aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Stewart2018-08-08 02:48:28 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit20cc6ae56d294c13086b32a74c3f1c7b79d04318 (patch)
treef41db753fe58d7b229523f608ea8a5835860fafd
parent5fae11b871850ffce45499b5b2fa37dbbdb40706 (diff)
downloadscummvm-rg350-20cc6ae56d294c13086b32a74c3f1c7b79d04318.tar.gz
scummvm-rg350-20cc6ae56d294c13086b32a74c3f1c7b79d04318.tar.bz2
scummvm-rg350-20cc6ae56d294c13086b32a74c3f1c7b79d04318.zip
STARTREK: VENG6
-rw-r--r--engines/startrek/awaymission.h7
-rw-r--r--engines/startrek/room.h58
-rw-r--r--engines/startrek/rooms/veng6.cpp427
-rw-r--r--engines/startrek/text.cpp44
-rw-r--r--engines/startrek/text.h49
5 files changed, 583 insertions, 2 deletions
diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h
index 7543674c70..02def65a13 100644
--- a/engines/startrek/awaymission.h
+++ b/engines/startrek/awaymission.h
@@ -679,9 +679,16 @@ struct AwayMission {
bool havePowerPack; // 0x5a
bool enteredRoom5FirstTime; // 0x5b
bool askedSpockAboutFire; // 0x5c
+
+ // bits 0-1 are set for each of the 2 cables that can be connected to the
+ // junction box in engineering.
+ byte junctionCablesConnected; // 0x5d
+
bool tookCableFromSickbayHallway; // 0x5f
bool tookMolecularSaw; // 0x60
bool readEngineeringJournal; // 0x61
+ bool tookEngineeringJournal; // 0x62
+ bool engineeringCabinetOpen; // 0x63
bool examinedTorpedoControl; // 0x66
bool field68; // 0x68
bool getPointsForHealingBrittany; // 0x69
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 4f0a1723aa..0bdaf7cafc 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -2716,6 +2716,59 @@ public:
// VENG6
void veng6Tick1();
+ void veng6WalkToDoor();
+ void veng6ReachedDoor();
+ void veng6DoorOpened();
+ void veng6LookAtLeftPort();
+ void veng6LookAtRightPort();
+ void veng6LookAtDoor();
+ void veng6LookAtOilCanister();
+ void veng6LookAtCabinet();
+ void veng6LookAtCable();
+ void veng6LookAtRightConsole();
+ void veng6LookAtImpulseEngines();
+ void veng6LookAtLeftConsole();
+ void veng6LookAtJunctionBox();
+ void veng6LookAtJournal();
+ void veng6LookAtKirk();
+ void veng6LookAtSpock();
+ void veng6LookAtMccoy();
+ void veng6LookAtRedshirt();
+ void veng6LookAtDeadGuy();
+ void veng6LookAnywhere();
+ void veng6TalkToKirk();
+ void veng6TalkToSpock();
+ void veng6TalkToMccoy();
+ void veng6TalkToRedshirt();
+ void veng6UseCable1OnLeftPort();
+ void veng6UseCable2OnLeftPort();
+ void veng6UseCableOnLeftPort(byte cable);
+ void veng6KirkOrSpockReachedLeftPort();
+ void veng6AttachedLeftCable();
+ void veng6UseCable1OnRightPort();
+ void veng6UseCable2OnRightPort();
+ void veng6UseCableOnRightPort(byte cable);
+ void veng6KirkOrSpockReachedRightPort();
+ void veng6AttachedRightCable();
+ void veng6UseCrewmanOnJunctionBox();
+ void veng6SpockReachedJunctionBox();
+ void veng6SpockAdjustedJunctionBox();
+ void veng6UseHypoOnOilCanister();
+ void veng6ReachedOilCanister();
+ void veng6FilledHypoWithOil();
+ void veng6UseCabinet();
+ void veng6ReachedCabinet();
+ void veng6OpenedOrClosedCabinet();
+ void veng6UseSTricorderOnImpulseEngines();
+ void veng6UseSTricorderOnRightConsole();
+ void veng6UseSTricorderOnJunctionBox();
+ void veng6UsePowerPackOnLeftConsole();
+ void veng6GetJunctionBox();
+ void veng6GetOilCanister();
+ void veng6GetEngineeringJournal();
+ void veng6ReachedEngineeringJournal();
+ void veng6TookEngineeringJournal();
+ // TODO: common code
// VENG7
void veng7Tick1();
@@ -3049,6 +3102,11 @@ public:
// veng4
bool usingMedkitOnBrittany;
+ // veng6
+ byte kirkAndSpockReadyToAttachLeftCable; // 0xca
+ byte kirkAndSpockReadyToAttachRightCable; // 0xcb
+ byte cableInUse; // 0xcc
+
// venga (common)
bool walkingToDoor; // 0xcb (veng1), 0xca (veng4)
} veng;
diff --git a/engines/startrek/rooms/veng6.cpp b/engines/startrek/rooms/veng6.cpp
index 78743d4420..e822742d06 100644
--- a/engines/startrek/rooms/veng6.cpp
+++ b/engines/startrek/rooms/veng6.cpp
@@ -22,20 +22,443 @@
#include "startrek/room.h"
-#define OBJECT_DOOR 8
+#define OBJECT_CABLE_1 8
+#define OBJECT_CABLE_2 9
+#define OBJECT_JUNCTION_BOX 10
+#define OBJECT_JOURNAL 11
+#define OBJECT_DOOR 12
+#define OBJECT_DEAD_GUY 13
+#define OBJECT_IMPULSE_ENGINES 14
+#define OBJECT_CABINET 15
-#define HOTSPOT_20 0x20
+#define HOTSPOT_LEFT_PORT 0x20
+#define HOTSPOT_RIGHT_PORT 0x21
+#define HOTSPOT_OIL_CANISTER 0x22
+#define HOTSPOT_CABINET 0x23
+#define HOTSPOT_RIGHT_CONSOLE 0x24 // Fusion mixture regulator
+#define HOTSPOT_IMPULSE_ENGINES 0x25
+#define HOTSPOT_LEFT_CONSOLE 0x26 // Impulse engine control
+#define HOTSPOT_DOOR 0x27
namespace StarTrek {
extern const RoomAction veng6ActionList[] = {
{ {ACTION_TICK, 1, 0, 0}, &Room::veng6Tick1 },
+
+ { {ACTION_WALK, OBJECT_DOOR, 0, 0}, &Room::veng6WalkToDoor },
+ { {ACTION_WALK, HOTSPOT_DOOR, 0, 0}, &Room::veng6WalkToDoor },
+ { {ACTION_DONE_WALK, 2, 0, 0}, &Room::veng6ReachedDoor },
+ { {ACTION_DONE_ANIM, 1, 0, 0}, &Room::veng6DoorOpened },
+
+ { {ACTION_LOOK, HOTSPOT_LEFT_PORT, 0, 0}, &Room::veng6LookAtLeftPort },
+ { {ACTION_LOOK, HOTSPOT_RIGHT_PORT, 0, 0}, &Room::veng6LookAtRightPort },
+ { {ACTION_LOOK, OBJECT_DOOR, 0, 0}, &Room::veng6LookAtDoor },
+ { {ACTION_LOOK, HOTSPOT_DOOR, 0, 0}, &Room::veng6LookAtDoor },
+ { {ACTION_LOOK, HOTSPOT_OIL_CANISTER, 0, 0}, &Room::veng6LookAtOilCanister },
+ { {ACTION_LOOK, OBJECT_CABINET, 0, 0}, &Room::veng6LookAtCabinet },
+ { {ACTION_LOOK, HOTSPOT_CABINET, 0, 0}, &Room::veng6LookAtCabinet },
+ { {ACTION_LOOK, OBJECT_CABLE_2, 0, 0}, &Room::veng6LookAtCable },
+ { {ACTION_LOOK, OBJECT_CABLE_1, 0, 0}, &Room::veng6LookAtCable },
+ { {ACTION_LOOK, HOTSPOT_RIGHT_CONSOLE, 0, 0}, &Room::veng6LookAtRightConsole },
+ { {ACTION_LOOK, OBJECT_IMPULSE_ENGINES, 0, 0}, &Room::veng6LookAtImpulseEngines },
+ { {ACTION_LOOK, HOTSPOT_IMPULSE_ENGINES, 0, 0}, &Room::veng6LookAtImpulseEngines },
+ { {ACTION_LOOK, HOTSPOT_LEFT_CONSOLE, 0, 0}, &Room::veng6LookAtLeftConsole },
+ { {ACTION_LOOK, OBJECT_JUNCTION_BOX, 0, 0}, &Room::veng6LookAtJunctionBox },
+ { {ACTION_LOOK, OBJECT_JOURNAL, 0, 0}, &Room::veng6LookAtJournal },
+ { {ACTION_LOOK, OBJECT_KIRK, 0, 0}, &Room::veng6LookAtKirk },
+ { {ACTION_LOOK, OBJECT_SPOCK, 0, 0}, &Room::veng6LookAtSpock },
+ { {ACTION_LOOK, OBJECT_MCCOY, 0, 0}, &Room::veng6LookAtMccoy },
+ { {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::veng6LookAtRedshirt },
+ { {ACTION_LOOK, OBJECT_DEAD_GUY, 0, 0}, &Room::veng6LookAtDeadGuy },
+ { {ACTION_LOOK, 0xff, 0, 0}, &Room::veng6LookAnywhere },
+ { {ACTION_TALK, OBJECT_KIRK, 0, 0}, &Room::veng6TalkToKirk },
+ { {ACTION_TALK, OBJECT_SPOCK, 0, 0}, &Room::veng6TalkToSpock },
+ { {ACTION_TALK, OBJECT_MCCOY, 0, 0}, &Room::veng6TalkToMccoy },
+ { {ACTION_TALK, OBJECT_REDSHIRT, 0, 0}, &Room::veng6TalkToRedshirt },
+
+ { {ACTION_USE, OBJECT_ICABLE1, HOTSPOT_LEFT_PORT, 0}, &Room::veng6UseCable1OnLeftPort },
+ { {ACTION_USE, OBJECT_ICABLE1, HOTSPOT_LEFT_CONSOLE, 0}, &Room::veng6UseCable1OnLeftPort },
+ { {ACTION_USE, OBJECT_ICABLE2, HOTSPOT_LEFT_PORT, 0}, &Room::veng6UseCable2OnLeftPort },
+ { {ACTION_USE, OBJECT_ICABLE2, HOTSPOT_LEFT_CONSOLE, 0}, &Room::veng6UseCable2OnLeftPort },
+ { {ACTION_DONE_WALK, 3, 0, 0}, &Room::veng6KirkOrSpockReachedLeftPort },
+ { {ACTION_DONE_WALK, 4, 0, 0}, &Room::veng6KirkOrSpockReachedLeftPort },
+ { {ACTION_DONE_ANIM, 5, 0, 0}, &Room::veng6AttachedLeftCable },
+
+ { {ACTION_USE, OBJECT_ICABLE1, HOTSPOT_RIGHT_PORT, 0}, &Room::veng6UseCable1OnRightPort },
+ { {ACTION_USE, OBJECT_ICABLE1, HOTSPOT_RIGHT_CONSOLE, 0}, &Room::veng6UseCable1OnRightPort },
+ { {ACTION_USE, OBJECT_ICABLE2, HOTSPOT_RIGHT_PORT, 0}, &Room::veng6UseCable2OnRightPort },
+ { {ACTION_USE, OBJECT_ICABLE2, HOTSPOT_RIGHT_CONSOLE, 0}, &Room::veng6UseCable2OnRightPort },
+ { {ACTION_DONE_WALK, 6, 0, 0}, &Room::veng6KirkOrSpockReachedRightPort },
+ { {ACTION_DONE_WALK, 7, 0, 0}, &Room::veng6KirkOrSpockReachedRightPort },
+ { {ACTION_DONE_ANIM, 8, 0, 0}, &Room::veng6AttachedRightCable },
+
+ { {ACTION_USE, OBJECT_SPOCK, OBJECT_JUNCTION_BOX, 0}, &Room::veng6UseCrewmanOnJunctionBox },
+ { {ACTION_USE, OBJECT_MCCOY, OBJECT_JUNCTION_BOX, 0}, &Room::veng6UseCrewmanOnJunctionBox },
+ { {ACTION_USE, OBJECT_REDSHIRT, OBJECT_JUNCTION_BOX, 0}, &Room::veng6UseCrewmanOnJunctionBox },
+ { {ACTION_USE, OBJECT_KIRK, OBJECT_JUNCTION_BOX, 0}, &Room::veng6UseCrewmanOnJunctionBox },
+ { {ACTION_DONE_WALK, 9, 0, 0}, &Room::veng6SpockReachedJunctionBox },
+ { {ACTION_DONE_ANIM, 10, 0, 0}, &Room::veng6SpockAdjustedJunctionBox },
+
+ { {ACTION_USE, OBJECT_IHYPO, HOTSPOT_OIL_CANISTER, 0}, &Room::veng6UseHypoOnOilCanister },
+ { {ACTION_DONE_WALK, 13, 0, 0}, &Room::veng6ReachedOilCanister },
+ { {ACTION_DONE_ANIM, 14, 0, 0}, &Room::veng6FilledHypoWithOil },
+
+ { {ACTION_USE, OBJECT_KIRK, OBJECT_CABINET, 0}, &Room::veng6UseCabinet },
+ { {ACTION_DONE_WALK, 15, 0, 0}, &Room::veng6ReachedCabinet },
+ { {ACTION_DONE_ANIM, 16, 0, 0}, &Room::veng6OpenedOrClosedCabinet },
+
+ { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_IMPULSE_ENGINES, 0}, &Room::veng6UseSTricorderOnImpulseEngines },
+ { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_RIGHT_CONSOLE, 0}, &Room::veng6UseSTricorderOnRightConsole },
+ { {ACTION_USE, OBJECT_ISTRICOR, OBJECT_JUNCTION_BOX, 0}, &Room::veng6UseSTricorderOnJunctionBox },
+ { {ACTION_USE, OBJECT_IFUSION, HOTSPOT_LEFT_CONSOLE, 0}, &Room::veng6UsePowerPackOnLeftConsole },
+ { {ACTION_GET, OBJECT_JUNCTION_BOX, 0, 0}, &Room::veng6GetJunctionBox },
+ { {ACTION_GET, HOTSPOT_OIL_CANISTER, 0, 0}, &Room::veng6GetOilCanister },
+ { {ACTION_GET, OBJECT_JOURNAL, 0, 0}, &Room::veng6GetEngineeringJournal },
+ { {ACTION_DONE_WALK, 11, 0, 0}, &Room::veng6ReachedEngineeringJournal },
+ { {ACTION_DONE_ANIM, 12, 0, 0}, &Room::veng6TookEngineeringJournal },
+
+ // Common code
+ { {ACTION_USE, OBJECT_IMEDKIT, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
+ { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
+ { {ACTION_USE, OBJECT_MCCOY, OBJECT_DEAD_GUY, 0}, &Room::vengaUseMccoyOnDeadGuy },
+
+ // ENHANCEMENT
+ { {ACTION_USE, OBJECT_ISTRICOR, OBJECT_IMPULSE_ENGINES, 0}, &Room::veng6UseSTricorderOnImpulseEngines },
};
extern const int veng6NumActions = ARRAYSIZE(veng6ActionList);
+#define DOOR_X 0x13e
+#define DOOR_Y 0xa8
+
+#define CABLE_1_X 0x5d
+#define CABLE_1_Y 0x95
+
+#define CABLE_2_X 0x107
+#define CABLE_2_Y 0x94
+
+#define IMPULSE_ENGINE_X 0x9e
+#define IMPULSE_ENGINE_Y 0x59
+
+#define CABINET_X 0x19
+#define CABINET_Y 0x86
+
void Room::veng6Tick1() {
+ loadActorAnim(OBJECT_DOOR, "s7r6d1c", DOOR_X, DOOR_Y);
+ loadActorAnim(OBJECT_DEAD_GUY, "s7r6c1", 0x82, 0x5c);
+ loadActorAnim(OBJECT_JUNCTION_BOX, "s7r6j1", 0x9a, 0xaf);
+
+ if (_awayMission->veng.junctionCablesConnected & 1)
+ loadActorAnim(OBJECT_CABLE_1, "s7r6cl", CABLE_1_X, CABLE_1_Y);
+ if (_awayMission->veng.junctionCablesConnected & 2)
+ loadActorAnim(OBJECT_CABLE_2, "s7r6cr", CABLE_2_X, CABLE_2_Y);
+
+ if (_awayMission->veng.impulseEnginesOn) {
+ loadActorAnim(OBJECT_IMPULSE_ENGINES, "s7r6i1", IMPULSE_ENGINE_X, IMPULSE_ENGINE_Y);
+ // FIXME: doesn't loop
+ playVoc("VEN6LON");
+ } else
+ playVoc("VEN6LOFF");
+
+ if (!_awayMission->veng.tookEngineeringJournal)
+ loadActorAnim(OBJECT_JOURNAL, "s7r6ej", 0x24, 0x82);
+
+ loadActorAnim(OBJECT_CABINET, "s7r6p1c", CABINET_X, CABINET_Y);
+ if (_awayMission->veng.engineeringCabinetOpen)
+ loadActorAnim(OBJECT_CABINET, "s7r6p1o", CABINET_X, CABINET_Y);
+}
+
+void Room::veng6WalkToDoor() {
+ walkCrewmanC(OBJECT_KIRK, 0x120, 0xad, &Room::veng6ReachedDoor);
+}
+
+void Room::veng6ReachedDoor() {
+ _awayMission->disableInput = true;
+ playSoundEffectIndex(SND_DOOR1);
+ loadActorAnimC(OBJECT_DOOR, "s7r6d1", DOOR_X, DOOR_Y, &Room::veng6DoorOpened);
+}
+
+void Room::veng6DoorOpened() {
+ walkCrewman(OBJECT_KIRK, 0x136, 0xaa);
+}
+
+void Room::veng6LookAtLeftPort() {
+ showText(TX_VEN6N018);
+}
+
+void Room::veng6LookAtRightPort() {
+ showText(TX_VEN6N016);
+}
+
+void Room::veng6LookAtDoor() {
+ showText(TX_VEN5N007);
+}
+
+void Room::veng6LookAtOilCanister() {
+ showText(TX_VEN6N011);
+}
+
+void Room::veng6LookAtCabinet() {
+ showText(TX_VEN6N015);
+}
+
+void Room::veng6LookAtCable() {
+ showText(TX_VEN6N013);
+}
+
+void Room::veng6LookAtRightConsole() {
+ showText(TX_VEN6N017);
+}
+
+void Room::veng6LookAtImpulseEngines() {
+ showText(TX_VEN6N010);
+}
+
+void Room::veng6LookAtLeftConsole() {
+ showText(TX_VEN6N009);
+}
+
+void Room::veng6LookAtJunctionBox() {
+ showText(TX_VEN6N012);
+}
+
+void Room::veng6LookAtJournal() {
+ showText(TX_VEN6N025);
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_021);
+}
+
+void Room::veng6LookAtKirk() {
+ showText(TX_VEN6N001);
+}
+
+void Room::veng6LookAtSpock() {
+ showText(TX_VEN6N003);
+}
+
+void Room::veng6LookAtMccoy() {
+ showText(TX_VEN6N002);
+}
+
+void Room::veng6LookAtRedshirt() {
+ showText(TX_VEN6N000);
+}
+
+void Room::veng6LookAtDeadGuy() {
+ showText(TX_VEN0N016);
+}
+
+void Room::veng6LookAnywhere() {
+ showText(TX_VEN6N019);
+}
+
+void Room::veng6TalkToKirk() {
+ showText(TX_SPEAKER_KIRK, TX_VEN6_005);
+ showText(TX_SPEAKER_MCCOY, TX_VEN6_009);
+}
+
+void Room::veng6TalkToSpock() {
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_014);
+}
+
+void Room::veng6TalkToMccoy() {
+ showText(TX_SPEAKER_MCCOY, TX_VEN6_008);
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_018);
+}
+
+void Room::veng6TalkToRedshirt() {
+ showText(TX_SPEAKER_KIJE, TX_VEN6_023);
+}
+
+void Room::veng6UseCable1OnLeftPort() {
+ veng6UseCableOnLeftPort(OBJECT_ICABLE1);
+}
+
+void Room::veng6UseCable2OnLeftPort() {
+ veng6UseCableOnLeftPort(OBJECT_ICABLE2);
+}
+
+void Room::veng6UseCableOnLeftPort(byte cable) {
+ _roomVar.veng.cableInUse = cable;
+
+ if (!(_awayMission->veng.junctionCablesConnected & 1)) {
+ _awayMission->disableInput = true;
+ walkCrewmanC(OBJECT_SPOCK, 0x91, 0xb4, &Room::veng6KirkOrSpockReachedLeftPort);
+ walkCrewmanC(OBJECT_KIRK, 0x5c, 0xa0, &Room::veng6KirkOrSpockReachedLeftPort);
+ }
+}
+
+void Room::veng6KirkOrSpockReachedLeftPort() {
+ if (++_roomVar.veng.kirkAndSpockReadyToAttachLeftCable == 2) {
+ loadActorAnimC(OBJECT_KIRK, "kuseln", -1, -1, &Room::veng6AttachedLeftCable);
+ loadActorAnim(OBJECT_SPOCK, "suseln");
+ playVoc("EFX4");
+ }
+}
+
+void Room::veng6AttachedLeftCable() {
+ loadActorAnim(OBJECT_CABLE_1, "s7r6cl", CABLE_1_X, CABLE_1_Y);
+ showText(TX_VEN6N020);
+ _awayMission->veng.junctionCablesConnected |= 1;
+ loseItem(_roomVar.veng.cableInUse);
+ _awayMission->disableInput = false;
+}
+
+void Room::veng6UseCable1OnRightPort() {
+ veng6UseCableOnRightPort(OBJECT_ICABLE1);
+}
+
+void Room::veng6UseCable2OnRightPort() {
+ veng6UseCableOnRightPort(OBJECT_ICABLE2);
+}
+
+void Room::veng6UseCableOnRightPort(byte cable) {
+ _roomVar.veng.cableInUse = cable;
+
+ if (!(_awayMission->veng.junctionCablesConnected & 2)) {
+ _awayMission->disableInput = true;
+ walkCrewmanC(OBJECT_SPOCK, 0xac, 0xb4, &Room::veng6KirkOrSpockReachedRightPort);
+ walkCrewmanC(OBJECT_KIRK, 0x107, 0xa0, &Room::veng6KirkOrSpockReachedRightPort);
+ }
+}
+
+void Room::veng6KirkOrSpockReachedRightPort() {
+ if (++_roomVar.veng.kirkAndSpockReadyToAttachRightCable == 2) {
+ loadActorAnimC(OBJECT_KIRK, "kuseln", -1, -1, &Room::veng6AttachedRightCable);
+ loadActorAnim(OBJECT_SPOCK, "suseln");
+ playVoc("EFX4");
+ }
+}
+
+void Room::veng6AttachedRightCable() {
+ loadActorAnim(OBJECT_CABLE_2, "s7r6cr", CABLE_2_X, CABLE_2_Y);
+ showText(TX_VEN6N022);
+ _awayMission->veng.junctionCablesConnected |= 2;
+ loseItem(_roomVar.veng.cableInUse);
+ _awayMission->disableInput = false;
+}
+
+void Room::veng6UseCrewmanOnJunctionBox() {
+ if (_awayMission->veng.impulseEnginesOn)
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_012);
+ else if ((_awayMission->veng.junctionCablesConnected & 3) == 3) {
+ showText(TX_SPEAKER_COMPUTER, TX_COMPA185);
+ showText(TX_SPEAKER_KIRK, TX_VEN6_003);
+ if (!_awayMission->veng.readEngineeringJournal)
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_017);
+ else {
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_016);
+ showText(TX_SPEAKER_KIRK, TX_VEN6_002);
+ walkCrewmanC(OBJECT_SPOCK, 0x99, 0xb4, &Room::veng6SpockReachedJunctionBox);
+ }
+ } else
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_011);
+}
+
+void Room::veng6SpockReachedJunctionBox() {
+ loadActorAnimC(OBJECT_SPOCK, "suseln", -1, -1, &Room::veng6SpockAdjustedJunctionBox);
+}
+
+void Room::veng6SpockAdjustedJunctionBox() {
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_019);
+ loadActorAnim(OBJECT_IMPULSE_ENGINES, "s7r6i1", IMPULSE_ENGINE_X, IMPULSE_ENGINE_Y);
+ _awayMission->veng.impulseEnginesOn = true;
+ stopAllVocSounds();
+ playVoc("VEN6LON");
+}
+
+void Room::veng6UseHypoOnOilCanister() {
+ if (_awayMission->veng.oilInHypo)
+ showText(TX_VEN6N006);
+ else {
+ _awayMission->disableInput = true;
+ walkCrewmanC(OBJECT_KIRK, 0x3c, 0x9e, &Room::veng6ReachedOilCanister);
+ }
+}
+
+void Room::veng6ReachedOilCanister() {
+ loadActorAnimC(OBJECT_KIRK, "kusehw", -1, -1, &Room::veng6FilledHypoWithOil);
+}
+
+void Room::veng6FilledHypoWithOil() {
+ _awayMission->disableInput = false;
+ showText(TX_VEN6N007);
+ _awayMission->veng.oilInHypo = true;
+}
+
+void Room::veng6UseCabinet() {
+ _awayMission->disableInput = true;
+ walkCrewmanC(OBJECT_KIRK, 0x36, 0x9f, &Room::veng6ReachedCabinet);
+}
+
+void Room::veng6ReachedCabinet() {
+ loadActorAnimC(OBJECT_KIRK, "kusehw", -1, -1, &Room::veng6OpenedOrClosedCabinet);
+}
+
+void Room::veng6OpenedOrClosedCabinet() {
+ _awayMission->disableInput = false;
+
+ if (_awayMission->veng.engineeringCabinetOpen) {
+ loadActorAnim(OBJECT_CABINET, "s7r6p2", CABINET_X, CABINET_Y);
+ playSoundEffectIndex(SND_DOOR1);
+ _awayMission->veng.engineeringCabinetOpen = false;
+ } else {
+ loadActorAnim(OBJECT_CABINET, "s7r6p1", CABINET_X, CABINET_Y);
+ playSoundEffectIndex(SND_DOOR1);
+ _awayMission->veng.engineeringCabinetOpen = true;
+ if (!_awayMission->veng.tookEngineeringJournal)
+ showText(TX_VEN6N005);
+ }
+}
+
+void Room::veng6UseSTricorderOnImpulseEngines() {
+ if (_awayMission->veng.impulseEnginesOn)
+ spockScan(DIR_S, TX_VEN6_010);
+ else {
+ spockScan(DIR_S, TX_VEN6_020);
+ showText(TX_SPEAKER_KIRK, TX_VEN6_001);
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_022);
+ }
+}
+
+void Room::veng6UseSTricorderOnRightConsole() {
+ if (_awayMission->veng.impulseEnginesOn)
+ spockScan(DIR_S, TX_VEN6_013);
+ else
+ spockScan(DIR_S, TX_VEN6_007);
+}
+
+void Room::veng6UseSTricorderOnJunctionBox() {
+ spockScan(DIR_S, TX_VEN6_015);
+}
+
+void Room::veng6UsePowerPackOnLeftConsole() {
+ showText(TX_SPEAKER_SPOCK, TX_VEN6_006);
+}
+
+void Room::veng6GetJunctionBox() {
+ showText(TX_MUD1N014);
+}
+
+void Room::veng6GetOilCanister() {
+ showText(TX_VEN6N008);
+}
+
+void Room::veng6GetEngineeringJournal() {
+ _awayMission->disableInput = true;
+ walkCrewmanC(OBJECT_KIRK, 0x36, 0x9f, &Room::veng6ReachedEngineeringJournal);
+}
+
+void Room::veng6ReachedEngineeringJournal() {
+ loadActorAnimC(OBJECT_KIRK, "kusemw", -1, -1, &Room::veng6TookEngineeringJournal);
+}
+
+void Room::veng6TookEngineeringJournal() {
+ loadActorStandAnim(OBJECT_JOURNAL);
+ _awayMission->disableInput = false;
+ showText(TX_VEN6N024);
+ _awayMission->veng.tookEngineeringJournal = true;
+ giveItem(OBJECT_ITECH);
}
}
diff --git a/engines/startrek/text.cpp b/engines/startrek/text.cpp
index 091b4cbc18..c565b1f4af 100644
--- a/engines/startrek/text.cpp
+++ b/engines/startrek/text.cpp
@@ -80,6 +80,7 @@ extern const char *const g_gameStrings[] = {
"#GENE\\GENER004#Game Over",
"#COMP\\COMPA180#Orbit Stabilized. Warning Cancelled.",
+ "#COMP\\COMPA185#Please select an impedence.",
"#COMP\\COMPA186#Ammonia",
"#COMP\\COMPA187#Di-hydrogen Oxide",
"#COMP\\COMPA189#Nitrous Oxide",
@@ -3055,7 +3056,50 @@ extern const char *const g_gameStrings[] = {
"#VEN5\\VEN5N010#You pick up the portable Fusion power pack.",
+ "#VEN6\\VEN6_001#Can we re-route the power lines?",
+ "#VEN6\\VEN6_002#Go ahead and adjust the settings, Spock.",
+ "#VEN6\\VEN6_003#Spock?",
+ "#VEN6\\VEN6_005#This reminds me of a poem I read when I was a child. \"I am Ozymandius, King of Kings, look ><upon my works, ye mighty, and despair.\"",
+ "#VEN6\\VEN6_006#Captain, the energy output of the Fusion Power pack is insufficient to power any of the major ship's systems.",
+ "#VEN6\\VEN6_007#Captain, this is the fusion mixture regulator for the impulse engines. There is currently no power running to it.",
+ "#VEN6\\VEN6_008#Remind me to compliment Mr. Scott on the efficiency of his engineering section.",
+ "#VEN6\\VEN6_009#You have good reason to despair, here, Jim.",
+ "#VEN6\\VEN6_010#Impulse power is functioning, Captain.",
+ "#VEN6\\VEN6_011#It is illogical to use this machine before we have something connected to it.",
+ "#VEN6\\VEN6_012#The impedance is correctly set, Captain. Changing the setting could be dangerous.",
+ "#VEN6\\VEN6_013#The regulator is fully operating from the power tap run from the impulse engines. We can allocate power to ship's systems in Auxiliary Control.",
+ "#VEN6\\VEN6_014#There has been a .0003 degradation in hull integrity in the last hour. There should be no danger, Captain.",
+ "#VEN6\\VEN6_015#This is an engineering circuit junction box. It is used for temporary re-routing of power. Without using one of these devices set to the proper impedance, an overload can occur.",
+ "#VEN6\\VEN6_016#Captain, the information obtained from the engineering journals indicates the correct impedance setting to be nineteen thousand ohms.",
+ "#VEN6\\VEN6_017#Captain, the wrong setting on this particular device may cause the fusion reactors to melt down. We will have to do some research to determine the correct setting.",
+ "#VEN6\\VEN6_018#Given that Mr. Scott has received a Starfleet Citation on five occasions for efficiency, I do not see the logic in your suggestion, Doctor.",
+ "#VEN6\\VEN6_019#Power has now been restored, Captain.",
+ "#VEN6\\VEN6_020#The impulse engines are intact, Captain. We could use the fusion reactors from the impulse engines to restore power, but the lines have been severed to the power regulator.",
+ "#VEN6\\VEN6_021#These journals may prove useful in our attempt to reestablish power. A functioning computer terminal will allow us to examine them.",
+ "#VEN6\\VEN6_022#We should be able to, Captain, if we can find a suitable supply of power cable. We will need to route the power through a junction box so we can set an impedance level. A direct connection to the regulator would cause an overload.",
+ "#VEN6\\VEN6_023#Tragic, Captain. This is one of the greatest disasters in Starfleet history.",
+ "#VEN6\\VEN6N000#Kije fidgets nervously.",
+ "#VEN6\\VEN6N001#Kirk wonders if the landing party has overlooked anything.",
+ "#VEN6\\VEN6N002#McCoy wonders when it will be his turn to die in the line of duty.",
+ "#VEN6\\VEN6N003#Spock glances at his tricorder, making certain the superstructure of the Republic is stable.",
+ "#VEN6\\VEN6N005#The closet opens revealing a library of engineering technical journals.",
+ "#VEN6\\VEN6N006#The hypo is already filled with oil.",
"#VEN6\\VEN6N007#The hypo is now filled with multipurpose oil.",
+ "#VEN6\\VEN6N008#The oil canister is bolted to the hull and can't be taken.",
+ "#VEN6\\VEN6N009#These are the controls to the Republic's impulse engines.",
+ "#VEN6\\VEN6N010#These are the impulse engines for the Republic.",
+ "#VEN6\\VEN6N011#This is a canister of high grade multipurpose oil. Very useful for lubricating machinery.",
+ "#VEN6\\VEN6N012#This is a junction box used for temporary re-routing of engineering circuits.",
+ "#VEN6\\VEN6N013#This is a length of heavy duty insulated power cable.",
+ "#VEN6\\VEN6N015#This is a standard storage closet.",
+ "#VEN6\\VEN6N016#This is the emergency power input port for the fusion mixture regulator.",
+ "#VEN6\\VEN6N017#This is the fusion mixture regulator for the Republic's impulse engines.",
+ "#VEN6\\VEN6N018#This port is used to connect emergency power from the impulse engines to other systems if dedicated lines are damaged.",
+ "#VEN6\\VEN6N019#This was the engineering section of the U.S.S. Republic.",
+ "#VEN6\\VEN6N020#You connect a length of cable between the impulse engine and the junction box.",
+ "#VEN6\\VEN6N022#You connect a length of cable between the regulator circuits and the junction box.",
+ "#VEN6\\VEN6N024#You take the engineering technical journals.",
+ "#VEN6\\VEN6N025#This is a library of engineering technical journals.",
"#VENA\\VENA_F32#The landing party has been taken captive by the Elasi, and you know Starfleet does not negotiate with terrorists. As you look forward to a long captivity you wonder who will take command of the Enterprise. Better luck next time.",
diff --git a/engines/startrek/text.h b/engines/startrek/text.h
index a55809a486..0db4fd9dea 100644
--- a/engines/startrek/text.h
+++ b/engines/startrek/text.h
@@ -138,6 +138,7 @@ enum GameStringIDs {
TX_GENER004,
TX_COMPA180,
+ TX_COMPA185,
TX_COMPA186,
TX_COMPA187,
TX_COMPA189,
@@ -3178,7 +3179,55 @@ enum GameStringIDs {
TX_VEN5N010,
+ TX_VEN6_001,
+ TX_VEN6_002,
+ TX_VEN6_003,
+ // UNUSED
+ TX_VEN6_005,
+ TX_VEN6_006,
+ TX_VEN6_007,
+ TX_VEN6_008,
+ TX_VEN6_009,
+ TX_VEN6_010,
+ TX_VEN6_011,
+ TX_VEN6_012,
+ TX_VEN6_013,
+ TX_VEN6_014,
+ TX_VEN6_015,
+ TX_VEN6_016,
+ TX_VEN6_017,
+ TX_VEN6_018,
+ TX_VEN6_019,
+ TX_VEN6_020,
+ TX_VEN6_021,
+ TX_VEN6_022,
+ TX_VEN6_023,
+ TX_VEN6N000,
+ TX_VEN6N001,
+ TX_VEN6N002,
+ TX_VEN6N003,
+ // UNUSED
+ TX_VEN6N005,
+ TX_VEN6N006,
TX_VEN6N007,
+ TX_VEN6N008,
+ TX_VEN6N009,
+ TX_VEN6N010,
+ TX_VEN6N011,
+ TX_VEN6N012,
+ TX_VEN6N013,
+ // MISSING
+ TX_VEN6N015,
+ TX_VEN6N016,
+ TX_VEN6N017,
+ TX_VEN6N018,
+ TX_VEN6N019,
+ TX_VEN6N020,
+ // UNUSED
+ TX_VEN6N022,
+ // UNUSED
+ TX_VEN6N024,
+ TX_VEN6N025,
TX_VENA_F32,