diff options
-rw-r--r-- | engines/supernova2/rooms.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp index b6fa63fe1c..4a9a2a2e53 100644 --- a/engines/supernova2/rooms.cpp +++ b/engines/supernova2/rooms.cpp @@ -2602,9 +2602,14 @@ Upstairs2::Upstairs2(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 10; _id = UPSTAIRS2; _shown[0] = kShownTrue; + _shown[2] = kShownTrue; + + _objectState[0] = Object(_id, kStringRight, kStringDefaultDescription, G_RIGHT, EXIT, 1, 1, 0, PYR_ENTRANCE, 14); + _objectState[1] = Object(_id, kStringLeft, kStringDefaultDescription, G_LEFT, EXIT, 2, 2, 0, PYR_ENTRANCE, 10); + _objectState[2] = Object(_id, kStringCorridor, kStringDefaultDescription, CORRIDOR, EXIT, 0, 0, 0, PYR_ENTRANCE, 2); } void Upstairs2::onEntrance() { @@ -2615,6 +2620,19 @@ void Upstairs2::animation() { } bool Upstairs2::interact(Action verb, Object &obj1, Object &obj2) { + if (!_gm->move(verb, obj1)) + return false; + if (obj1._id == CORRIDOR) { + if (_gm->_state._pyraE) + _gm->_state._pyraE = 0; + else + _gm->_state._pyraE = 1; + } + if (obj1._id == G_RIGHT) + _gm->changeRoom(BOTTOM_LEFT_DOOR); + else + _gm->passageConstruction(); + _gm->_newRoom = true; return true; } |