diff options
Diffstat (limited to 'engines/startrek')
-rw-r--r-- | engines/startrek/room.cpp | 2 | ||||
-rw-r--r-- | engines/startrek/room.h | 22 | ||||
-rw-r--r-- | engines/startrek/rooms/feather4.cpp | 134 | ||||
-rw-r--r-- | engines/startrek/rooms/function_map.h | 10 | ||||
-rw-r--r-- | engines/startrek/text.h | 47 |
5 files changed, 203 insertions, 12 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp index 4dc15957f8..52f2c05ba6 100644 --- a/engines/startrek/room.cpp +++ b/engines/startrek/room.cpp @@ -149,7 +149,7 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm) { } else if (name == "FEATHER4") { _roomActionList = feather4ActionList; - _numRoomActions = sizeof(feather4ActionList) / sizeof(RoomAction); + _numRoomActions = feather4NumActions; } else if (name == "FEATHER5") { _roomActionList = feather5ActionList; diff --git a/engines/startrek/room.h b/engines/startrek/room.h index e5a630db7d..434ac811e4 100644 --- a/engines/startrek/room.h +++ b/engines/startrek/room.h @@ -1569,6 +1569,28 @@ public: // FEATHER4 void feather4Tick1(); + void feather4UseCommunicator(); + void feather4UsePhaser(); + void feather4UseSTricorderOnLight(); + void feather4UseSTricorderOnMushroom(); + void feather4UseSTricorderOnBush(); + void feather4UseSTricorderAnywhere(); + void feather4UseMTricorderOnLight(); + void feather4UseMTricorderOnMushroom(); + void feather4UseMTricorderAnywhere(); + void feather4UseMedkitAnywhere(); + void feather4TalkToMccoy(); + void feather4TalkToSpock(); + void feather4TalkToRedshirt(); + void feather4LookAtEyes(); + void feather4LookAnywhere(); + void feather4LookAtMushroom(); + void feather4LookAtBush(); + void feather4LookAtLight(); + void feather4LookAtKirk(); + void feather4LookAtSpock(); + void feather4LookAtMccoy(); + void feather4LookAtRedshirt(); // FEATHER5 void feather5Tick1(); diff --git a/engines/startrek/rooms/feather4.cpp b/engines/startrek/rooms/feather4.cpp index b2e92df619..7629353afe 100644 --- a/engines/startrek/rooms/feather4.cpp +++ b/engines/startrek/rooms/feather4.cpp @@ -22,14 +22,142 @@ #include "startrek/room.h" -#define OBJECT_8 8 - -#define HOTSPOT_20 0x20 +#define HOTSPOT_EYES 0x20 +#define HOTSPOT_MUSHROOM 0x21 +#define HOTSPOT_BUSH 0x22 +#define HOTSPOT_LIGHT_1 0x23 +#define HOTSPOT_LIGHT_2 0x24 +#define HOTSPOT_LIGHT_3 0x25 namespace StarTrek { +extern const RoomAction feather4ActionList[] = { + { {ACTION_TICK, 1, 0, 0}, &Room::feather4Tick1 }, + { {ACTION_USE, OBJECT_ICOMM, 0xff, 0}, &Room::feather4UseCommunicator }, + { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::feather4UsePhaser }, + { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::feather4UsePhaser }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_LIGHT_1, 0}, &Room::feather4UseSTricorderOnLight }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_LIGHT_2, 0}, &Room::feather4UseSTricorderOnLight }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_LIGHT_3, 0}, &Room::feather4UseSTricorderOnLight }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_MUSHROOM, 0},&Room::feather4UseSTricorderOnMushroom }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_BUSH, 0}, &Room::feather4UseSTricorderOnBush }, + { {ACTION_USE, OBJECT_ISTRICOR, 0xff, 0}, &Room::feather4UseSTricorderAnywhere }, + { {ACTION_USE, OBJECT_IMTRICOR, HOTSPOT_LIGHT_1, 0}, &Room::feather4UseMTricorderOnLight }, + { {ACTION_USE, OBJECT_IMTRICOR, HOTSPOT_LIGHT_2, 0}, &Room::feather4UseMTricorderOnLight }, + { {ACTION_USE, OBJECT_IMTRICOR, HOTSPOT_LIGHT_3, 0}, &Room::feather4UseMTricorderOnLight }, + { {ACTION_USE, OBJECT_IMTRICOR, HOTSPOT_MUSHROOM, 0},&Room::feather4UseMTricorderOnMushroom }, + { {ACTION_USE, OBJECT_IMTRICOR, 0xff, 0}, &Room::feather4UseMTricorderAnywhere }, + { {ACTION_USE, OBJECT_IMEDKIT, 0xff, 0}, &Room::feather4UseMedkitAnywhere }, + { {ACTION_TALK, OBJECT_MCCOY, 0, 0}, &Room::feather4TalkToMccoy }, + { {ACTION_TALK, OBJECT_SPOCK, 0, 0}, &Room::feather4TalkToSpock }, + { {ACTION_TALK, OBJECT_REDSHIRT, 0, 0}, &Room::feather4TalkToRedshirt }, + { {ACTION_LOOK, HOTSPOT_EYES, 0, 0}, &Room::feather4LookAtEyes }, + { {ACTION_LOOK, 0xff, 0, 0}, &Room::feather4LookAnywhere }, + { {ACTION_LOOK, HOTSPOT_MUSHROOM, 0, 0}, &Room::feather4LookAtMushroom }, + { {ACTION_LOOK, HOTSPOT_BUSH, 0, 0}, &Room::feather4LookAtBush }, + { {ACTION_LOOK, HOTSPOT_LIGHT_1, 0, 0}, &Room::feather4LookAtLight }, + { {ACTION_LOOK, HOTSPOT_LIGHT_2, 0, 0}, &Room::feather4LookAtLight }, + { {ACTION_LOOK, HOTSPOT_LIGHT_3, 0, 0}, &Room::feather4LookAtLight }, + { {ACTION_LOOK, OBJECT_KIRK, 0, 0}, &Room::feather4LookAtKirk }, + { {ACTION_LOOK, OBJECT_SPOCK, 0, 0}, &Room::feather4LookAtSpock }, + { {ACTION_LOOK, OBJECT_MCCOY, 0, 0}, &Room::feather4LookAtMccoy }, + { {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::feather4LookAtRedshirt }, +}; + +extern const int feather4NumActions = sizeof(feather4ActionList) / sizeof(RoomAction); + + void Room::feather4Tick1() { + playVoc("FEA4LOOP"); + playMidiMusicTracks(27); +} + +void Room::feather4UseCommunicator() { + showText(TX_SPEAKER_MCCOY, TX_FEA4_005); // BUGFIX: Original played wrong audio file (TX_FEA4N008) +} + +void Room::feather4UsePhaser() { + showText(TX_SPEAKER_SPOCK, TX_FEA4_011); +} + +void Room::feather4UseSTricorderOnLight() { + spockScan(DIR_W, TX_FEA4_010); +} + +void Room::feather4UseSTricorderOnMushroom() { + spockScan(DIR_W, TX_FEA4_012); +} + +void Room::feather4UseSTricorderOnBush() { + spockScan(DIR_W, TX_FEA4_009); +} + +void Room::feather4UseSTricorderAnywhere() { + spockScan(DIR_W, TX_FEA4_008); +} + +void Room::feather4UseMTricorderOnLight() { + mccoyScan(DIR_W, TX_FEA4_001); +} + +void Room::feather4UseMTricorderOnMushroom() { + mccoyScan(DIR_W, TX_FEA4_003); +} + +void Room::feather4UseMTricorderAnywhere() { + mccoyScan(DIR_W, TX_FEA4_006); +} + +void Room::feather4UseMedkitAnywhere() { + showText(TX_SPEAKER_MCCOY, TX_FEA4_002); +} + +void Room::feather4TalkToMccoy() { + showText(TX_SPEAKER_MCCOY, TX_FEA4_004); +} + +void Room::feather4TalkToSpock() { + showText(TX_SPEAKER_SPOCK, TX_FEA4_007); +} + +void Room::feather4TalkToRedshirt() { + showText(TX_SPEAKER_STRAGEY, TX_FEA4_013); +} + +void Room::feather4LookAtEyes() { + showText(TX_FEA4N003); +} + +void Room::feather4LookAnywhere() { + showText(TX_FEA4N008); +} + +void Room::feather4LookAtMushroom() { + showText(TX_FEA4N001); +} + +void Room::feather4LookAtBush() { + showText(TX_FEA4N000); +} + +void Room::feather4LookAtLight() { + showText(TX_FEA4N002); +} + +void Room::feather4LookAtKirk() { + showText(TX_FEA4N004); +} + +void Room::feather4LookAtSpock() { + showText(TX_FEA4N007); +} + +void Room::feather4LookAtMccoy() { + showText(TX_FEA4N006); +} +void Room::feather4LookAtRedshirt() { + showText(TX_FEA4N005); } } diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h index 95f343ccf7..e0996f3b86 100644 --- a/engines/startrek/rooms/function_map.h +++ b/engines/startrek/rooms/function_map.h @@ -28,8 +28,6 @@ namespace StarTrek { -// FIXME: calling a constructor in global scope not allowed in scummvm? - RoomAction demon0ActionList[] = { { {ACTION_TICK, 1, 0, 0}, &Room::demon0Tick1 }, { {ACTION_TICK, 2, 0, 0}, &Room::demon0Tick2 }, @@ -1782,12 +1780,8 @@ RoomAction feather0ActionList[] = { { {ACTION_USE, OBJECT_IMTRICOR, 8, 0}, &Room::feather0UseMTricorderOnQuetzecoatl }, }; -extern const RoomAction feather1ActionList[], feather2ActionList[], feather3ActionList[]; -extern const int feather1NumActions, feather2NumActions, feather3NumActions; - -RoomAction feather4ActionList[] = { - { {ACTION_TICK, 1, 0, 0}, &Room::feather4Tick1 }, -}; +extern const RoomAction feather1ActionList[], feather2ActionList[], feather3ActionList[], feather4ActionList[]; +extern const int feather1NumActions, feather2NumActions, feather3NumActions, feather4NumActions; RoomAction feather5ActionList[] = { { {ACTION_TICK, 1, 0, 0}, &Room::feather5Tick1 }, diff --git a/engines/startrek/text.h b/engines/startrek/text.h index 15d20ae16d..f47fa5c1b2 100644 --- a/engines/startrek/text.h +++ b/engines/startrek/text.h @@ -1803,6 +1803,30 @@ enum GameStringIDs { TX_FEA3N012, + TX_FEA4_001, + TX_FEA4_002, + TX_FEA4_003, + TX_FEA4_004, + TX_FEA4_005, + TX_FEA4_006, + TX_FEA4_007, + TX_FEA4_008, + TX_FEA4_009, + TX_FEA4_010, + TX_FEA4_011, + TX_FEA4_012, + TX_FEA4_013, + TX_FEA4N000, + TX_FEA4N001, + TX_FEA4N002, + TX_FEA4N003, + TX_FEA4N004, + TX_FEA4N005, + TX_FEA4N006, + TX_FEA4N007, + TX_FEA4N008, + + TX_SIN3_012, @@ -3543,6 +3567,29 @@ const char * const g_gameStrings[] = { "#FEA3\\FEA3N012#Your security officer looks at you for orders and, perhaps, inspiration.", + "#FEA4\\FEA4_001#A swarm of fireflies, Jim.", + "#FEA4\\FEA4_002#Everyone is healthy, Jim, there's no need for the medical kit here.", + "#FEA4\\FEA4_003#I would strongly recommend against touching these, Jim. They are highly toxic.", + "#FEA4\\FEA4_004#It's getting a little cool out here. Keep warm. I don't want a bunch of sick crewmen when we get back to the ship. If we ever do get back to the ship.", + "#FEA4\\FEA4_005#Still out, Jim.", + "#FEA4\\FEA4_006#You're looking a little pale, Jim.", + "#FEA4\\FEA4_007#Fascinating. The trees are able to grow very close together in this forest, Captain.", + "#FEA4\\FEA4_008#I am reading a life form to the west, Captain.", + "#FEA4\\FEA4_009#It vaguely resembles the Terran Spanish Bayonette. The edges of the leaf are razor sharp and secrete a poisonous resin.", + "#FEA4\\FEA4_010#Small colonies of bio-luminescent insects, Captain.", + "#FEA4\\FEA4_011#They are not currently operational, Captain.", + "#FEA4\\FEA4_012#Tralxacian mushrooms. Their spores are highly toxic and are released if they are disturbed.", + "#FEA4\\FEA4_013#Does every planetside mission have this much adventure, Captain? Mind you, I can't say Mr. Quetzecoatl is making a very good impression on me...", + "#FEA4\\FEA4N000#A large fern fans the pathway.", + "#FEA4\\FEA4N001#Below this rock is a large growth of mushrooms.", + "#FEA4\\FEA4N002#Familiar glowing spheres light the path.", + "#FEA4\\FEA4N003#Feral red eyes glare out of the dark at you.", + "#FEA4\\FEA4N004#James T. Kirk realizes that every step increases their danger.", + "#FEA4\\FEA4N005#Lt. Stragey smiles as he strolls down the path.", + "#FEA4\\FEA4N006#McCoy doesn't want to be bothered right now.", + "#FEA4\\FEA4N007#Mr. Spock analyzes the surroundings.", + "#FEA4\\FEA4N008#You are in a dark forest. You can hear the flow of water to the northwest.", + "#SIN3\\SIN3_012#Can't say I like the decor.", |