From 00445f0cfafdb97865f3e4c82632d8702fb5cb6e Mon Sep 17 00:00:00 2001 From: Matthew Stewart Date: Tue, 10 Jul 2018 01:01:47 -0400 Subject: STARTREK: TRIAL3 --- engines/startrek/awaymission.h | 12 ++ engines/startrek/room.h | 53 +++++ engines/startrek/rooms/trial3.cpp | 423 +++++++++++++++++++++++++++++++++++++- engines/startrek/sound.h | 7 +- engines/startrek/text.h | 96 +++++++++ 5 files changed, 589 insertions(+), 2 deletions(-) (limited to 'engines/startrek') diff --git a/engines/startrek/awaymission.h b/engines/startrek/awaymission.h index 984ee55cf8..93d0fd2898 100644 --- a/engines/startrek/awaymission.h +++ b/engines/startrek/awaymission.h @@ -278,6 +278,16 @@ struct AwayMission { bool globSplitInTwo; // 0x35 bool globDefeated; // 0x36 byte globEnergyLevels[3]; // 0x37 + bool enteredTrial3FirstTime; // 0x3a + byte klingonShootIndex; // 0x3b + byte shotKlingons; // 0x3c + + // 0: Hasn't appeared yet + // 21: Is conscious + // 22: Is stunned + // 23: Is dead + int16 shotKlingonState; // 0x3d + bool enteredGlobRoom; // 0x5c bool forceFieldDown; // 0x5d bool uhuraAnalyzedCode; // 0x5e @@ -285,6 +295,8 @@ struct AwayMission { bool gotPointsForGettingRod; // 0x61 bool gotPointsForCoatingRodWithIron; // 0x62 bool gotPointsForScanningGlob; // 0x64 + + bool gotPointsForBeamingOut; } trial; }; }; diff --git a/engines/startrek/room.h b/engines/startrek/room.h index 288c01fd9e..236f24cabe 100644 --- a/engines/startrek/room.h +++ b/engines/startrek/room.h @@ -1893,6 +1893,59 @@ public: // TRIAL3 void trial3Tick1(); + void trial3Tick30(); + void trial3Klingon1BeamedIn(); + void trial3Klingon2BeamedIn(); + void trial3Klingon3BeamedIn(); + void trial3KlingonShootsSomeone1(); + void trial3Klingon1DoneShooting(); + void trial3Klingon2DoneShooting(); + void trial3Klingon3DoneShooting(); + void trial3KlingonShootsSomeone2(); + void trial3RedshirtDoneDying(); + void trial3KirkDoneDying(); + void trial3Klingon1Shot(); + void trial3Klingon2Shot(); + void trial3Klingon3Shot(); + void trial3CheckShowUhuraText(); + void trial3CrewmanBeamedOut(); + void trial3Tick90(); + void trial3TouchedHotspot3(); + void trial3KirkExploded(); + void trial3LookAtKirk(); + void trial3LookAtSpock(); + void trial3LookAtMccoy(); + void trial3LookAtRedshirt(); + void trial3LookAtExit(); + void trial3LookAtWall(); + void trial3TalkToKirk(); + void trial3TalkToSpock(); + void trial3TalkToMccoy(); + void trial3TalkToRedshirt(); + void trial3UsePhaserOnWall(); + void trial3UseStunPhaserOnKlingon1(); + void trial3ReadyToShootKlingon1OnStun(); + void trial3UseKillPhaserOnKlingon1(); + void trial3ReadyToShootKlingon1OnKill(); + void trial3UsePhaserAnywhere(); + void trial3UseMTricorderOnKirk(); + void trial3UseMTricorderOnSpock(); + void trial3UseMTricorderOnMccoy(); + void trial3UseMTricorderOnRedshirt(); + void trial3UseMTricorderOnExit(); + void trial3UseSTricorderOnWall(); + void trial3UseSTricorderOnExit(); + void trial3UseMTricorderOnKlingon(); + void trial3UseCommunicator(); + void trial3BeamToVlict(); + void trial3UseMccoyOnWall(); + void trial3UseMccoyOnExit(); + void trial3UseSpockOnWall(); + void trial3UseSpockOnExit(); + void trial3UseRedshirtOnExit(); + void trial3UseRedshirtOnWall(); + void trial3WalkToExit(); + void trial3UseMedkitAnywhere(); // TRIAL4 void trial4Tick1(); diff --git a/engines/startrek/rooms/trial3.cpp b/engines/startrek/rooms/trial3.cpp index afbb1eee6e..2e382bccdf 100644 --- a/engines/startrek/rooms/trial3.cpp +++ b/engines/startrek/rooms/trial3.cpp @@ -22,16 +22,437 @@ #include "startrek/room.h" +#define OBJECT_KLINGON_1 8 +#define OBJECT_KLINGON_2 9 // Unused +#define OBJECT_KLINGON_3 10 // Unused +#define OBJECT_EXPLOSION 11 + +#define HOTSPOT_EXIT 0x20 +#define HOTSPOT_WALL 0x21 + namespace StarTrek { extern const RoomAction trial3ActionList[] = { - { {ACTION_TICK, 1, 0, 0}, &Room::trial3Tick1 }, + { {ACTION_TICK, 1, 0, 0}, &Room::trial3Tick1 }, + { {ACTION_TICK, 30, 0, 0}, &Room::trial3Tick30 }, + { {ACTION_DONE_ANIM, 1, 0, 0}, &Room::trial3Klingon1BeamedIn }, + { {ACTION_DONE_ANIM, 2, 0, 0}, &Room::trial3Klingon2BeamedIn }, + { {ACTION_DONE_ANIM, 3, 0, 0}, &Room::trial3Klingon3BeamedIn }, + { {ACTION_DONE_ANIM, 4, 0, 0}, &Room::trial3Klingon1DoneShooting }, + { {ACTION_DONE_ANIM, 5, 0, 0}, &Room::trial3Klingon2DoneShooting }, + { {ACTION_DONE_ANIM, 6, 0, 0}, &Room::trial3Klingon3DoneShooting }, + { {ACTION_DONE_ANIM, 15, 0, 0}, &Room::trial3RedshirtDoneDying }, + { {ACTION_DONE_ANIM, 16, 0, 0}, &Room::trial3KirkDoneDying }, + { {ACTION_DONE_ANIM, 11, 0, 0}, &Room::trial3Klingon1Shot }, + { {ACTION_DONE_ANIM, 12, 0, 0}, &Room::trial3Klingon2Shot }, + { {ACTION_DONE_ANIM, 13, 0, 0}, &Room::trial3Klingon3Shot }, + { {ACTION_DONE_ANIM, 19, 0, 0}, &Room::trial3CrewmanBeamedOut }, + { {ACTION_TICK, 90, 0, 0}, &Room::trial3Tick90 }, + { {ACTION_TOUCHED_HOTSPOT, 3, 0, 0}, &Room::trial3TouchedHotspot3 }, + { {ACTION_DONE_ANIM, 14, 0, 0}, &Room::trial3KirkExploded }, + { {ACTION_LOOK, OBJECT_KIRK, 0, 0}, &Room::trial3LookAtKirk }, + { {ACTION_LOOK, OBJECT_SPOCK, 0, 0}, &Room::trial3LookAtSpock }, + { {ACTION_LOOK, OBJECT_MCCOY, 0, 0}, &Room::trial3LookAtMccoy }, + { {ACTION_LOOK, OBJECT_REDSHIRT, 0, 0}, &Room::trial3LookAtRedshirt }, + { {ACTION_LOOK, HOTSPOT_EXIT, 0, 0}, &Room::trial3LookAtExit }, + { {ACTION_LOOK, HOTSPOT_WALL, 0, 0}, &Room::trial3LookAtWall }, + { {ACTION_TALK, OBJECT_KIRK, 0, 0}, &Room::trial3TalkToKirk }, + { {ACTION_TALK, OBJECT_SPOCK, 0, 0}, &Room::trial3TalkToSpock }, + { {ACTION_TALK, OBJECT_MCCOY, 0, 0}, &Room::trial3TalkToMccoy }, + { {ACTION_TALK, OBJECT_REDSHIRT, 0, 0}, &Room::trial3TalkToRedshirt }, + { {ACTION_USE, OBJECT_IPHASERS, HOTSPOT_WALL, 0}, &Room::trial3UsePhaserOnWall }, + { {ACTION_USE, OBJECT_IPHASERK, HOTSPOT_WALL, 0}, &Room::trial3UsePhaserOnWall }, + + { {ACTION_USE, OBJECT_IPHASERS, OBJECT_KLINGON_1, 0}, &Room::trial3UseStunPhaserOnKlingon1 }, + { {ACTION_DONE_ANIM, 17, 0, 0}, &Room::trial3ReadyToShootKlingon1OnStun }, + { {ACTION_USE, OBJECT_IPHASERK, OBJECT_KLINGON_1, 0}, &Room::trial3UseKillPhaserOnKlingon1 }, + { {ACTION_DONE_ANIM, 18, 0, 0}, &Room::trial3ReadyToShootKlingon1OnKill }, + // OMITTED: Similar code for unused klingons 2 and 3 + + { {ACTION_USE, OBJECT_IPHASERS, 0xff, 0}, &Room::trial3UsePhaserAnywhere }, + { {ACTION_USE, OBJECT_IPHASERK, 0xff, 0}, &Room::trial3UsePhaserAnywhere }, + + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_KIRK, 0}, &Room::trial3UseMTricorderOnKirk }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_SPOCK, 0}, &Room::trial3UseMTricorderOnSpock }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_MCCOY, 0}, &Room::trial3UseMTricorderOnMccoy }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_REDSHIRT, 0}, &Room::trial3UseMTricorderOnRedshirt }, + { {ACTION_USE, OBJECT_IMTRICOR, HOTSPOT_EXIT, 0}, &Room::trial3UseMTricorderOnExit }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_WALL, 0}, &Room::trial3UseSTricorderOnWall }, + { {ACTION_USE, OBJECT_ISTRICOR, HOTSPOT_EXIT, 0}, &Room::trial3UseSTricorderOnExit }, + { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_KLINGON_1, 0}, &Room::trial3UseMTricorderOnKlingon }, + { {ACTION_USE, OBJECT_ICOMM, 0xff, 0}, &Room::trial3UseCommunicator }, + { {ACTION_USE, OBJECT_MCCOY, HOTSPOT_WALL, 0}, &Room::trial3UseMccoyOnWall }, + { {ACTION_USE, OBJECT_MCCOY, HOTSPOT_EXIT, 0}, &Room::trial3UseMccoyOnExit }, + { {ACTION_USE, OBJECT_SPOCK, HOTSPOT_WALL, 0}, &Room::trial3UseSpockOnWall }, + { {ACTION_USE, OBJECT_SPOCK, HOTSPOT_EXIT, 0}, &Room::trial3UseSpockOnExit }, + { {ACTION_USE, OBJECT_REDSHIRT, HOTSPOT_EXIT, 0}, &Room::trial3UseRedshirtOnExit }, + { {ACTION_USE, OBJECT_REDSHIRT, HOTSPOT_WALL, 0}, &Room::trial3UseRedshirtOnWall }, + { {ACTION_WALK, HOTSPOT_EXIT, 0, 0}, &Room::trial3WalkToExit }, + { {ACTION_USE, OBJECT_IMEDKIT, 0xff, 0}, &Room::trial3UseMedkitAnywhere }, }; extern const int trial3NumActions = sizeof(trial3ActionList) / sizeof(RoomAction); void Room::trial3Tick1() { + playVoc("TRI3LOOP"); + + if (!_vm->_awayMission.trial.enteredTrial3FirstTime) { + _vm->_awayMission.disableWalking = true; + _vm->_awayMission.disableInput = 2; + } + playMidiMusicTracks(MIDITRACK_33, -1); +} + +void Room::trial3Tick30() { + if (!_vm->_awayMission.trial.enteredTrial3FirstTime) { + _vm->_awayMission.disableInput = false; + _vm->_awayMission.trial.enteredTrial3FirstTime = true; + + showText(TX_SPEAKER_BENNIE, TX_TRI3_030); + showText(TX_SPEAKER_KIRK, TX_TRI3_005); + showText(TX_SPEAKER_MCCOY, TX_TRI3_019); + showText(TX_SPEAKER_SPOCK, TX_TRI3_025); + showText(TX_SPEAKER_MCCOY, TX_TRI3_020); + showText(TX_SPEAKER_KIRK, TX_TRI3_004); + } +} + +void Room::trial3Klingon1BeamedIn() { + loadActorAnimC(OBJECT_KLINGON_1, "t3kfir", -1, -1, &Room::trial3Klingon1DoneShooting); + trial3KlingonShootsSomeone1(); +} + +void Room::trial3Klingon2BeamedIn() { + loadActorAnimC(OBJECT_KLINGON_2, "t3kfir", -1, -1, &Room::trial3Klingon2DoneShooting); + trial3KlingonShootsSomeone1(); +} + +void Room::trial3Klingon3BeamedIn() { + loadActorAnimC(OBJECT_KLINGON_3, "t3kfir", -1, -1, &Room::trial3Klingon3DoneShooting); + trial3KlingonShootsSomeone1(); +} + +void Room::trial3KlingonShootsSomeone1() { + _vm->_awayMission.trial.klingonShootIndex++; + if (_vm->_awayMission.trial.klingonShootIndex == 1) { + playSoundEffectIndex(SND_PHASSHOT); + showBitmapFor5Ticks("t3phas04", 5); + loadActorAnimC(OBJECT_REDSHIRT, "rkillw", -1, -1, &Room::trial3RedshirtDoneDying); + _vm->_awayMission.redshirtDead = true; + } else if (_vm->_awayMission.trial.klingonShootIndex == 2) { + playSoundEffectIndex(SND_PHASSHOT); + showBitmapFor5Ticks("t3phas05", 5); + playMidiMusicTracks(MIDITRACK_2, -1); + loadActorAnimC(OBJECT_KIRK, "kkillw", -1, -1, &Room::trial3KirkDoneDying); + } +} + +void Room::trial3Klingon1DoneShooting() { + loadActorAnimC(OBJECT_KLINGON_1, "t3kfir", -1, -1, &Room::trial3Klingon1DoneShooting); + trial3KlingonShootsSomeone2(); +} + +void Room::trial3Klingon2DoneShooting() { + loadActorAnimC(OBJECT_KLINGON_2, "t3kfir", -1, -1, &Room::trial3Klingon2DoneShooting); + trial3KlingonShootsSomeone2(); +} + +void Room::trial3Klingon3DoneShooting() { + loadActorAnimC(OBJECT_KLINGON_3, "t3kfir", -1, -1, &Room::trial3Klingon3DoneShooting); + trial3KlingonShootsSomeone2(); +} + +void Room::trial3KlingonShootsSomeone2() { + // This function is almost exactly identical to "trial3KlingonShootsSomeone1(), just + // one line differs... + _vm->_awayMission.trial.klingonShootIndex++; + if (_vm->_awayMission.trial.klingonShootIndex == 1) { + playSoundEffectIndex(SND_PHASSHOT); + showBitmapFor5Ticks("t3phas04", 5); + loadActorAnimC(OBJECT_REDSHIRT, "rkillw", -1, -1, &Room::trial3RedshirtDoneDying); + _vm->_awayMission.redshirtDead = true; + } else if (_vm->_awayMission.trial.klingonShootIndex == 2) { + playSoundEffectIndex(SND_PHASSHOT); + showBitmapFor5Ticks("t3phas05", 5); + // NOTE: Only difference to "trial3KlingonShootsSomeone1" is this doesn't play a midi track? + loadActorAnimC(OBJECT_KIRK, "kkillw", -1, -1, &Room::trial3KirkDoneDying); + } +} + +void Room::trial3RedshirtDoneDying() { + _vm->_awayMission.redshirtDead = true; +} + +void Room::trial3KirkDoneDying() { + showGameOverMenu(); +} + +void Room::trial3Klingon1Shot() { + _vm->_awayMission.trial.shotKlingons |= 1; + trial3CheckShowUhuraText(); +} + +void Room::trial3Klingon2Shot() { + _vm->_awayMission.trial.shotKlingons |= 2; + trial3CheckShowUhuraText(); +} + +void Room::trial3Klingon3Shot() { + _vm->_awayMission.trial.shotKlingons |= 4; + trial3CheckShowUhuraText(); +} + +void Room::trial3CheckShowUhuraText() { + if (_vm->_awayMission.trial.shotKlingons == 1) { + _vm->_awayMission.trial.shotKlingons |= 8; + _vm->_awayMission.disableWalking = false; + loadActorStandAnim(OBJECT_KIRK); + + showText(TX_SPEAKER_UHURA, TX_TRI3U084); + showText(TX_SPEAKER_KIRK, TX_TRI3_007); + showText(TX_SPEAKER_UHURA, TX_TRI3U099); + + _vm->_awayMission.trial.forceFieldDown = true; + + const TextRef choices[] = { + TX_SPEAKER_KIRK, + TX_TRI3_006, TX_TRI3_002, TX_TRI3_003, + TX_BLANK + }; + int choice = showText(choices); + + if (choice == 0) { // Don't beam out + } else if (choice == 1) { // Beam to enterprise + endMission(_vm->_awayMission.trial.missionScore, _vm->_awayMission.trial.field2b, 1); // FIXME: inconsistent + } else if (choice == 2) { // Beam to Vlict + trial3BeamToVlict(); + } + } +} + +void Room::trial3CrewmanBeamedOut() { + if (!_vm->_awayMission.trial.gotPointsForBeamingOut) { + _vm->_awayMission.trial.gotPointsForBeamingOut = true; + _vm->_awayMission.trial.missionScore += 2; // BUG: Doesn't happen when done in other rooms + } + loadRoomIndex(4, 4); +} + +void Room::trial3Tick90() { + if ((!(_vm->_awayMission.trial.shotKlingons & 8) && _vm->_awayMission.trial.shotKlingonState != 20)) { + playSoundEffectIndex(SND_TRANSMAT); + playMidiMusicTracks(MIDITRACK_32, -1); + loadActorAnimC(OBJECT_KLINGON_1, "t3ktel", 0x57, 0xb1, &Room::trial3Klingon1BeamedIn); + _vm->_awayMission.trial.shotKlingonState = 21; + } +} + +void Room::trial3TouchedHotspot3() { // Activated the explosive + playSoundEffectIndex(SND_BLANK_14); + playMidiMusicTracks(MIDITRACK_2, -1); + playVoc("BITOKIRK"); + loadActorAnimC(OBJECT_EXPLOSION, "t3expl", 0, 0xc7, &Room::trial3KirkExploded); +} + +void Room::trial3KirkExploded() { + showGameOverMenu(); +} + +void Room::trial3LookAtKirk() { + showText(TX_TRI3N000); +} + +void Room::trial3LookAtSpock() { + showText(TX_TRI3N004); +} + +void Room::trial3LookAtMccoy() { + showText(TX_TRI3N001); +} + +void Room::trial3LookAtRedshirt() { + showText(TX_TRI3N002); +} + +void Room::trial3LookAtExit() { + showText(TX_TRI3N005); +} + +void Room::trial3LookAtWall() { + showText(TX_TRI3N007); +} + +void Room::trial3TalkToKirk() { + showText(TX_SPEAKER_KIRK, TX_TRI3_001); +} + +void Room::trial3TalkToSpock() { + showText(TX_SPEAKER_SPOCK, TX_TRI3_022); +} + +void Room::trial3TalkToMccoy() { + showText(TX_SPEAKER_MCCOY, TX_TRI3_018); +} + +void Room::trial3TalkToRedshirt() { + showText(TX_SPEAKER_BENNIE, TX_TRI3_029); +} + +void Room::trial3UsePhaserOnWall() { + showText(TX_TRI3N006); +} + +void Room::trial3UseStunPhaserOnKlingon1() { + // BUGFIX: Instead of checking that the klingon isn't unconscious, (22), check that + // he's conscious (21). + // There's also the "dead" state (23) to consider. This prevents a softlock if + // a phaser is used on him just as he's being vaporized. + if (_vm->_awayMission.trial.shotKlingonState == 21) { + _vm->_awayMission.disableInput = true; + loadActorAnimC(OBJECT_KIRK, "kdraww", -1, -1, &Room::trial3ReadyToShootKlingon1OnStun); + } +} + +void Room::trial3ReadyToShootKlingon1OnStun() { + if (_vm->_awayMission.trial.shotKlingonState == 21) { + playSoundEffectIndex(SND_PHASSHOT); + showBitmapFor5Ticks("t3phas00", 5); + loadActorAnimC(OBJECT_KLINGON_1, "t3kstn", -1, -1, &Room::trial3Klingon1Shot); + _vm->_awayMission.disableInput = false; + _vm->_awayMission.trial.shotKlingonState = 22; + } +} + +void Room::trial3UseKillPhaserOnKlingon1() { + // BUGFIX: Prevent softlock by checking that he's conscious (shotKlingonState == 21) + // In addition to preventing the softlock mentioned above, this also prevents + // a softlock where a kill phaser is used on the unconscious klingon. + if (_vm->_awayMission.trial.shotKlingonState == 21) { + _vm->_awayMission.disableInput = true; + loadActorAnimC(OBJECT_KIRK, "kdraww", -1, -1, &Room::trial3ReadyToShootKlingon1OnKill); + } +} + +void Room::trial3ReadyToShootKlingon1OnKill() { + if (_vm->_awayMission.trial.shotKlingonState == 21) { + playSoundEffectIndex(SND_PHASSHOT); + showBitmapFor5Ticks("t3phas02", 5); + loadActorAnimC(OBJECT_KLINGON_1, "t3kdie", -1, -1, &Room::trial3Klingon1Shot); + _vm->_awayMission.disableInput = false; + _vm->_awayMission.trial.shotKlingonState = 23; + _vm->_awayMission.trial.missionScore -= 3; // Penalty for killing klingon + } +} + +void Room::trial3UsePhaserAnywhere() { + showText(TX_TRI3N003); +} + +void Room::trial3UseMTricorderOnKirk() { + // BUGFIX: Original animated Spock instead of Mccoy (same for below mccoy-scan functions) + mccoyScan(DIR_S, TX_TRI3_015, true); +} + +void Room::trial3UseMTricorderOnSpock() { + mccoyScan(DIR_S, TX_TRI3_016, true); +} + +void Room::trial3UseMTricorderOnMccoy() { + mccoyScan(DIR_S, TX_TRI3_013, true); +} + +void Room::trial3UseMTricorderOnRedshirt() { + mccoyScan(DIR_S, TX_TRI3_014, true); +} + +void Room::trial3UseMTricorderOnExit() { + mccoyScan(DIR_S, TX_TRI3_009, true); +} + +void Room::trial3UseSTricorderOnWall() { + spockScan(DIR_S, TX_TRI3_024, true); +} + +void Room::trial3UseSTricorderOnExit() { + spockScan(DIR_S, TX_TRI3_023, true); +} + +void Room::trial3UseMTricorderOnKlingon() { + if (_vm->_awayMission.trial.shotKlingonState == 22) { // Unconscious + mccoyScan(DIR_S, TX_TRI3_011); + showText(TX_SPEAKER_BENNIE, TX_TRI3_028); + } +} + +void Room::trial3UseCommunicator() { + if (_vm->_awayMission.trial.forceFieldDown) { + showText(TX_SPEAKER_UHURA, TX_TRI3U089); + + const TextRef choices[] = { + TX_SPEAKER_KIRK, + TX_TRI3_103, TX_TRI3_104, TX_TRI3_107, + TX_BLANK + }; + int choice = showText(choices); + + if (choice == 0) { // "Beam us back to the enterprise" + _vm->_awayMission.trial.field5f = 1; + endMission(_vm->_awayMission.trial.missionScore, _vm->_awayMission.trial.field2b, 1); // FIXME: inconsistent + } else if (choice == 1) { // "Beam us to Vlict's position" + trial3BeamToVlict(); + } // Else don't transport anywhere + } else { // Force field still up + showText(TX_SPEAKER_UHURA, TX_TRI3U067); + } +} + +void Room::trial3BeamToVlict() { + // ENHANCEMENT: The audio that should play here (TX_TRI3U080) doesn't seem to have the + // normal "filter" applied over it, making it sound jarring. So, use the equivalent + // text from TRIAL1 instead. + showText(TX_SPEAKER_UHURA, TX_TRI1U080); + + _vm->_awayMission.disableInput = true; + playSoundEffectIndex(SND_TRANSDEM); + + loadActorAnimC(OBJECT_KIRK, "kteled", -1, -1, &Room::trial3CrewmanBeamedOut); + loadActorAnimC(OBJECT_SPOCK, "steled", -1, -1, &Room::trial3CrewmanBeamedOut); + loadActorAnimC(OBJECT_MCCOY, "mteled", -1, -1, &Room::trial3CrewmanBeamedOut); + if (!_vm->_awayMission.redshirtDead) + loadActorAnimC(OBJECT_REDSHIRT, "rteled", -1, -1, &Room::trial3CrewmanBeamedOut); +} + +void Room::trial3UseMccoyOnWall() { + showText(TX_SPEAKER_MCCOY, TX_TRI3_010); +} + +void Room::trial3UseMccoyOnExit() { + showText(TX_SPEAKER_MCCOY, TX_TRI3_012); +} + +void Room::trial3UseSpockOnWall() { + showText(TX_SPEAKER_SPOCK, TX_TRI3_021); +} + +void Room::trial3UseSpockOnExit() { + showText(TX_SPEAKER_SPOCK, TX_TRI3_008); +} + +void Room::trial3UseRedshirtOnExit() { + showText(TX_SPEAKER_BENNIE, TX_TRI3_027); +} + +void Room::trial3UseRedshirtOnWall() { + showText(TX_SPEAKER_BENNIE, TX_TRI3_026); +} + +void Room::trial3WalkToExit() { + walkCrewman(OBJECT_KIRK, 0x26, 0x9d); +} + +void Room::trial3UseMedkitAnywhere() { + showText(TX_SPEAKER_MCCOY, TX_TRI3_017); } } diff --git a/engines/startrek/sound.h b/engines/startrek/sound.h index 6e14effb62..d5d2323680 100644 --- a/engines/startrek/sound.h +++ b/engines/startrek/sound.h @@ -90,7 +90,12 @@ enum MidiTracks { MIDITRACK_25, MIDITRACK_26, MIDITRACK_27, - MIDITRACK_28 + MIDITRACK_28, + MIDITRACK_29, + MIDITRACK_30, + MIDITRACK_31, + MIDITRACK_32, + MIDITRACK_33 }; // Max # of VOC files that can play at once diff --git a/engines/startrek/text.h b/engines/startrek/text.h index 1fe7876b1b..82191d0e4b 100644 --- a/engines/startrek/text.h +++ b/engines/startrek/text.h @@ -2217,6 +2217,54 @@ enum GameStringIDs { TX_TRI2U104, + TX_TRI3_001, + TX_TRI3_002, + TX_TRI3_003, + TX_TRI3_004, + TX_TRI3_005, + TX_TRI3_006, + TX_TRI3_007, + TX_TRI3_008, + TX_TRI3_009, + TX_TRI3_010, + TX_TRI3_011, + TX_TRI3_012, + TX_TRI3_013, + TX_TRI3_014, + TX_TRI3_015, + TX_TRI3_016, + TX_TRI3_017, + TX_TRI3_018, + TX_TRI3_019, + TX_TRI3_020, + TX_TRI3_021, + TX_TRI3_022, + TX_TRI3_023, + TX_TRI3_024, + TX_TRI3_025, + TX_TRI3_026, + TX_TRI3_027, + TX_TRI3_028, + TX_TRI3_029, + TX_TRI3_030, + TX_TRI3_103, + TX_TRI3_104, + TX_TRI3_107, + TX_TRI3N000, + TX_TRI3N001, + TX_TRI3N002, + TX_TRI3N003, + TX_TRI3N004, + TX_TRI3N005, + TX_TRI3N006, + TX_TRI3N007, + TX_TRI3U067, + TX_TRI3U080, + TX_TRI3U084, + TX_TRI3U089, + TX_TRI3U099, + + TX_TRI4_076, @@ -4358,6 +4406,54 @@ const char * const g_gameStrings[] = { "#TRI2\\TRI2U104#Understood, Captain.", + "#TRI3\\TRI3_001#This is too easy. I don't like it.", + "#TRI3\\TRI3_002#Beam us directly to the Enterprise.", + "#TRI3\\TRI3_003#Beam us directly to Vlict's position.", + "#TRI3\\TRI3_004#Deaths, Bones. Our deaths.", + "#TRI3\\TRI3_005#I don't like it. This was too easy.", + "#TRI3\\TRI3_006#We'll call you if we want to transport. Kirk out.", + "#TRI3\\TRI3_007#We're fine, lieutenant.", + "#TRI3\\TRI3_008#Captain, Starfleet protocol requires that the commanding officer lead in hazardous situations.", + "#TRI3\\TRI3_009#Approximately thirty Klingons, within 500 meters of the opening, no closer than 200 meters.", + "#TRI3\\TRI3_010#Damn it Jim, I'm a Doctor, not a structural Engineer!", + "#TRI3\\TRI3_011#He's out like a light, Jim. There are hibernating Arcturian sloth-tigers that will get up more quickly than this guy.", + "#TRI3\\TRI3_012#I believe that you have seniority, Jim.", + "#TRI3\\TRI3_013#He's a Male Human, average physical condition.", + "#TRI3\\TRI3_014#Male Human, excellent physical condition.", + "#TRI3\\TRI3_015#Male Human, good physical condition.", + "#TRI3\\TRI3_016#Male Human-Vulcan hybrid. Excellent physical condition.", + "#TRI3\\TRI3_017#Nobody needs healing, Jim, but you will if they harm my patient.", + "#TRI3\\TRI3_018#Well, maybe I've been too hard on you, Jim. I'm sorry.", + "#TRI3\\TRI3_019#Easy! Are you out of your mind?", + "#TRI3\\TRI3_020#Electrical monsters, things that explode when you phaser them, what else does he want?", + "#TRI3\\TRI3_021#I do not understand the desired course of action.", + "#TRI3\\TRI3_022#I recommend caution, Captain.", + "#TRI3\\TRI3_023#Reading a high energy build-up; there is a Klingon explosive device present five point three meters outside the cavern! It could be detonated at any moment!", + "#TRI3\\TRI3_024#This wall was carved from the natural rock of a cavern.", + "#TRI3\\TRI3_025#Admiral Vlict has a reputation for thoroughness, Doctor. If he means to kill us, we can expect more than we've encountered.", + "#TRI3\\TRI3_026#How hard do you want me to hit it, sir.", + "#TRI3\\TRI3_027#No sir. I insist that you have the honor of leading us to victory.", + "#TRI3\\TRI3_028#What are waiting for, sir? Shouldn't we just get out of here?", + "#TRI3\\TRI3_029#When I get out of this, I am going to have the best shore leave in Starfleet history!", + "#TRI3\\TRI3_030#Daylight! We're almost there! We've beaten them!", + "#TRI3\\TRI3_103#Beam us back to the Enterprise. Kirk out.", + "#TRI3\\TRI3_104#Beam us to Vlict's position.", + "#TRI3\\TRI3_107#Negative.", + "#TRI3\\TRI3N000#Captain James Tiberius Kirk, deep in thought.", + "#TRI3\\TRI3N001#Doctor Leonard McCoy, a rather disgruntled surgeon.", + "#TRI3\\TRI3N002#Ensign Bennie, who wishes that he was back at the Academy right now...", + "#TRI3\\TRI3N003#No gunslinging allowed, space cowboy.", + "#TRI3\\TRI3N004#Spock, one of the foremost science officers in Starfleet.", + "#TRI3\\TRI3N005#The exit to this particular complex. You hope.", + "#TRI3\\TRI3N006#The wall is resistant to phaser fire.", + "#TRI3\\TRI3N007#The wall of this corridor.", + "#TRI3\\TRI3U067#Captain, we're still working on breaching the force field. We will let you know when we're ready to beam you out.", + "#TRI3\\TRI3U080#Affirmative, sir.", + "#TRI3\\TRI3U084#Captain, our sensors have picked up phaser fire! Are you all right? Captain, come in please!", + "#TRI3\\TRI3U089#Do you wish to be beamed up now Captain?", + "#TRI3\\TRI3U099#Mr. Scott has found a way to breach the force field!", + + "#TRI4\\TRI4_076#You humans have an excellent imagination, but a poor grasp of reality.", -- cgit v1.2.3