diff options
author | Strangerke | 2017-11-14 21:33:33 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-01-23 02:15:39 +0000 |
commit | d189820ce3c01060f1cf834d269f815e4198516b (patch) | |
tree | 9b31248d5c9b2868adb00b572fd0fdb8be763a3f | |
parent | d1d1d988b08ba19f4daa095eff6ee64ef9c19c77 (diff) | |
download | scummvm-rg350-d189820ce3c01060f1cf834d269f815e4198516b.tar.gz scummvm-rg350-d189820ce3c01060f1cf834d269f815e4198516b.tar.bz2 scummvm-rg350-d189820ce3c01060f1cf834d269f815e4198516b.zip |
SUPERNOVA: Implement AxacussExit interaction logic
-rw-r--r-- | engines/supernova/rooms.cpp | 29 | ||||
-rw-r--r-- | engines/supernova/state.cpp | 13 | ||||
-rw-r--r-- | engines/supernova/state.h | 2 |
3 files changed, 41 insertions, 3 deletions
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp index 8c0cbd62be..7bae002b6b 100644 --- a/engines/supernova/rooms.cpp +++ b/engines/supernova/rooms.cpp @@ -2860,8 +2860,33 @@ bool AxacussIntersection::interact(Action verb, Object &obj1, Object &obj2) { } bool AxacussExit::interact(Action verb, Object &obj1, Object &obj2) { - // STUB - return false; + if (((verb == ACTION_WALK) || (verb == ACTION_OPEN)) && (obj1._id == DOOR) && !_gm->_state._powerOff) + _gm->guard3Shot(); + else if ((verb == ACTION_TALK) && (obj1._id == GUARDIAN)) { + // FIXME: refactor _rowsX and _dialogsX + // _gm->dialog(3, &_rowsX, &_dialogsX,0); + _gm->guard3Shot(); + } else if ((verb == ACTION_USE) && Object::combine(obj1, obj2, LAMP, MAGNET)) { + _gm->_inventory.remove(*_gm->_rooms[CELL]->getObject(7)); + for (int i = 4; i <= 11; i++) { + _gm->drawImage(i); + if (i == 11) + _vm->playSound(kAudioUndef2); // 046/4020 + _gm->wait2(1); + _gm->drawImage(i + 128); + } + _gm->_state._powerOff = true; + _gm->_currentRoom->getObject(5)->_click = 255; + + _gm->search(450); + _gm->roomBrightness(); + _vm->paletteBrightness(); + } else if ((verb == ACTION_USE) && (Object::combine(obj1,obj2,MAGNET,GUARDIAN) || Object::combine(obj1,obj2,KNIFE,GUARDIAN))) + _vm->renderMessage(kStringArsanoEntrance27); + else + return false; + + return true; } bool AxacussOffice1::interact(Action verb, Object &obj1, Object &obj2) { diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 4c697c802e..27ad9da381 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -1948,4 +1948,17 @@ void GameManager::guardShot() { shot(4, 3); } +void GameManager::guard3Shot() { + drawImage(1); + wait2(3); + _vm->playSound(kAudioVoiceHalt); // 46/0 + while (_vm->_mixer->isSoundHandleActive(_vm->_soundHandle)) + wait2(1); + + wait2(5); + drawImage(2); + wait2(3); + shot(3,2); +} + } diff --git a/engines/supernova/state.h b/engines/supernova/state.h index 30bb7eb4a7..91a066e71c 100644 --- a/engines/supernova/state.h +++ b/engines/supernova/state.h @@ -167,7 +167,6 @@ public: bool saveGame(int number); void errorTemp(); void roomBrightness(); - void palette(); void showMenu(); void animationOff(); void animationOn(); @@ -215,6 +214,7 @@ public: void searchStartEvent(); void outro(); void guardShot(); + void guard3Shot(); }; } |