aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-06-10 09:11:42 +0200
committerThierry Crozat2019-07-28 15:09:14 +0100
commitf022350257ed6b286ab6e208e5469fc36c271837 (patch)
tree0e61ee2eceeb2fae629b8bedd3c90ee780dce90c /engines
parent103bd737a52db092a1b5295a10a281a7aaec46e6 (diff)
downloadscummvm-rg350-f022350257ed6b286ab6e208e5469fc36c271837.tar.gz
scummvm-rg350-f022350257ed6b286ab6e208e5469fc36c271837.tar.bz2
scummvm-rg350-f022350257ed6b286ab6e208e5469fc36c271837.zip
SUPERNOVA2: Add Monster1N room
Diffstat (limited to 'engines')
-rw-r--r--engines/supernova2/ms2_def.h10
-rw-r--r--engines/supernova2/rooms.cpp61
2 files changed, 64 insertions, 7 deletions
diff --git a/engines/supernova2/ms2_def.h b/engines/supernova2/ms2_def.h
index 46747a9fed..4146a11451 100644
--- a/engines/supernova2/ms2_def.h
+++ b/engines/supernova2/ms2_def.h
@@ -149,15 +149,15 @@ kStringEntrance, kStringDoor, kString97, kString98, kString99,
kString100, kStringCorridor, kString102, kStringDinosaurHead, kString104,
kString105, kStringSuctionCup, kString107, kStringOpening, kString109,
kStringMassive, kStringInscriptionDescription, kStringPyramid0, kStringPyramid1, kStringPyramid2,
-kStringPyramid3, kStringPyramid4, kStringPiece, kStringPyramid5, kString119,
+kStringPyramid3, kStringPyramid4, kStringPiece, kStringPyramid5, kStringPyramid6,
kString120, kString121, kString122, kString123, kString124,
kString125, kString126, kString127, kString128, kString129,
kString130, kString131, kStringDirection1, kStringDirection2, kStringDirection3,
kStringDirection4, kStringRope, kStringSign, kStringSignDescription, kStringEntrance1Description,
kStringPyramid, kStringPyramidDescription, kStringSun, kStringSunDescription, kStringSign5Description,
kStringRight, kStringLeft, kStringButton, kStringInscription, kStringTomato,
-kStringFunnyDescription, kStringKnife1, kStringKnife1Description, kString153, kString154,
-kString155, kString156, kString157, kString158, kString159,
+kStringFunnyDescription, kStringKnife1, kStringKnife1Description, kStringMonster, kStringRopeDescription,
+kStringEyes, kStringMouth, kStringMonster1Description, kString158, kString159,
kString160, kString161, kString162, kStringSlot, kString164,
kString165, kString166, kString167, kString168, kStringExit,
kString170, kStringToothbrush, kString172, kString173, kString174,
@@ -248,8 +248,8 @@ kStringIntro6, kStringIntro7, kStringIntro8, kStringIntroTV1, kStringIntroTV2,
kStringIntroTV3, kStringIntroTV4, kStringIntroTV5, kStringIntroTV6, kStringIntroTV7,
kStringIntroTV8, kStringIntroTV9, kStringIntroTV10, kStringIntroTV11, kStringIntroTV12,
kStringIntroTV13, kStringIntroTV14, kStringIntroTV15, kStringIntroTV16, kStringIntro9,
-kStringIntro10, kStringIntro11, kStringIntro12, kStringIntro13, kStringIntro14,
-kStringDialogSeparator
+kStringIntro10, kStringIntro11, kStringIntro12, kStringIntro13, kStringIntro14,
+kStringMonsterDescription, kStringDialogSeparator
};
ObjectType operator|(ObjectType a, ObjectType b);
diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp
index d7a0042b3f..a20a96ddc3 100644
--- a/engines/supernova2/rooms.cpp
+++ b/engines/supernova2/rooms.cpp
@@ -3042,9 +3042,15 @@ MonsterF::MonsterF(Supernova2Engine *vm, GameManager *gm) {
_vm = vm;
_gm = gm;
- _fileNumber = 6;
+ _fileNumber = 14;
_id = MONSTER_F;
_shown[0] = kShownTrue;
+ _shown[1] = kShownTrue;
+ _shown[14] = 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, kStringMonster, kStringMonsterDescription, CORRIDOR, EXIT, 0, 0, 0, PYR_ENTRANCE, 2);
}
void MonsterF::onEntrance() {
@@ -3055,6 +3061,15 @@ void MonsterF::animation() {
}
bool MonsterF::interact(Action verb, Object &obj1, Object &obj2) {
+ if (!_gm->move(verb, obj1))
+ return false;
+ if (obj1._id == CORRIDOR) {
+ if (_gm->_state._pyraS == 4)
+ _gm->changeRoom(MONSTER1_N);
+ else
+ _gm->changeRoom(MONSTER2_N);
+ }
+ _gm->_newRoom = true;
return true;
}
@@ -3062,9 +3077,17 @@ Monster1N::Monster1N(Supernova2Engine *vm, GameManager *gm) {
_vm = vm;
_gm = gm;
- _fileNumber = 6;
+ _fileNumber = 13;
_id = MONSTER1_N;
_shown[0] = kShownTrue;
+ _shown[1] = kShownTrue;
+
+ _objectState[0] = Object(_id, kStringRight, kStringDefaultDescription, G_RIGHT, EXIT, 8, 8, 0, PYR_ENTRANCE, 14);
+ _objectState[1] = Object(_id, kStringLeft, kStringDefaultDescription, G_LEFT, EXIT, 7, 7, 0, PYR_ENTRANCE, 10);
+ _objectState[2] = Object(_id, kStringRope, kStringRopeDescription, ROPE, TAKE | COMBINABLE, 255, 255, 2);
+ _objectState[3] = Object(_id, kStringEyes, kStringDefaultDescription, NULLOBJECT, NULLTYPE, 6, 6, 0);
+ _objectState[4] = Object(_id, kStringMouth, kStringDefaultDescription, MOUTH, NULLTYPE, 1, 1, 0);
+ _objectState[5] = Object(_id, kStringMonster, kStringMonster1Description, MONSTER, NULLTYPE, 0, 0, 0);
}
void Monster1N::onEntrance() {
@@ -3075,6 +3098,40 @@ void Monster1N::animation() {
}
bool Monster1N::interact(Action verb, Object &obj1, Object &obj2) {
+ if (_gm->move(verb, obj1)) {
+ _gm->passageConstruction();
+ _gm->_newRoom = true;
+ } else if ((verb == ACTION_OPEN || verb == ACTION_PULL) && obj1._id == MOUTH) {
+ if (obj1._type & OPENED)
+ _vm->renderMessage(kStringGenericInteract8);
+ else {
+ obj1._type |= OPENED;
+ if (isSectionVisible(kMaxSection - 1))
+ _vm->renderImage(2);
+ else {
+ _objectState[2]._click = 1;
+ _vm->renderImage(4);
+ setSectionVisible(2, kShownFalse);
+ }
+ _vm->playSound(kAudioTaxiOpen);
+ }
+ } else if (verb == ACTION_CLOSE && obj1._id == MOUTH) {
+ if (obj1._type & OPENED) {
+ _vm->renderImage(1);
+ setSectionVisible(2, kShownFalse);
+ obj1._type &= ~OPENED;
+ _vm->playSound(kAudioElevator1);
+ } else
+ _vm->renderMessage(kStringGenericInteract11);
+ } else if (verb == ACTION_TAKE && (obj1._id == ROPE || obj1._id == NOTE)) {
+ _gm->takeObject(obj1);
+ setSectionVisible(3, kShownFalse);
+ setSectionVisible(4, kShownFalse);
+ setSectionVisible(kMaxSection - 1, kShownTrue);
+ } else if (verb == ACTION_USE && Object::combine(obj1, obj2, TKNIFE, MONSTER)) {
+ _vm->renderMessage(kStringPyramid6);
+ } else
+ return false;
return true;
}