aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/startrek/awaymission.h1
-rw-r--r--engines/startrek/room.h23
-rw-r--r--engines/startrek/rooms/veng7.cpp151
-rw-r--r--engines/startrek/text.cpp17
-rw-r--r--engines/startrek/text.h19
5 files changed, 209 insertions, 2 deletions
diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h
index 02def65a13..878597949d 100644
--- a/engines/startrek/awaymission.h
+++ b/engines/startrek/awaymission.h
@@ -684,6 +684,7 @@ struct AwayMission {
// junction box in engineering.
byte junctionCablesConnected; // 0x5d
+ bool tookCableFromTransporterRoomHallway; // 0x5e
bool tookCableFromSickbayHallway; // 0x5f
bool tookMolecularSaw; // 0x60
bool readEngineeringJournal; // 0x61
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 0bdaf7cafc..b6a7d5dfaa 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -2772,6 +2772,29 @@ public:
// VENG7
void veng7Tick1();
+ void veng7WalkToDoor();
+ void veng7ReachedDoor();
+ void veng7DoorOpened();
+ void veng7TouchedTurboliftDoor();
+ void veng7LookAtCollapsedSection();
+ void veng7LookAtDeadGuy();
+ void veng7LookAtDoor();
+ void veng7LookAtCable();
+ void veng7LookAtKirk();
+ void veng7LookAtSpock();
+ void veng7LookAtMccoy();
+ void veng7LookAtRedshirt();
+ void veng7LookAnywhere();
+ void veng7TalkToKirk();
+ void veng7TalkToSpock();
+ void veng7TalkToMccoy();
+ void veng7TalkToRedshirt();
+ void veng7UseSTricorderOnCollapsedSection();
+ void veng7TouchedHotspot0();
+ void veng7GetCable();
+ void veng7ReachedCable();
+ void veng7PickedUpCable();
+ // TODO: common code
// VENG8
void veng8Tick1();
diff --git a/engines/startrek/rooms/veng7.cpp b/engines/startrek/rooms/veng7.cpp
index 5d5e5a99b5..3ba673e52f 100644
--- a/engines/startrek/rooms/veng7.cpp
+++ b/engines/startrek/rooms/veng7.cpp
@@ -22,20 +22,167 @@
#include "startrek/room.h"
-#define OBJECT_DOOR 8
+#define OBJECT_CABLE 8
+#define OBJECT_DEAD_GUY 9
+#define OBJECT_DOOR 10
-#define HOTSPOT_20 0x20
+#define HOTSPOT_DOOR 0x20
+#define HOTSPOT_COLLAPSED_SECTION 0x21
namespace StarTrek {
extern const RoomAction veng7ActionList[] = {
{ {ACTION_TICK, 1, 0, 0}, &Room::veng7Tick1 },
+
+ { {ACTION_WALK, OBJECT_DOOR, 0, 0}, &Room::veng7WalkToDoor },
+ { {ACTION_WALK, HOTSPOT_DOOR, 0, 0}, &Room::veng7WalkToDoor },
+ { {ACTION_DONE_WALK, 2, 0, 0}, &Room::veng7ReachedDoor },
+ { {ACTION_DONE_ANIM, 1, 0, 0}, &Room::veng7DoorOpened },
+ { {ACTION_TOUCHED_WARP, 1, 0, 0}, &Room::veng7TouchedTurboliftDoor },
+
+ { {ACTION_LOOK, HOTSPOT_COLLAPSED_SECTION, 0, 0}, &Room::veng7LookAtCollapsedSection },
+ { {ACTION_LOOK, OBJECT_DEAD_GUY, 0, 0}, &Room::veng7LookAtDeadGuy },
+ { {ACTION_LOOK, OBJECT_DOOR, 0, 0}, &Room::veng7LookAtDoor },
+ { {ACTION_LOOK, HOTSPOT_DOOR, 0, 0}, &Room::veng7LookAtDoor },
+ { {ACTION_LOOK, OBJECT_CABLE, 0, 0}, &Room::veng7LookAtCable },
+ { {ACTION_LOOK, OBJECT_KIRK, 0, 0}, &Room::veng7LookAtKirk },
+ { {ACTION_LOOK, OBJECT_SPOCK, 0, 0}, &Room::veng7LookAtSpock },
+ { {ACTION_LOOK, OBJECT_MCCOY, 0, 0}, &Room::veng7LookAtMccoy },
+ { {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::veng7LookAtRedshirt },
+ { {ACTION_LOOK, 0xff, 0, 0}, &Room::veng7LookAnywhere },
+ { {ACTION_TALK, OBJECT_KIRK, 0, 0}, &Room::veng7TalkToKirk },
+ { {ACTION_TALK, OBJECT_SPOCK, 0, 0}, &Room::veng7TalkToSpock },
+ { {ACTION_TALK, OBJECT_MCCOY, 0, 0}, &Room::veng7TalkToMccoy },
+ { {ACTION_TALK, OBJECT_REDSHIRT, 0, 0}, &Room::veng7TalkToRedshirt },
+
+ { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_COLLAPSED_SECTION, 0}, &Room::veng7UseSTricorderOnCollapsedSection },
+
+ { {ACTION_TOUCHED_HOTSPOT, 0, 0, 0}, &Room::veng7TouchedHotspot0 },
+ { {ACTION_GET, OBJECT_CABLE, 0, 0}, &Room::veng7GetCable },
+ { {ACTION_DONE_WALK, 3, 0, 0}, &Room::veng7ReachedCable },
+ { {ACTION_DONE_ANIM, 4, 0, 0}, &Room::veng7PickedUpCable },
+
+ // 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 },
};
extern const int veng7NumActions = ARRAYSIZE(veng7ActionList);
void Room::veng7Tick1() {
+ playVoc("VEN7LOOP");
+
+ loadActorAnim(OBJECT_DOOR, "s7r7d1c", 0x59, 0x72);
+
+ if (!_awayMission->veng.tookCableFromTransporterRoomHallway)
+ loadActorAnim(OBJECT_CABLE, "s7r7ca", 0xac, 0x8a);
+
+ loadActorAnim(OBJECT_DEAD_GUY, "s7r7c1", 0xa6, 0x49);
+}
+
+void Room::veng7WalkToDoor() {
+ walkCrewmanC(OBJECT_KIRK, 0x66, 0x76, &Room::veng7ReachedDoor);
+}
+
+void Room::veng7ReachedDoor() {
+ _awayMission->disableInput = true;
+ playSoundEffectIndex(SND_DOOR1);
+ loadActorAnimC(OBJECT_DOOR, "s7r7d1", 0x59, 0x72, &Room::veng7DoorOpened);
+}
+
+void Room::veng7DoorOpened() {
+ walkCrewman(OBJECT_KIRK, 0x5b, 0x76);
+}
+
+void Room::veng7TouchedTurboliftDoor() {
+ playSoundEffectIndex(SND_DOOR1);
+ showRepublicMap(7, 1);
+}
+
+void Room::veng7LookAtCollapsedSection() {
+ showText(TX_VEN7N001);
+}
+
+void Room::veng7LookAtDeadGuy() {
+ // ENHANCEMENT: Original played TX_VEN0N016. This is reused and boring, and there is
+ // a more interesting unused audio file, so use that instead.
+ showText(TX_VEN7N000);
+}
+
+void Room::veng7LookAtDoor() {
+ showText(TX_VEN7N007);
+}
+
+void Room::veng7LookAtCable() {
+ showText(TX_VEN7N008);
+}
+
+void Room::veng7LookAtKirk() {
+ showText(TX_VEN7N003);
+}
+
+void Room::veng7LookAtSpock() {
+ showText(TX_VEN7N005);
+}
+
+void Room::veng7LookAtMccoy() {
+ showText(TX_VEN7N004);
+}
+
+void Room::veng7LookAtRedshirt() {
+ showText(TX_VEN7N002);
+}
+
+void Room::veng7LookAnywhere() {
+ showText(TX_VEN7N006);
+}
+
+void Room::veng7TalkToKirk() {
+ showText(TX_SPEAKER_KIRK, TX_VEN7_001);
+}
+
+void Room::veng7TalkToSpock() {
+ showText(TX_SPEAKER_SPOCK, TX_VEN7_005);
+}
+
+void Room::veng7TalkToMccoy() {
+ // NOTE: TX_VEN7_007 could also fit here. It might be more fitting since it's not
+ // reused. However, it mentions that McCoy gave up medical practice in Georgia. Maybe
+ // they removed this for continuity reasons or something. I don't want to be
+ // responsible for creating any possible confusion over his backstory.
+ showText(TX_SPEAKER_MCCOY, TX_VEN1_004);
+}
+
+void Room::veng7TalkToRedshirt() {
+ showText(TX_SPEAKER_KIJE, TX_VEN7_007);
+}
+
+void Room::veng7UseSTricorderOnCollapsedSection() {
+ spockScan(DIR_S, TX_VEN7_006);
+}
+
+void Room::veng7TouchedHotspot0() { // Got too close to the collapsed section
+ showText(TX_SPEAKER_SPOCK, TX_VEN7_003);
+}
+
+void Room::veng7GetCable() {
+ _awayMission->disableInput = true;
+ walkCrewmanC(OBJECT_KIRK, 0xac, 0x8b, &Room::veng7ReachedCable);
+}
+
+void Room::veng7ReachedCable() {
+ loadActorAnimC(OBJECT_KIRK, "kusehn", -1, -1, &Room::veng7PickedUpCable);
+ playVoc("MUR4E6");
+}
+
+void Room::veng7PickedUpCable() {
+ loadActorStandAnim(OBJECT_CABLE);
+ showText(TX_VEN7N009);
+ giveItem(OBJECT_ICABLE1);
+ _awayMission->veng.tookCableFromTransporterRoomHallway = true;
+ _awayMission->disableInput = false;
}
}
diff --git a/engines/startrek/text.cpp b/engines/startrek/text.cpp
index 3e9395c77a..833b9e4080 100644
--- a/engines/startrek/text.cpp
+++ b/engines/startrek/text.cpp
@@ -3102,6 +3102,23 @@ extern const char *const g_gameStrings[] = {
"#VEN6\\VEN6N025#This is a library of engineering technical journals.",
+ "#VEN7\\VEN7_001#I haven't seen anything this bad since I was aboard the Farragut, and this vampire cloud...",
+ "#VEN7\\VEN7_003#Captain, please be careful. The floor in that area is very unstable and might collapse from our added weight.",
+ "#VEN7\\VEN7_005#I do not see the need for conversation, Captain. Humans have an irrational enjoyment of endless discourse.",
+ "#VEN7\\VEN7_006#It appears to be a section from a coolant exhaust port. I would not recommend too close of an inspection, Captain. The floor could collapse from our added weight.",
+ "#VEN7\\VEN7_007#It does get better than this, doesn't it Captain?",
+ "#VEN7\\VEN7N000#A corpse is half-buried under the debris.",
+ "#VEN7\\VEN7N001#A large piece of equipment has fallen through the ceiling. The area looks extremely unstable. fortunately, the entry to the transporter room is near.",
+ "#VEN7\\VEN7N002#Ensign Kije.",
+ "#VEN7\\VEN7N003#James T. Kirk.",
+ "#VEN7\\VEN7N004#Leonard McCoy.",
+ "#VEN7\\VEN7N005#Mister Spock.",
+ "#VEN7\\VEN7N006#This corridor leads to the transporter room.",
+ "#VEN7\\VEN7N007#This door leads to the transporter room.",
+ "#VEN7\\VEN7N008#This is a length of heavy duty insulated power cable.",
+ "#VEN7\\VEN7N009#You pick up a length of cable.",
+
+
"#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.",
"#VENA\\VENA_F34#Captain, it would be unwise to use your phaser considering the already extensive damage sustained by the Republic.",
"#VENA\\VENA_F40#The Elasi fire photon torpedoes. The Republic has been destroyed.",
diff --git a/engines/startrek/text.h b/engines/startrek/text.h
index 0db4fd9dea..cf0efa0165 100644
--- a/engines/startrek/text.h
+++ b/engines/startrek/text.h
@@ -3230,6 +3230,25 @@ enum GameStringIDs {
TX_VEN6N025,
+ TX_VEN7_001,
+ // UNUSED
+ TX_VEN7_003,
+ // UNUSED
+ TX_VEN7_005,
+ TX_VEN7_006,
+ TX_VEN7_007,
+ TX_VEN7N000,
+ TX_VEN7N001,
+ TX_VEN7N002,
+ TX_VEN7N003,
+ TX_VEN7N004,
+ TX_VEN7N005,
+ TX_VEN7N006,
+ TX_VEN7N007,
+ TX_VEN7N008,
+ TX_VEN7N009,
+
+
TX_VENA_F32,
TX_VENA_F34,
TX_VENA_F40,