diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/hotspots.cpp | 4 | ||||
-rw-r--r-- | engines/mads/scene.cpp | 19 | ||||
-rw-r--r-- | engines/mads/screen.cpp | 2 | ||||
-rw-r--r-- | engines/mads/user_interface.cpp | 15 |
4 files changed, 13 insertions, 27 deletions
diff --git a/engines/mads/hotspots.cpp b/engines/mads/hotspots.cpp index ca05ad618c..d3ce0a9263 100644 --- a/engines/mads/hotspots.cpp +++ b/engines/mads/hotspots.cpp @@ -182,13 +182,13 @@ Hotspot::Hotspot(Common::SeekableReadStream &f, bool isV2) { _articleNumber = f.readByte(); _active = f.readByte() != 0; _cursor = (CursorType)f.readByte(); - _vocabId = f.readUint16LE(); - _verbId = f.readUint16LE(); if (isV2) { // This looks to be some sort of bitmask. Perhaps it signifies // the valid verbs for this hotspot f.skip(2); // unknown } + _vocabId = f.readUint16LE(); + _verbId = f.readUint16LE(); } /*------------------------------------------------------------------------*/ diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp index e53061c750..62a0e2031c 100644 --- a/engines/mads/scene.cpp +++ b/engines/mads/scene.cpp @@ -477,26 +477,15 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) { // Copy background for the dirty areas to the screen _dirtyAreas.copy(&_backgroundSurface, &_vm->_screen, _posAdjust); - // TODO: Remove this HACK when sprites are implemented for V2 games - if (_vm->getGameID() != GType_RexNebular) { - if (transitionType) { - // Fading in the screen - _vm->_screen.transition(transitionType, surfaceFlag); - _vm->_sound->startQueuedCommands(); - } else { - // Copy dirty areas to the screen - _dirtyAreas.copyToScreen(_vm->_screen._offset); - } - return; - } - // Handle dirty areas for foreground objects - _spriteSlots.setDirtyAreas(); + if (_vm->getGameID() == GType_RexNebular) // TODO: Implement for V2 games + _spriteSlots.setDirtyAreas(); _textDisplay.setDirtyAreas2(); _dirtyAreas.merge(1, DIRTY_AREAS_SIZE); // Draw sprites that have changed - _spriteSlots.drawSprites(&_vm->_screen); + if (_vm->getGameID() == GType_RexNebular) // TODO: Implement for V2 games + _spriteSlots.drawSprites(&_vm->_screen); // Draw text elements onto the view _textDisplay.draw(&_vm->_screen); diff --git a/engines/mads/screen.cpp b/engines/mads/screen.cpp index 640617e127..f0564c5fbc 100644 --- a/engines/mads/screen.cpp +++ b/engines/mads/screen.cpp @@ -259,7 +259,7 @@ ScreenObjects::ScreenObjects(MADSEngine *vm) : _vm(vm) { } void ScreenObjects::add(const Common::Rect &bounds, Layer layer, ScrCategory category, int descId) { - assert(size() < 100); + //assert(size() < 100); ScreenObject so; so._bounds = bounds; diff --git a/engines/mads/user_interface.cpp b/engines/mads/user_interface.cpp index 8208c14f4d..e8eaf3ad44 100644 --- a/engines/mads/user_interface.cpp +++ b/engines/mads/user_interface.cpp @@ -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); } } |