aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/startrek/awaymission.cpp4
-rw-r--r--engines/startrek/awaymission.h21
-rw-r--r--engines/startrek/module.mk6
-rw-r--r--engines/startrek/room.cpp24
-rw-r--r--engines/startrek/room.h65
-rw-r--r--engines/startrek/rooms/function_map.h62
-rw-r--r--engines/startrek/rooms/mudd0.cpp349
-rw-r--r--engines/startrek/rooms/mudd1.cpp34
-rw-r--r--engines/startrek/rooms/mudd2.cpp34
-rw-r--r--engines/startrek/rooms/mudd3.cpp34
-rw-r--r--engines/startrek/rooms/mudd4.cpp34
-rw-r--r--engines/startrek/rooms/mudd5.cpp34
-rw-r--r--engines/startrek/startrek.cpp2
-rw-r--r--engines/startrek/text.h133
14 files changed, 832 insertions, 4 deletions
diff --git a/engines/startrek/awaymission.cpp b/engines/startrek/awaymission.cpp
index 6d845dadde..d87c690a69 100644
--- a/engines/startrek/awaymission.cpp
+++ b/engines/startrek/awaymission.cpp
@@ -467,7 +467,9 @@ void StarTrekEngine::handleAwayMissionAction() {
Action action = _actionQueue.pop();
if ((action.type == ACTION_FINISHED_ANIMATION || action.type == ACTION_FINISHED_WALKING) && action.b1 == 0xff) {
- _awayMission.disableInput = false;
+ // Just finished walking or beaming into a room
+ if (_awayMission.disableInput == 1)
+ _awayMission.disableInput = false;
_warpHotspotsActive = true;
return;
}
diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h
index 2a0b323b1a..af93218944 100644
--- a/engines/startrek/awaymission.h
+++ b/engines/startrek/awaymission.h
@@ -33,7 +33,12 @@ struct AwayMission {
int16 mouseY; // 0x12
int16 crewGetupTimers[4]; // 0x14
bool disableWalking; // 0x1c
- byte disableInput; // 0x1d; Set while beaming in or walking into a room. Disables control?
+
+ // 0 / false: input enabled
+ // 1 / true: input disabled, turns back on after walking or beaming into a room
+ // 2: input disabled, doesn't turn back on after walking or beaming into room
+ byte disableInput; // 0x1d
+
bool redshirtDead; // 0x1e
byte activeAction; // 0x1f
byte activeObject; // 0x20; The item that is going to be used on something
@@ -182,6 +187,20 @@ struct AwayMission {
bool gotPointsForHydratingRomulans; // 0x51
int16 missionScore; // 0x52
} love;
+
+ struct {
+ byte field29; // 0x29
+
+ // True if you've combined the lense + degrimer and fired it off, discovering
+ // it's a weapon
+ bool discoveredLenseAndDegrimerFunction; // 0x3c
+ bool gotMemoryDisk; // 0x48
+ bool gotLense; // 0x49
+ bool gotDegrimer; // 0x4a
+
+ bool enteredRoom0ForFirstTime; // 0x54
+ int16 missionScore; // 0x5a
+ } mudd;
};
};
// Size: 0x129 bytes
diff --git a/engines/startrek/module.mk b/engines/startrek/module.mk
index 6de706e257..4271aef4a1 100644
--- a/engines/startrek/module.mk
+++ b/engines/startrek/module.mk
@@ -37,6 +37,12 @@ MODULE_OBJS = \
rooms/love4.o \
rooms/love5.o \
rooms/lovea.o \
+ rooms/mudd0.o \
+ rooms/mudd1.o \
+ rooms/mudd2.o \
+ rooms/mudd3.o \
+ rooms/mudd4.o \
+ rooms/mudd5.o \
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index 730d42f73d..0076e76806 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -105,6 +105,30 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm) {
_roomActionList = love5ActionList;
_numRoomActions = sizeof(love5ActionList) / sizeof(RoomAction);
}
+ else if (name == "MUDD0") {
+ _roomActionList = mudd0ActionList;
+ _numRoomActions = sizeof(mudd0ActionList) / sizeof(RoomAction);
+ }
+ else if (name == "MUDD1") {
+ _roomActionList = mudd1ActionList;
+ _numRoomActions = sizeof(mudd1ActionList) / sizeof(RoomAction);
+ }
+ else if (name == "MUDD2") {
+ _roomActionList = mudd2ActionList;
+ _numRoomActions = sizeof(mudd2ActionList) / sizeof(RoomAction);
+ }
+ else if (name == "MUDD3") {
+ _roomActionList = mudd3ActionList;
+ _numRoomActions = sizeof(mudd3ActionList) / sizeof(RoomAction);
+ }
+ else if (name == "MUDD4") {
+ _roomActionList = mudd4ActionList;
+ _numRoomActions = sizeof(mudd4ActionList) / sizeof(RoomAction);
+ }
+ else if (name == "MUDD5") {
+ _roomActionList = mudd5ActionList;
+ _numRoomActions = sizeof(mudd5ActionList) / sizeof(RoomAction);
+ }
else {
warning("Room \"%s\" unimplemented", name.c_str());
_numRoomActions = 0;
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 009913d112..ad08ce3bd6 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -120,7 +120,7 @@ private:
Common::Point getActorPos(int actorIndex); // Cmd 0x0d
int16 getRandomWordInRange(int start, int end); // Cmd 0x0e
void playSoundEffectIndex(int soundEffect); // Cmd 0x0f
- void playMidiMusicTracks(int startTrack, int loopTrack); // Cmd 0x10
+ void playMidiMusicTracks(int startTrack, int loopTrack = -1); // Cmd 0x10
void endMission(int16 score, int16 arg2, int16 arg3); // Cmd 0x11
void showGameOverMenu(); // Cmd 0x12
void playVoc(Common::String filename); // Cmd 0x15
@@ -1118,6 +1118,64 @@ public:
void loveaUseAmmonia();
void loveaUseCommunicator();
+
+ // MUDD0
+ void mudd0Tick1();
+ void mudd0Tick50();
+ void mudd0Tick60();
+ void mudd0UsePhaserOnMudd();
+ void mudd0UseCommunicator();
+ void mudd0LookAtFoodBox();
+ void mudd0LookAtComponentBox();
+ void mudd0LookAnywhere();
+ void mudd0LookAtMemoryDiskBox();
+ void mudd0LookAtDegrimerBox();
+ void mudd0LookAtLense();
+ void mudd0UseSTricorderAnywhere();
+ void mudd0UseMTricorderAnywhere();
+ void mudd0UseSTricorderOnMemoryDiskBox();
+ void mudd0UseSTricorderOnDegrimerBox();
+ void mudd0UseMTricorderOnLense();
+ void mudd0UseLenseOnDegrimer();
+ void mudd0UseAlienDevice();
+ void mudd0FiredAlienDevice();
+ void mudd0UseDegrimer();
+ void mudd0GetLense();
+ void mudd0GetMemoryDisk();
+ void mudd0GetDegrimer();
+ void mudd0PickedUpLense();
+ void mudd0PickedUpItem();
+ void mudd0WalkToSouthDoor();
+ void mudd0TouchedHotspot1();
+ void mudd0WalkToNorthDoor();
+ void mudd0TouchedHotspot0();
+ void mudd0UseMedkit();
+ void mudd0LookAtKirk();
+ void mudd0LookAtSpock();
+ void mudd0LookAtMccoy();
+ void mudd0LookAtRedshirt();
+ void mudd0LookAtMudd();
+ void mudd0TalkToKirk();
+ void mudd0TalkToSpock();
+ void mudd0TalkToMccoy();
+ void mudd0TalkToRedshirt();
+ void mudd0TalkToMudd();
+
+ // MUDD1
+ void mudd1Tick1();
+
+ // MUDD2
+ void mudd2Tick1();
+
+ // MUDD3
+ void mudd3Tick1();
+
+ // MUDD4
+ void mudd4Tick1();
+
+ // MUDD5
+ void mudd5Tick1();
+
private:
// Room-specific variables. This is memset'ed to 0 when the room is initialized.
union {
@@ -1224,6 +1282,11 @@ private:
byte cmnYPosToCureSpock;
} love;
+ struct {
+ // mudd0
+ bool walkingToDoor; // 0x22a9
+ } mudd;
+
} _roomVar;
};
diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h
index 71c70871b3..92b5f98428 100644
--- a/engines/startrek/rooms/function_map.h
+++ b/engines/startrek/rooms/function_map.h
@@ -28,6 +28,8 @@
namespace StarTrek {
+// FIXME: calling a constructor in global scope not allowed in scummvm?
+
RoomAction demon0ActionList[] = {
{ Action(ACTION_TICK, 1, 0, 0), &Room::demon0Tick1 },
{ Action(ACTION_TICK, 2, 0, 0), &Room::demon0Tick2 },
@@ -1393,6 +1395,66 @@ RoomAction love5ActionList[] = {
{ Action(ACTION_USE, OBJECT_ICOMM, -1, 0), &Room::loveaUseCommunicator },
};
+RoomAction mudd0ActionList[] = {
+ { Action(ACTION_TICK, 1, 0, 0), &Room::mudd0Tick1 },
+ { Action(ACTION_TICK, 50, 0, 0), &Room::mudd0Tick50 },
+ { Action(ACTION_TICK, 60, 0, 0), &Room::mudd0Tick60 },
+ { Action(ACTION_USE, OBJECT_IPHASERS, 8, 0), &Room::mudd0UsePhaserOnMudd },
+ { Action(ACTION_USE, OBJECT_IPHASERK, 8, 0), &Room::mudd0UsePhaserOnMudd },
+ { Action(ACTION_USE, OBJECT_ICOMM, -1, 0), &Room::mudd0UseCommunicator },
+ { Action(ACTION_LOOK, 0x23, 0, 0), &Room::mudd0LookAtFoodBox },
+ { Action(ACTION_LOOK, 0x24, 0, 0), &Room::mudd0LookAtComponentBox },
+ { Action(ACTION_LOOK, -1, 0, 0), &Room::mudd0LookAnywhere },
+ { Action(ACTION_LOOK, 0x20, 0, 0), &Room::mudd0LookAtMemoryDiskBox },
+ { Action(ACTION_LOOK, 0x22, 0, 0), &Room::mudd0LookAtDegrimerBox },
+ { Action(ACTION_LOOK, 0x21, 0, 0), &Room::mudd0LookAtLense },
+ { Action(ACTION_USE, OBJECT_ISTRICOR, -1, 0), &Room::mudd0UseSTricorderAnywhere },
+ { Action(ACTION_USE, OBJECT_IMTRICOR, -1, 0), &Room::mudd0UseMTricorderAnywhere },
+ { 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 },
+ { 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 },
+ { Action(ACTION_TIMER_EXPIRED, 1, 0, 0), &Room::mudd0PickedUpLense },
+ { Action(ACTION_FINISHED_ANIMATION, 1, 0, 0), &Room::mudd0PickedUpItem },
+ { Action(ACTION_WALK, 0x26, 0, 0), &Room::mudd0WalkToSouthDoor },
+ { Action(ACTION_TOUCHED_HOTSPOT, 1, 0, 0), &Room::mudd0TouchedHotspot1 },
+ { Action(ACTION_WALK, 0x25, 0, 0), &Room::mudd0WalkToNorthDoor },
+ { Action(ACTION_TOUCHED_HOTSPOT, 0, 0, 0), &Room::mudd0TouchedHotspot0 },
+ { Action(ACTION_USE, OBJECT_IMEDKIT, -1, 0), &Room::mudd0UseMedkit },
+ { Action(ACTION_LOOK, OBJECT_KIRK, 0, 0), &Room::mudd0LookAtKirk },
+ { Action(ACTION_LOOK, OBJECT_SPOCK, 0, 0), &Room::mudd0LookAtSpock },
+ { Action(ACTION_LOOK, OBJECT_MCCOY, 0, 0), &Room::mudd0LookAtMccoy },
+ { Action(ACTION_LOOK, OBJECT_REDSHIRT, 0, 0), &Room::mudd0LookAtRedshirt },
+ { Action(ACTION_LOOK, 8, 0, 0), &Room::mudd0LookAtMudd },
+ { Action(ACTION_TALK, OBJECT_KIRK, 0, 0), &Room::mudd0TalkToKirk },
+ { Action(ACTION_TALK, OBJECT_SPOCK, 0, 0), &Room::mudd0TalkToSpock },
+ { Action(ACTION_TALK, OBJECT_MCCOY, 0, 0), &Room::mudd0TalkToMccoy },
+ { Action(ACTION_TALK, OBJECT_REDSHIRT, 0, 0), &Room::mudd0TalkToRedshirt },
+ { Action(ACTION_TALK, 8, 0, 0), &Room::mudd0TalkToMudd },
+ // TODO: remainder? something about losing atmosphere?
+};
+
+RoomAction mudd1ActionList[] = {
+ { Action(ACTION_TICK, 1, 0, 0), &Room::mudd1Tick1 },
+};
+RoomAction mudd2ActionList[] = {
+ { Action(ACTION_TICK, 1, 0, 0), &Room::mudd2Tick1 },
+};
+RoomAction mudd3ActionList[] = {
+ { Action(ACTION_TICK, 1, 0, 0), &Room::mudd3Tick1 },
+};
+RoomAction mudd4ActionList[] = {
+ { Action(ACTION_TICK, 1, 0, 0), &Room::mudd4Tick1 },
+};
+RoomAction mudd5ActionList[] = {
+ { Action(ACTION_TICK, 1, 0, 0), &Room::mudd5Tick1 },
+};
}
diff --git a/engines/startrek/rooms/mudd0.cpp b/engines/startrek/rooms/mudd0.cpp
new file mode 100644
index 0000000000..d482aa7e24
--- /dev/null
+++ b/engines/startrek/rooms/mudd0.cpp
@@ -0,0 +1,349 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "startrek/room.h"
+
+#define OBJECT_MUDD 8
+#define OBJECT_ALIENDV 9
+#define OBJECT_DOOR 10
+
+#define HOTSPOT_MEMORY_DISK_BOX 0x20
+#define HOTSPOT_LENSE 0x21
+#define HOTSPOT_DEGRIMER_BOX 0x22
+#define HOTSPOT_FOOD_BOX 0x23
+#define HOTSPOT_COMPONENT_BOX 0x24
+#define HOTSPOT_DOOR 0x25
+#define HOTSPOT_BOTTOM_OF_ROOM 0x26
+
+// BUG: Mudd is sometimes present when he shouldn't be.
+
+namespace StarTrek {
+
+void Room::mudd0Tick1() {
+ playVoc("MUD0LOOP");
+
+ _vm->_awayMission.disableInput = 2;
+ loadActorAnim(OBJECT_MUDD, "s4cbhr", 0xa2, 0xa9, 0);
+
+ // Floppy version's code.
+ /*
+ if (_vm->_awayMission.mudd.field29 == 0)
+ _vm->_awayMission.mudd.field29 = 2;
+ else {
+ _vm->_awayMission.mudd.field1d = 2;
+ loadActorAnim(OBJECT_MUDD, "s4cbhr", 0xa2, 0xa9, 0);
+ }
+ */
+}
+
+void Room::mudd0Tick50() {
+ if (!_vm->_awayMission.mudd.enteredRoom0ForFirstTime) {
+ playMidiMusicTracks(3);
+ _vm->_awayMission.mudd.enteredRoom0ForFirstTime = true;
+ }
+}
+
+void Room::mudd0Tick60() {
+ _vm->_awayMission.disableInput = false;
+
+ if (_vm->_awayMission.mudd.field29 == 0) {
+ _vm->_awayMission.mudd.field29++;
+
+ showText(TX_SPEAKER_MUDD, TX_MUD0_037);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_009);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_028);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_017);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_026);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_006);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_033);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_005);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_029);
+ }
+}
+
+void Room::mudd0UsePhaserOnMudd() {
+ showText(TX_SPEAKER_MUDD, TX_MUD0_025);
+}
+
+void Room::mudd0UseCommunicator() {
+ showText(TX_SPEAKER_KIRK, TX_MUD0_001);
+ showText(TX_SPEAKER_UHURA, TX_STATICU1);
+}
+
+void Room::mudd0LookAtFoodBox() {
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
+ loadActorStandAnim(OBJECT_KIRK);
+ showText(TX_MUD0N012);
+}
+
+void Room::mudd0LookAtComponentBox() {
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
+ loadActorStandAnim(OBJECT_KIRK);
+ showText(TX_MUD0N013);
+}
+
+void Room::mudd0LookAnywhere() {
+ showText(TX_MUD0N019);
+}
+
+void Room::mudd0LookAtMemoryDiskBox() {
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_N;
+ loadActorStandAnim(OBJECT_KIRK);
+ showText(TX_MUD0N010);
+}
+
+void Room::mudd0LookAtDegrimerBox() {
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_W;
+ loadActorStandAnim(OBJECT_KIRK);
+ showText(TX_MUD0N008);
+}
+
+void Room::mudd0LookAtLense() {
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_E;
+ loadActorStandAnim(OBJECT_KIRK);
+ showText(TX_MUD0N014);
+}
+
+void Room::mudd0UseSTricorderAnywhere() {
+ // Narrator says something, not Spock (so we don't use "spockScan" function)
+ loadActorAnim2(OBJECT_SPOCK, "sscans", -1, -1, 0);
+ playSoundEffectIndex(SND_TRICORDER);
+ showText(TX_MUD0N015);
+}
+
+void Room::mudd0UseMTricorderAnywhere() {
+ // Narrator says something, not Mccoy (so we don't use "mccoyScan" function)
+ // BUGFIX-ish: original game had "McCoy" as the speaker, which is inconsistent with
+ // above.
+ loadActorAnim2(OBJECT_MCCOY, "mscans", -1, -1, 0);
+ playSoundEffectIndex(SND_TRICORDER);
+ showText(TX_MUD0N015);
+}
+
+void Room::mudd0UseSTricorderOnMemoryDiskBox() {
+ spockScan(DIR_N, TX_MUD0_021, true);
+}
+
+void Room::mudd0UseSTricorderOnDegrimerBox() {
+ // Narrator says something, not Spock (so we don't use "spockScan" function)
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_SPOCK] = DIR_W;
+ loadActorAnim2(OBJECT_SPOCK, "sscanw", -1, -1, 0);
+ playSoundEffectIndex(SND_TRICORDER);
+ showText(TX_MUD0N000);
+}
+
+void Room::mudd0UseMTricorderOnLense() {
+ if (_vm->_awayMission.mudd.discoveredLenseAndDegrimerFunction)
+ mccoyScan(DIR_E, TX_MUD0_012, true);
+ else
+ mccoyScan(DIR_E, TX_MUD0_013, true);
+}
+
+void Room::mudd0UseLenseOnDegrimer() {
+ giveItem(OBJECT_IALIENDV);
+ loseItem(OBJECT_IDEGRIME);
+ loseItem(OBJECT_ILENSES);
+
+ _vm->_awayMission.mudd.missionScore++;
+ showText(TX_MUD0N011);
+ // Identical (?) audio files: TX_MUD0N011, TX_MUD1N013
+}
+
+
+void Room::mudd0UseAlienDevice() {
+ _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);
+ playVoc("EXPLO3");
+}
+
+void Room::mudd0FiredAlienDevice() {
+ _vm->_awayMission.disableInput = false;
+ if (!_vm->_awayMission.mudd.discoveredLenseAndDegrimerFunction) {
+ _vm->_awayMission.mudd.discoveredLenseAndDegrimerFunction = true;
+ _vm->_awayMission.mudd.missionScore += 5;
+ showText(TX_SPEAKER_KIRK, TX_MUD0_002);
+ // Identical (?) audio files: TX_MUD0_002, TX_MUD1_002
+ }
+}
+
+
+void Room::mudd0UseDegrimer() {
+ // Identical (?) audio files: TX_MUD0N002, TX_MUD1N004, ...
+ showText(TX_MUD0N002);
+}
+
+
+void Room::mudd0GetLense() {
+ if (_vm->_awayMission.mudd.gotLense)
+ showText(TX_MUD0N016);
+ else {
+ _vm->_awayMission.mudd.gotLense = true;
+ _vm->_awayMission.mudd.missionScore++;
+ giveItem(OBJECT_ILENSES);
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_E;
+ loadActorAnim2(OBJECT_KIRK, "s5r1kg", -1, -1);
+ _vm->_awayMission.timers[1] = 27;
+ }
+}
+
+void Room::mudd0GetMemoryDisk() {
+ if (_vm->_awayMission.mudd.gotMemoryDisk)
+ showText(TX_MUD0N016);
+ else {
+ _vm->_awayMission.mudd.gotMemoryDisk = true;
+ _vm->_awayMission.mudd.missionScore++;
+ giveItem(OBJECT_IDISKS);
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_N;
+ loadActorAnimC(OBJECT_KIRK, "kuseln", -1, -1, &Room::mudd0PickedUpItem);
+ }
+}
+
+void Room::mudd0GetDegrimer() {
+ if (_vm->_awayMission.mudd.gotDegrimer)
+ showText(TX_MUD0N016);
+ else {
+ _vm->_awayMission.mudd.gotDegrimer = true;
+ _vm->_awayMission.mudd.missionScore++;
+ giveItem(OBJECT_IDEGRIME);
+ _vm->_awayMission.crewDirectionsAfterWalk[OBJECT_KIRK] = DIR_S;
+ loadActorAnimC(OBJECT_KIRK, "kusemw", -1, -1, &Room::mudd0PickedUpItem);
+ }
+}
+
+// Timer 1 expired
+void Room::mudd0PickedUpLense() {
+ loadActorStandAnim(OBJECT_KIRK);
+ mudd0PickedUpItem();
+}
+
+void Room::mudd0PickedUpItem() {
+ _vm->_awayMission.disableInput = false; // NOTE: this was never set to true
+ showText(TX_LOV1N007);
+}
+
+
+void Room::mudd0WalkToSouthDoor() {
+ _roomVar.mudd.walkingToDoor = true;
+ _vm->_awayMission.disableInput = true;
+ walkCrewman(OBJECT_KIRK, 0x5a, 0xc7);
+}
+
+void Room::mudd0TouchedHotspot1() { // Trigger bottom door opening
+ if (_roomVar.mudd.walkingToDoor)
+ playVoc("SMADOOR3");
+}
+
+void Room::mudd0WalkToNorthDoor() {
+ _roomVar.mudd.walkingToDoor = true;
+ _vm->_awayMission.disableInput = true;
+ walkCrewman(OBJECT_KIRK, 0xa0, 0x68);
+}
+
+void Room::mudd0TouchedHotspot0() { // Trigger top door opening
+ if (_roomVar.mudd.walkingToDoor) {
+ playVoc("SMADOOR3");
+ loadActorAnim2(OBJECT_DOOR, "s4cbdo", 0xa0, 0x6b);
+ }
+}
+
+void Room::mudd0UseMedkit() {
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_011);
+}
+
+void Room::mudd0LookAtKirk() {
+ showText(TX_MUD0N004);
+}
+
+void Room::mudd0LookAtSpock() {
+ showText(TX_MUD0N007);
+}
+
+void Room::mudd0LookAtMccoy() {
+ showText(TX_MUD0N001);
+}
+
+void Room::mudd0LookAtRedshirt() {
+ showText(TX_MUD0N005);
+}
+
+void Room::mudd0LookAtMudd() {
+ showText(TX_MUD0N003);
+}
+
+void Room::mudd0TalkToKirk() {
+ if (_vm->_awayMission.mudd.field29 == 2)
+ showText(TX_SPEAKER_KIRK, TX_MUD0_010);
+ else {
+ showText(TX_SPEAKER_KIRK, TX_MUD0_010);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_031);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_007);
+ }
+}
+
+void Room::mudd0TalkToSpock() {
+ if (_vm->_awayMission.mudd.field29 == 2)
+ showText(TX_SPEAKER_SPOCK, TX_MUD0_022);
+ else {
+ showText(TX_SPEAKER_SPOCK, TX_MUD0_022);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_034);
+ showText(TX_SPEAKER_SPOCK, TX_MUD0_023);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_015);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_038);
+ }
+}
+
+void Room::mudd0TalkToMccoy() {
+ if (_vm->_awayMission.mudd.field29 == 2)
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_016);
+ else {
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_016);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_003);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_027);
+ showText(TX_SPEAKER_MCCOY, TX_MUD0_014);
+ }
+}
+
+void Room::mudd0TalkToRedshirt() {
+ if (_vm->_awayMission.mudd.field29 == 2)
+ showText(TX_SPEAKER_BUCHERT, TX_MUD0_016);
+ else {
+ showText(TX_SPEAKER_BUCHERT, TX_MUD0_040);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_030);
+ showText(TX_SPEAKER_BUCHERT, TX_MUD0_041);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_036);
+ showText(TX_SPEAKER_BUCHERT, TX_MUD0_039);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_008);
+ }
+}
+
+void Room::mudd0TalkToMudd() {
+ showText(TX_SPEAKER_MUDD, TX_MUD0_032);
+ showText(TX_SPEAKER_SPOCK, TX_MUD0_024);
+ showText(TX_SPEAKER_MUDD, TX_MUD0_035);
+ showText(TX_SPEAKER_KIRK, TX_MUD0_004);
+}
+
+}
diff --git a/engines/startrek/rooms/mudd1.cpp b/engines/startrek/rooms/mudd1.cpp
new file mode 100644
index 0000000000..90292514d2
--- /dev/null
+++ b/engines/startrek/rooms/mudd1.cpp
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "startrek/room.h"
+
+#define OBJECT_DOOR1 8
+
+#define HOTSPOT_CONSOLE 0x20
+
+namespace StarTrek {
+
+void Room::mudd1Tick1() {
+}
+
+}
diff --git a/engines/startrek/rooms/mudd2.cpp b/engines/startrek/rooms/mudd2.cpp
new file mode 100644
index 0000000000..f4b5b5f904
--- /dev/null
+++ b/engines/startrek/rooms/mudd2.cpp
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "startrek/room.h"
+
+#define OBJECT_DOOR1 8
+
+#define HOTSPOT_CONSOLE 0x20
+
+namespace StarTrek {
+
+void Room::mudd2Tick1() {
+}
+
+}
diff --git a/engines/startrek/rooms/mudd3.cpp b/engines/startrek/rooms/mudd3.cpp
new file mode 100644
index 0000000000..e3f215f784
--- /dev/null
+++ b/engines/startrek/rooms/mudd3.cpp
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "startrek/room.h"
+
+#define OBJECT_DOOR1 8
+
+#define HOTSPOT_CONSOLE 0x20
+
+namespace StarTrek {
+
+void Room::mudd3Tick1() {
+}
+
+}
diff --git a/engines/startrek/rooms/mudd4.cpp b/engines/startrek/rooms/mudd4.cpp
new file mode 100644
index 0000000000..f6a0e55c2d
--- /dev/null
+++ b/engines/startrek/rooms/mudd4.cpp
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "startrek/room.h"
+
+#define OBJECT_DOOR1 8
+
+#define HOTSPOT_CONSOLE 0x20
+
+namespace StarTrek {
+
+void Room::mudd4Tick1() {
+}
+
+}
diff --git a/engines/startrek/rooms/mudd5.cpp b/engines/startrek/rooms/mudd5.cpp
new file mode 100644
index 0000000000..30ddc9879c
--- /dev/null
+++ b/engines/startrek/rooms/mudd5.cpp
@@ -0,0 +1,34 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "startrek/room.h"
+
+#define OBJECT_DOOR1 8
+
+#define HOTSPOT_CONSOLE 0x20
+
+namespace StarTrek {
+
+void Room::mudd5Tick1() {
+}
+
+}
diff --git a/engines/startrek/startrek.cpp b/engines/startrek/startrek.cpp
index 993be77813..24fa741e92 100644
--- a/engines/startrek/startrek.cpp
+++ b/engines/startrek/startrek.cpp
@@ -83,7 +83,7 @@ StarTrekEngine::StarTrekEngine(OSystem *syst, const StarTrekGameDescription *gam
_textboxVar6 = 0;
_textboxHasMultipleChoices = false;
- _missionToLoad = "LOVE";
+ _missionToLoad = "MUDD";
_roomIndexToLoad = 0;
for (int i = 0; i < NUM_OBJECTS; i++)
diff --git a/engines/startrek/text.h b/engines/startrek/text.h
index 457f87bfdc..93f1b8f060 100644
--- a/engines/startrek/text.h
+++ b/engines/startrek/text.h
@@ -100,6 +100,9 @@ enum GameStringIDs {
TX_SPEAKER_CHEEVER,
TX_SPEAKER_PREAX,
+ TX_SPEAKER_BUCHERT,
+ TX_SPEAKER_MUDD,
+
TX_BRIDU146,
TX_G_024,
@@ -1160,6 +1163,69 @@ enum GameStringIDs {
TX_LOVA_F55,
+ TX_MUD0_001,
+ TX_MUD0_002,
+ TX_MUD0_003,
+ TX_MUD0_004,
+ TX_MUD0_005,
+ TX_MUD0_006,
+ TX_MUD0_007,
+ TX_MUD0_008,
+ TX_MUD0_009,
+ TX_MUD0_010,
+ TX_MUD0_011,
+ TX_MUD0_012,
+ TX_MUD0_013,
+ TX_MUD0_014,
+ TX_MUD0_015,
+ TX_MUD0_016,
+ TX_MUD0_017,
+ TX_MUD0_018,
+ TX_MUD0_019,
+ TX_MUD0_020,
+ TX_MUD0_021,
+ TX_MUD0_022,
+ TX_MUD0_023,
+ TX_MUD0_024,
+ TX_MUD0_025,
+ TX_MUD0_026,
+ TX_MUD0_027,
+ TX_MUD0_028,
+ TX_MUD0_029,
+ TX_MUD0_030,
+ TX_MUD0_031,
+ TX_MUD0_032,
+ TX_MUD0_033,
+ TX_MUD0_034,
+ TX_MUD0_035,
+ TX_MUD0_036,
+ TX_MUD0_037,
+ TX_MUD0_038,
+ TX_MUD0_039,
+ TX_MUD0_040,
+ TX_MUD0_041,
+ TX_MUD0N000,
+ TX_MUD0N001,
+ TX_MUD0N002,
+ TX_MUD0N003,
+ TX_MUD0N004,
+ TX_MUD0N005,
+ TX_MUD0N006,
+ TX_MUD0N007,
+ TX_MUD0N008,
+ TX_MUD0N009,
+ TX_MUD0N010,
+ TX_MUD0N011,
+ TX_MUD0N012,
+ TX_MUD0N013,
+ TX_MUD0N014,
+ TX_MUD0N015,
+ TX_MUD0N016,
+ TX_MUD0N017,
+ // UNUSED
+ TX_MUD0N019,
+
+
TX_MUD2_040,
@@ -1173,6 +1239,7 @@ enum GameStringIDs {
TX_SPOKCOFF,
+ TX_STATICU1,
TX_END
@@ -1216,6 +1283,9 @@ const char * const g_gameStrings[] = {
"Dr. Cheever",
"Preax",
+ "Lt. Buchert",
+ "Harry Mudd",
+
"#BRID\\BRIDU146#Nothing to report, Captain.",
"#GENE\\G_024#Fascinating.",
@@ -2276,6 +2346,68 @@ const char * const g_gameStrings[] = {
"#LOVA\\LOVA_F55#Jim, we need to synthesize more to make the serum before we can use it.", // TYPO
+ "#MUD0\\MUD0_001#Kirk to Enterprise...",
+ "#MUD0\\MUD0_002#Well! Now I think we know why the Elasi pirates were so interested in finding out where Mudd was getting these!",
+ "#MUD0\\MUD0_003#Bones, Federation law is clear on this. Federation law protects everyone, even Harry Mudd. ",
+ "#MUD0\\MUD0_004#Don't push your luck, Harry. ",
+ "#MUD0\\MUD0_005#Harry, as official representatives of the Federation, and of Starfleet, we recognize your rights to legitimate salvage. Need I say more? ",
+ "#MUD0\\MUD0_006#I see, Harry. Well, we'll look around here while the Enterprise remains close by.",
+ "#MUD0\\MUD0_007#It was a rhetorical question, Harry. ",
+ "#MUD0\\MUD0_008#No Lieutenant, that was Horatio Jones, but Harry Mudd is worse.",
+ "#MUD0\\MUD0_009#Well, you're terrible trouble to me, Harry. Tell me what this is all about.",
+ "#MUD0\\MUD0_010#Why do I have the feeling that I am about to have a bad day? ",
+ "#MUD0\\MUD0_011#Everyone is healthy, Jim, there's no need for the medical kit here.",
+ "#MUD0\\MUD0_012#These lenses were definitely not made to correct the aliens' vision. Mudd might've been able to sell these among humans as magnifiers, but these people must have had another use for them.",
+ "#MUD0\\MUD0_013#These lenses are finely made magnifiers, but I can't help but wonder if that's what the aliens really used them for. ",
+ "#MUD0\\MUD0_014#About as much as the Klingons are devoted to pacifism... ",
+ "#MUD0\\MUD0_015#For once Spock, I couldn't have said it better myself. ",
+ "#MUD0\\MUD0_016#Jim? You can't seriously be thinking of helping Mudd after all he's done. ",
+ "#MUD0\\MUD0_017#Then something went wrong, right?",
+ "#MUD0\\MUD0_018#Life support down to 25%, Captain.",
+ "#MUD0\\MUD0_019#Life support down to 50%, Captain.",
+ "#MUD0\\MUD0_020#Life support down to 75%, Captain.",
+ "#MUD0\\MUD0_021#These are computer memory transfer media, probably designed for use with the alien computer system.",
+ "#MUD0\\MUD0_022#Given the past record of Harry Mudd, Captain, I strongly recommend that you do not trust him. ",
+ "#MUD0\\MUD0_023#I am. Your record is that of a greedy, amoral, sociopathic fraud who preys upon human emotion, most notably, gullibility. ", // TYPO (gullability)
+ "#MUD0\\MUD0_024#There was the time that you tried to commandeer the Enterprise to sell wives to miners, and then there was the time you stole the Enterprise to exchange us for androids who were holding you prisoner... ",
+ "#MUD0\\MUD0_025#Kirk, after all we've been through you wouldn't shoot me would you?",
+ "#MUD0\\MUD0_026#Actually no, Doctor, not then. I'd started offering a few other little items I found -- Mudd's Limited coffee substitute -- a great little specialty item; lenses to a firm packaging BuildYerOwn telescope kits; a collection of novelty paints -- things like that. All of a sudden, the Elasi pirates are asking for me in every quadrant, and wanting to know where I'm getting my goods!",
+ "#MUD0\\MUD0_027#And we all know how devoted I am to Federation law. ",
+ "#MUD0\\MUD0_028#I happened upon this ship not long ago, and dutifully registered it as salvage, mind you! In the hold here, I discovered one of these devices -- in that box over there. When I tried one on a wall, it floated off the grease and dirt -- perfect for cleaning, near as I could see. I peddled a few of these Mudd's Miracle De-Grimers and everything was going perfectly well.",
+ "#MUD0\\MUD0_029#I understand perfectly, Captain -- Carry on, Captain.",
+ "#MUD0\\MUD0_030#It's a system that cost a gambler his life, boy. He crawled up to me and whispered it with his dying breath, and it can be yours for a mere... 200 credits. ",
+ "#MUD0\\MUD0_031#Kirk! Now that we're together... ",
+ "#MUD0\\MUD0_032#Kirk, my friend! When have I ever given you the slightest bit of trouble? ",
+ "#MUD0\\MUD0_033#Look around all you like, Captain, but I'll be keeping an eye on you. I've registered this derelict as my salvage, and I don't want you running off with all my prizes! ",
+ "#MUD0\\MUD0_034#Mr. Spock! Whatever gave you that impression! I thought Vulcans were supposed to be logical. ",
+ "#MUD0\\MUD0_035#Perhaps there have been a few minor misunderstandings... ",
+ "#MUD0\\MUD0_036#Starfleet! You're all the same. No sense of adventure! ",
+ "#MUD0\\MUD0_037#Welcome, Captain Kirk! So glad you're here. The Elasi have been terrible trouble to me.",
+ "#MUD0\\MUD0_038#Why I've never been so insulted in all my life! ",
+ "#MUD0\\MUD0_039#Didn't Mudd bring those tribbles on board the Enterprise?",
+ "#MUD0\\MUD0_040#So you say you know how to break the gambling machines on Curalon IV? ",
+ "#MUD0\\MUD0_041#Sorry Mr. Mudd. My mother didn't raise any fools in her family. ",
+ "#MUD0\\MUD0N000#A small energy device with a flanged opening at the front, about the size of one's thumbnail.",
+ "#MUD0\\MUD0N001#Dr. McCoy looks like he would like to violate the Hippocratic Oath on Harry Mudd, but you know he won't. ",
+ "#MUD0\\MUD0N002#Dust and grease lifts off the surface, leaving this item clean as new.",
+ "#MUD0\\MUD0N003#Harcourt Fenton Mudd. Of course, he's going to be honest and fair with you... ",
+ "#MUD0\\MUD0N004#James T. Kirk looks rather exasperated right now. ",
+ "#MUD0\\MUD0N005#Lieutenant Buchert is standing around, watching everyone else converse with Harry Mudd. ",
+ "#MUD0\\MUD0N006#Life support fails completely and you fall unconscious.",
+ "#MUD0\\MUD0N007#Mr. Spock is as close to annoyed as a Vulcan can get. ",
+ "#MUD0\\MUD0N008#Odd-looking contraptions small enough to hold in one hand.",
+ "#MUD0\\MUD0N009#The atmosphere in the ship has dropped below the level needed to sustain life. You drop to unconsciousness and slowly die.",
+ "#MUD0\\MUD0N010#There are shiny, multi-sided, spherical objects in this box.",
+ "#MUD0\\MUD0N011#These two things fit together like they were made for each other.",
+ "#MUD0\\MUD0N012#This container holds bricks of what might have been preprocessed food -- a long time ago.",
+ "#MUD0\\MUD0N013#This container holds small mechanical components unfamiliar to you.",
+ "#MUD0\\MUD0N014#This lense, about the size of one's thumbnail, magnifies like a fine optical glass. ",
+ "#MUD0\\MUD0N015#This storage bay is stockpiled with all manner of goods.",
+ "#MUD0\\MUD0N016#You already have that.",
+ "#MUD0\\MUD0N017#You can't take that.",
+ "#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.",
+
+
"#MUD2\\MUD2_040#You look troubled, Captain.",
@@ -2289,6 +2421,7 @@ const char * const g_gameStrings[] = {
"#sfx\\spokcoff#cough... cough...",
+ "#SFX\\STATICU1#Ent... neu ... trans...",
};
}