aboutsummaryrefslogtreecommitdiff
path: root/engines/startrek/rooms
diff options
context:
space:
mode:
authorMatthew Stewart2018-08-08 03:24:03 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commit5f1f19be506359350956a4886052060dfabc5f0c (patch)
tree80c25a1525b893d8239dc28c4a832ff41d194cd4 /engines/startrek/rooms
parent4887ba0fd2964301a1bc4d3ea8ba5e398aba8d37 (diff)
downloadscummvm-rg350-5f1f19be506359350956a4886052060dfabc5f0c.tar.gz
scummvm-rg350-5f1f19be506359350956a4886052060dfabc5f0c.tar.bz2
scummvm-rg350-5f1f19be506359350956a4886052060dfabc5f0c.zip
STARTREK: VENG7
Diffstat (limited to 'engines/startrek/rooms')
-rw-r--r--engines/startrek/rooms/veng7.cpp151
1 files changed, 149 insertions, 2 deletions
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;
}
}