aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Stewart2018-06-28 16:04:13 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commitc47150358157524c4b0079b7927ded660359f99f (patch)
treee770cab5ba492905cd056435b0d7fca482fbfa16
parent7cff7248642f3639f9f880178232686f60b7e315 (diff)
downloadscummvm-rg350-c47150358157524c4b0079b7927ded660359f99f.tar.gz
scummvm-rg350-c47150358157524c4b0079b7927ded660359f99f.tar.bz2
scummvm-rg350-c47150358157524c4b0079b7927ded660359f99f.zip
STARTREK: MUDD2
-rw-r--r--engines/startrek/awaymission.cpp2
-rw-r--r--engines/startrek/awaymission.h7
-rw-r--r--engines/startrek/room.h46
-rw-r--r--engines/startrek/rooms/function_map.h63
-rw-r--r--engines/startrek/rooms/mudd0.cpp12
-rw-r--r--engines/startrek/rooms/mudd1.cpp4
-rw-r--r--engines/startrek/rooms/mudd2.cpp375
-rw-r--r--engines/startrek/startrek.cpp2
-rw-r--r--engines/startrek/text.h130
9 files changed, 631 insertions, 10 deletions
diff --git a/engines/startrek/awaymission.cpp b/engines/startrek/awaymission.cpp
index fd1f61f6be..694e0ccf71 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(1);
+ initAwayCrewPositions(3);
}
void StarTrekEngine::runAwayMission() {
diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h
index 2e3663fc88..612e7dc9f1 100644
--- a/engines/startrek/awaymission.h
+++ b/engines/startrek/awaymission.h
@@ -192,14 +192,21 @@ struct AwayMission {
byte field29; // 0x29
bool torpedoLoaded; // 0x33
bool knowAboutTorpedo; // 0x34
+ bool field36; // 0x36
+ bool muddDroppedCapsule; // 0x39
// True if you've combined the lense + degrimer and fired it off, discovering
// it's a weapon
bool discoveredLenseAndDegrimerFunction; // 0x3c
byte torpedoStatus; // 0x3d
+ bool field3f; // 0x3f
bool gotMemoryDisk; // 0x48
bool gotLense; // 0x49
bool gotDegrimer; // 0x4a
+ bool field4c; // 0x4c
+ bool muddUnconscious; // 0x4d
+ byte field4e; // 0x4e
+ bool muddInhaledGas; // 0x4f
bool enteredRoom0ForFirstTime; // 0x54
bool gotPointsForLoadingTorpedo; // 0x55
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 144434b54d..d76589e206 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -1207,7 +1207,53 @@ public:
void mudd1TouchedHotspot0();
// MUDD2
+ void mudd2WalkToNorthDoor();
+ void mudd2TouchedHotspot0();
+ void mudd2WalkToSouthDoor();
+ void mudd2TouchedHotspot1();
void mudd2Tick1();
+ void mudd2Timer1Expired();
+ void mudd2UseSTricorderAnywhere();
+ void mudd2UseSpockOnCapsules();
+ void mudd2GetCapsules();
+ void mudd2MccoyReachedCapsules();
+ void mudd2MccoyPickedUpCapsules();
+ void mudd2UseCommunicator();
+ void mudd2LookAtCapsules();
+ void mudd2UseMTricorderOnCapsules();
+ void mudd2UseCapsuleOnControlPanel();
+ void mudd2MccoyReachedControlPanel();
+ void mudd2MccoyPutCapsuleInControlPanel();
+ void mudd2UseKirkOnBed();
+ void mudd2KirkReachedBed();
+ void mudd2MuddNoticedKirk();
+ void mudd2MuddDroppedCapsule();
+ void mudd2UsePhaserOnMudd();
+ void mudd2UseSpockOnMudd();
+ void mudd2SpockReachedMudd();
+ void mudd2SpockPinchedMudd();
+ void mudd2UseKirkOnMudd();
+ void mudd2UseRedshirtOnMudd();
+ void mudd2RedshirtReachedMudd();
+ void mudd2Timer2Expired();
+ void mudd2MuddFinishedPushingRedshirt();
+ void mudd2RedshirtPushedAway();
+ void mudd2UseMTricorderOnMudd();
+ void mudd2UseMedkitOnMudd();
+ void mudd2MccoyReachedMudd();
+ void mudd2MccoyCuredMudd();
+ void mudd2LookAtKirk();
+ void mudd2LookAtSpock();
+ void mudd2LookAtMccoy();
+ void mudd2LookAtRedshirt();
+ void mudd2LookAtMudd();
+ void mudd2LookAtControlPanel();
+ void mudd2LookAtBed();
+ void mudd2TalkToKirk();
+ void mudd2TalkToSpock();
+ void mudd2TalkToMccoy();
+ void mudd2TalkToRedshirt();
+ void mudd2TalkToMudd();
// MUDD3
void mudd3Tick1();
diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h
index 23c96532bf..d1f3b7800e 100644
--- a/engines/startrek/rooms/function_map.h
+++ b/engines/startrek/rooms/function_map.h
@@ -1460,10 +1460,10 @@ RoomAction mudd1ActionList[] = {
{ Action(ACTION_FINISHED_ANIMATION, 4, 0, 0), &Room::mudd1SpockPressedRedButton },
// Common code
+ { Action(ACTION_USE, OBJECT_IDEGRIME, -1, 0), &Room::mudd0UseDegrimer },
{ 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 },
@@ -1504,8 +1504,69 @@ RoomAction mudd1ActionList[] = {
};
RoomAction mudd2ActionList[] = {
+ { Action(ACTION_WALK, 0x21, 0, 0), &Room::mudd2WalkToNorthDoor },
+ { Action(ACTION_TOUCHED_HOTSPOT, 0, 0, 0), &Room::mudd2TouchedHotspot0 },
+ { Action(ACTION_WALK, 0x22, 0, 0), &Room::mudd2WalkToSouthDoor },
+ { Action(ACTION_TOUCHED_HOTSPOT, 1, 0, 0), &Room::mudd2TouchedHotspot1 },
{ Action(ACTION_TICK, 1, 0, 0), &Room::mudd2Tick1 },
+ { Action(ACTION_TIMER_EXPIRED, 1, 0, 0), &Room::mudd2Timer1Expired },
+ { Action(ACTION_USE, OBJECT_ISTRICOR, -1, 0), &Room::mudd2UseSTricorderAnywhere },
+ { Action(ACTION_USE, OBJECT_SPOCK, 0x20, 0), &Room::mudd2UseSpockOnCapsules },
+ { Action(ACTION_GET, 0x20, 0, 0), &Room::mudd2GetCapsules },
+ { Action(ACTION_FINISHED_WALKING, 12, 0, 0), &Room::mudd2MccoyReachedCapsules },
+ { Action(ACTION_FINISHED_ANIMATION, 13, 0, 0), &Room::mudd2MccoyPickedUpCapsules },
+ { Action(ACTION_USE, OBJECT_ICOMM, -1, 0), &Room::mudd2UseCommunicator },
+
+ // Common code
+ { Action(ACTION_USE, OBJECT_IDEGRIME, -1, 0), &Room::mudd0UseDegrimer },
+ { Action(ACTION_USE, OBJECT_ILENSES, OBJECT_IDEGRIME, 0), &Room::mudd0UseLenseOnDegrimer },
+ { Action(ACTION_USE, OBJECT_IALIENDV, -1, 0), &Room::mudd0UseAlienDevice },
+ { Action(ACTION_FINISHED_ANIMATION, 18, 0, 0), &Room::mudd0FiredAlienDevice },
+
+ { Action(ACTION_LOOK, 0x20, 0, 0), &Room::mudd2LookAtCapsules },
+ { Action(ACTION_USE, OBJECT_IMTRICOR, 0x20, 0), &Room::mudd2UseMTricorderOnCapsules },
+ { Action(ACTION_USE, OBJECT_ICAPSULE, 0x23, 0), &Room::mudd2UseCapsuleOnControlPanel },
+ { Action(ACTION_FINISHED_WALKING, 15, 0, 0), &Room::mudd2MccoyReachedControlPanel },
+ { Action(ACTION_FINISHED_ANIMATION, 15, 0, 0), &Room::mudd2MccoyPutCapsuleInControlPanel },
+ { Action(ACTION_USE, OBJECT_KIRK, 0x24, 0), &Room::mudd2UseKirkOnBed },
+ { Action(ACTION_USE, OBJECT_KIRK, 0x25, 0), &Room::mudd2UseKirkOnBed },
+ { Action(ACTION_FINISHED_WALKING, 6, 0, 0), &Room::mudd2KirkReachedBed },
+ { Action(ACTION_FINISHED_ANIMATION, 1, 0, 0), &Room::mudd2MuddNoticedKirk },
+ { Action(ACTION_FINISHED_ANIMATION, 2, 0, 0), &Room::mudd2MuddDroppedCapsule },
+ { Action(ACTION_USE, OBJECT_IPHASERS, 8, 0), &Room::mudd2UsePhaserOnMudd },
+ { Action(ACTION_USE, OBJECT_IPHASERK, 8, 0), &Room::mudd2UsePhaserOnMudd },
+
+ { Action(ACTION_USE, OBJECT_SPOCK, 8, 0), &Room::mudd2UseSpockOnMudd },
+ { Action(ACTION_FINISHED_WALKING, 4, 0, 0), &Room::mudd2SpockReachedMudd },
+ { Action(ACTION_FINISHED_ANIMATION, 5, 0, 0), &Room::mudd2SpockPinchedMudd },
+ { Action(ACTION_USE, OBJECT_KIRK, 8, 0), &Room::mudd2UseKirkOnMudd },
+
+ { Action(ACTION_USE, OBJECT_REDSHIRT, 8, 0), &Room::mudd2UseRedshirtOnMudd },
+ { Action(ACTION_FINISHED_WALKING, 16, 0, 0), &Room::mudd2RedshirtReachedMudd },
+ { Action(ACTION_TIMER_EXPIRED, 2, 0, 0), &Room::mudd2Timer2Expired },
+ { Action(ACTION_FINISHED_ANIMATION, 17, 0, 0), &Room::mudd2MuddFinishedPushingRedshirt },
+ { Action(ACTION_FINISHED_ANIMATION, 16, 0, 0), &Room::mudd2RedshirtPushedAway },
+ { Action(ACTION_USE, OBJECT_IMTRICOR, 8, 0), &Room::mudd2UseMTricorderOnMudd },
+ { Action(ACTION_USE, OBJECT_IMEDKIT, 8, 0), &Room::mudd2UseMedkitOnMudd },
+ { Action(ACTION_USE, OBJECT_MCCOY, 8, 0), &Room::mudd2UseMedkitOnMudd },
+ { Action(ACTION_FINISHED_WALKING, 10, 0, 0), &Room::mudd2MccoyReachedMudd },
+ { Action(ACTION_FINISHED_ANIMATION, 11, 0, 0), &Room::mudd2MccoyCuredMudd },
+ { Action(ACTION_LOOK, OBJECT_KIRK, 0, 0), &Room::mudd2LookAtKirk },
+ { Action(ACTION_LOOK, OBJECT_SPOCK, 0, 0), &Room::mudd2LookAtSpock },
+ { Action(ACTION_LOOK, OBJECT_MCCOY, 0, 0), &Room::mudd2LookAtMccoy },
+ { Action(ACTION_LOOK, OBJECT_REDSHIRT, 0, 0), &Room::mudd2LookAtRedshirt },
+ { Action(ACTION_LOOK, 8, 0, 0), &Room::mudd2LookAtMudd },
+ { Action(ACTION_LOOK, 0x23, 0, 0), &Room::mudd2LookAtControlPanel },
+ { Action(ACTION_LOOK, 0x25, 0, 0), &Room::mudd2LookAtBed },
+ { Action(ACTION_LOOK, 0x24, 0, 0), &Room::mudd2LookAtBed },
+ { Action(ACTION_TALK, OBJECT_KIRK, 0, 0), &Room::mudd2TalkToKirk },
+ { Action(ACTION_TALK, OBJECT_SPOCK, 0, 0), &Room::mudd2TalkToSpock },
+ { Action(ACTION_TALK, OBJECT_MCCOY, 0, 0), &Room::mudd2TalkToMccoy },
+ { Action(ACTION_TALK, OBJECT_REDSHIRT, 0, 0), &Room::mudd2TalkToRedshirt },
+ { Action(ACTION_TALK, 8, 0, 0), &Room::mudd2TalkToMudd },
+ // TODO: remainder? something about losing atmosphere?
};
+
RoomAction mudd3ActionList[] = {
{ Action(ACTION_TICK, 1, 0, 0), &Room::mudd3Tick1 },
};
diff --git a/engines/startrek/rooms/mudd0.cpp b/engines/startrek/rooms/mudd0.cpp
index d482aa7e24..54b3a2244f 100644
--- a/engines/startrek/rooms/mudd0.cpp
+++ b/engines/startrek/rooms/mudd0.cpp
@@ -165,17 +165,23 @@ void Room::mudd0UseLenseOnDegrimer() {
_vm->_awayMission.mudd.missionScore++;
showText(TX_MUD0N011);
- // Identical (?) audio files: TX_MUD0N011, TX_MUD1N013
+ // Identical (?) audio files: TX_MUD0N011, TX_MUD1N013, TX_MUD2N010
}
void Room::mudd0UseAlienDevice() {
+ const int deviceObjectIndices[] = {
+ 9, // MUDD0
+ 13, // MUDD1
+ 11, // MUDD2
+ };
+
_vm->_awayMission.disableInput = true;
_vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
loadActorStandAnim(OBJECT_KIRK);
Common::Point pos = getActorPos(OBJECT_KIRK);
- loadActorAnimC(OBJECT_ALIENDV, "s4cbxp", pos.x, 10, &Room::mudd0FiredAlienDevice);
+ loadActorAnimC(deviceObjectIndices[_roomIndex], "s4cbxp", pos.x, 10, &Room::mudd0FiredAlienDevice);
playVoc("EXPLO3");
}
@@ -191,7 +197,7 @@ void Room::mudd0FiredAlienDevice() {
void Room::mudd0UseDegrimer() {
- // Identical (?) audio files: TX_MUD0N002, TX_MUD1N004, ...
+ // Identical (?) audio files: TX_MUD0N002, TX_MUD1N004, TX_MUD2N001...
showText(TX_MUD0N002);
}
diff --git a/engines/startrek/rooms/mudd1.cpp b/engines/startrek/rooms/mudd1.cpp
index eecc84698b..074b4bf1f7 100644
--- a/engines/startrek/rooms/mudd1.cpp
+++ b/engines/startrek/rooms/mudd1.cpp
@@ -156,7 +156,7 @@ void Room::mudd1SpockPressedRedButton() {
const int choices[] = {
TX_SPEAKER_KIRK,
TX_MUD1_004,
- TX_MUD1_003,
+ TX_MUD1_003,
TX_MUD1_007,
TX_BLANK
};
@@ -313,7 +313,7 @@ void Room::mudd1WalkToWestDoor() {
walkCrewman(OBJECT_KIRK, 0x35, 0x71);
}
-void Room::mudd1TouchedHotspot0() {
+void Room::mudd1TouchedHotspot0() { // Trigger door at west of room
if (_roomVar.mudd.walkingToDoor == 2) {
playVoc("SMADOOR3");
loadActorAnim(OBJECT_WEST_DOOR, "s4wbd2", 0x37, 0x73);
diff --git a/engines/startrek/rooms/mudd2.cpp b/engines/startrek/rooms/mudd2.cpp
index f4b5b5f904..81a975dfe6 100644
--- a/engines/startrek/rooms/mudd2.cpp
+++ b/engines/startrek/rooms/mudd2.cpp
@@ -22,13 +22,384 @@
#include "startrek/room.h"
-#define OBJECT_DOOR1 8
+#define OBJECT_MUDD 8
+#define OBJECT_CAPSULE 9
+#define OBJECT_NORTH_DOOR 10
+#define OBJECT_ALIENDV 11
-#define HOTSPOT_CONSOLE 0x20
+#define HOTSPOT_CAPSULES 0x20
+#define HOTSPOT_NORTH_DOOR 0x21
+#define HOTSPOT_WEST_DOOR 0x22
+#define HOTSPOT_CONTROL_PANEL 0x23
+#define HOTSPOT_LEFT_BED 0x24
+#define HOTSPOT_RIGHT_BED 0x25
namespace StarTrek {
+void Room::mudd2WalkToNorthDoor() {
+ _roomVar.mudd.walkingToDoor = true;
+ _vm->_awayMission.disableInput = true;
+ walkCrewman(OBJECT_KIRK, 0xbc, 0x6a);
+}
+
+void Room::mudd2TouchedHotspot0() { // Trigger north door
+ if (_roomVar.mudd.walkingToDoor) {
+ playVoc("SMADOOR3");
+ loadActorAnim(OBJECT_NORTH_DOOR, "s4sbdo", 0xbe, 0x6b);
+ }
+}
+
+void Room::mudd2WalkToSouthDoor() {
+ _roomVar.mudd.walkingToDoor = true;
+ _vm->_awayMission.disableInput = true;
+ walkCrewman(OBJECT_KIRK, 0x46, 0x6f);
+}
+
+void Room::mudd2TouchedHotspot1() {
+ if (_roomVar.mudd.walkingToDoor) {
+ playVoc("SMADOOR3");
+ }
+}
+
void Room::mudd2Tick1() {
+ playVoc("MUD2LOOP");
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_W;
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_W;
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_REDSHIRT] = DIR_W;
+ _vm->_awayMission.mudd.muddDroppedCapsule = false;
+
+ if (_vm->_awayMission.mudd.field4e == 0) {
+ _vm->_awayMission.mudd.field4e = 0;
+ } else if (_vm->_awayMission.mudd.field4e == 2) {
+ _vm->_awayMission.mudd.muddDroppedCapsule = true;
+ if (!_vm->_awayMission.mudd.muddUnconscious) {
+ _vm->_awayMission.mudd.muddUnconscious = false;
+ loadActorAnim2(OBJECT_MUDD, "s4sbhn", 0x9f, 0xbf);
+ loadActorAnim2(OBJECT_CAPSULE, "s4sbvp", 0x93, 0xc3);
+ } else {
+ loadActorAnim2(OBJECT_MUDD, "s4sbob", 0x9f, 0xba);
+ }
+ } else if (_vm->_awayMission.mudd.field3f) {
+ _vm->_awayMission.mudd.field4e = 0;
+ } else if (_vm->_awayMission.mudd.field4e == 1) {
+ playMidiMusicTracks(3);
+ loadActorAnim2(OBJECT_MUDD, "s4sbhw", 0x99, 0xbf);
+ _vm->_awayMission.disableInput = 2;
+ _vm->_awayMission.mudd.muddInhaledGas = true;
+ _vm->_awayMission.timers[1] = 70;
+ _vm->_awayMission.mudd.field4e = 2;
+ _vm->_awayMission.mudd.field3f = true;
+ }
+}
+
+void Room::mudd2Timer1Expired() {
+ loadActorAnimC(OBJECT_MUDD, "s4sbmt", 0xa0, 0xbf, &Room::mudd2MuddNoticedKirk);
+}
+
+void Room::mudd2UseSTricorderAnywhere() {
+ spockScan(DIR_S, TX_MUD2_037, false);
+}
+
+void Room::mudd2UseSpockOnCapsules() {
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_018);
+}
+
+void Room::mudd2GetCapsules() {
+ if (!_vm->_awayMission.mudd.muddInhaledGas || _vm->_awayMission.mudd.muddUnconscious) {
+ if (!_vm->_awayMission.mudd.field36)
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_024);
+ else
+ walkCrewmanC(OBJECT_MCCOY, 0x9f, 0xbf, &Room::mudd2MccoyReachedCapsules);
+ } else {
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_023);
+ }
+}
+
+void Room::mudd2MccoyReachedCapsules() {
+ loadActorAnimC(OBJECT_MCCOY, "musehn", -1, -1, &Room::mudd2MccoyPickedUpCapsules);
+ giveItem(OBJECT_ICAPSULE);
+}
+
+void Room::mudd2MccoyPickedUpCapsules() {
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_W;
+ walkCrewman(OBJECT_MCCOY, 0xfe, 0xb2);
+}
+
+void Room::mudd2UseCommunicator() {
+ showText(TX_SPEAKER_KIRK, TX_MUD2_009);
+ showText(TX_SPEAKER_UHURA, TX_STATICU1);
+}
+
+void Room::mudd2LookAtCapsules() {
+ showText(TX_MUD2N008);
+}
+
+void Room::mudd2UseMTricorderOnCapsules() {
+ mccoyScan(DIR_W, TX_MUD2_030, false);
+ showText(TX_SPEAKER_KIRK, TX_MUD2_004);
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_019);
+}
+
+void Room::mudd2UseCapsuleOnControlPanel() {
+ if (!_vm->_awayMission.mudd.muddInhaledGas || _vm->_awayMission.mudd.muddUnconscious)
+ walkCrewmanC(OBJECT_MCCOY, 0x9f, 0xbf, &Room::mudd2MccoyReachedControlPanel);
+ else
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_023);
+}
+
+void Room::mudd2MccoyReachedControlPanel() {
+ if (_vm->_awayMission.mudd.field36)
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_014);
+ else
+ loadActorAnimC(OBJECT_MCCOY, "musehn", -1, -1, &Room::mudd2MccoyPutCapsuleInControlPanel);
+}
+
+void Room::mudd2MccoyPutCapsuleInControlPanel() {
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_N;
+ loadActorStandAnim(OBJECT_MCCOY);
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_020);
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_029);
+ showText(TX_SPEAKER_SPOCK, TX_MUD2_039);
+ if (_vm->_awayMission.mudd.muddUnconscious)
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_034);
+
+ loseItem(OBJECT_ICAPSULE);
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_MCCOY] = DIR_W;
+ walkCrewman(OBJECT_MCCOY, 0xfe, 0xb2);
+}
+
+void Room::mudd2UseKirkOnBed() {
+ if (!_vm->_awayMission.mudd.field4c && !_vm->_awayMission.mudd.field36) {
+ walkCrewmanC(OBJECT_KIRK, 0xd7, 0xbd, &Room::mudd2KirkReachedBed);
+ } else if (_vm->_awayMission.mudd.field36) {
+ walkCrewman(OBJECT_KIRK, 0xd7, 0xbd, 7); // BUG(?): no continuation?
+ }
+}
+
+void Room::mudd2KirkReachedBed() {
+ // BUGFIX: Speaker is mccoy, not none
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_022);
+}
+
+
+void Room::mudd2MuddNoticedKirk() {
+ showText(TX_SPEAKER_MUDD, TX_MUD2_044);
+ playVoc("BATTYGAS");
+ loadActorAnimC(OBJECT_MUDD, "s4sbhb", 0x9f, 0xbf, &Room::mudd2MuddDroppedCapsule); // Drops the capsule
+ playMidiMusicTracks(0);
+}
+
+void Room::mudd2MuddDroppedCapsule() {
+ loadActorAnim2(OBJECT_MUDD, "s4sbhn", 0x9f, 0xbf, 3); // NOTE: no callback from this
+ loadActorAnim2(OBJECT_CAPSULE, "s4sbvp", 0x93, 0xc3);
+ _vm->_awayMission.mudd.muddDroppedCapsule = true;
+
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_032);
+ showText(TX_SPEAKER_MUDD, TX_MUD2_049);
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_026);
+ showText(TX_SPEAKER_MUDD, TX_MUD2_051);
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_031);
+ showText(TX_SPEAKER_MUDD, TX_MUD2_050);
+
+ _vm->_awayMission.disableInput = false;
+}
+
+
+void Room::mudd2UsePhaserOnMudd() {
+ if (_vm->_awayMission.mudd.muddInhaledGas && !_vm->_awayMission.mudd.muddUnconscious) {
+ showText(TX_SPEAKER_BUCHERT, TX_MUD2_053);
+ showText(TX_SPEAKER_MUDD, TX_MUD2_042);
+ showText(TX_SPEAKER_MUDD, TX_MUD2_043);
+ }
+}
+
+
+// Spock neck-pinches Mudd
+void Room::mudd2UseSpockOnMudd() {
+ if (_vm->_awayMission.mudd.muddInhaledGas && !_vm->_awayMission.mudd.muddUnconscious) {
+ _vm->_awayMission.disableInput = true;
+ walkCrewmanC(OBJECT_SPOCK, 0x8a, 0xbf, &Room::mudd2SpockReachedMudd);
+ }
+}
+
+void Room::mudd2SpockReachedMudd() {
+ loadActorAnimC(OBJECT_SPOCK, "s4sbsp", 0x9f, 0xbf, &Room::mudd2SpockPinchedMudd);
+ loadActorStandAnim(OBJECT_MUDD);
+}
+
+void Room::mudd2SpockPinchedMudd() {
+ loadActorAnim2(OBJECT_MUDD, "s4sbob", 0x9f, 0xba);
+ loadActorAnim2(OBJECT_SPOCK, "sstnde", 0xd0, 0xbd);
+
+ showText(TX_SPEAKER_SPOCK, TX_MUD2_012);
+
+ _vm->_awayMission.disableInput = false;
+ _vm->_awayMission.mudd.muddUnconscious = true;
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
+ walkCrewman(OBJECT_SPOCK, 0x118, 0xc4);
+}
+
+void Room::mudd2UseKirkOnMudd() {
+ if (_vm->_awayMission.mudd.muddInhaledGas && !_vm->_awayMission.mudd.muddUnconscious) {
+ showText(TX_SPEAKER_KIRK, TX_MUD2_001);
+ mudd2UseSpockOnMudd();
+ }
+}
+
+
+void Room::mudd2UseRedshirtOnMudd() {
+ if (_vm->_awayMission.mudd.muddInhaledGas && !_vm->_awayMission.mudd.muddUnconscious) {
+ _vm->_awayMission.disableInput = true;
+ walkCrewmanC(OBJECT_REDSHIRT, 0xc3, 0xbe, &Room::mudd2RedshirtReachedMudd);
+ }
+}
+
+void Room::mudd2RedshirtReachedMudd() {
+ _vm->_awayMission.timers[2] = 8;
+ loadActorAnimC(OBJECT_REDSHIRT, "s4sbrh", -1, -1, &Room::mudd2RedshirtPushedAway);
+ playVoc("ROCKFACE");
+ loadActorAnimC(OBJECT_MUDD, "s4sbhh", 0x9f, 0xbf, &Room::mudd2MuddFinishedPushingRedshirt);
+}
+
+void Room::mudd2Timer2Expired() {
+ playSoundEffectIndex(SND_BLANK_0b);
+}
+
+void Room::mudd2MuddFinishedPushingRedshirt() {
+ loadActorAnim2(OBJECT_MUDD, "s4sbhn");
+}
+
+void Room::mudd2RedshirtPushedAway() {
+ showText(TX_SPEAKER_BUCHERT, TX_MUD2_052);
+ loadActorAnim(OBJECT_REDSHIRT, "rstnds", 0xd8, 0xc3);
+ _vm->_awayMission.disableInput = false;
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_REDSHIRT] = DIR_W;
+ walkCrewman(OBJECT_REDSHIRT, 0x117, 0xae);
+}
+
+
+// BUGFIX: This was originally "Action 0x45 on Mudd"; as far as I know, action 0x45
+// doesn't exist. It's far more likely that 0x45 is supposed to correspond to
+// OBJECT_IMTRICOR in a USE action.
+// The function itself was also modified (ie. condition for showing text was inverted).
+void Room::mudd2UseMTricorderOnMudd() {
+ if (_vm->_awayMission.mudd.muddInhaledGas && !_vm->_awayMission.mudd.muddUnconscious)
+ mccoyScan(DIR_W, TX_MUD2_013, false);
+}
+
+
+void Room::mudd2UseMedkitOnMudd() {
+ if (!_vm->_awayMission.mudd.muddInhaledGas)
+ return;
+ else if (_vm->_awayMission.mudd.muddUnconscious) {
+ if (!_vm->_awayMission.mudd.field36)
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_015);
+ else if (!_vm->_awayMission.mudd.field4c)
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_021);
+ else
+ walkCrewmanC(OBJECT_MCCOY, 0xde, 0xaf, &Room::mudd2MccoyReachedMudd);
+ }
+ else // Can't get to him since he's busy being crazy
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_016);
+}
+
+void Room::mudd2MccoyReachedMudd() {
+ _vm->_awayMission.mudd.missionScore += 2;
+ loadActorAnimC(OBJECT_MCCOY, "s4sbms", -1, -1, &Room::mudd2MccoyCuredMudd);
+}
+
+void Room::mudd2MccoyCuredMudd() {
+ _vm->_awayMission.mudd.field3f = false;
+ _vm->_awayMission.mudd.field4e = 3;
+ _vm->_awayMission.mudd.muddDroppedCapsule = false;
+ _vm->_awayMission.mudd.muddInhaledGas = false;
+
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_033);
+ showText(TX_SPEAKER_MUDD, TX_MUD2_045);
+
+ _vm->_awayMission.mudd.muddUnconscious = false;
+}
+
+
+void Room::mudd2LookAtKirk() {
+ showText(TX_MUD2N003);
+}
+
+void Room::mudd2LookAtSpock() {
+ showText(TX_MUD2N006);
+}
+
+void Room::mudd2LookAtMccoy() {
+ showText(TX_MUD2N000);
+}
+
+void Room::mudd2LookAtRedshirt() {
+ showText(TX_MUD2N004);
+}
+
+void Room::mudd2LookAtMudd() {
+ showText(TX_MUD2N002);
+}
+
+void Room::mudd2LookAtControlPanel() {
+ showText(TX_MUD2N011);
+}
+
+void Room::mudd2LookAtBed() {
+ showText(TX_MUD2N007);
+}
+
+// FIXME: The conditions in the below functions seem wrong.
+void Room::mudd2TalkToKirk() {
+ if (!_vm->_awayMission.mudd.muddDroppedCapsule || _vm->_awayMission.mudd.muddInhaledGas || _vm->_awayMission.mudd.muddUnconscious)
+ showText(TX_SPEAKER_KIRK, TX_MUD2_010);
+ else {
+ showText(TX_SPEAKER_KIRK, TX_MUD2_005);
+ showText(TX_SPEAKER_MUDD, TX_MUD2_046);
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_035);
+ }
+}
+
+void Room::mudd2TalkToSpock() {
+ if (!_vm->_awayMission.mudd.muddDroppedCapsule || _vm->_awayMission.mudd.muddInhaledGas || _vm->_awayMission.mudd.muddUnconscious) {
+ showText(TX_SPEAKER_SPOCK, TX_MUD2_040);
+ showText(TX_SPEAKER_KIRK, TX_MUD2_011);
+ } else {
+ showText(TX_SPEAKER_SPOCK, TX_MUD2_038);
+ }
+}
+
+void Room::mudd2TalkToMccoy() {
+ if (!_vm->_awayMission.mudd.muddDroppedCapsule || _vm->_awayMission.mudd.muddInhaledGas || _vm->_awayMission.mudd.muddUnconscious) {
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_025);
+ showText(TX_SPEAKER_KIRK, TX_MUD2_007);
+ } else {
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_027);
+ }
+}
+
+void Room::mudd2TalkToRedshirt() {
+ if (!_vm->_awayMission.mudd.muddDroppedCapsule || _vm->_awayMission.mudd.muddInhaledGas || _vm->_awayMission.mudd.muddUnconscious) {
+ showText(TX_SPEAKER_BUCHERT, TX_MUD2_054);
+ showText(TX_SPEAKER_KIRK, TX_MUD2_008);
+ } else {
+ showText(TX_SPEAKER_BUCHERT, TX_MUD2_055);
+ showText(TX_SPEAKER_KIRK, TX_MUD2_003);
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_048);
+ }
+}
+
+void Room::mudd2TalkToMudd() {
+ if (!_vm->_awayMission.mudd.muddDroppedCapsule || _vm->_awayMission.mudd.muddUnconscious)
+ return;
+ else if (_vm->_awayMission.mudd.muddInhaledGas) {
+ showText(TX_SPEAKER_MUDD, TX_MUD2_048);
+ showText(TX_SPEAKER_MCCOY, TX_MUD2_028);
+ } else {
+ showText(TX_SPEAKER_MUDD, TX_MUD2_047);
+ showText(TX_SPEAKER_KIRK, TX_MUD2_006);
+ }
}
}
diff --git a/engines/startrek/startrek.cpp b/engines/startrek/startrek.cpp
index 584357601a..1fa88bb206 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 = 1;
+ _roomIndexToLoad = 2;
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 c5034a510a..611305a697 100644
--- a/engines/startrek/text.h
+++ b/engines/startrek/text.h
@@ -1273,7 +1273,73 @@ enum GameStringIDs {
TX_MUD1N016,
+ TX_MUD2_001,
+ TX_MUD2_002,
+ TX_MUD2_003,
+ TX_MUD2_004,
+ TX_MUD2_005,
+ TX_MUD2_006,
+ TX_MUD2_007,
+ TX_MUD2_008,
+ TX_MUD2_009,
+ TX_MUD2_010,
+ TX_MUD2_011,
+ TX_MUD2_012,
+ TX_MUD2_013,
+ TX_MUD2_014,
+ TX_MUD2_015,
+ TX_MUD2_016,
+ // UNUSED
+ TX_MUD2_018,
+ TX_MUD2_019,
+ TX_MUD2_020,
+ TX_MUD2_021,
+ TX_MUD2_022,
+ TX_MUD2_023,
+ TX_MUD2_024,
+ TX_MUD2_025,
+ TX_MUD2_026,
+ TX_MUD2_027,
+ TX_MUD2_028,
+ TX_MUD2_029,
+ TX_MUD2_030,
+ TX_MUD2_031,
+ TX_MUD2_032,
+ TX_MUD2_033,
+ TX_MUD2_034,
+ TX_MUD2_035,
+ TX_MUD2_036,
+ TX_MUD2_037,
+ TX_MUD2_038,
+ TX_MUD2_039,
TX_MUD2_040,
+ // UNUSED
+ TX_MUD2_042,
+ TX_MUD2_043,
+ TX_MUD2_044,
+ TX_MUD2_045,
+ TX_MUD2_046,
+ TX_MUD2_047,
+ TX_MUD2_048,
+ TX_MUD2_049,
+ TX_MUD2_050,
+ TX_MUD2_051,
+ TX_MUD2_052,
+ TX_MUD2_053,
+ TX_MUD2_054,
+ TX_MUD2_055,
+ TX_MUD2N000,
+ TX_MUD2N001,
+ TX_MUD2N002,
+ TX_MUD2N003,
+ TX_MUD2N004,
+ TX_MUD2N005,
+ TX_MUD2N006,
+ TX_MUD2N007,
+ TX_MUD2N008,
+ TX_MUD2N009,
+ TX_MUD2N010,
+ TX_MUD2N011,
TX_MUD4_018,
@@ -2501,7 +2567,71 @@ const char * const g_gameStrings[] = {
"#MUD1\\MUD1N016#Two yellow triangular buttons.",
+ "#MUD2\\MUD2_001#Spock, see if you can outflank him...",
+ "#MUD2\\MUD2_002#Well, now I think we know why the Elasi pirates were so interested in finding out where Mudd was getting these>",
+ "#MUD2\\MUD2_003#Almost worth a try. Bones? ",
+ "#MUD2\\MUD2_004#Do they pose any threat to us, Doctor?",
+ "#MUD2\\MUD2_005#Harry! Calm down Harry, it's only us! ",
+ "#MUD2\\MUD2_006#Harry, when did you become a comedian? ",
+ "#MUD2\\MUD2_007#I can't think of anything we did that was THAT bad. ",
+ "#MUD2\\MUD2_008#There's not much I wouldn't do to not have to deal with Mudd. ",
+ "#MUD2\\MUD2_009#Kirk to Enterprise...",
+ "#MUD2\\MUD2_010#Sometimes I wish I had become an archeology professor instead of a Starfleet Captain. ",
+ "#MUD2\\MUD2_011#Sorry if I was bothering you. I was just silently cursing the day I met Harry Mudd. ",
+ "#MUD2\\MUD2_012#All yours now, Doctor McCoy.",
+ "#MUD2\\MUD2_013#He's showing definite signs of hallucination and a marked increase in adrenalin. I would recommend extreme caution in handling him.",
+ "#MUD2\\MUD2_014#I feel sure that these would have been used here, but I don't understand enough of how the aliens thought, to make it work.",
+ "#MUD2\\MUD2_015#I need to understand more about the aliens before I can make this bed and its instrumentation function.",
+ "#MUD2\\MUD2_016#I'm not fast enough to get him with a tranquilizer hypo, Jim!",
+ "#MUD2\\MUD2_018#Jim, these look like the capsules we might use in a hypo. I wouldn't recommend experimenting with them, though. Alien physiology or not, you can never be sure what unusual chemicals will do to the human body.",
+ "#MUD2\\MUD2_019#None seems likely to have any effect on human -- or Vulcan -- physiology. To be on the safe side, though, I wouldn't recommend taking a snootful from one of the capsules!",
+ "#MUD2\\MUD2_020#The capsules slide into the machinery on the bed exactly as they're designed to.",
+ "#MUD2\\MUD2_021#The volatile chemicals have evaporated over the time the derelict hung in space. I need to refill the capsule-dispenser for the bed to activate and effect a cure on our friend Harry, here.",
+ "#MUD2\\MUD2_022#This is no time for a nap!", // TYPO
+ "#MUD2\\MUD2_023#We can't get near that equipment with mudd going nuts over there, Jim.",
+ "#MUD2\\MUD2_024#We won't be able to operate any of this equipment unless we can learn more about the aliens, Jim.",
+ "#MUD2\\MUD2_025#Are you religious, Jim? Is Harry Mudd a divine punishment for anything we did wrong? ",
+ "#MUD2\\MUD2_026#Deleterious effects. I guess I don't even need my tricorder to know that.",
+ "#MUD2\\MUD2_027#He's delirious Jim. Actually, it's kinda funny. ",
+ "#MUD2\\MUD2_028#I think I liked him better when he was less delirious. ",
+ "#MUD2\\MUD2_029#I'm telling the program our physiology is not the same as the aliens' physiology. Don't want it to try to cure us of being human!",
+ "#MUD2\\MUD2_030#It would be interesting to analyze them back aboard the Enterprise, but these are probably vaccines, medicines, and research viruses.",
+ "#MUD2\\MUD2_031#If we can get him on one of the beds, and get it active, I think he can be cured. Otherwise, he's likely to become increasingly violent.",
+ "#MUD2\\MUD2_032#Jim, that doesn't look good at all... Harry, let me take a look at you and check whether that had some deleterious effect...",
+ "#MUD2\\MUD2_033#Okay, Harry, you should start to feel better in a few minutes. Just lie there quietly until you feel like moving.",
+ "#MUD2\\MUD2_034#Particularly when we're talking about Harry Mudd...",
+ "#MUD2\\MUD2_035#Well, he got one thing right. ",
+ "#MUD2\\MUD2_036#Who knows what effect a phaser might have on him with all those chemicals in his system? We must find another way to handle this. ",
+ "#MUD2\\MUD2_037#This room closely resembles the Enterprise sickbay. The beds are powered, as is the central post console. ",
+ "#MUD2\\MUD2_038#It would appear that the accident has made Harry Mudd even less logical than before. ",
+ "#MUD2\\MUD2_039#That would be too much to hope for, would it not, Doctor?",
"#MUD2\\MUD2_040#You look troubled, Captain.",
+ "#MUD2\\MUD2_042#Ahh, I feel faster -- smarter -- strong enough to take you all on! You're really lizard men wearing human masks -- his is coming off -- Hahahahahah!",
+ "#MUD2\\MUD2_043#I know you for what you really are! I'll tell the whole world, and then where will you be!",
+ "#MUD2\\MUD2_044#Why C-c-Captain!",
+ "#MUD2\\MUD2_045#*Groan.* Give me something for this headache, Doc. A herd of Hamali tree-elephants landed behind my eyeballs and did a mating dance...",
+ "#MUD2\\MUD2_046#Argh! My most dire enemies have found me! ",
+ "#MUD2\\MUD2_047#Kirk, you sound as though you aren't happy to see me! After all we've been through together, I thought we had built a genuine bond of camraderie, two men fighting side by side against impossible odds! ",
+ "#MUD2\\MUD2_048#No! You're going to sell me to space aliens! Use my brain as a weapon to destroy the human race! And here I am, willing to help out in a good cause... ",
+ "#MUD2\\MUD2_049#No! You're all space aliens! You're little grey men from inside the hollow earth! You want to experiment on my body parts! Stay away from me!",
+ "#MUD2\\MUD2_050#Stay away from me!>",
+ "#MUD2\\MUD2_051#You'll mind control me, kidnap my children! Dissect my dog!",
+ "#MUD2\\MUD2_052#He's unnaturally strong, Captain! I can't take him down!",
+ "#MUD2\\MUD2_053#I don't think the phaser will have the usual effect, Captain.... we'll have to think of something else!",
+ "#MUD2\\MUD2_054#Captain, count your blessings! We haven't met any salt vampires, deranged computers, blood-draining clouds, cell imploding sirens, Greek gods, or any of the other things people keep telling me about in security. ",
+ "#MUD2\\MUD2_055#Sir, I can phaser him. A stun setting would just leave him queasy. ",
+ "#MUD2\\MUD2N000#Dr. McCoy, who isn't arguing as much with Spock as usual. ",
+ "#MUD2\\MUD2N001#Dust and grease lifts off the surface, leaving this item clean as new.",
+ "#MUD2\\MUD2N002#Harcourt Fenton Mudd. Three of the most prominent psychologists in the galaxy became famous by publishing case studies in sociopathy about him. ",
+ "#MUD2\\MUD2N003#James Kirk, the paragon of a Starfleet captain, feels nothing like a paragon right now. ",
+ "#MUD2\\MUD2N004#Lieutenant Buchert. His is not to reason why. His is to obey orders and stay alert. ",
+ "#MUD2\\MUD2N005#Life support fails completely and you fall unconscious.",
+ "#MUD2\\MUD2N006#Mr. Spock, your loyal science officer. ",
+ "#MUD2\\MUD2N007#Padded inclines resembling a bed.",
+ "#MUD2\\MUD2N008#Small containers of oddly-colored liquids.",
+ "#MUD2\\MUD2N009#The atmosphere in the ship has dropped below the level needed to sustain life. You drop to unconsciousness and slowly die.",
+ "#MUD2\\MUD2N010#These two things fit together like they were made for each other.",
+ "#MUD2\\MUD2N011#This seems to be the main monitoring station for the beds. Above it is some sort of dispensary.",
"#MUD4\\MUD4_018#Kirk to Enterprise ... Kirk to Enterprise.",