diff options
Diffstat (limited to 'engines/supernova2')
-rw-r--r-- | engines/supernova2/ms2_def.h | 8 | ||||
-rw-r--r-- | engines/supernova2/rooms.cpp | 158 |
2 files changed, 151 insertions, 15 deletions
diff --git a/engines/supernova2/ms2_def.h b/engines/supernova2/ms2_def.h index acca6f2c04..d3b94c579a 100644 --- a/engines/supernova2/ms2_def.h +++ b/engines/supernova2/ms2_def.h @@ -119,7 +119,7 @@ enum ObjectId { SCRIBBLE1,SCRIBBLE2,BELL,KEYPAD,DOOR_L,DOOR_R,ID_CARD, MAGNET,UNDER_BED,KEY,HATCH,CABINET,DISCMAN, SMALL_DOOR,BACK_MONEY,WALL,SUCTION_CUP,IMITATION,SP_KEYCARD,ALARM_CRACKER, - ENCRYPTED_DOOR,ALARM_ANLAGE,MUS_STREET,BIG_DOOR,MUSIC_SYSTEM, + ENCRYPTED_DOOR,ALARM_SYSTEM,MUS_STREET,BIG_DOOR,MUSIC_SYSTEM, HANDLE,SWITCH,DOOR_SWITCH,SUIT,CABLE,RCABLE, MUSCARD,HEAD, DISPLAY }; @@ -143,11 +143,11 @@ kString65, kString66, kString67, kString68, kString69, kStringMuseum8, kStringMuseum9, kStringMuseum7, kStringMuseum6, kStringMuseum15, kStringMuseum16, kStringMuseum10, kStringMuseum12, kStringMuseum13, kStringMuseum14, kStringMuseum1, kStringMuseum2, kStringMuseum3, kStringMuseum4, kStringMuseum5, -kString85, kString86, kString87, kString88, kString89, -kString90, kString91, kString92, kStringDinosaur, kStringDinosaurDescription, +kString85, kString86, kStringMuseum17, kStringMuseum18, kStringMuseum19, +kStringMuseum20, kStringMuseum21, kStringMuseum22, kStringDinosaur, kStringDinosaurDescription, kStringEntrance, kStringDoor, kStringRoad, kStringCamera, kStringCameraDescription, kStringMainEntrance, kStringCorridor, kStringDinosaurDescription2, kStringDinosaurHead, kStringDinosaurHeadDescription, -kString105, kStringSuctionCup, kString107, kStringOpening, kStringLetter, +kStringAlarmSystem, kStringSuctionCup, kStringWall, kStringOpening, kStringLetter, kStringMassive, kStringInscriptionDescription, kStringPyramid0, kStringPyramid1, kStringPyramid2, kStringPyramid3, kStringPyramid4, kStringPiece, kStringPyramid5, kStringPyramid6, kStringPyramid7, kStringPyramid8, kStringPyramid9, kStringPyramid10, kStringPyramid11, diff --git a/engines/supernova2/rooms.cpp b/engines/supernova2/rooms.cpp index 1402c8eddf..412f3c8365 100644 --- a/engines/supernova2/rooms.cpp +++ b/engines/supernova2/rooms.cpp @@ -4401,16 +4401,27 @@ Mus12::Mus12(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 37; _id = MUS12; _shown[0] = kShownTrue; + _shown[2] = kShownTrue; + _shown[3] = kShownTrue; + _shown[4] = kShownTrue; + _shown[5] = kShownTrue; + _shown[6] = kShownTrue; + _shown[13] = kShownTrue; + _shown[17] = kShownTrue; + + _objectState[0] = Object(_id, kStringCorridor, kStringDefaultDescription, NULLOBJECT, EXIT, 6, 6, 0, MUS_ROUND, 10); } void Mus12::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus12::animation() { + _gm->pressureAlarmCount(); } bool Mus12::interact(Action verb, Object &obj1, Object &obj2) { @@ -4421,16 +4432,26 @@ Mus13::Mus13(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 37; _id = MUS13; _shown[0] = kShownTrue; + _shown[3] = kShownTrue; + _shown[5] = kShownTrue; + _shown[6] = kShownTrue; + _shown[14] = kShownTrue; + _shown[16] = kShownTrue; + _objectState[0] = Object(_id, kStringCorridor, kStringDefaultDescription, NULLOBJECT, EXIT, 7, 7, 0, MUS_ROUND, 14); + _objectState[1] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 0, 0, 7, MUS14, 10); + _objectState[2] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 3, 3, 10, MUS15, 16); } void Mus13::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus13::animation() { + _gm->pressureAlarmCount(); } bool Mus13::interact(Action verb, Object &obj1, Object &obj2) { @@ -4441,16 +4462,27 @@ Mus14::Mus14(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 37; _id = MUS14; _shown[0] = kShownTrue; + _shown[1] = kShownTrue; + _shown[3] = kShownTrue; + _shown[4] = kShownTrue; + _shown[5] = kShownTrue; + _shown[6] = kShownTrue; + _shown[8] = kShownTrue; + _shown[15] = kShownTrue; + + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 1, 1, 8, MUS13, 14); } void Mus14::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus14::animation() { + _gm->pressureAlarmCount(); } bool Mus14::interact(Action verb, Object &obj1, Object &obj2) { @@ -4461,16 +4493,23 @@ Mus15::Mus15(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 36; _id = MUS15; _shown[0] = kShownTrue; + _shown[3] = kShownTrue; + _shown[8] = kShownTrue; + + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 0, 0, 3, MUS13, 2); + _objectState[1] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 1, 1, 4, MUS16, 22); } void Mus15::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus15::animation() { + _gm->pressureAlarmCount(); } bool Mus15::interact(Action verb, Object &obj1, Object &obj2) { @@ -4481,16 +4520,23 @@ Mus16::Mus16(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 36; _id = MUS16; _shown[0] = kShownTrue; + _shown[3] = kShownTrue; + _shown[10] = kShownTrue; + + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 0, 0, 3, MUS15, 2); + _objectState[1] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 1, 1, 4, MUS17, 22); } void Mus16::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus16::animation() { + _gm->pressureAlarmCount(); } bool Mus16::interact(Action verb, Object &obj1, Object &obj2) { @@ -4501,16 +4547,27 @@ Mus17::Mus17(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 37; _id = MUS17; _shown[0] = kShownTrue; + _shown[1] = kShownTrue; + _shown[6] = kShownTrue; + _shown[9] = kShownTrue; + _shown[17] = kShownTrue; + + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 2, 2, 9, MUS16, 6); + _objectState[1] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 1, 1, 8, MUS21, 14); + _objectState[2] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 3, 3, 10, MUS18, 16); + _objectState[3] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 4, 4, 11, MUS20, 8); } void Mus17::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus17::animation() { + _gm->pressureAlarmCount(); } bool Mus17::interact(Action verb, Object &obj1, Object &obj2) { @@ -4521,16 +4578,23 @@ Mus18::Mus18(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 36; _id = MUS18; _shown[0] = kShownTrue; + _shown[3] = kShownTrue; + _shown[11] = kShownTrue; + + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 0, 0, 3, MUS17, 2); + _objectState[1] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 1, 1, 4, MUS19, 22); } void Mus18::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus18::animation() { + _gm->pressureAlarmCount(); } bool Mus18::interact(Action verb, Object &obj1, Object &obj2) { @@ -4541,16 +4605,27 @@ Mus19::Mus19(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 37; _id = MUS19; _shown[0] = kShownTrue; + _shown[1] = kShownTrue; + _shown[2] = kShownTrue; + _shown[3] = kShownTrue; + _shown[4] = kShownTrue; + _shown[6] = kShownTrue; + _shown[11] = kShownTrue; + _shown[15] = kShownTrue; + + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 4, 4, 11, MUS18, 8); } void Mus19::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus19::animation() { + _gm->pressureAlarmCount(); } bool Mus19::interact(Action verb, Object &obj1, Object &obj2) { @@ -4561,16 +4636,22 @@ Mus20::Mus20(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 36; _id = MUS20; _shown[0] = kShownTrue; + _shown[1] = kShownTrue; + _shown[4] = kShownTrue; + _shown[7] = kShownTrue; + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 1, 1, 4, MUS17, 22); } void Mus20::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus20::animation() { + _gm->pressureAlarmCount(); } bool Mus20::interact(Action verb, Object &obj1, Object &obj2) { @@ -4581,16 +4662,27 @@ Mus21::Mus21(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 37; _id = MUS21; _shown[0] = kShownTrue; + _shown[2] = kShownTrue; + _shown[3] = kShownTrue; + _shown[5] = kShownTrue; + _shown[6] = kShownTrue; + _shown[7] = kShownTrue; + _shown[18] = kShownTrue; + + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 0, 0, 7, MUS17, 10); + _objectState[1] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE, 3, 3, 10, MUS22, 16); } void Mus21::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus21::animation() { + _gm->pressureAlarmCount(); } bool Mus21::interact(Action verb, Object &obj1, Object &obj2) { @@ -4601,19 +4693,63 @@ Mus22::Mus22(Supernova2Engine *vm, GameManager *gm) { _vm = vm; _gm = gm; - _fileNumber = 6; + _fileNumber = 36; _id = MUS22; _shown[0] = kShownTrue; + _shown[2] = kShownTrue; + _shown[3] = kShownTrue; + _shown[5] = kShownTrue; + _shown[9] = kShownTrue; + + _objectState[0] = Object(_id, kStringDoor, kStringDefaultDescription, NULLOBJECT, EXIT | OPENABLE | OPENED, 0, 0, 3, MUS21, 2); + _objectState[1] = Object(_id, kStringAlarmSystem, kStringDefaultDescription, ALARM_SYSTEM, COMBINABLE, 2, 2, 0); + _objectState[2] = Object(_id, kStringSuctionCup, kStringDefaultDescription, SUCTION_CUP, TAKE | COMBINABLE, 255, 255, 0); + _objectState[3] = Object(_id, kStringWall, kStringDefaultDescription, WALL, COMBINABLE, 4, 4, 0); } void Mus22::onEntrance() { + _gm->pressureAlarmEntrance(); setRoomSeen(true); } void Mus22::animation() { + _gm->pressureAlarmCount(); } bool Mus22::interact(Action verb, Object &obj1, Object &obj2) { + if (verb == ACTION_USE && Object::combine(obj1, obj2, SUCTION_CUP, WALL)) { + if (isSectionVisible(6)) + _vm->renderMessage(kStringMuseum17); + else { + _vm->renderImage(6); + _vm->renderMessage(kStringMuseum18); + _objectState[2]._click = 3; + if (obj1._id == SUCTION_CUP) + _gm->_inventory.remove(obj1); + else + _gm->_inventory.remove(obj2); + } + } else if (verb == ACTION_TAKE && obj1._id == SUCTION_CUP && + !(obj1._type & CARRIED)) { + _vm->renderImage(2); + setSectionVisible(6, kShownFalse); + _vm->renderImage(5); + _gm->takeObject(obj1); + _vm->renderMessage(kStringMuseum19); + } else if (verb == ACTION_USE && + Object::combine(obj1, obj2, ALARM_CRACKER, ALARM_SYSTEM)) { + if (_gm->_state._alarmCracked) + _vm->renderMessage(kStringMuseum20); + else { + _vm->renderMessage(kStringMuseum21); + _gm->crackDoor(20); + if (!_gm->_state._alarmOn) { + _vm->renderMessage(kStringMuseum22); + _vm->playSound(kAudioSuccess); + _gm->_state._alarmCracked = true; + } + } + } return true; } |