diff options
author | Matthew Stewart | 2018-06-28 02:45:42 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 7cff7248642f3639f9f880178232686f60b7e315 (patch) | |
tree | 13ae1ee5af9ead11c814536e3dac918569408f88 | |
parent | 4c0eb3aa67bc5c4381e311c0b37284acb6f7497c (diff) | |
download | scummvm-rg350-7cff7248642f3639f9f880178232686f60b7e315.tar.gz scummvm-rg350-7cff7248642f3639f9f880178232686f60b7e315.tar.bz2 scummvm-rg350-7cff7248642f3639f9f880178232686f60b7e315.zip |
STARTREK: MUDD1
-rw-r--r-- | engines/startrek/awaymission.cpp | 2 | ||||
-rw-r--r-- | engines/startrek/awaymission.h | 7 | ||||
-rw-r--r-- | engines/startrek/room.cpp | 2 | ||||
-rw-r--r-- | engines/startrek/room.h | 58 | ||||
-rw-r--r-- | engines/startrek/rooms/function_map.h | 60 | ||||
-rw-r--r-- | engines/startrek/rooms/mudd1.cpp | 293 | ||||
-rw-r--r-- | engines/startrek/startrek.cpp | 2 | ||||
-rw-r--r-- | engines/startrek/text.h | 93 |
8 files changed, 506 insertions, 11 deletions
diff --git a/engines/startrek/awaymission.cpp b/engines/startrek/awaymission.cpp index d87c690a69..fd1f61f6be 100644 --- a/engines/startrek/awaymission.cpp +++ b/engines/startrek/awaymission.cpp @@ -41,7 +41,7 @@ void StarTrekEngine::initAwayMission() { _roomIndexToLoad = -1; // Load crew positions for beaming in - initAwayCrewPositions(4); + initAwayCrewPositions(1); } void StarTrekEngine::runAwayMission() { diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h index af93218944..2e3663fc88 100644 --- a/engines/startrek/awaymission.h +++ b/engines/startrek/awaymission.h @@ -190,15 +190,22 @@ struct AwayMission { struct { byte field29; // 0x29 + bool torpedoLoaded; // 0x33 + bool knowAboutTorpedo; // 0x34 // True if you've combined the lense + degrimer and fired it off, discovering // it's a weapon bool discoveredLenseAndDegrimerFunction; // 0x3c + byte torpedoStatus; // 0x3d bool gotMemoryDisk; // 0x48 bool gotLense; // 0x49 bool gotDegrimer; // 0x4a bool enteredRoom0ForFirstTime; // 0x54 + bool gotPointsForLoadingTorpedo; // 0x55 + bool gotPointsForPressingRedButton; // 0x56 + bool enteredRoom1ForFirstTime; // 0x58 + bool field58; // 0x58 int16 missionScore; // 0x5a } mudd; }; diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp index 0076e76806..b727c2daa2 100644 --- a/engines/startrek/room.cpp +++ b/engines/startrek/room.cpp @@ -36,6 +36,8 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm) { _rdfData = new byte[size]; rdfFile->read(_rdfData, size); + _roomIndex = name.lastChar() - '0'; + // Find room-specific code table if (name == "DEMON0") { _roomActionList = demon0ActionList; diff --git a/engines/startrek/room.h b/engines/startrek/room.h index ad08ce3bd6..144434b54d 100644 --- a/engines/startrek/room.h +++ b/engines/startrek/room.h @@ -95,18 +95,20 @@ private: RoomAction *_roomActionList; int _numRoomActions; + int _roomIndex; // ie. for DEMON2, this is 2 + int findFunctionPointer(int action, void (Room::*funcPtr)()); // Interface for room-specific code - void loadActorAnim(int actorIndex, Common::String anim, int16 x, int16 y, uint16 field66 = 0); // Cmd 0x00 + void loadActorAnim(int actorIndex, Common::String anim, int16 x = -1, int16 y = -1, uint16 field66 = 0); // Cmd 0x00 void loadActorAnimC(int actorIndex, Common::String anim, int16 x, int16 y, void (Room::*funcPtr)());// Cmd 0x00 void loadActorStandAnim(int actorIndex); // Cmd 0x01 - void loadActorAnim2(int actorIndex, Common::String anim, int16 x, int16 y, uint16 field66 = 0);// Cmd 0x02 + void loadActorAnim2(int actorIndex, Common::String anim, int16 x = -1, int16 y = -1, uint16 field66 = 0);// Cmd 0x02 int showRoomSpecificText(const char **textAddr); // (Deprecated, use function below) // Cmd 0x03 - int showText(const TextRef *text); // Cmd 0x03 - int showText(TextRef speaker, TextRef text); // Cmd 0x03 - int showText(TextRef text); // Cmd 0x03 + int showText(const TextRef *text); // Cmd 0x03 + int showText(TextRef speaker, TextRef text); // Cmd 0x03 + int showText(TextRef text); // Cmd 0x03 void giveItem(int item); // Cmd 0x04 // Command 0x05: "demon4ShowSunPuzzle" void loadRoomIndex(int roomIndex, int spawnIndex); // Cmd 0x06 @@ -1163,6 +1165,46 @@ public: // MUDD1 void mudd1Tick1(); + void mudd1Timer1Expired(); + void mudd1UseCommunicator(); + void mudd1UseSpockOnBlueButton(); + void mudd1SpockReachedBlueButton(); + void mudd1SpockPressedBlueButton(); + void mudd1CraneFinishedMoving(); + void mudd1UseSpockOnYellowButton(); + void mudd1SpockReachedYellowButton(); + void mudd1SpockPressedYellowButton(); + void mudd1UseSpockOnRedButton(); + void mudd1SpockReachedRedButton(); + void mudd1SpockPressedRedButton(); + void mudd1GetTorpedo(); + void mudd1UseSTricorderOnTorpedo(); + void mudd1UseSTricorderOnTorpedoLauncher(); + void mudd1UseSTricorderOnButton(); + void mudd1UseSTricorderOnCrane(); + void mudd1UseMedkitAnywhere(); + void mudd1LookAnywhere(); + void mudd1LookAtTorpedo(); + void mudd1LookAtFallenTorpedo(); + void mudd1LookAtTorpedoLauncher(); + void mudd1LookAtKirk(); + void mudd1LookAtSpock(); + void mudd1LookAtMccoy(); + void mudd1LookAtRedshirt(); + void mudd1LookAtCrane(); + void mudd1LookAtRedButton(); + void mudd1LookAtBlueButton(); + void mudd1LookAtYellowButton(); + void mudd1TalkToKirk(); + void mudd1TalkToSpock(); + void mudd1TalkToMccoy(); + void mudd1TalkToRedshirt(); + void mudd1WalkToSouthDoor(); + void mudd1TouchedHotspot2(); + void mudd1WalkToNorthDoor(); + void mudd1TouchedHotspot1(); + void mudd1WalkToWestDoor(); + void mudd1TouchedHotspot0(); // MUDD2 void mudd2Tick1(); @@ -1176,6 +1218,8 @@ public: // MUDD5 void mudd5Tick1(); + // MUDDA + private: // Room-specific variables. This is memset'ed to 0 when the room is initialized. union { @@ -1283,8 +1327,8 @@ private: } love; struct { - // mudd0 - bool walkingToDoor; // 0x22a9 + // common + byte walkingToDoor; } mudd; diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h index 92b5f98428..23c96532bf 100644 --- a/engines/startrek/rooms/function_map.h +++ b/engines/startrek/rooms/function_map.h @@ -1413,10 +1413,13 @@ RoomAction mudd0ActionList[] = { { Action(ACTION_USE, OBJECT_ISTRICOR, 0x20, 0), &Room::mudd0UseSTricorderOnMemoryDiskBox }, { Action(ACTION_USE, OBJECT_ISTRICOR, 0x22, 0), &Room::mudd0UseSTricorderOnDegrimerBox }, { Action(ACTION_USE, OBJECT_IMTRICOR, 0x21, 0), &Room::mudd0UseMTricorderOnLense }, + + // TODO: move these to common code { Action(ACTION_USE, OBJECT_ILENSES, OBJECT_IDEGRIME, 0), &Room::mudd0UseLenseOnDegrimer }, { Action(ACTION_USE, OBJECT_IALIENDV, -1, 0), &Room::mudd0UseAlienDevice }, { Action(ACTION_FINISHED_ANIMATION, 9, 0, 0), &Room::mudd0FiredAlienDevice }, { Action(ACTION_USE, OBJECT_IDEGRIME, -1, 0), &Room::mudd0UseDegrimer }, + { Action(ACTION_GET, 0x21, 0, 0), &Room::mudd0GetLense }, { Action(ACTION_GET, 0x20, 0, 0), &Room::mudd0GetMemoryDisk }, { Action(ACTION_GET, 0x22, 0, 0), &Room::mudd0GetDegrimer }, @@ -1442,7 +1445,64 @@ RoomAction mudd0ActionList[] = { RoomAction mudd1ActionList[] = { { Action(ACTION_TICK, 1, 0, 0), &Room::mudd1Tick1 }, + { Action(ACTION_TIMER_EXPIRED, 1, 0, 0), &Room::mudd1Timer1Expired }, + + { Action(ACTION_USE, OBJECT_ICOMM, -1, 0), &Room::mudd1UseCommunicator }, + { Action(ACTION_USE, OBJECT_SPOCK, 0x23, 0), &Room::mudd1UseSpockOnBlueButton }, + { Action(ACTION_FINISHED_WALKING, 1, 0, 0), &Room::mudd1SpockReachedBlueButton }, + { Action(ACTION_FINISHED_ANIMATION, 1, 0, 0), &Room::mudd1SpockPressedBlueButton }, + { Action(ACTION_FINISHED_ANIMATION, 2, 0, 0), &Room::mudd1CraneFinishedMoving }, + { Action(ACTION_USE, OBJECT_SPOCK, 0x24, 0), &Room::mudd1UseSpockOnYellowButton }, + { Action(ACTION_FINISHED_WALKING, 2, 0, 0), &Room::mudd1SpockReachedYellowButton }, + { Action(ACTION_FINISHED_ANIMATION, 3, 0, 0), &Room::mudd1SpockPressedYellowButton }, + { Action(ACTION_USE, OBJECT_SPOCK, 0x25, 0), &Room::mudd1UseSpockOnRedButton }, + { Action(ACTION_FINISHED_WALKING, 3, 0, 0), &Room::mudd1SpockReachedRedButton }, + { Action(ACTION_FINISHED_ANIMATION, 4, 0, 0), &Room::mudd1SpockPressedRedButton }, + + // Common code + { Action(ACTION_USE, OBJECT_ILENSES, OBJECT_IDEGRIME, 0), &Room::mudd0UseLenseOnDegrimer }, + { Action(ACTION_USE, OBJECT_IALIENDV, -1, 0), &Room::mudd0UseAlienDevice }, + { Action(ACTION_FINISHED_ANIMATION, 9, 0, 0), &Room::mudd0FiredAlienDevice }, + { Action(ACTION_USE, OBJECT_IDEGRIME, -1, 0), &Room::mudd0UseDegrimer }, + + { Action(ACTION_GET, 9, 0, 0), &Room::mudd1GetTorpedo }, + { Action(ACTION_GET, 0x21, 0, 0), &Room::mudd1GetTorpedo }, + { Action(ACTION_GET, 0x20, 0, 0), &Room::mudd1GetTorpedo }, + { Action(ACTION_USE, OBJECT_ISTRICOR, 0x21, 0), &Room::mudd1UseSTricorderOnTorpedo }, + { Action(ACTION_USE, OBJECT_ISTRICOR, 9, 0), &Room::mudd1UseSTricorderOnTorpedo }, + { Action(ACTION_USE, OBJECT_ISTRICOR, 0x20, 0), &Room::mudd1UseSTricorderOnTorpedo }, + { Action(ACTION_USE, OBJECT_ISTRICOR, 0x22, 0), &Room::mudd1UseSTricorderOnTorpedoLauncher }, + { Action(ACTION_USE, OBJECT_ISTRICOR, 0x25, 0), &Room::mudd1UseSTricorderOnButton }, + { Action(ACTION_USE, OBJECT_ISTRICOR, 0x23, 0), &Room::mudd1UseSTricorderOnButton }, + { Action(ACTION_USE, OBJECT_ISTRICOR, 0x24, 0), &Room::mudd1UseSTricorderOnButton }, + { Action(ACTION_USE, OBJECT_ISTRICOR, 8, 0), &Room::mudd1UseSTricorderOnCrane }, + { Action(ACTION_USE, OBJECT_IMEDKIT, -1, 0), &Room::mudd1UseMedkitAnywhere }, + { Action(ACTION_LOOK, -1, 0, 0), &Room::mudd1LookAnywhere }, + { Action(ACTION_LOOK, 0x20, 0, 0), &Room::mudd1LookAtTorpedo }, + { Action(ACTION_LOOK, 9, 0, 0), &Room::mudd1LookAtTorpedo }, + { Action(ACTION_LOOK, 0x21, 0, 0), &Room::mudd1LookAtFallenTorpedo }, + { Action(ACTION_LOOK, 0x22, 0, 0), &Room::mudd1LookAtTorpedoLauncher }, + { Action(ACTION_LOOK, OBJECT_KIRK, 0, 0), &Room::mudd1LookAtKirk }, + { Action(ACTION_LOOK, OBJECT_SPOCK, 0, 0), &Room::mudd1LookAtSpock }, + { Action(ACTION_LOOK, OBJECT_MCCOY, 0, 0), &Room::mudd1LookAtMccoy }, + { Action(ACTION_LOOK, OBJECT_REDSHIRT, 0, 0), &Room::mudd1LookAtRedshirt }, + { Action(ACTION_LOOK, 8, 0, 0), &Room::mudd1LookAtCrane }, + { Action(ACTION_LOOK, 0x25, 0, 0), &Room::mudd1LookAtRedButton }, + { Action(ACTION_LOOK, 0x23, 0, 0), &Room::mudd1LookAtBlueButton }, + { Action(ACTION_LOOK, 0x24, 0, 0), &Room::mudd1LookAtYellowButton }, + { Action(ACTION_TALK, OBJECT_KIRK, 0, 0), &Room::mudd1TalkToKirk }, + { Action(ACTION_TALK, OBJECT_SPOCK, 0, 0), &Room::mudd1TalkToSpock }, + { Action(ACTION_TALK, OBJECT_MCCOY, 0, 0), &Room::mudd1TalkToMccoy }, + { Action(ACTION_TALK, OBJECT_REDSHIRT, 0, 0), &Room::mudd1TalkToRedshirt }, + { Action(ACTION_WALK, 0x28, 0, 0), &Room::mudd1WalkToSouthDoor }, + { Action(ACTION_TOUCHED_HOTSPOT, 2, 0, 0), &Room::mudd1TouchedHotspot2 }, + { Action(ACTION_WALK, 0x27, 0, 0), &Room::mudd1WalkToNorthDoor }, + { Action(ACTION_TOUCHED_HOTSPOT, 1, 0, 0), &Room::mudd1TouchedHotspot1 }, + { Action(ACTION_WALK, 0x26, 0, 0), &Room::mudd1WalkToWestDoor }, + { Action(ACTION_TOUCHED_HOTSPOT, 0, 0, 0), &Room::mudd1TouchedHotspot0 }, + // TODO: remainder? something about losing atmosphere? }; + RoomAction mudd2ActionList[] = { { Action(ACTION_TICK, 1, 0, 0), &Room::mudd2Tick1 }, }; diff --git a/engines/startrek/rooms/mudd1.cpp b/engines/startrek/rooms/mudd1.cpp index 90292514d2..eecc84698b 100644 --- a/engines/startrek/rooms/mudd1.cpp +++ b/engines/startrek/rooms/mudd1.cpp @@ -22,13 +22,302 @@ #include "startrek/room.h" -#define OBJECT_DOOR1 8 +#define OBJECT_CRANE 8 +#define OBJECT_TORPEDO 9 +#define OBJECT_CRANE_ANIMATION 10 +#define OBJECT_NORTH_DOOR 11 +#define OBJECT_WEST_DOOR 12 +#define OBJECT_ALIENDV 13 -#define HOTSPOT_CONSOLE 0x20 +#define HOTSPOT_TORPEDO 0x20 +#define HOTSPOT_FALLEN_TORPEDO 0x21 +#define HOTSPOT_TORPEDO_LAUNCHER 0x22 +#define HOTSPOT_BLUE_BUTTON 0x23 +#define HOTSPOT_YELLOW_BUTTON 0x24 +#define HOTSPOT_PURPLE_BUTTON 0x25 +#define HOTSPOT_WEST_DOOR 0x26 +#define HOTSPOT_NORTH_DOOR 0x27 +#define HOTSPOT_SOUTH_DOOR 0x28 + +// BUG: The action menu appears sort of behind a torpedo. ScummVM-exclusive bug. Also, +// during the loading animation, it can appear on top of Kirk if he's standing in front +// (not scummvm-exclusive). namespace StarTrek { void Room::mudd1Tick1() { + playVoc("MUD1LOOP"); // BUGFIX: moved this out of below if statement + + if (!_vm->_awayMission.mudd.enteredRoom1ForFirstTime) { + playMidiMusicTracks(0); + _vm->_awayMission.mudd.enteredRoom1ForFirstTime = true; + } + + loadActorAnim2(OBJECT_CRANE, "s4wbhs", 0x9b, 0x31); + + if (!_vm->_awayMission.mudd.torpedoLoaded) + loadActorAnim(OBJECT_TORPEDO, "s4wbcs", 0x32, 0x65); +} + +void Room::mudd1Timer1Expired() { + playSoundEffectIndex(SND_07); +} + +void Room::mudd1UseCommunicator() { + showText(TX_SPEAKER_KIRK, TX_MUD1_001); + showText(TX_SPEAKER_UHURA, TX_STATICU1); +} + + +void Room::mudd1UseSpockOnBlueButton() { // Loads up the torpedo + if (!_vm->_awayMission.mudd.torpedoLoaded) { + walkCrewmanC(OBJECT_SPOCK, 0x2f, 0x9f, &Room::mudd1SpockReachedBlueButton); + _vm->_awayMission.disableInput = true; + if (!_vm->_awayMission.mudd.gotPointsForLoadingTorpedo) { + _vm->_awayMission.mudd.gotPointsForLoadingTorpedo = true; + _vm->_awayMission.mudd.missionScore += 2; + } + } +} + +void Room::mudd1SpockReachedBlueButton() { + _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_E; + loadActorAnimC(OBJECT_SPOCK, "susemn", -1, -1, &Room::mudd1SpockPressedBlueButton); + _vm->_awayMission.timers[1] = 5; +} + +void Room::mudd1SpockPressedBlueButton() { + playVoc("crn2can"); + loadActorAnim(OBJECT_CRANE, "s4wbcr"); + loadActorAnim(OBJECT_TORPEDO, "s4wbcn"); + loadActorAnimC(OBJECT_CRANE_ANIMATION, "s4wbsl", 0x77, 0x83, &Room::mudd1CraneFinishedMoving); + _vm->_awayMission.mudd.torpedoLoaded = true; +} + +void Room::mudd1CraneFinishedMoving() { + _vm->_awayMission.disableInput = false; + walkCrewman(OBJECT_SPOCK, 0x43, 0x9f); + + if (_vm->_awayMission.mudd.torpedoLoaded) + showText(TX_SPEAKER_SPOCK, TX_MUD1_017); + else + showText(TX_SPEAKER_SPOCK, TX_MUD1_016); +} + + +void Room::mudd1UseSpockOnYellowButton() { // Unloads the torpedo + if (_vm->_awayMission.mudd.torpedoLoaded) { + _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_E; + walkCrewmanC(OBJECT_SPOCK, 0x2f, 0x9f, &Room::mudd1SpockReachedYellowButton); + _vm->_awayMission.disableInput = true; + } +} + +void Room::mudd1SpockReachedYellowButton() { + loadActorAnim2(OBJECT_SPOCK, "susemn", -1, -1, 3); + _vm->_awayMission.timers[1] = 5; +} + +void Room::mudd1SpockPressedYellowButton() { + playVoc("crn2rack"); + loadActorAnim2(OBJECT_CRANE, "s4wbhb"); + loadActorAnim2(OBJECT_TORPEDO, "s4wbcb", 0x32, 0x65, 0); + loadActorAnimC(OBJECT_CRANE_ANIMATION, "s4wbsb", -1, -1, &Room::mudd1CraneFinishedMoving); + _vm->_awayMission.mudd.torpedoLoaded = false; +} + + +void Room::mudd1UseSpockOnRedButton() { + if (_vm->_awayMission.mudd.torpedoLoaded) { + walkCrewmanC(OBJECT_SPOCK, 0x2f, 0x9f, &Room::mudd1SpockReachedRedButton); + _vm->_awayMission.disableInput = true; + if (!_vm->_awayMission.mudd.gotPointsForPressingRedButton) { + _vm->_awayMission.mudd.gotPointsForPressingRedButton = true; + _vm->_awayMission.mudd.missionScore += 3; + } + } +} + +void Room::mudd1SpockReachedRedButton() { + loadActorAnimC(OBJECT_SPOCK, "susemn", -1, -1, &Room::mudd1SpockPressedRedButton); + _vm->_awayMission.timers[1] = 5; +} + +void Room::mudd1SpockPressedRedButton() { + walkCrewman(OBJECT_SPOCK, 0x43, 0x9f); + + showText(TX_SPEAKER_SPOCK, TX_MUD1_022); + showText(TX_SPEAKER_SPOCK, TX_MUD1_021); + showText(TX_SPEAKER_SPOCK, TX_MUD1_023); + + _vm->_awayMission.disableInput = false; + _vm->_awayMission.mudd.knowAboutTorpedo = true; + + const int choices[] = { + TX_SPEAKER_KIRK, + TX_MUD1_004, + TX_MUD1_003, + TX_MUD1_007, + TX_BLANK + }; + + int choice = showText(choices); + + switch (choice) { + case 0: + _vm->_awayMission.mudd.torpedoStatus = false; + + // ENHANCEMENT: Original text was just "(Spock raises eyebrow)" without any audio. + // This changes it to a narration to make it flow better. + showText(TX_DEM0N009); + break; + + case 1: + showText(TX_SPEAKER_KIRK, TX_MUD1_007); + // fall through + + case 2: + _vm->_awayMission.mudd.torpedoStatus = true; + showText(TX_SPEAKER_UHURA, TX_STATICU1); + break; + } +} + + +void Room::mudd1GetTorpedo() { + showText(TX_MUD1N014); +} + +void Room::mudd1UseSTricorderOnTorpedo() { + spockScan(DIR_W, TX_MUD1_025, false); + showText(TX_SPEAKER_BUCHERT, TX_MUD1_027); + showText(TX_SPEAKER_SPOCK, TX_MUD1_020); + showText(TX_SPEAKER_BUCHERT, TX_MUD1_028); + showText(TX_SPEAKER_SPOCK, TX_MUD1_024); +} + +void Room::mudd1UseSTricorderOnTorpedoLauncher() { + spockScan(DIR_W, TX_MUD1_010, false); +} + +void Room::mudd1UseSTricorderOnButton() { + // ENHANCEMENT: Do the whole "spockScan" thing, don't just show the text + spockScan(DIR_W, TX_MUD1_015, false); +} + +void Room::mudd1UseSTricorderOnCrane() { + // ENHANCEMENT: See above + spockScan(DIR_N, TX_MUD1_014, false); +} + +void Room::mudd1UseMedkitAnywhere() { + showText(TX_SPEAKER_MCCOY, TX_MUD1_011); +} + +void Room::mudd1LookAnywhere() { + showText(TX_MUD1N011); +} + +void Room::mudd1LookAtTorpedo() { + showText(TX_MUD1N002); +} + +void Room::mudd1LookAtFallenTorpedo() { + showText(TX_MUD1N012); +} + +void Room::mudd1LookAtTorpedoLauncher() { + showText(TX_MUD1N003); +} + +void Room::mudd1LookAtKirk() { + showText(TX_MUD1N005); +} + +void Room::mudd1LookAtSpock() { + showText(TX_MUD1N009); +} + +void Room::mudd1LookAtMccoy() { + showText(TX_MUD1N008); +} + +void Room::mudd1LookAtRedshirt() { + showText(TX_MUD1N006); +} + +void Room::mudd1LookAtCrane() { + showText(TX_MUD1N000); +} + +void Room::mudd1LookAtRedButton() { + showText(TX_MUD1N001); +} + +void Room::mudd1LookAtBlueButton() { + showText(TX_MUD1N015); +} + +void Room::mudd1LookAtYellowButton() { + showText(TX_MUD1N016); +} + +void Room::mudd1TalkToKirk() { + showText(TX_SPEAKER_KIRK, TX_MUD1_006); + showText(TX_SPEAKER_MCCOY, TX_MUD1_013); + showText(TX_SPEAKER_KIRK, TX_MUD1_005); +} + +void Room::mudd1TalkToSpock() { + showText(TX_SPEAKER_SPOCK, TX_MUD1_019); + showText(TX_SPEAKER_KIRK, TX_MUD1_008); +} + +void Room::mudd1TalkToMccoy() { + showText(TX_SPEAKER_MCCOY, TX_MUD1_012); +} + +void Room::mudd1TalkToRedshirt() { + showText(TX_SPEAKER_BUCHERT, TX_MUD1_026); + showText(TX_SPEAKER_KIRK, TX_MUD1_009); +} + +void Room::mudd1WalkToSouthDoor() { + _roomVar.mudd.walkingToDoor = 1; + _vm->_awayMission.disableInput = true; + walkCrewman(OBJECT_KIRK, 0xa0, 0xc7); +} + +void Room::mudd1TouchedHotspot2() { // Trigger door at bottom of room + if (_roomVar.mudd.walkingToDoor == 1) { + playVoc("SMADOOR3"); + } +} + +void Room::mudd1WalkToNorthDoor() { + _roomVar.mudd.walkingToDoor = 1; + _vm->_awayMission.disableInput = true; + walkCrewman(OBJECT_KIRK, 0xab, 0x71); +} + +void Room::mudd1TouchedHotspot1() { // Trigger door at top of room + if (_roomVar.mudd.walkingToDoor == 1) { + playVoc("SMADOOR3"); + loadActorAnim(OBJECT_NORTH_DOOR, "s4wbd1", 0xab, 0x73); + } +} + +void Room::mudd1WalkToWestDoor() { + _roomVar.mudd.walkingToDoor = 2; + _vm->_awayMission.disableInput = true; + walkCrewman(OBJECT_KIRK, 0x35, 0x71); +} + +void Room::mudd1TouchedHotspot0() { + if (_roomVar.mudd.walkingToDoor == 2) { + playVoc("SMADOOR3"); + loadActorAnim(OBJECT_WEST_DOOR, "s4wbd2", 0x37, 0x73); + } } } diff --git a/engines/startrek/startrek.cpp b/engines/startrek/startrek.cpp index 24fa741e92..584357601a 100644 --- a/engines/startrek/startrek.cpp +++ b/engines/startrek/startrek.cpp @@ -84,7 +84,7 @@ StarTrekEngine::StarTrekEngine(OSystem *syst, const StarTrekGameDescription *gam _textboxHasMultipleChoices = false; _missionToLoad = "MUDD"; - _roomIndexToLoad = 0; + _roomIndexToLoad = 1; for (int i = 0; i < NUM_OBJECTS; i++) _itemList[i] = g_itemList[i]; diff --git a/engines/startrek/text.h b/engines/startrek/text.h index 93f1b8f060..c5034a510a 100644 --- a/engines/startrek/text.h +++ b/engines/startrek/text.h @@ -1226,6 +1226,53 @@ enum GameStringIDs { TX_MUD0N019, + TX_MUD1_001, + TX_MUD1_002, + TX_MUD1_003, + TX_MUD1_004, + TX_MUD1_005, + TX_MUD1_006, + TX_MUD1_007, + TX_MUD1_008, + TX_MUD1_009, + TX_MUD1_010, + TX_MUD1_011, + TX_MUD1_012, + TX_MUD1_013, + TX_MUD1_014, + TX_MUD1_015, + TX_MUD1_016, + TX_MUD1_017, + // UNUSED + TX_MUD1_019, + TX_MUD1_020, + TX_MUD1_021, + TX_MUD1_022, + TX_MUD1_023, + TX_MUD1_024, + TX_MUD1_025, + TX_MUD1_026, + TX_MUD1_027, + TX_MUD1_028, + TX_MUD1N000, + TX_MUD1N001, + TX_MUD1N002, + TX_MUD1N003, + TX_MUD1N004, + TX_MUD1N005, + TX_MUD1N006, + TX_MUD1N007, + TX_MUD1N008, + TX_MUD1N009, + TX_MUD1N010, + TX_MUD1N011, + TX_MUD1N012, + TX_MUD1N013, + TX_MUD1N014, + TX_MUD1N015, + TX_MUD1N016, + + TX_MUD2_040, @@ -2408,6 +2455,52 @@ const char * const g_gameStrings[] = { "#MUD0\\MUD0N019#This place is cluttered with stored goods of every sort. It would take an army of workers weeks to examine every container and determine what is inside.", + "#MUD1\\MUD1_001#Kirk to Enterprise...", + "#MUD1\\MUD1_002#Well, now! I think we know why the Elasi pirates were so interested in finding out where Mudd was getting these!", + "#MUD1\\MUD1_003#I agree that we should take it aboard the Enterprise. ", + "#MUD1\\MUD1_004#I don't think we should tinker with technology we don't understand, Spock. And I'm surprised you'd suggest such a thing.", + "#MUD1\\MUD1_005#I know, Bones. ", + "#MUD1\\MUD1_006#I wonder what's happening on the Enterprise right now. ", + "#MUD1\\MUD1_007#I'll try to raise the ship... Kirk to Enterprise, Kirk to Enterprise...", + "#MUD1\\MUD1_008#If the Elasi gets hold of this, they'll make Mudd seem like a perfect caretaker by comparison. ", + "#MUD1\\MUD1_009#That machinery in the middle of the room, however, is like nothing I recognize -- and I thought I'd seen just about everything.", + "#MUD1\\MUD1_010#A weapons-delivery system. It appears to be an accessory tied directly to the alien equivalent of our ship's phasers and photon torpedoes.", + "#MUD1\\MUD1_011#Everyone is healthy, Jim, there's no need for the medical kit here.", + "#MUD1\\MUD1_012#I wonder where that Mudd has gone. I wouldn't let him out of my sight... mind you, I'm not too crazy about having him in my sight either. ", + "#MUD1\\MUD1_013#Scotty will take good care of it, Jim. He has before. ", + "#MUD1\\MUD1_014#It seems to be part of the loading system for the weapon. It is also fully functional.", + "#MUD1\\MUD1_015#The control panel has power running to it, Captain.", + "#MUD1\\MUD1_016#The device has been unloaded, Captain.", + "#MUD1\\MUD1_017#The device has finished loading, Captain.", + "#MUD1\\MUD1_019#A most interesting technology, Captain.", + "#MUD1\\MUD1_020#Evidently these are more than theoretical, Lt. Buchert. The energy initially released is infinitesimally small but boosts itself until the power finally released is comparable to our photon torpedoes.", + "#MUD1\\MUD1_021#However, I've already examined the weapons console and the main weapons battery on this ship was completely destroyed in the action which made her a derelict.", + "#MUD1\\MUD1_022#I believe, Captain, that this weapon must be hooked up through the main weapons battery.", + "#MUD1\\MUD1_023#Mr. Scott would have to go over this thoroughly, but I would recommend we try to take this weapon with us to the Enterprise.", + "#MUD1\\MUD1_024#The machinery to deliver these cartridges would be an engineering feat as well, Captain.", + "#MUD1\\MUD1_025#Unique, Captain. I believe these are self-referencing packed-quantum cartridges. ", + "#MUD1\\MUD1_026#It looks to me like these people knew how to defend themselves, Captain.", + "#MUD1\\MUD1_027#Powerboosters! I've read about those -- but they're just theoretical.", + "#MUD1\\MUD1_028#The technical journals discussing the possibilities indicated it would create a weapon of greater range than those we have now, if not a greater punch. ", + "#MUD1\\MUD1N000#A large claw-like device hanging from the ceiling.", + "#MUD1\\MUD1N001#A red triangular button.", + "#MUD1\\MUD1N002#A row of unmarked cylindrical containers.", + "#MUD1\\MUD1N003#An elaborate piece of alien-looking machinery.", + "#MUD1\\MUD1N004#Dust and grease lifts off the surface, leaving this item clean as new.", + "#MUD1\\MUD1N005#James T. Kirk, dwarfed by the technology that surrounds him. ", + "#MUD1\\MUD1N006#Lieutenant Buchert, waiting for a chance to perform his duty. ", + "#MUD1\\MUD1N007#Life support fails completely and you fall unconscious.", + "#MUD1\\MUD1N008#McCoy is scowling, probably from your meeting with Harcourt Fenton Mudd. ", + "#MUD1\\MUD1N009#Mr. Spock is looking forward to the moment that he can sit down at the main computer and analyze the findings of this mission. ", + "#MUD1\\MUD1N010#The atmosphere in the ship has dropped below the level needed to sustain life. You drop to unconsciousness and slowly die.", + "#MUD1\\MUD1N011#The room reminds you of the weapons-room of some old-style warships from the early days of starfaring.", + "#MUD1\\MUD1N012#These cylinders have fallen down from the rest.", + "#MUD1\\MUD1N013#These two things fit together like they were made for each other.", + "#MUD1\\MUD1N014#This is much too heavy to lift.", + "#MUD1\\MUD1N015#Three triangular blue buttons.", + "#MUD1\\MUD1N016#Two yellow triangular buttons.", + + "#MUD2\\MUD2_040#You look troubled, Captain.", |