diff options
Diffstat (limited to 'engines/supernova')
-rw-r--r-- | engines/supernova/rooms.cpp | 28 | ||||
-rw-r--r-- | engines/supernova/state.cpp | 18 | ||||
-rw-r--r-- | engines/supernova/state.h | 1 |
3 files changed, 45 insertions, 2 deletions
diff --git a/engines/supernova/rooms.cpp b/engines/supernova/rooms.cpp index 1c7b647cd1..8c0cbd62be 100644 --- a/engines/supernova/rooms.cpp +++ b/engines/supernova/rooms.cpp @@ -2831,8 +2831,32 @@ bool AxacussBcorridor::interact(Action verb, Object &obj1, Object &obj2) { } bool AxacussIntersection::interact(Action verb, Object &obj1, Object &obj2) { - // STUB - return false; + if (((verb == ACTION_WALK) || (verb == ACTION_OPEN)) && (obj1._id == DOOR) && !isSectionVisible(1)) + _gm->guardShot(); + else if ((verb == ACTION_OPEN) && (obj1._id == DOOR) && !obj1.hasProperty(OPENED)) { + _gm->_rooms[CORRIDOR9]->setSectionVisible(27, true); + _gm->_rooms[CORRIDOR9]->setSectionVisible(28, false); + _gm->_rooms[CORRIDOR9]->getObject(1)->setProperty(OPENED); + return false; + } else if ((verb == ACTION_CLOSE) && (obj1._id == DOOR) && obj1.hasProperty(OPENED)) { + _gm->_rooms[CORRIDOR9]->setSectionVisible(27, false); + _gm->_rooms[CORRIDOR9]->setSectionVisible(28, true); + _gm->_rooms[CORRIDOR9]->getObject(1)->disableProperty(OPENED); + return false; + } else if ((verb == ACTION_TALK) && (obj1._id == GUARDIAN)) { + // FIXME: refactor _rowsX and _dialogsX + // _gm->dialog(3, &rowsx, &_dialogsX, 0); + _gm->guardShot(); + } else if ((verb == ACTION_TAKE) && (obj1._id == MASTERKEYCARD)) { + _gm->great(0); + setSectionVisible(7, false); + return false; + } 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 AxacussExit::interact(Action verb, Object &obj1, Object &obj2) { diff --git a/engines/supernova/state.cpp b/engines/supernova/state.cpp index 7886225fd8..4c697c802e 100644 --- a/engines/supernova/state.cpp +++ b/engines/supernova/state.cpp @@ -1930,4 +1930,22 @@ void GameManager::executeRoom() { _currentRoom->onEntrance(); } +void GameManager::guardShot() { + drawImage(2); + drawImage(5); + wait2(3); + drawImage(2); + + _vm->playSound(kAudioVoiceHalt); + while (_vm->_mixer->isSoundHandleActive(_vm->_soundHandle)) + wait2(1); + + drawImage(5); + wait2(5); + drawImage(3); + wait2(3); + + shot(4, 3); +} + } diff --git a/engines/supernova/state.h b/engines/supernova/state.h index 1b993d145b..30bb7eb4a7 100644 --- a/engines/supernova/state.h +++ b/engines/supernova/state.h @@ -214,6 +214,7 @@ public: void taxiEvent(); void searchStartEvent(); void outro(); + void guardShot(); }; } |