diff options
author | Matthew Stewart | 2018-07-04 22:06:59 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 5863f515f72904ab17f976a55264fc5a342fc90c (patch) | |
tree | 01d5c6819992026711d7b8fa5f2772c50a59f316 /engines/startrek | |
parent | 8aef8c453918a583e1d804bf371437fef3b08e8c (diff) | |
download | scummvm-rg350-5863f515f72904ab17f976a55264fc5a342fc90c.tar.gz scummvm-rg350-5863f515f72904ab17f976a55264fc5a342fc90c.tar.bz2 scummvm-rg350-5863f515f72904ab17f976a55264fc5a342fc90c.zip |
STARTREK: FEATHER5
Diffstat (limited to 'engines/startrek')
-rw-r--r-- | engines/startrek/action.h | 5 | ||||
-rw-r--r-- | engines/startrek/awaymission.cpp | 14 | ||||
-rw-r--r-- | engines/startrek/awaymission.h | 2 | ||||
-rw-r--r-- | engines/startrek/room.cpp | 2 | ||||
-rw-r--r-- | engines/startrek/room.h | 62 | ||||
-rw-r--r-- | engines/startrek/rooms/feather4.cpp | 10 | ||||
-rw-r--r-- | engines/startrek/rooms/feather5.cpp | 389 | ||||
-rw-r--r-- | engines/startrek/rooms/function_map.h | 6 | ||||
-rw-r--r-- | engines/startrek/text.h | 114 |
9 files changed, 582 insertions, 22 deletions
diff --git a/engines/startrek/action.h b/engines/startrek/action.h index 1416736ec5..de20863cef 100644 --- a/engines/startrek/action.h +++ b/engines/startrek/action.h @@ -42,6 +42,11 @@ enum ActionTypes { 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 as redundant. They only still exist so I don't need to redo the + // manual spacing in the room action lists. ACTION_FINISHED_ANIMATION = 10, ACTION_FINISHED_WALKING = 12, diff --git a/engines/startrek/awaymission.cpp b/engines/startrek/awaymission.cpp index 8c7f8db51e..819319e296 100644 --- a/engines/startrek/awaymission.cpp +++ b/engines/startrek/awaymission.cpp @@ -613,16 +613,14 @@ void StarTrekEngine::handleAwayMissionAction() { showTextbox("", getLoadedText(GROUNDTX_LOOK_SPOCK), 20, 20, TEXTCOLOR_YELLOW, 0); else if (action.activeObject() == OBJECT_MCCOY) showTextbox("", getLoadedText(GROUNDTX_LOOK_MCCOY), 20, 20, TEXTCOLOR_YELLOW, 0); - else { - if (action.activeObject() == OBJECT_REDSHIRT) - showTextbox("", getLoadedText(GROUNDTX_LOOK_REDSHIRT), 20, 20, TEXTCOLOR_YELLOW, 0); - + else if (action.activeObject() == OBJECT_REDSHIRT) + showTextbox("", getLoadedText(GROUNDTX_LOOK_REDSHIRT), 20, 20, TEXTCOLOR_YELLOW, 0); + else // Show generic "nothing of note" text. - // BUG? This text is also shown after looking at the redshirt. However, his - // text is normally overridden on a per-mission basis, so perhaps this bug - // never manifests itself? + // BUGFIX: originally this was shown after the redshirt's text as well. + // Though, the original game may not have used this default implementation + // anywhere... showTextbox("", getLoadedText(GROUNDTX_LOOK_ANYWHERE), 20, 20, TEXTCOLOR_YELLOW, 0); - } break; case ACTION_TALK: diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h index 8202ddb4a5..06c89239c6 100644 --- a/engines/startrek/awaymission.h +++ b/engines/startrek/awaymission.h @@ -253,9 +253,11 @@ struct AwayMission { bool tookKnife; // 0x2d bool field2e; // 0x2e byte numRocksThrownAtTlaoxac; // 0x2f + bool gotFern; // 0x30 bool holeBlocked; // 0x31 bool tlaoxacTestPassed; // 0x32 bool knockedOutTlaoxac; // 0x33 + bool waterMonsterRetreated; // 0x34 bool showedSnakeToTlaoxac; // 0x35 int16 missionScore; // 0x36 } feather; diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp index 52f2c05ba6..342bba9ae7 100644 --- a/engines/startrek/room.cpp +++ b/engines/startrek/room.cpp @@ -153,7 +153,7 @@ Room::Room(StarTrekEngine *vm, const Common::String &name) : _vm(vm) { } else if (name == "FEATHER5") { _roomActionList = feather5ActionList; - _numRoomActions = sizeof(feather5ActionList) / sizeof(RoomAction); + _numRoomActions = feather5NumActions; } else if (name == "FEATHER6") { _roomActionList = feather6ActionList; diff --git a/engines/startrek/room.h b/engines/startrek/room.h index 434ac811e4..0e536b7726 100644 --- a/engines/startrek/room.h +++ b/engines/startrek/room.h @@ -1573,7 +1573,7 @@ public: void feather4UsePhaser(); void feather4UseSTricorderOnLight(); void feather4UseSTricorderOnMushroom(); - void feather4UseSTricorderOnBush(); + void feather4UseSTricorderOnFern(); void feather4UseSTricorderAnywhere(); void feather4UseMTricorderOnLight(); void feather4UseMTricorderOnMushroom(); @@ -1585,7 +1585,7 @@ public: void feather4LookAtEyes(); void feather4LookAnywhere(); void feather4LookAtMushroom(); - void feather4LookAtBush(); + void feather4LookAtFern(); void feather4LookAtLight(); void feather4LookAtKirk(); void feather4LookAtSpock(); @@ -1594,6 +1594,64 @@ public: // FEATHER5 void feather5Tick1(); + void feather5TouchedHotspot0(); + void feather5UseSpockOnFern(); + void feather5UseMccoyOnFern(); + void feather5UseRedshirtOnFern(); + void feather5UseRedshirtOnLeftExit(); + void feather5RedshirtReachedLog(); + void feather5RedshirtDeathFinished(); + void feather5UseSpockOnLeftExit(); + void feather5UseMccoyOnLeftExit(); + void feather5UseSnakeOnKirk(); + void feather5UseSnakeOnSpock(); + void feather5UseSnakeOnMccoy(); + void feather5UseSnakeOnRedshirt(); + void feather5UseSnakeOnWater(); + void feather5UseKnifeOnKirk(); + void feather5UseKnifeOnSpock(); + void feather5UseKnifeOnMccoy(); + void feather5UseKnifeOnRedshirt(); + void feather5UseKnifeOnWater(); + void feather5UseKnifeOnMonster(); + void feather5GetFern(); + void feather5UseKnifeOnFern(); + void feather5ReachedFern(); + void feather5PickedUpFern(); + void feather5UseFernOnMonster(); + void feather5ReachedPositionToUseFern(); + void feather5DoneThrowingFern(); + void feather5FernFellIntoWater(); + void feather5Timer1Expired(); + void feather5UseRockOnSpock(); + void feather5UseRockOnMccoy(); + void feather5UseRockOnRedshirt(); + void feather5UseCrewmanOnThrownFern(); + void feather5UseSpockOnMonster(); + void feather5UseMccoyOnMonster(); + void feather5UseRedshirtOnMonster(); + void feather5UsePhaser(); + void feather5LookAnywhere(); + void feather5LookAtLog(); + void feather5LookAtWater(); + void feather5LookAtFern(); + void feather5LookAtInsects(); + void feather5LookAtCave(); + void feather5LookAtMonster(); + void feather5LookAtSpock(); + void feather5LookAtKirk(); + void feather5LookAtMccoy(); + void feather5LookAtRedshirt(); + void feather5TalkToMccoy(); + void feather5TalkToSpock(); + void feather5TalkToRedshirt(); + void feather5UseMTricorderOnWater(); + void feather5UseMTricorderOnMonster(); + void feather5UseSTricorderOnMonster(); + void feather5UseSTricorderAnywhere(); + void feather5UseSTricorderOnWater(); + void feather5UseSTricorderOnFern(); + void feather5UseMedkitAnywhere(); // FEATHER6 void feather6Tick1(); diff --git a/engines/startrek/rooms/feather4.cpp b/engines/startrek/rooms/feather4.cpp index 7629353afe..69d3f37842 100644 --- a/engines/startrek/rooms/feather4.cpp +++ b/engines/startrek/rooms/feather4.cpp @@ -24,7 +24,7 @@ #define HOTSPOT_EYES 0x20 #define HOTSPOT_MUSHROOM 0x21 -#define HOTSPOT_BUSH 0x22 +#define HOTSPOT_FERN 0x22 #define HOTSPOT_LIGHT_1 0x23 #define HOTSPOT_LIGHT_2 0x24 #define HOTSPOT_LIGHT_3 0x25 @@ -40,7 +40,7 @@ extern const RoomAction feather4ActionList[] = { { {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, HOTSPOT_FERN, 0}, &Room::feather4UseSTricorderOnFern }, { {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 }, @@ -54,7 +54,7 @@ extern const RoomAction feather4ActionList[] = { { {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_FERN, 0, 0}, &Room::feather4LookAtFern }, { {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 }, @@ -88,7 +88,7 @@ void Room::feather4UseSTricorderOnMushroom() { spockScan(DIR_W, TX_FEA4_012); } -void Room::feather4UseSTricorderOnBush() { +void Room::feather4UseSTricorderOnFern() { spockScan(DIR_W, TX_FEA4_009); } @@ -136,7 +136,7 @@ void Room::feather4LookAtMushroom() { showText(TX_FEA4N001); } -void Room::feather4LookAtBush() { +void Room::feather4LookAtFern() { showText(TX_FEA4N000); } diff --git a/engines/startrek/rooms/feather5.cpp b/engines/startrek/rooms/feather5.cpp index f7a2cd1597..843604d65c 100644 --- a/engines/startrek/rooms/feather5.cpp +++ b/engines/startrek/rooms/feather5.cpp @@ -22,14 +22,399 @@ #include "startrek/room.h" -#define OBJECT_8 8 +#define OBJECT_MONSTER 8 +#define OBJECT_THROWN_FERN 10 -#define HOTSPOT_20 0x20 +// The log in the middle of this room has odd "hitboxes". The top half is hotspot 0x20, +// while the bottom half is hotspot 0x22. You need to use the redshirt on the top half to +// cross over. Not sure why this is. + +#define HOTSPOT_LEFT_EXIT 0x20 +#define HOTSPOT_FERN 0x21 +#define HOTSPOT_LOG 0x22 +#define HOTSPOT_WATER 0x23 +#define HOTSPOT_INSECTS_1 0x24 +#define HOTSPOT_INSECTS_2 0x25 +#define HOTSPOT_CAVE 0x26 namespace StarTrek { +extern const RoomAction feather5ActionList[] = { + { {ACTION_TICK, 1, 0, 0}, &Room::feather5Tick1 }, + { {ACTION_TOUCHED_HOTSPOT, 0, 0, 0}, &Room::feather5TouchedHotspot0 }, + { {ACTION_USE, OBJECT_SPOCK, HOTSPOT_FERN, 0}, &Room::feather5UseSpockOnFern }, + { {ACTION_USE, OBJECT_MCCOY, HOTSPOT_FERN, 0}, &Room::feather5UseMccoyOnFern }, + { {ACTION_USE, OBJECT_REDSHIRT, HOTSPOT_FERN, 0}, &Room::feather5UseRedshirtOnFern }, + + { {ACTION_USE, OBJECT_REDSHIRT, HOTSPOT_LEFT_EXIT, 0}, &Room::feather5UseRedshirtOnLeftExit }, + { {ACTION_DONE_WALK, 8, 0, 0}, &Room::feather5RedshirtReachedLog }, + { {ACTION_DONE_ANIM, 8, 0, 0}, &Room::feather5RedshirtDeathFinished }, + + { {ACTION_USE, OBJECT_SPOCK, HOTSPOT_LEFT_EXIT, 0}, &Room::feather5UseSpockOnLeftExit }, + { {ACTION_USE, OBJECT_MCCOY, HOTSPOT_LEFT_EXIT, 0}, &Room::feather5UseMccoyOnLeftExit }, + { {ACTION_USE, OBJECT_ISNAKE, OBJECT_KIRK, 0}, &Room::feather5UseSnakeOnKirk }, + { {ACTION_USE, OBJECT_ISNAKE, OBJECT_SPOCK, 0}, &Room::feather5UseSnakeOnSpock }, + { {ACTION_USE, OBJECT_ISNAKE, OBJECT_MCCOY, 0}, &Room::feather5UseSnakeOnMccoy }, + { {ACTION_USE, OBJECT_ISNAKE, OBJECT_REDSHIRT, 0}, &Room::feather5UseSnakeOnRedshirt }, + { {ACTION_USE, OBJECT_ISNAKE, HOTSPOT_WATER, 0}, &Room::feather5UseSnakeOnWater }, + { {ACTION_USE, OBJECT_IKNIFE, OBJECT_KIRK, 0}, &Room::feather5UseKnifeOnKirk }, + { {ACTION_USE, OBJECT_IKNIFE, OBJECT_SPOCK, 0}, &Room::feather5UseKnifeOnSpock }, + { {ACTION_USE, OBJECT_IKNIFE, OBJECT_MCCOY, 0}, &Room::feather5UseKnifeOnMccoy }, + { {ACTION_USE, OBJECT_IKNIFE, OBJECT_REDSHIRT, 0}, &Room::feather5UseKnifeOnRedshirt }, + { {ACTION_USE, OBJECT_IKNIFE, HOTSPOT_WATER, 0}, &Room::feather5UseKnifeOnWater }, + { {ACTION_USE, OBJECT_IKNIFE, OBJECT_MONSTER, 0}, &Room::feather5UseKnifeOnMonster }, + { {ACTION_GET, HOTSPOT_FERN, 0, 0}, &Room::feather5GetFern }, + + { {ACTION_USE, OBJECT_IKNIFE, HOTSPOT_FERN, 0}, &Room::feather5UseKnifeOnFern }, + { {ACTION_DONE_WALK, 1, 0, 0}, &Room::feather5ReachedFern }, + { {ACTION_DONE_ANIM, 1, 0, 0}, &Room::feather5PickedUpFern }, + + { {ACTION_USE, OBJECT_IFERN, OBJECT_MONSTER, 0}, &Room::feather5UseFernOnMonster }, + { {ACTION_USE, OBJECT_IFERN, HOTSPOT_WATER, 0}, &Room::feather5UseFernOnMonster }, + { {ACTION_DONE_WALK, 2, 0, 0}, &Room::feather5ReachedPositionToUseFern }, + { {ACTION_DONE_ANIM, 2, 0, 0}, &Room::feather5DoneThrowingFern }, + { {ACTION_DONE_ANIM, 3, 0, 0}, &Room::feather5FernFellIntoWater }, + { {ACTION_TIMER_EXPIRED, 1, 0, 0}, &Room::feather5Timer1Expired }, + + { {ACTION_USE, OBJECT_IROCK, OBJECT_SPOCK, 0}, &Room::feather5UseRockOnSpock }, + { {ACTION_USE, OBJECT_IROCK, OBJECT_MCCOY, 0}, &Room::feather5UseRockOnMccoy }, + { {ACTION_USE, OBJECT_IROCK, OBJECT_REDSHIRT, 0}, &Room::feather5UseRockOnRedshirt }, + { {ACTION_USE, OBJECT_SPOCK, OBJECT_THROWN_FERN, 0}, &Room::feather5UseCrewmanOnThrownFern }, + { {ACTION_USE, OBJECT_MCCOY, OBJECT_THROWN_FERN, 0}, &Room::feather5UseCrewmanOnThrownFern }, + { {ACTION_USE, OBJECT_REDSHIRT, OBJECT_THROWN_FERN, 0},&Room::feather5UseCrewmanOnThrownFern }, + { {ACTION_USE, OBJECT_SPOCK, OBJECT_MONSTER, 0}, &Room::feather5UseSpockOnMonster }, + { {ACTION_USE, OBJECT_MCCOY, OBJECT_MONSTER, 0}, &Room::feather5UseMccoyOnMonster }, + { {ACTION_USE, OBJECT_REDSHIRT, OBJECT_MONSTER, 0}, &Room::feather5UseRedshirtOnMonster }, + { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::feather5UsePhaser }, + { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::feather5UsePhaser }, + { {ACTION_LOOK, 0xff, 0, 0}, &Room::feather5LookAnywhere }, + { {ACTION_LOOK, HOTSPOT_LOG, 0, 0}, &Room::feather5LookAtLog }, + { {ACTION_LOOK, HOTSPOT_WATER, 0, 0}, &Room::feather5LookAtWater }, + { {ACTION_LOOK, HOTSPOT_FERN, 0, 0}, &Room::feather5LookAtFern }, + { {ACTION_LOOK, HOTSPOT_INSECTS_1, 0, 0}, &Room::feather5LookAtInsects }, + { {ACTION_LOOK, HOTSPOT_INSECTS_2, 0, 0}, &Room::feather5LookAtInsects }, + { {ACTION_LOOK, HOTSPOT_CAVE, 0, 0}, &Room::feather5LookAtCave }, + { {ACTION_LOOK, OBJECT_MONSTER, 0, 0}, &Room::feather5LookAtMonster }, + { {ACTION_LOOK, OBJECT_SPOCK, 0, 0}, &Room::feather5LookAtSpock }, + { {ACTION_LOOK, OBJECT_KIRK, 0, 0}, &Room::feather5LookAtKirk }, + { {ACTION_LOOK, OBJECT_MCCOY, 0, 0}, &Room::feather5LookAtMccoy }, + { {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::feather5LookAtRedshirt }, + { {ACTION_TALK, OBJECT_MCCOY, 0, 0}, &Room::feather5TalkToMccoy }, + { {ACTION_TALK, OBJECT_SPOCK, 0, 0}, &Room::feather5TalkToSpock }, + { {ACTION_TALK, OBJECT_REDSHIRT, 0, 0}, &Room::feather5TalkToRedshirt }, + { {ACTION_USE, OBJECT_IMTRICOR, HOTSPOT_WATER, 0}, &Room::feather5UseMTricorderOnWater }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_MONSTER, 0}, &Room::feather5UseMTricorderOnMonster }, + { {ACTION_USE, OBJECT_ISTRICOR, OBJECT_MONSTER, 0}, &Room::feather5UseSTricorderOnMonster }, + { {ACTION_USE, OBJECT_ISTRICOR, 0xff, 0}, &Room::feather5UseSTricorderAnywhere }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_WATER, 0}, &Room::feather5UseSTricorderOnWater }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_FERN, 0}, &Room::feather5UseSTricorderOnFern }, + { {ACTION_USE, OBJECT_IMEDKIT, 0xff, 0}, &Room::feather5UseMedkitAnywhere }, +}; + +extern const int feather5NumActions = sizeof(feather5ActionList) / sizeof(RoomAction); + + void Room::feather5Tick1() { + playVoc("FEA5LOOP"); + playMidiMusicTracks(29); + + if (!_vm->_awayMission.feather.waterMonsterRetreated) + loadActorAnim(OBJECT_MONSTER, "s5r5os", 0x4e, 0xa4); + else + loadMapFile("feath5b"); +} + +void Room::feather5TouchedHotspot0() { // Approached the log + if (!_vm->_awayMission.feather.waterMonsterRetreated) { + showText(TX_SPEAKER_SPOCK, TX_FEA5_005); + if (!_vm->_awayMission.redshirtDead) + showText(TX_SPEAKER_STRAGEY, TX_FEA5_033); + } +} + +void Room::feather5UseSpockOnFern() { + showText(TX_SPEAKER_SPOCK, TX_FEA5_004); +} + +void Room::feather5UseMccoyOnFern() { + showText(TX_SPEAKER_MCCOY, TX_FEA5_009); +} + +void Room::feather5UseRedshirtOnFern() { + showText(TX_SPEAKER_STRAGEY, TX_FEA5_035); +} + +void Room::feather5UseRedshirtOnLeftExit() { + if (!_vm->_awayMission.feather.waterMonsterRetreated) { + showText(TX_SPEAKER_STRAGEY, TX_FEA5_034); + _vm->_awayMission.disableInput = true; + loadMapFile("feath5b"); + walkCrewmanC(OBJECT_REDSHIRT, 0x8f, 0x64, &Room::feather5RedshirtReachedLog); + } +} + +void Room::feather5RedshirtReachedLog() { + playMidiMusicTracks(2); + playVoc("TENTICL2"); + loadActorAnim(OBJECT_MONSTER, "s5r5oh", 0x4e, 0xa4); + loadActorAnimC(OBJECT_REDSHIRT, "s5r5ol", 0x8f, 0x64, &Room::feather5RedshirtDeathFinished); + _vm->_awayMission.feather.waterMonsterRetreated = true; + _vm->_awayMission.redshirtDead = true; +} + +void Room::feather5RedshirtDeathFinished() { + loadActorStandAnim(OBJECT_REDSHIRT); + _vm->_awayMission.disableInput = false; +} + +void Room::feather5UseSpockOnLeftExit() { + if (!_vm->_awayMission.feather.waterMonsterRetreated) + showText(TX_SPEAKER_SPOCK, TX_FEA5_002); +} + +void Room::feather5UseMccoyOnLeftExit() { + if (!_vm->_awayMission.feather.waterMonsterRetreated) + showText(TX_SPEAKER_MCCOY, TX_FEA5_015); +} + +void Room::feather5UseSnakeOnKirk() { + showText(TX_SPEAKER_KIRK, TX_FEA5N010); +} + +void Room::feather5UseSnakeOnSpock() { + showText(TX_SPEAKER_SPOCK, TX_FEA5_032); +} + +void Room::feather5UseSnakeOnMccoy() { + showText(TX_SPEAKER_MCCOY, TX_FEA5_020); +} + +void Room::feather5UseSnakeOnRedshirt() { + showText(TX_SPEAKER_STRAGEY, TX_FEA5_040); +} + +void Room::feather5UseSnakeOnWater() { + showText(TX_FEA5N011); + loseItem(OBJECT_ISNAKE); +} + +void Room::feather5UseKnifeOnKirk() { + // ENHANCEMENT: Originally showed TX_DEM0_020 here ("Jim, are you out of your mind?") + // However, there is an unused audio file for text that otherwise only appears in the + // mac version. (DOS floppy version has yet another variation for this text.) + // We'll use that unused audio file here... + showText(TX_SPEAKER_KIRK, TX_FEA5_001); +} + +void Room::feather5UseKnifeOnSpock() { + showText(TX_SPEAKER_SPOCK, TX_FEA5_029); +} + +void Room::feather5UseKnifeOnMccoy() { + showText(TX_SPEAKER_MCCOY, TX_FEA5_008); +} + +void Room::feather5UseKnifeOnRedshirt() { + showText(TX_SPEAKER_STRAGEY, TX_FEA5_039); +} + +void Room::feather5UseKnifeOnWater() { + showText(TX_SPEAKER_MCCOY, TX_FEA5_018); +} + +void Room::feather5UseKnifeOnMonster() { + showText(TX_SPEAKER_SPOCK, TX_FEA5_006); +} + +void Room::feather5GetFern() { + showText(TX_FEA5N008); +} + +void Room::feather5UseKnifeOnFern() { + if (_vm->_awayMission.feather.gotFern) + showText(TX_FEA5N015); + else { + walkCrewmanC(OBJECT_KIRK, 0x106, 0x8a, &Room::feather5ReachedFern); + _vm->_awayMission.disableInput = true; + } +} + +void Room::feather5ReachedFern() { + loadActorAnimC(OBJECT_KIRK, "s5r5kf", -1, -1, &Room::feather5PickedUpFern); +} + +void Room::feather5PickedUpFern() { + _vm->_awayMission.disableInput = false; + loadActorStandAnim(OBJECT_KIRK); + giveItem(OBJECT_IFERN); + _vm->_awayMission.feather.gotFern = true; +} + + +void Room::feather5UseFernOnMonster() { + // BUG: Infinite score mechanism. Just keep throwing ferns into the water. + _vm->_awayMission.feather.missionScore += 2; + walkCrewmanC(OBJECT_KIRK, 0x106, 0x8a, &Room::feather5ReachedPositionToUseFern); + _vm->_awayMission.disableInput = true; +} + +void Room::feather5ReachedPositionToUseFern() { + loadActorAnimC(OBJECT_KIRK, "s5r5kt", -1, -1, &Room::feather5DoneThrowingFern); + loadActorAnimC(OBJECT_THROWN_FERN, "s5r5pt", 0xe6, 0x52, &Room::feather5FernFellIntoWater); +} + +void Room::feather5DoneThrowingFern() { + _vm->_awayMission.disableInput = false; + loadActorStandAnim(OBJECT_KIRK); + loseItem(OBJECT_IFERN); + _vm->_awayMission.feather.gotFern = false; +} + +void Room::feather5FernFellIntoWater() { + if (!_vm->_awayMission.feather.waterMonsterRetreated) { + _vm->_awayMission.feather.waterMonsterRetreated = true; + _vm->_awayMission.timers[1] = 20; + loadActorStandAnim(OBJECT_MONSTER); + loadMapFile("feath5b"); + } +} + +void Room::feather5Timer1Expired() { // Spock explains that the creature retreated + showText(TX_SPEAKER_SPOCK, TX_FEA5_025); +} + + +void Room::feather5UseRockOnSpock() { + showText(TX_SPEAKER_SPOCK, TX_FEA5_027); +} + +void Room::feather5UseRockOnMccoy() { + showText(TX_SPEAKER_MCCOY, TX_FEA5_019); +} + +void Room::feather5UseRockOnRedshirt() { + showText(TX_SPEAKER_STRAGEY, TX_FEA5_038); +} + +void Room::feather5UseCrewmanOnThrownFern() { + // This might be unused? The object in question (OBJECT_THROWN_FERN) shouldn't be + // visible while player control is active. + showText(TX_FEA5N003); +} + +void Room::feather5UseSpockOnMonster() { + showText(TX_SPEAKER_SPOCK, TX_FEA5_003); +} + +void Room::feather5UseMccoyOnMonster() { + showText(TX_SPEAKER_MCCOY, TX_FEA5_016); +} + +void Room::feather5UseRedshirtOnMonster() { + showText(TX_SPEAKER_STRAGEY, TX_FEA5_037); +} + +void Room::feather5UsePhaser() { + showText(TX_SPEAKER_SPOCK, TX_FEA5_028); +} + +void Room::feather5LookAnywhere() { + showText(TX_FEA5N012); +} + +void Room::feather5LookAtLog() { + showText(TX_FEA5N007); +} + +void Room::feather5LookAtWater() { + showText(TX_FEA5N009); +} + +void Room::feather5LookAtFern() { + showText(TX_FEA5N014); +} + +void Room::feather5LookAtInsects() { + showText(TX_FEA5N005); +} + +void Room::feather5LookAtCave() { + showText(TX_FEA5N013); +} + +void Room::feather5LookAtMonster() { + showText(TX_FEA5N000); +} + +void Room::feather5LookAtSpock() { + showText(TX_FEA5N006); +} + +void Room::feather5LookAtKirk() { + if (!_vm->_awayMission.feather.waterMonsterRetreated) + showText(TX_FEA5N001); + else // ENHANCEMENT: Fall back to default behaviour instead of doing nothing + _vm->_awayMission.rdfStillDoDefaultAction = true; +} + +void Room::feather5LookAtMccoy() { + if (!_vm->_awayMission.feather.waterMonsterRetreated) + showText(TX_FEA5N002); + else // ENHANCEMENT: Fall back to default behaviour instead of doing nothing + _vm->_awayMission.rdfStillDoDefaultAction = true; +} + +void Room::feather5LookAtRedshirt() { + if (!_vm->_awayMission.feather.waterMonsterRetreated) + showText(TX_FEA5N004); + else // ENHANCEMENT: Fall back to default behaviour instead of doing nothing + _vm->_awayMission.rdfStillDoDefaultAction = true; +} + +void Room::feather5TalkToMccoy() { + showText(TX_SPEAKER_MCCOY, TX_FEA5_007); +} + +void Room::feather5TalkToSpock() { + showText(TX_SPEAKER_SPOCK, TX_FEA5_022); +} + +void Room::feather5TalkToRedshirt() { + showText(TX_SPEAKER_STRAGEY, TX_FEA5_036); +} + +void Room::feather5UseMTricorderOnWater() { + if (_vm->_awayMission.feather.waterMonsterRetreated) + mccoyScan(DIR_W, TX_FEA5_011); + else + mccoyScan(DIR_W, TX_FEA5_014); +} + +void Room::feather5UseMTricorderOnMonster() { + mccoyScan(DIR_W, TX_FEA5_013); +} + +void Room::feather5UseSTricorderOnMonster() { + spockScan(DIR_W, TX_FEA5_024); +} + +void Room::feather5UseSTricorderAnywhere() { + spockScan(DIR_W, TX_FEA5_026); +} + +void Room::feather5UseSTricorderOnWater() { + if (_vm->_awayMission.feather.waterMonsterRetreated) + spockScan(DIR_W, TX_FEA5_031); + else + spockScan(DIR_W, TX_FEA5_030); +} + +void Room::feather5UseSTricorderOnFern() { + spockScan(DIR_N, TX_FEA5_023); +} +void Room::feather5UseMedkitAnywhere() { + showText(TX_SPEAKER_MCCOY, TX_FEA5_010); } } diff --git a/engines/startrek/rooms/function_map.h b/engines/startrek/rooms/function_map.h index e0996f3b86..ab53a11159 100644 --- a/engines/startrek/rooms/function_map.h +++ b/engines/startrek/rooms/function_map.h @@ -1782,10 +1782,8 @@ RoomAction feather0ActionList[] = { extern const RoomAction feather1ActionList[], feather2ActionList[], feather3ActionList[], feather4ActionList[]; extern const int feather1NumActions, feather2NumActions, feather3NumActions, feather4NumActions; - -RoomAction feather5ActionList[] = { - { {ACTION_TICK, 1, 0, 0}, &Room::feather5Tick1 }, -}; +extern const RoomAction feather5ActionList[]; +extern const int feather5NumActions; RoomAction feather6ActionList[] = { { {ACTION_TICK, 1, 0, 0}, &Room::feather6Tick1 }, diff --git a/engines/startrek/text.h b/engines/startrek/text.h index f47fa5c1b2..efa4abb666 100644 --- a/engines/startrek/text.h +++ b/engines/startrek/text.h @@ -1827,6 +1827,64 @@ enum GameStringIDs { TX_FEA4N008, + TX_FEA5_001, + TX_FEA5_002, + TX_FEA5_003, + TX_FEA5_004, + TX_FEA5_005, + TX_FEA5_006, + TX_FEA5_007, + TX_FEA5_008, + TX_FEA5_009, + TX_FEA5_010, + TX_FEA5_011, + // MISSING + TX_FEA5_013, + TX_FEA5_014, + TX_FEA5_015, + TX_FEA5_016, + // MISSING + TX_FEA5_018, + TX_FEA5_019, + TX_FEA5_020, + TX_FEA5_021, // UNUSED + TX_FEA5_022, + TX_FEA5_023, + TX_FEA5_024, + TX_FEA5_025, + TX_FEA5_026, + TX_FEA5_027, + TX_FEA5_028, + TX_FEA5_029, + TX_FEA5_030, + TX_FEA5_031, + TX_FEA5_032, + TX_FEA5_033, + TX_FEA5_034, + TX_FEA5_035, + TX_FEA5_036, + TX_FEA5_037, + TX_FEA5_038, + TX_FEA5_039, + TX_FEA5_040, + TX_FEA5N000, + TX_FEA5N001, + TX_FEA5N002, + TX_FEA5N003, + TX_FEA5N004, + TX_FEA5N005, + TX_FEA5N006, + TX_FEA5N007, + TX_FEA5N008, + TX_FEA5N009, + TX_FEA5N010, + TX_FEA5N011, + TX_FEA5N012, + TX_FEA5N013, + TX_FEA5N014, + TX_FEA5N015, + + TX_SIN3_012, @@ -3591,6 +3649,62 @@ const char * const g_gameStrings[] = { "#FEA4\\FEA4N008#You are in a dark forest. You can hear the flow of water to the northwest.", + "#FEA5\\FEA5_001#This is a very finely crafted knife.", + "#FEA5\\FEA5_002#Captain, I believe it would be suicide to try crossing the log while the creature is near.", + "#FEA5\\FEA5_003#Captain, I do not believe that my service to Starfleet includes, as humans say, 'throwing my life away'.", + "#FEA5\\FEA5_004#Captain, I would recommend using something to cut the plant. There are numerous small thorns along the stem.", + "#FEA5\\FEA5_005#Captain, it would not be wise to cross while the creature is near.", + "#FEA5\\FEA5_006#Due to the small size of the knife, I doubt it would harm such a large creature.", + "#FEA5\\FEA5_007#Anyone for a campfire?", + "#FEA5\\FEA5_008#Captain, I'll declare you unfit to command if you keep this up!", + "#FEA5\\FEA5_009#Damn! That's gonna hurt Jim. Take a look at those thorns. You might try cutting that with something.", // TYPO + "#FEA5\\FEA5_010#Everyone is healthy, Jim, there's no need for the medical kit here.", + "#FEA5\\FEA5_011#I'm not reading that creature anymore, Jim.", + "#FEA5\\FEA5_013#It's some kind of squid, and it doesn't look very friendly.", + "#FEA5\\FEA5_014#Jim! There's some kind of an aquatic creature down there.", + "#FEA5\\FEA5_015#Jim, that's ludicrous!", + "#FEA5\\FEA5_016#Jim, we've been friends a long time, but... I mean... you're not serious?", + "#FEA5\\FEA5_018#Jim, with our phasers not working, we may need that knife to protect ourselves!", // TYPO + "#FEA5\\FEA5_019#This planet is starting to get to me. I'm sure something just hit me.", + "#FEA5\\FEA5_020#You weren't a snake handler in your previous life were you? I don't like snakes.", // TYPO + "#FEA5\\FEA5_021#Good throw, Captain. However, I think the creature was merely startled. It may return in a little while.", + "#FEA5\\FEA5_022#I recommend caution here, Captain.", + "#FEA5\\FEA5_023#It appears that the leaves are slightly toxic. I would not recommend touching it for an extended amount of time, Captain.", + "#FEA5\\FEA5_024#It is some kind of mollusk; the river seems to be its home, and it is carnivorous, eating land and river based forms of life.", + "#FEA5\\FEA5_025#It would appear that the plant secretes a chemical that is a natural repellent to the creature. It has retreated far down stream, Captain.", + "#FEA5\\FEA5_026#Nothing unusual here, Captain.", + "#FEA5\\FEA5_027#Please stop that Captain. I have enough distractions from Dr. McCoy.", + "#FEA5\\FEA5_028#Still inoperative, Captain.", + "#FEA5\\FEA5_029#Thank you Captain, but Vulcans do not use knives.", + "#FEA5\\FEA5_030#The tricorder registers a lifeform, a large marine creature, lurking just below the surface of the water.", + "#FEA5\\FEA5_031#The tricorder shows nothing unusual, Captain. The creature is still down stream.", + "#FEA5\\FEA5_032#Was there a reason for that, Captain?", + "#FEA5\\FEA5_033#Captain, perhaps I should try to cross first.", + "#FEA5\\FEA5_034#I'll give it a try, Captain.", + "#FEA5\\FEA5_035#It looks like that plant fights back sir. You might want to use something to cut it loose.", + "#FEA5\\FEA5_036#Reminds me of a planet I was stationed on once. The native girls were real friendly. Ensign Shou had his bachelor party there, great time. You ever been to Omicron Draconis, Captain?", + "#FEA5\\FEA5_037#Sir, I finished second in my weight class in wrestling at the Academy, but I don't think that thing's in my weight class.", + "#FEA5\\FEA5_038#Sir, you dropped your rock.", + "#FEA5\\FEA5_039#Thanks Captain, but I can take care of myself. I finished second in my weight class in wrestling at the Academy. You keep the knife.", + "#FEA5\\FEA5_040#You're weird, sir.", + "#FEA5\\FEA5N000#A pair of eyes are all that you can see of the rest of this creature. Most of it is hidden beneath the murky water.", + "#FEA5\\FEA5N001#Captain Kirk is looking at the big creature in the water.", + "#FEA5\\FEA5N002#Dr. McCoy is looking at the big creature in the water.", + "#FEA5\\FEA5N003#He will not do that.", + "#FEA5\\FEA5N004#Lt. Stragey is looking at the big creature in the water.", + "#FEA5\\FEA5N005#Luminescent insects swarm near a large tree.", + "#FEA5\\FEA5N006#Mr. Spock is looking ahead to a cave opening on the other side of the log.", + "#FEA5\\FEA5N007#The log looks quite old but sturdy.", + "#FEA5\\FEA5N008#The plant is tough. You will need something sharp to cut it.", + "#FEA5\\FEA5N009#The river water is too muddy to get an idea of its depth or what may be beneath the surface.", + "#FEA5\\FEA5N010#The snake bites you.", + "#FEA5\\FEA5N011#The snake disapears beneath the surface of the water.", + "#FEA5\\FEA5N012#There is a slow muddy river blocking your path. A strong thick log serves as a footbridge. The river is unmoving, and the heat and stillness are oppressive.", + "#FEA5\\FEA5N013#There seems to be a lit cave beyond the log.", + "#FEA5\\FEA5N014#This plant has a rather thick stem and prickly leaves.", // TYPO + "#FEA5\\FEA5N015#You already have a piece of the plant.", + + "#SIN3\\SIN3_012#Can't say I like the decor.", |