aboutsummaryrefslogtreecommitdiff
path: root/engines/supernova2/rooms.cpp
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-06-10 08:03:42 +0200
committerThierry Crozat2019-07-28 15:09:14 +0100
commit559f6b4e2886d7a292cd81e1c61621f3394c9369 (patch)
treece4aea2c61df7875fa80a0153a0222350e5b634a /engines/supernova2/rooms.cpp
parent2d4b37233d3aa0bb8ca170f8f8c0358c2e78c405 (diff)
downloadscummvm-rg350-559f6b4e2886d7a292cd81e1c61621f3394c9369.tar.gz
scummvm-rg350-559f6b4e2886d7a292cd81e1c61621f3394c9369.tar.bz2
scummvm-rg350-559f6b4e2886d7a292cd81e1c61621f3394c9369.zip
SUPERNOVA2: Add TomatoF room
Diffstat (limited to 'engines/supernova2/rooms.cpp')
-rw-r--r--engines/supernova2/rooms.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp
index bd4c59c364..ef0150e6e7 100644
--- a/engines/supernova2/rooms.cpp
+++ b/engines/supernova2/rooms.cpp
@@ -2976,9 +2976,15 @@ TomatoF::TomatoF(Supernova2Engine *vm, GameManager *gm) {
_vm = vm;
_gm = gm;
- _fileNumber = 6;
+ _fileNumber = 14;
_id = TOMATO_F;
_shown[0] = kShownTrue;
+ _shown[4] = kShownTrue;
+ _shown[15] = kShownTrue;
+
+ _objectState[0] = Object(_id, kStringRight, kStringDefaultDescription, G_RIGHT, EXIT, 12, 12, 0, PYR_ENTRANCE, 14);
+ _objectState[1] = Object(_id, kStringLeft, kStringDefaultDescription, G_LEFT, EXIT, 11, 11, 0, PYR_ENTRANCE, 10);
+ _objectState[2] = Object(_id, kStringTomato, kStringFunny, CORRIDOR, EXIT, 3, 3, 0, PYR_ENTRANCE, 2);
}
void TomatoF::onEntrance() {
@@ -2989,6 +2995,11 @@ void TomatoF::animation() {
}
bool TomatoF::interact(Action verb, Object &obj1, Object &obj2) {
+ if (!_gm->move(verb, obj1))
+ return false;
+ if (obj1._id == CORRIDOR)
+ _gm->changeRoom(TOMATO_N);
+ _gm->_newRoom = true;
return true;
}