aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-06-10 12:45:21 +0200
committerThierry Crozat2019-07-28 15:09:14 +0100
commit4500cd0bfb8a8d7b3cc313a2b89ee1ddb1fdb324 (patch)
tree8746e51e57d5ec9c2781fb03779aa441257d6944
parent801c684218b91bbb10be27e95e3abfa87ff8de21 (diff)
downloadscummvm-rg350-4500cd0bfb8a8d7b3cc313a2b89ee1ddb1fdb324.tar.gz
scummvm-rg350-4500cd0bfb8a8d7b3cc313a2b89ee1ddb1fdb324.tar.bz2
scummvm-rg350-4500cd0bfb8a8d7b3cc313a2b89ee1ddb1fdb324.zip
SUPERNOVA2: Add Mask room
-rw-r--r--engines/supernova2/ms2_def.h8
-rw-r--r--engines/supernova2/resman.cpp2
-rw-r--r--engines/supernova2/rooms.cpp35
3 files changed, 38 insertions, 7 deletions
diff --git a/engines/supernova2/ms2_def.h b/engines/supernova2/ms2_def.h
index e82985989a..c457bf7c2e 100644
--- a/engines/supernova2/ms2_def.h
+++ b/engines/supernova2/ms2_def.h
@@ -151,8 +151,8 @@ kString105, kStringSuctionCup, kString107, kStringOpening, kStringLetter,
kStringMassive, kStringInscriptionDescription, kStringPyramid0, kStringPyramid1, kStringPyramid2,
kStringPyramid3, kStringPyramid4, kStringPiece, kStringPyramid5, kStringPyramid6,
kStringPyramid7, kStringPyramid8, kStringPyramid9, kStringPyramid10, kStringPyramid11,
-kStringPyramid12, kStringPyramid13, kStringPyramid14, kStringPyramid15, kString129,
-kString130, kString131, kStringDirection1, kStringDirection2, kStringDirection3,
+kStringPyramid12, kStringPyramid13, kStringPyramid14, kStringPyramid15, kStringPyramid17,
+kStringPyramid18, kStringPyramid19, kStringDirection1, kStringDirection2, kStringDirection3,
kStringDirection4, kStringRope, kStringSign, kStringSignDescription, kStringEntrance1Description,
kStringPyramid, kStringPyramidDescription, kStringSun, kStringSunDescription, kStringSign5Description,
kStringRight, kStringLeft, kStringButton, kStringInscription, kStringTomato,
@@ -161,7 +161,7 @@ kStringEyes, kStringMouth, kStringMonster1Description, kStringNote, kStringNoteD
kStringOpeningDescription1, kStringOpeningDescription2, kStringNoteDescription1, kStringSlot, kStringSlotDescription3,
kStringOpeningDescription3, kStringStones, kStringPlate, kStringCoffin, kStringExit,
kStringCreepy, kStringToothbrush, kStringToothbrushDescription1, kStringToothpaste, kStringBall,
-kStringBallDescription, kString176, kString177, kStringDefaultDescription, kStringLooksMetal,
+kStringBallDescription, kStringEye, kStringEyeDescription, kStringDefaultDescription, kStringLooksMetal,
kStringTaxiArrives, kStringNothingHappens, kStringEmpty, kStringWalletOpen, kStringAttachMagnet,
kStringPoleMagnet, kStringCunning, kStringMustBuyFirst, kStringInsertChip, kStringTransferCD,
kStringCDNotInserted, kStringRemoveChip, kStringChipNotInserted, kStringWhatFor, kStringMMCD,
@@ -249,7 +249,7 @@ kStringIntroTV3, kStringIntroTV4, kStringIntroTV5, kStringIntroTV6, kStringIntro
kStringIntroTV8, kStringIntroTV9, kStringIntroTV10, kStringIntroTV11, kStringIntroTV12,
kStringIntroTV13, kStringIntroTV14, kStringIntroTV15, kStringIntroTV16, kStringIntro9,
kStringIntro10, kStringIntro11, kStringIntro12, kStringIntro13, kStringIntro14,
-kStringMonsterDescription, kStringDialogSeparator
+kStringMonsterDescription, kStringPyramid16, kStringDialogSeparator
};
ObjectType operator|(ObjectType a, ObjectType b);
diff --git a/engines/supernova2/resman.cpp b/engines/supernova2/resman.cpp
index 7074731a55..05ad7bdc12 100644
--- a/engines/supernova2/resman.cpp
+++ b/engines/supernova2/resman.cpp
@@ -56,7 +56,7 @@ static const AudioInfo audioInfo[kAudioNumSamples] = {
{53, 5010, 30020},
{55, 18230, -1},
{55, 17020, 18230},
- {53, 0, 5210},
+ {53, 0, 5010},
{47, 17020, -1},
{51, 9020, -1},
{51, 0, 6010},
diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp
index 60d96d6a44..748607039d 100644
--- a/engines/supernova2/rooms.cpp
+++ b/engines/supernova2/rooms.cpp
@@ -3729,9 +3729,14 @@ Mask::Mask(Supernova2Engine *vm, GameManager *gm) {
_vm = vm;
_gm = gm;
- _fileNumber = 6;
+ _fileNumber = 18;
_id = MASK;
_shown[0] = kShownTrue;
+
+ _objectState[0] = Object(_id, kStringExit, kStringDefaultDescription, NULLOBJECT, EXIT, 255, 255, 0, COFFIN_ROOM, 22);
+ _objectState[1] = Object(_id, kStringEye, kStringEyeDescription, EYE1, NULLTYPE, 0, 0, 0);
+ _objectState[2] = Object(_id, kStringEye, kStringEyeDescription, EYE2, NULLTYPE, 1, 1, 0);
+ _objectState[3] = Object(_id, kStringMouth, kStringDefaultDescription, NULLOBJECT, NULLTYPE, 2, 2, 0);
}
void Mask::onEntrance() {
@@ -3742,7 +3747,33 @@ void Mask::animation() {
}
bool Mask::interact(Action verb, Object &obj1, Object &obj2) {
- return true;
+ if (verb == ACTION_OPEN && (obj1._id == EYE1 || obj1._id == EYE2)) {
+ if (obj1._type & OPENED)
+ _vm->renderMessage(kStringPyramid16);
+ else
+ _vm->renderImage(obj1._id - EYE1 + 1);
+ if (isSectionVisible(1) && isSectionVisible(2)) {
+ _gm->reply(kStringPyramid17, 3, 3 + 128);
+ _gm->reply(kStringPyramid18, 3, 3 + 128);
+ _gm->reply(kStringPyramid19, 3, 3 + 128);
+ _vm->playSound(kAudioAppearance1);
+ while(_vm->_sound->isPlaying())
+ _gm->wait(1);
+ _vm->paletteFadeOut();
+ _vm->loadGame(kSleepAutosaveSlot);
+ _gm->changeRoom(CABIN);
+ _gm->_newRoom = true;
+ _gm->drawGUI();
+ _gm->_rooms[CABIN]->setSectionVisible(2, kShownTrue);
+ _gm->_rooms[CABIN]->setSectionVisible(kMaxSection - 1, kShownFalse);
+ _gm->_rooms[CABIN]->setSectionVisible(kMaxSection - 2, kShownTrue);
+ _gm->_rooms[CABIN]->setSectionVisible(1, kShownFalse);
+ _gm->_rooms[CABIN]->getObject(2)->_click = 8;
+ _gm->_state._eventTime = kMaxTimerValue;
+ }
+ return true;
+ }
+ return false;
}
Museum::Museum(Supernova2Engine *vm, GameManager *gm) {