diff options
author | Matthew Stewart | 2018-08-08 00:42:25 -0400 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-09 08:37:30 +0200 |
commit | 5fae11b871850ffce45499b5b2fa37dbbdb40706 (patch) | |
tree | a27d132d5be2b6bf3a2b92ad29aa39b4dcfe3526 /engines/startrek/rooms/veng3.cpp | |
parent | 6db428f0063b25d112ed5647a3562f89816bafbf (diff) | |
download | scummvm-rg350-5fae11b871850ffce45499b5b2fa37dbbdb40706.tar.gz scummvm-rg350-5fae11b871850ffce45499b5b2fa37dbbdb40706.tar.bz2 scummvm-rg350-5fae11b871850ffce45499b5b2fa37dbbdb40706.zip |
STARTREK: Move VENG function into common code
Diffstat (limited to 'engines/startrek/rooms/veng3.cpp')
-rw-r--r-- | engines/startrek/rooms/veng3.cpp | 34 |
1 files changed, 4 insertions, 30 deletions
diff --git a/engines/startrek/rooms/veng3.cpp b/engines/startrek/rooms/veng3.cpp index 649288be66..969a8a1037 100644 --- a/engines/startrek/rooms/veng3.cpp +++ b/engines/startrek/rooms/veng3.cpp @@ -91,9 +91,10 @@ extern const RoomAction veng3ActionList[] = { { {ACTION_DONE_WALK, 11, 0, 0}, &Room::veng3ReachedCable }, { {ACTION_DONE_ANIM, 12, 0, 0}, &Room::veng3PickedUpCable }, - { {ACTION_USE, OBJECT_IMEDKIT, OBJECT_DEAD_GUY, 0}, &Room::veng3UseMccoyOnDeadGuy }, - { {ACTION_USE, OBJECT_IMTRICOR, OBJECT_DEAD_GUY, 0}, &Room::veng3UseMccoyOnDeadGuy }, - { {ACTION_USE, OBJECT_MCCOY, OBJECT_DEAD_GUY, 0}, &Room::veng3UseMccoyOnDeadGuy }, + // 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 veng3NumActions = ARRAYSIZE(veng3ActionList); @@ -353,31 +354,4 @@ void Room::veng3PickedUpCable() { _awayMission->veng.tookCableFromSickbayHallway = true; } -void Room::veng3UseMccoyOnDeadGuy() { // NOTE: Identical to function in VENG1 - int val = getRandomWordInRange(0, 5); - - switch (val) { - case 0: - // NOTE: The exact text differs from the text used in DEM3. But, in order for this - // text indexing scheme to work, two rooms can't use the same audio with different - // text. Original was "He's dead, jim." instead of "He's dead, Jim...". - showText(TX_SPEAKER_MCCOY, TX_DEM3_019); - break; - - case 1: - showText(TX_SPEAKER_MCCOY, TX_VEN4_016); - break; - - case 2: - case 3: - showText(TX_SPEAKER_MCCOY, TX_G_014); - break; - - case 4: - case 5: - showText(TX_SPEAKER_MCCOY, TX_VEN0_016); - break; - } -} - } |