MADS: Fix loading of V2 hotspots

This commit is contained in:
Filippos Karapetis 2014-05-06 04:39:12 +03:00
parent c5878e401c
commit d88e165e00
4 changed files with 13 additions and 27 deletions

View file

@ -704,15 +704,12 @@ void UserInterface::loadElements() {
CAT_INV_ANIM, 0);
}
// TODO: Implement for V2 games
if (_vm->getGameID() == GType_RexNebular) {
if (_vm->_game->_screenObjects._inputMode == kInputBuildingSentences ||
_vm->_game->_screenObjects._inputMode == kInputLimitedSentences) {
_categoryIndexes[CAT_HOTSPOT - 1] = _vm->_game->_screenObjects.size() + 1;
for (int hotspotIdx = scene._hotspots.size() - 1; hotspotIdx >= 0; --hotspotIdx) {
Hotspot &hs = scene._hotspots[hotspotIdx];
_vm->_game->_screenObjects.add(hs._bounds, LAYER_GUI, CAT_HOTSPOT, hotspotIdx);
}
if (_vm->_game->_screenObjects._inputMode == kInputBuildingSentences ||
_vm->_game->_screenObjects._inputMode == kInputLimitedSentences) {
_categoryIndexes[CAT_HOTSPOT - 1] = _vm->_game->_screenObjects.size() + 1;
for (int hotspotIdx = scene._hotspots.size() - 1; hotspotIdx >= 0; --hotspotIdx) {
Hotspot &hs = scene._hotspots[hotspotIdx];
_vm->_game->_screenObjects.add(hs._bounds, LAYER_GUI, CAT_HOTSPOT, hotspotIdx);
}
}