Permalink
Browse files

STARTREK: Remove optional parameters from methods

  • Loading branch information...
Drenn1 authored and sev- committed Jun 16, 2018
1 parent 933d214 commit 44b0a4c7bb4615933a7e9f6124a7fffbd309da8d
Showing with 14 additions and 11 deletions.
  1. +6 −3 engines/startrek/room.h
  2. +8 −8 engines/startrek/rooms/tug2.cpp
@@ -120,9 +120,12 @@ class Room {
void showGameOverMenu(); // Cmd 0x12
void playVoc(Common::String filename); // Cmd 0x15

// Helper functions for repetitive stuff
void spockScan(int direction, int text, bool changeDirection = true);
void mccoyScan(int direction, int text, bool changeDirection = true);
// Helper functions for repetitive stuff.

// If "changeDirection" is true, they remain facing that direction even after their
// animation is finished. The game is inconsistent about doing this.
void spockScan(int direction, int text, bool changeDirection);
void mccoyScan(int direction, int text, bool changeDirection);

// Room-specific code
public:
@@ -188,7 +188,7 @@ void Room::tug2LookAtWires() {
void Room::tug2UseSTricorderOnButton() {
if (_vm->_awayMission.tug.field35 != 0)
return;
spockScan(DIR_E, TX_TUG2_007);
spockScan(DIR_E, TX_TUG2_007, true);
}

void Room::tug2UseMccoyOnWires() {
@@ -783,18 +783,18 @@ void Room::tug2Timer2Expired() {
}

void Room::tug2UseSTricorderOnBomb() {
spockScan(DIR_E, TX_TUG2_004);
spockScan(DIR_E, TX_TUG2_004, true);
}

void Room::tug2UseMTricorderOnGuard1() {
if (_vm->_awayMission.tug.guard1Status == GUARDSTAT_STUNNED)
mccoyScan(DIR_E, TX_TUG2_016);
mccoyScan(DIR_E, TX_TUG2_016, true);
}

void Room::tug2UseMTricorderOnGuard2() {
// BUGFIX: original didn't play audio for this (despite being the same as above).
if (_vm->_awayMission.tug.guard2Status == GUARDSTAT_STUNNED)
mccoyScan(DIR_E, TX_TUG2_016);
mccoyScan(DIR_E, TX_TUG2_016, true);
}

void Room::tug2TalkToGuard1() {
@@ -855,19 +855,19 @@ void Room::tug2TalkToBrig() {
if (_vm->_awayMission.tug.brigForceFieldDown && _vm->_awayMission.tug.talkedToBrigCrewman)
showText(TX_SPEAKER_MASADA_CREWMAN, TX_TUG2_027);
else if (!_vm->_awayMission.tug.brigForceFieldDown)
mccoyScan(DIR_E, TX_TUG2_015);
mccoyScan(DIR_E, TX_TUG2_015, true);
}

void Room::tug2UseMTricorderOnBrig() {
if (_vm->_awayMission.tug.field35 == 6)
mccoyScan(DIR_E, TX_TUG2_019);
mccoyScan(DIR_E, TX_TUG2_019, true);
else if (!_vm->_awayMission.tug.brigForceFieldDown)
mccoyScan(DIR_E, TX_TUG2_015);
mccoyScan(DIR_E, TX_TUG2_015, true);
}

void Room::tug2UseMTricorderOnOpenBrig() {
if (_vm->_awayMission.tug.brigForceFieldDown)
mccoyScan(DIR_E, TX_TUG2_015);
mccoyScan(DIR_E, TX_TUG2_015, true);
}

void Room::tug2UsePhaserAnywhere() {

0 comments on commit 44b0a4c

Please sign in to comment.