aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Stewart2018-07-04 00:32:34 -0400
committerEugene Sandulenko2018-08-09 08:37:30 +0200
commitae3be7b40730387707bf4c104ea4f2ff8b588523 (patch)
treeacd6f32b6dc77cdf65d06139b3c7710618b2845c /engines
parent007960e85eeaeb0f1ab45914936a917cb40af808 (diff)
downloadscummvm-rg350-ae3be7b40730387707bf4c104ea4f2ff8b588523.tar.gz
scummvm-rg350-ae3be7b40730387707bf4c104ea4f2ff8b588523.tar.bz2
scummvm-rg350-ae3be7b40730387707bf4c104ea4f2ff8b588523.zip
STARTREK: FEATHER2
Diffstat (limited to 'engines')
-rw-r--r--engines/startrek/action.h10
-rw-r--r--engines/startrek/room.cpp2
-rw-r--r--engines/startrek/room.h18
-rw-r--r--engines/startrek/rooms/feather2.cpp116
-rw-r--r--engines/startrek/rooms/function_map.h8
-rw-r--r--engines/startrek/text.h43
6 files changed, 186 insertions, 11 deletions
diff --git a/engines/startrek/action.h b/engines/startrek/action.h
index f6178d8858..ab50defdb7 100644
--- a/engines/startrek/action.h
+++ b/engines/startrek/action.h
@@ -29,7 +29,7 @@ namespace StarTrek {
class Room;
-enum Acton { // TODO: rename
+enum ActionTypes {
ACTION_TICK = 0,
ACTION_WALK = 1, // Actions 1-5 are directly usable on away missions.
@@ -41,8 +41,16 @@ enum Acton { // TODO: rename
ACTION_TOUCHED_WARP = 6,
ACTION_TOUCHED_HOTSPOT = 7, // Second kind of "hotspot" only relevant when an object touches them
ACTION_TIMER_EXPIRED = 8,
+
+ ACTION_DONE_ANIM = 10,
+ ACTION_DONE_WALK = 12,
+
+ // TODO: Remove these two as redundant.
+ // They're only here because I don't want to mess up the spacing in function_map.h by
+ // find/replacing the old name.
ACTION_FINISHED_ANIMATION = 10,
ACTION_FINISHED_WALKING = 12,
+
ACTION_OPTIONS = 13 // Not really an action, but selectable from action menu
};
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp
index 0430d34d78..a2e5ff3e13 100644
--- a/engines/startrek/room.cpp
+++ b/engines/startrek/room.cpp
@@ -141,7 +141,7 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm) {
}
else if (name == "FEATHER2") {
_roomActionList = feather2ActionList;
- _numRoomActions = sizeof(feather2ActionList) / sizeof(RoomAction);
+ _numRoomActions = feather2NumActions;
}
else if (name == "FEATHER3") {
_roomActionList = feather3ActionList;
diff --git a/engines/startrek/room.h b/engines/startrek/room.h
index f4e7f30175..2a37c7f552 100644
--- a/engines/startrek/room.h
+++ b/engines/startrek/room.h
@@ -1500,6 +1500,24 @@ public:
// FEATHER2
void feather2Tick1();
+ void feather2UseCommunicator();
+ void feather2UsePhaser();
+ void feather2UseSTricorderAnywhere();
+ void feather2UseMTricorderAnywhere();
+ void feather2TalkToMccoy();
+ void feather2TalkToSpock();
+ void feather2TalkToRedshirt();
+ void feather2LookAtVines();
+ void feather2UseMedkit();
+ void feather2WalkToLeftExit();
+ void feather2LookAtEyes();
+ void feather2LookAtBigTree();
+ void feather2LookAtTrees();
+ void feather2LookAnywhere();
+ void feather2LookAtKirk();
+ void feather2LookAtSpock();
+ void feather2LookAtMccoy();
+ void feather2LookAtRedshirt();
// FEATHER3
void feather3Tick1();
diff --git a/engines/startrek/rooms/feather2.cpp b/engines/startrek/rooms/feather2.cpp
index d28e26c7fe..160302f000 100644
--- a/engines/startrek/rooms/feather2.cpp
+++ b/engines/startrek/rooms/feather2.cpp
@@ -22,14 +22,124 @@
#include "startrek/room.h"
-#define OBJECT_8 8
-
-#define HOTSPOT_20 0x20
+#define HOTSPOT_EYES_1 0x20
+#define HOTSPOT_EYES_2 0x21
+#define HOTSPOT_EYES_3 0x22
+#define HOTSPOT_BIG_TREE 0x23
+#define HOTSPOT_TREES 0x24
+#define HOTSPOT_VINES 0x25
+#define HOTSPOT_LEFT_EXIT 0x26
namespace StarTrek {
+extern const RoomAction feather2ActionList[] = {
+ { {ACTION_TICK, 1, 0, 0}, &Room::feather2Tick1 },
+ { {ACTION_USE, OBJECT_ICOMM, 0xff, 0}, &Room::feather2UseCommunicator },
+ { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::feather2UsePhaser },
+ { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::feather2UsePhaser },
+ { {ACTION_USE, OBJECT_ISTRICOR, 0xff, 0}, &Room::feather2UseSTricorderAnywhere },
+ { {ACTION_USE, OBJECT_IMTRICOR, 0xff, 0}, &Room::feather2UseMTricorderAnywhere },
+ { {ACTION_TALK, OBJECT_MCCOY, 0, 0}, &Room::feather2TalkToMccoy },
+ { {ACTION_TALK, OBJECT_SPOCK, 0, 0}, &Room::feather2TalkToSpock },
+ { {ACTION_TALK, OBJECT_REDSHIRT, 0, 0}, &Room::feather2TalkToRedshirt },
+ { {ACTION_LOOK, HOTSPOT_VINES, 0, 0}, &Room::feather2LookAtVines },
+ { {ACTION_USE, OBJECT_IMEDKIT, 0xff, 0}, &Room::feather2UseMedkit },
+ { {ACTION_WALK, HOTSPOT_LEFT_EXIT, 0, 0}, &Room::feather2WalkToLeftExit },
+ { {ACTION_LOOK, HOTSPOT_EYES_1, 0, 0}, &Room::feather2LookAtEyes },
+ { {ACTION_LOOK, HOTSPOT_EYES_2, 0, 0}, &Room::feather2LookAtEyes },
+ { {ACTION_LOOK, HOTSPOT_EYES_3, 0, 0}, &Room::feather2LookAtEyes },
+ { {ACTION_LOOK, HOTSPOT_BIG_TREE, 0, 0}, &Room::feather2LookAtBigTree },
+ { {ACTION_LOOK, HOTSPOT_TREES, 0, 0}, &Room::feather2LookAtTrees },
+ { {ACTION_LOOK, 0xff, 0, 0}, &Room::feather2LookAnywhere },
+ { {ACTION_LOOK, OBJECT_KIRK, 0, 0}, &Room::feather2LookAtKirk },
+ { {ACTION_LOOK, OBJECT_SPOCK, 0, 0}, &Room::feather2LookAtSpock },
+ { {ACTION_LOOK, OBJECT_MCCOY, 0, 0}, &Room::feather2LookAtMccoy },
+ { {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::feather2LookAtRedshirt },
+};
+
+extern const int feather2NumActions = sizeof(feather2ActionList) / sizeof(RoomAction);
+
+
void Room::feather2Tick1() {
+ playVoc("FEA2LOOP");
+ playMidiMusicTracks(27);
+}
+
+void Room::feather2UseCommunicator() {
+ showText(TX_SPEAKER_SPOCK, TX_FEA2_006);
+}
+
+void Room::feather2UsePhaser() {
+ // FIXME: Why does McCoy say "They're dead, Jim"?
+ showText(TX_SPEAKER_MCCOY, TX_FEA2_003);
+}
+
+void Room::feather2UseSTricorderAnywhere() {
+ spockScan(DIR_S, TX_FEA2_007);
+}
+
+void Room::feather2UseMTricorderAnywhere() {
+ // ENHANCEMENT: Original didn't play tricorder sound, etc
+ mccoyScan(DIR_S, TX_FEA2_002);
+}
+
+void Room::feather2TalkToMccoy() {
+ showText(TX_SPEAKER_MCCOY, TX_FEA2_004);
+}
+
+void Room::feather2TalkToSpock() {
+ showText(TX_SPEAKER_SPOCK, TX_FEA2_008);
+}
+
+void Room::feather2TalkToRedshirt() {
+ showText(TX_SPEAKER_STRAGEY, TX_FEA2_009);
+}
+
+void Room::feather2LookAtVines() {
+ // NOTE: This might be unused? I can't find where HOTSPOT_VINES is supposed to be.
+ showText(TX_FEA2N000);
+ showText(TX_SPEAKER_STRAGEY, TX_FEA2_010);
+ showText(TX_SPEAKER_MCCOY, TX_FEA2_005);
+}
+
+void Room::feather2UseMedkit() {
+ showText(TX_SPEAKER_MCCOY, TX_FEA2_001);
+}
+
+void Room::feather2WalkToLeftExit() {
+ walkCrewman(OBJECT_KIRK, 0x14, 0x96);
+}
+
+void Room::feather2LookAtEyes() {
+ showText(TX_FEA2N001);
+}
+
+void Room::feather2LookAtBigTree() {
+ showText(TX_FEA2N006);
+}
+
+void Room::feather2LookAtTrees() {
+ showText(TX_FEA2N007);
+}
+
+void Room::feather2LookAnywhere() {
+ showText(TX_FEA2N008);
+}
+
+void Room::feather2LookAtKirk() {
+ showText(TX_FEA2N002);
+}
+
+void Room::feather2LookAtSpock() {
+ showText(TX_FEA2N005);
+}
+
+void Room::feather2LookAtMccoy() {
+ showText(TX_FEA2N004);
+}
+void Room::feather2LookAtRedshirt() {
+ showText(TX_FEA2N003);
}
}
diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h
index 203043ba58..cca19c46f7 100644
--- a/engines/startrek/rooms/function_map.h
+++ b/engines/startrek/rooms/function_map.h
@@ -1782,12 +1782,8 @@ RoomAction feather0ActionList[] = {
{ {ACTION_USE, OBJECT_IMTRICOR, 8, 0}, &Room::feather0UseMTricorderOnQuetzecoatl },
};
-extern const RoomAction feather1ActionList[];
-extern const int feather1NumActions;
-
-RoomAction feather2ActionList[] = {
- { {ACTION_TICK, 1, 0, 0}, &Room::feather2Tick1 },
-};
+extern const RoomAction feather1ActionList[], feather2ActionList[];
+extern const int feather1NumActions, feather2NumActions;
RoomAction feather3ActionList[] = {
{ {ACTION_TICK, 1, 0, 0}, &Room::feather3Tick1 },
diff --git a/engines/startrek/text.h b/engines/startrek/text.h
index 4bc5f67ee7..4dab29d7e2 100644
--- a/engines/startrek/text.h
+++ b/engines/startrek/text.h
@@ -1723,6 +1723,27 @@ enum GameStringIDs {
TX_FEA1N022,
+ TX_FEA2_001,
+ TX_FEA2_002,
+ TX_FEA2_003,
+ TX_FEA2_004,
+ TX_FEA2_005,
+ TX_FEA2_006,
+ TX_FEA2_007,
+ TX_FEA2_008,
+ TX_FEA2_009,
+ TX_FEA2_010,
+ TX_FEA2N000,
+ TX_FEA2N001,
+ TX_FEA2N002,
+ TX_FEA2N003,
+ TX_FEA2N004,
+ TX_FEA2N005,
+ TX_FEA2N006,
+ TX_FEA2N007,
+ TX_FEA2N008,
+
+
TX_SIN3_012,
@@ -3384,6 +3405,28 @@ const char * const g_gameStrings[] = {
"#FEA1\\FEA1N022#You pick up some rocks from the pile.",
+ "#FEA2\\FEA2_001#Everyone is healthy, Jim, there's no need for the medical kit here.",
+ "#FEA2\\FEA2_002#Nothing interesting in this neck of the woods, Jim.",
+ "#FEA2\\FEA2_003#They're dead, Jim.",
+ "#FEA2\\FEA2_004#This jungle is sure lush, Jim. Speaking of lush, I could use a nice saurian brandy about now.",
+ "#FEA2\\FEA2_005#Really? Tell me more about your childhood Lieutenant...",
+ "#FEA2\\FEA2_006#Fascinating. Our communicators have apparently been rendered ineffective.",
+ "#FEA2\\FEA2_007#I am reading a life form to the west. It appears to be humanoid.",
+ "#FEA2\\FEA2_008#Staying in this overgrown region could prove quite dangerous. I suggest we continue, Captain.",
+ "#FEA2\\FEA2_009#I feel like someone is watching us, Captain.",
+ "#FEA2\\FEA2_010#You know, I always wanted to go swinging on a vine through a jungle. Just like in some old books I read when I was a kid.",
+ "#FEA2\\FEA2N000#A vine hangs from the trees.",
+ "#FEA2\\FEA2N001#Feral red eyes glare out of the dark at you.",
+ "#FEA2\\FEA2N002#Kirk is wondering what he said that made Quetzecoatl so angry...",
+ "#FEA2\\FEA2N003#Lt. Stragey appears fascinated by the vines hanging from the trees.",
+ "#FEA2\\FEA2N004#McCoy is filled with premonitions of injury and death. Why else would they have brought him along?",
+ "#FEA2\\FEA2N005#Spock is examining the surrounding terrain for signs of danger. Anything else would be illogical.",
+ "#FEA2\\FEA2N006#This great tree has been in this jungle for centuries.",
+ "#FEA2\\FEA2N007#Trees to the left of you! Trees to the right of you! Into the valley of trees raced the landing party!",
+ "#FEA2\\FEA2N008#You are in a densely vegetated area. The overgrowth blocks your view in all directions.",
+
+
+
"#SIN3\\SIN3_012#Can't say I like the decor.",