aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-06-07 11:33:15 +0200
committerThierry Crozat2019-07-28 15:09:14 +0100
commitaa7b4a2c97ed319aa01bbff0bfa496ad50b327c8 (patch)
treee132a85abe632523d2d8fda23e0b9f1d6af8d7a2
parent29f83a0887eaeb53f08f874e5767c8699991cd1f (diff)
downloadscummvm-rg350-aa7b4a2c97ed319aa01bbff0bfa496ad50b327c8.tar.gz
scummvm-rg350-aa7b4a2c97ed319aa01bbff0bfa496ad50b327c8.tar.bz2
scummvm-rg350-aa7b4a2c97ed319aa01bbff0bfa496ad50b327c8.zip
SUPERNOVA2: Add Upstairs1 room
-rw-r--r--engines/supernova2/rooms.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp
index 87b2cea512..9f387a1c13 100644
--- a/engines/supernova2/rooms.cpp
+++ b/engines/supernova2/rooms.cpp
@@ -2399,9 +2399,15 @@ Upstairs1::Upstairs1(Supernova2Engine *vm, GameManager *gm) {
_vm = vm;
_gm = gm;
- _fileNumber = 6;
+ _fileNumber = 10;
_id = UPSTAIRS1;
_shown[0] = kShownTrue;
+ _shown[1] = 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 Upstairs1::onEntrance() {
@@ -2412,6 +2418,16 @@ void Upstairs1::animation() {
}
bool Upstairs1::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;
+ }
+ _gm->passageConstruction();
+ _gm->_newRoom = true;
return true;
}