aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Stewart2018-08-08 00:38:24 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit6db428f0063b25d112ed5647a3562f89816bafbf (patch)
tree2927642fe0bec9eb509838396dedfc7d9f35aa76
parent1a12a25b54b2c19225b44892db972707a413c31c (diff)
downloadscummvm-rg350-6db428f0063b25d112ed5647a3562f89816bafbf.tar.gz
scummvm-rg350-6db428f0063b25d112ed5647a3562f89816bafbf.tar.bz2
scummvm-rg350-6db428f0063b25d112ed5647a3562f89816bafbf.zip
STARTREK: VENG5
-rw-r--r--engines/startrek/awaymission.h3
-rw-r--r--engines/startrek/room.h34
-rw-r--r--engines/startrek/rooms/veng5.cpp221
-rw-r--r--engines/startrek/text.cpp35
-rw-r--r--engines/startrek/text.h35
5 files changed, 324 insertions, 4 deletions
diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h
index abfa00fd71..7543674c70 100644
--- a/engines/startrek/awaymission.h
+++ b/engines/startrek/awaymission.h
@@ -675,7 +675,10 @@ struct AwayMission {
bool kirkShouldSuggestReestablishingPower; // 0x56
bool tookHypoFromSickbay; // 0x57
bool tookDrillFromSickbay; // 0x58
+ bool clearedDebrisInRoom5; // 0x59
bool havePowerPack; // 0x5a
+ bool enteredRoom5FirstTime; // 0x5b
+ bool askedSpockAboutFire; // 0x5c
bool tookCableFromSickbayHallway; // 0x5f
bool tookMolecularSaw; // 0x60
bool readEngineeringJournal; // 0x61
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index 0f85f720e9..b67bd675fe 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -2681,6 +2681,40 @@ public:
// VENG5
void veng5Tick1();
+ void veng5Tick45();
+ void veng5WalkToDoor();
+ void veng5ReachedDoor();
+ void veng5DoorOpened();
+ void veng5TouchedTurboliftDoor();
+ void veng5LookAtDoor();
+ void veng5LookAtLadder();
+ void veng5LookAtDeadGuy();
+ void veng5LookAtPowerPack();
+ void veng5LookAtDebris();
+ void veng5LookAtKirk();
+ void veng5LookAtSpock();
+ void veng5LookAtMccoy();
+ void veng5LookAtRedshirt();
+ void veng5LookAnywhere();
+ void veng5UsePhaserOnPowerPack();
+ void veng5UseStunPhaserOnDebris();
+ void veng5UseKillPhaserOnDebris();
+ void veng5ReachedPositionToShootDebris();
+ void veng5DrewPhaser();
+ void veng5VaporizedDebris();
+ void veng5UseMTricorderOnDebris();
+ void veng5UseSTricorderOnDebris();
+ void veng5UseMTricorderOnPowerPack();
+ void veng5UseSTricorderOnPowerPack();
+ void veng5TalkToKirk();
+ void veng5TalkToMccoy();
+ void veng5TalkToSpock();
+ void veng5TalkToRedshirt();
+ void veng5TouchedHotspot0();
+ void veng5GetPowerPack();
+ void veng5ReachedPowerPack();
+ void veng5PickedUpPowerPack();
+ // TODO: common code (and scanning the dead guy)
// VENG6
void veng6Tick1();
diff --git a/engines/startrek/rooms/veng5.cpp b/engines/startrek/rooms/veng5.cpp
index 9f5d2639a4..c89795f914 100644
--- a/engines/startrek/rooms/veng5.cpp
+++ b/engines/startrek/rooms/veng5.cpp
@@ -23,19 +23,236 @@
#include "startrek/room.h"
#define OBJECT_DOOR 8
+#define OBJECT_DEBRIS 9
+#define OBJECT_POWER_PACK 10
+#define OBJECT_DEAD_GUY 11
-#define HOTSPOT_20 0x20
+#define HOTSPOT_DOOR 0x20
+#define HOTSPOT_LADDER 0x21
namespace StarTrek {
extern const RoomAction veng5ActionList[] = {
- { {ACTION_TICK, 1, 0, 0}, &Room::veng5Tick1 },
+ { {ACTION_TICK, 1, 0, 0}, &Room::veng5Tick1 },
+ { {ACTION_TICK, 45, 0, 0}, &Room::veng5Tick45 },
+
+ { {ACTION_WALK, HOTSPOT_DOOR, 0, 0}, &Room::veng5WalkToDoor },
+ { {ACTION_DONE_WALK, 2, 0, 0}, &Room::veng5ReachedDoor },
+ { {ACTION_DONE_ANIM, 1, 0, 0}, &Room::veng5DoorOpened },
+ { {ACTION_TOUCHED_WARP, 1, 0, 0}, &Room::veng5TouchedTurboliftDoor },
+
+ { {ACTION_LOOK, HOTSPOT_DOOR, 0, 0}, &Room::veng5LookAtDoor },
+ { {ACTION_LOOK, OBJECT_DOOR, 0, 0}, &Room::veng5LookAtDoor },
+ { {ACTION_LOOK, HOTSPOT_LADDER, 0, 0}, &Room::veng5LookAtLadder },
+ { {ACTION_LOOK, OBJECT_DEAD_GUY, 0, 0}, &Room::veng5LookAtDeadGuy },
+ { {ACTION_LOOK, OBJECT_POWER_PACK, 0, 0}, &Room::veng5LookAtPowerPack },
+ { {ACTION_LOOK, OBJECT_DEBRIS, 0, 0}, &Room::veng5LookAtDebris },
+ { {ACTION_LOOK, OBJECT_KIRK, 0, 0}, &Room::veng5LookAtKirk },
+ { {ACTION_LOOK, OBJECT_SPOCK, 0, 0}, &Room::veng5LookAtSpock },
+ { {ACTION_LOOK, OBJECT_MCCOY, 0, 0}, &Room::veng5LookAtMccoy },
+ { {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::veng5LookAtRedshirt },
+ { {ACTION_LOOK, 0xff, 0, 0}, &Room::veng5LookAnywhere },
+
+ { {ACTION_USE, OBJECT_IPHASERS, OBJECT_POWER_PACK, 0}, &Room::veng5UsePhaserOnPowerPack },
+ { {ACTION_USE, OBJECT_IPHASERK, OBJECT_POWER_PACK, 0}, &Room::veng5UsePhaserOnPowerPack },
+ { {ACTION_USE, OBJECT_IPHASERS, OBJECT_DEBRIS, 0}, &Room::veng5UseStunPhaserOnDebris },
+ { {ACTION_USE, OBJECT_IPHASERK, OBJECT_DEBRIS, 0}, &Room::veng5UseKillPhaserOnDebris },
+ { {ACTION_DONE_WALK, 4, 0, 0}, &Room::veng5ReachedPositionToShootDebris },
+ { {ACTION_DONE_ANIM, 5, 0, 0}, &Room::veng5DrewPhaser },
+ { {ACTION_DONE_ANIM, 3, 0, 0}, &Room::veng5VaporizedDebris },
+
+ { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_DEBRIS, 0}, &Room::veng5UseMTricorderOnDebris },
+ { {ACTION_USE, OBJECT_ISTRICOR, OBJECT_DEBRIS, 0}, &Room::veng5UseSTricorderOnDebris },
+ { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_POWER_PACK, 0}, &Room::veng5UseMTricorderOnPowerPack },
+ { {ACTION_USE, OBJECT_ISTRICOR, OBJECT_POWER_PACK, 0}, &Room::veng5UseSTricorderOnPowerPack },
+
+ { {ACTION_TALK, OBJECT_KIRK, 0, 0}, &Room::veng5TalkToKirk },
+ { {ACTION_TALK, OBJECT_MCCOY, 0, 0}, &Room::veng5TalkToMccoy },
+ { {ACTION_TALK, OBJECT_SPOCK, 0, 0}, &Room::veng5TalkToSpock },
+ { {ACTION_TALK, OBJECT_REDSHIRT, 0, 0}, &Room::veng5TalkToRedshirt },
+
+ { {ACTION_TOUCHED_HOTSPOT, 0, 0, 0}, &Room::veng5TouchedHotspot0 },
+
+ { {ACTION_GET, OBJECT_POWER_PACK, 0, 0}, &Room::veng5GetPowerPack },
+ { {ACTION_DONE_WALK, 6, 0, 0}, &Room::veng5ReachedPowerPack },
+ { {ACTION_DONE_ANIM, 7, 0, 0}, &Room::veng5PickedUpPowerPack },
};
extern const int veng5NumActions = ARRAYSIZE(veng5ActionList);
void Room::veng5Tick1() {
+ playVoc("VEN5LOOP");
+
+ if (!_awayMission->veng.clearedDebrisInRoom5)
+ loadActorAnim(OBJECT_DEBRIS, "s7r5de", 0xb1, 0x89);
+ else if (!_awayMission->veng.havePowerPack)
+ loadActorAnim(OBJECT_POWER_PACK, "s7r5fu", 0xb1, 0x89);
+
+ loadActorAnim(OBJECT_DEAD_GUY, "s7r5c1", 0xe2, 0x91);
+}
+
+void Room::veng5Tick45() {
+ if (!_awayMission->veng.enteredRoom5FirstTime) {
+ _awayMission->veng.enteredRoom5FirstTime = true;
+ showText(TX_SPEAKER_SPOCK, TX_VEN5_005); // "I'm picking up on a nearby power source"
+ }
+}
+
+void Room::veng5WalkToDoor() {
+ walkCrewmanC(OBJECT_KIRK, 0x78, 0x8e, &Room::veng5ReachedDoor);
+}
+
+void Room::veng5ReachedDoor() {
+ _awayMission->disableInput = true;
+ playSoundEffectIndex(SND_DOOR1);
+ loadActorAnimC(OBJECT_DOOR, "s7r5d1", 0x6b, 0x8c, &Room::veng5DoorOpened);
+ walkCrewman(OBJECT_KIRK, 0x64, 0x8e);
+}
+
+void Room::veng5DoorOpened() {
+ loadRoomIndex(6, 2);
+}
+
+void Room::veng5TouchedTurboliftDoor() {
+ playSoundEffectIndex(SND_DOOR1);
+ showRepublicMap(5, 1);
+}
+
+void Room::veng5LookAtDoor() {
+ showText(TX_VEN5N007);
+}
+
+void Room::veng5LookAtLadder() {
+ showText(TX_VEN5N008);
+}
+
+void Room::veng5LookAtDeadGuy() {
+ showText(TX_VEN5N000);
+}
+
+void Room::veng5LookAtPowerPack() {
+ showText(TX_VEN5N009);
+}
+
+void Room::veng5LookAtDebris() {
+ showText(TX_VEN5N001);
+}
+
+void Room::veng5LookAtKirk() {
+ showText(TX_VEN5N003);
+}
+
+void Room::veng5LookAtSpock() {
+ showText(TX_VEN5N002);
+}
+
+void Room::veng5LookAtMccoy() {
+ showText(TX_VEN5N004);
+}
+
+void Room::veng5LookAtRedshirt() {
+ showText(TX_VEN5N005);
+}
+
+void Room::veng5LookAnywhere() {
+ showText(TX_VEN5N006);
+}
+
+void Room::veng5UsePhaserOnPowerPack() {
+ showText(TX_SPEAKER_MCCOY, TX_VEN5_007);
+}
+
+void Room::veng5UseStunPhaserOnDebris() {
+ showText(TX_SPEAKER_SPOCK, TX_VEN5_013);
+}
+
+void Room::veng5UseKillPhaserOnDebris() {
+ walkCrewmanC(OBJECT_KIRK, 0xaa, 0xb9, &Room::veng5ReachedPositionToShootDebris);
+ _awayMission->disableInput = true;
+}
+
+void Room::veng5ReachedPositionToShootDebris() {
+ loadActorAnimC(OBJECT_KIRK, "kfiren", -1, -1, &Room::veng5DrewPhaser);
+}
+
+void Room::veng5DrewPhaser() {
+ loadActorAnimC(OBJECT_POWER_PACK, "s7r5p1", 0xb1, 0x89, &Room::veng5VaporizedDebris);
+ playSoundEffectIndex(SND_PHASSHOT);
+ loadActorStandAnim(OBJECT_DEBRIS);
+}
+
+void Room::veng5VaporizedDebris() {
+ loadActorStandAnim(OBJECT_KIRK);
+
+ showText(TX_SPEAKER_MCCOY, TX_VEN5_011);
+ showText(TX_SPEAKER_SPOCK, TX_VEN5_018);
+ showText(TX_SPEAKER_MCCOY, TX_VEN5_010);
+ showText(TX_SPEAKER_SPOCK, TX_VEN5_019);
+ showText(TX_SPEAKER_KIRK, TX_VEN5_003);
+
+ _awayMission->veng.clearedDebrisInRoom5 = true;
+ _awayMission->disableInput = false;
+}
+
+void Room::veng5UseMTricorderOnDebris() {
+ mccoyScan(DIR_W, TX_VEN5_008);
+}
+
+void Room::veng5UseSTricorderOnDebris() {
+ spockScan(DIR_N, TX_VEN5_012);
+}
+
+void Room::veng5UseMTricorderOnPowerPack() {
+ mccoyScan(DIR_W, TX_VEN5_009); // ENHANCEMENT: Use mccoyScan, not showText
+}
+
+void Room::veng5UseSTricorderOnPowerPack() {
+ spockScan(DIR_N, TX_VEN5_004);
+}
+
+void Room::veng5TalkToKirk() {
+ showText(TX_SPEAKER_KIRK, TX_VEN5_001);
+}
+
+void Room::veng5TalkToMccoy() {
+ showText(TX_SPEAKER_MCCOY, TX_VEN5_006);
+}
+
+void Room::veng5TalkToSpock() {
+ showText(TX_SPEAKER_SPOCK, TX_VEN5_017);
+ showText(TX_SPEAKER_KIJE, TX_VEN5_R20);
+}
+
+void Room::veng5TalkToRedshirt() {
+ showText(TX_SPEAKER_KIJE, TX_VEN5_R19);
+}
+
+void Room::veng5TouchedHotspot0() { // Approached too close to fire
+ showText(TX_SPEAKER_SPOCK, TX_VEN5_015);
+
+ if (!_awayMission->veng.askedSpockAboutFire) {
+ _awayMission->veng.askedSpockAboutFire = true;
+ showText(TX_SPEAKER_KIRK, TX_VEN5_002);
+ showText(TX_SPEAKER_SPOCK, TX_VEN5_016);
+ }
+}
+
+void Room::veng5GetPowerPack() {
+ walkCrewmanC(OBJECT_KIRK, 0xb1, 0x8c, &Room::veng5ReachedPowerPack);
+}
+
+void Room::veng5ReachedPowerPack() {
+ loadActorAnimC(OBJECT_KIRK, "kuseln", -1, -1, &Room::veng5PickedUpPowerPack);
+}
+
+void Room::veng5PickedUpPowerPack() {
+ if (!_awayMission->veng.havePowerPack) {
+ loadActorStandAnim(OBJECT_POWER_PACK);
+ showText(TX_VEN5N010);
+ _awayMission->veng.havePowerPack = true;
+ giveItem(OBJECT_IFUSION);
+ }
}
}
diff --git a/engines/startrek/text.cpp b/engines/startrek/text.cpp
index 4ad34eeb44..091b4cbc18 100644
--- a/engines/startrek/text.cpp
+++ b/engines/startrek/text.cpp
@@ -2690,7 +2690,7 @@ extern const char *const g_gameStrings[] = {
"#VEN0\\VEN0_013#Captain, these phasers are not configured for fine cutting. We could cause extensive damage.",
"#VEN0\\VEN0_014#What kind of a butcher would do this sort of thing?",
"#VEN0\\VEN0_015#I'm a doctor, not a civil engineer!",
- "#VEN0\\VEN0_016#They're dead, Jim. All of them.", // TYPO
+ "#VEN0\\VEN0_016#They're dead, Jim. All of them.", // TYPO (for only some rooms this text appears in)
"#VEN0\\VEN0_017#Jim, don't forget, there's another survivor on board. We've got to find him!",
"#VEN0\\VEN0_018#My God, Jim. What kind of butcher would do something like this?",
"#VEN0\\VEN0_019#Punctured lung, nerve damage, brain damage, fractured arm and ribs; it's a miracle he lasted as long as he did. He's not coming back, Jim.",
@@ -3021,7 +3021,38 @@ extern const char *const g_gameStrings[] = {
"#VEN4\\VEN4N016#You retrieve the medical drill.",
"#VEN4\\VEN4N017#You see the dead body of Brittany. Her life was cut short and you won't stop until you find the persons responsible.",
- "#VEN4\\VEN4_017#I believe nothing needs to be said, Captain.",
+
+ "#VEN5\\VEN5_001#We must complete our mission, gentlemen.",
+ "#VEN5\\VEN5_002#Is the fire in danger of spreading, spock?",
+ "#VEN5\\VEN5_003#Thank you, Spock, I think we get the point.",
+ "#VEN5\\VEN5_004#A standard portable fusion power pack. It is fully functional, Captain.",
+ "#VEN5\\VEN5_005#Captain, I'm picking up a functioning energy source in the immediate vicinity.",
+ "#VEN5\\VEN5_006#I can't say that I'm very talkative right now.",
+ "#VEN5\\VEN5_007#Jim, are you mad? Put that phaser away. You almost killed us once already.",
+ "#VEN5\\VEN5_008#No lifeforms present, Jim. I'm picking up some kind of energy reading, though.",
+ "#VEN5\\VEN5_009#One of those fusion power packs, Jim. What do you want me to do with it?",
+ "#VEN5\\VEN5_010#A few centimeters lower with that phaser and half this section would be history, not to mention us...",
+ "#VEN5\\VEN5_011#Oh, my God, Jim! Is that what I think it is?",
+ "#VEN5\\VEN5_012#I am picking up a high energy power source somewhere under the debris. I recommend caution, Captain.",
+ "#VEN5\\VEN5_013#The stun setting would be ineffective, Captain.",
+ "#VEN5\\VEN5_015#Captain, it is unadvisable to approach too closely. There is an open fire nearby.",
+ "#VEN5\\VEN5_016#No, Captain. There is an inadequate supply of flammable material. It will eventually burn itself out.",
+ "#VEN5\\VEN5_017#This corridor seems to have been particularly damaged. There have been hull breaches on the deck below.",
+ "#VEN5\\VEN5_018#Yes, Doctor. It is a portable fusion power pack.",
+ "#VEN5\\VEN5_019#Actually, Doctor, three point two centimeters. And based on our proximity to the explosion, and the angle of the beam...",
+ "#VEN5\\VEN5_R19#Is there a question, Captain?",
+ "#VEN5\\VEN5_R20#I will monitor the situation, Mr. Spock. I can use the distraction.",
+ "#VEN5\\VEN5N000#A look of terror is still etched on the face of this crewman.",
+ "#VEN5\\VEN5N001#A rather large pile of debris.",
+ "#VEN5\\VEN5N002#A resolute Mr. Spock.",
+ "#VEN5\\VEN5N003#A sad but determined James T. Kirk.",
+ "#VEN5\\VEN5N004#Dr. McCoy avoids the glances of his crewmates.",
+ "#VEN5\\VEN5N005#Ensign Kije, learning that Starfleet isn't always very pleasant.",
+ "#VEN5\\VEN5N006#This corridor leads to the Republic's Engineering section.",
+ "#VEN5\\VEN5N007#This door leads to main engineering.",
+ "#VEN5\\VEN5N008#These ladders are used when turbolifts are unavailable. Unfortunately, it is blocked by debris and a small, smoldering fire.",
+ "#VEN5\\VEN5N009#This is the most powerful portable energy storage device ever developed by man. It is used to provide temporary power to small systems when Main or Auxiliary power is unavailable.",
+ "#VEN5\\VEN5N010#You pick up the portable Fusion power pack.",
"#VEN6\\VEN6N007#The hypo is now filled with multipurpose oil.",
diff --git a/engines/startrek/text.h b/engines/startrek/text.h
index 9cd6376f81..a55809a486 100644
--- a/engines/startrek/text.h
+++ b/engines/startrek/text.h
@@ -3143,6 +3143,41 @@ enum GameStringIDs {
TX_VEN4N017,
+ TX_VEN5_001,
+ TX_VEN5_002,
+ TX_VEN5_003,
+ TX_VEN5_004,
+ TX_VEN5_005,
+ TX_VEN5_006,
+ TX_VEN5_007,
+ TX_VEN5_008,
+ TX_VEN5_009,
+ TX_VEN5_010,
+ TX_VEN5_011,
+ TX_VEN5_012,
+ TX_VEN5_013,
+ // MISSING
+ TX_VEN5_015,
+ TX_VEN5_016,
+ TX_VEN5_017,
+ TX_VEN5_018,
+ TX_VEN5_019,
+ // UNUSED: 020 (identical to R20)
+ TX_VEN5_R19,
+ TX_VEN5_R20,
+ TX_VEN5N000,
+ TX_VEN5N001,
+ TX_VEN5N002,
+ TX_VEN5N003,
+ TX_VEN5N004,
+ TX_VEN5N005,
+ TX_VEN5N006,
+ TX_VEN5N007,
+ TX_VEN5N008,
+ TX_VEN5N009,
+ TX_VEN5N010,
+
+
TX_VEN6N007,