diff options
author | Strangerke | 2014-02-28 07:45:16 +0100 |
---|---|---|
committer | Strangerke | 2014-02-28 07:45:16 +0100 |
commit | cf3bf73cde489893fa6c7f6383bacdd5ef137fc2 (patch) | |
tree | 67193d0055b992fee604584c906ecd95a25e604c /engines/bbvs | |
parent | 79bad44750516415ae968f74d714f3708d83f973 (diff) | |
download | scummvm-rg350-cf3bf73cde489893fa6c7f6383bacdd5ef137fc2.tar.gz scummvm-rg350-cf3bf73cde489893fa6c7f6383bacdd5ef137fc2.tar.bz2 scummvm-rg350-cf3bf73cde489893fa6c7f6383bacdd5ef137fc2.zip |
BBVS: Use a boolean for _gameResult. Adapt function declarations accordingly
Diffstat (limited to 'engines/bbvs')
-rw-r--r-- | engines/bbvs/bbvs.cpp | 6 | ||||
-rw-r--r-- | engines/bbvs/minigames/bbairguitar.cpp | 4 | ||||
-rw-r--r-- | engines/bbvs/minigames/bbairguitar.h | 2 | ||||
-rw-r--r-- | engines/bbvs/minigames/bbant.cpp | 4 | ||||
-rw-r--r-- | engines/bbvs/minigames/bbant.h | 2 | ||||
-rw-r--r-- | engines/bbvs/minigames/bbloogie.cpp | 6 | ||||
-rw-r--r-- | engines/bbvs/minigames/bbloogie.h | 2 | ||||
-rw-r--r-- | engines/bbvs/minigames/bbtennis.cpp | 4 | ||||
-rw-r--r-- | engines/bbvs/minigames/bbtennis.h | 2 | ||||
-rw-r--r-- | engines/bbvs/minigames/minigame.cpp | 2 | ||||
-rw-r--r-- | engines/bbvs/minigames/minigame.h | 4 |
11 files changed, 19 insertions, 19 deletions
diff --git a/engines/bbvs/bbvs.cpp b/engines/bbvs/bbvs.cpp index 3da9e8b3ce..8bcc4d3809 100644 --- a/engines/bbvs/bbvs.cpp +++ b/engines/bbvs/bbvs.cpp @@ -1305,12 +1305,12 @@ bool BbvsEngine::runMinigame(int minigameNum) { break; } - int minigameResult = minigame->run(fromMainGame); + bool minigameResult = minigame->run(fromMainGame); delete minigame; - // Check if the prinicpal was hit with a megaloogie in the loogie minigame - if (minigameNum == 0 && minigameResult == 1) + // Check if the principal was hit with a megaloogie in the loogie minigame + if (minigameNum == 0 && minigameResult) _gameVars[42] = 1; #if 0 diff --git a/engines/bbvs/minigames/bbairguitar.cpp b/engines/bbvs/minigames/bbairguitar.cpp index 585477b34e..f2e42313e3 100644 --- a/engines/bbvs/minigames/bbairguitar.cpp +++ b/engines/bbvs/minigames/bbairguitar.cpp @@ -732,7 +732,7 @@ void MinigameBbAirGuitar::updateObjs() { } } -int MinigameBbAirGuitar::run(bool fromMainGame) { +bool MinigameBbAirGuitar::run(bool fromMainGame) { memset(_objects, 0, sizeof(_objects)); @@ -767,7 +767,7 @@ int MinigameBbAirGuitar::run(bool fromMainGame) { _gameState = 0; _gameTicks = 0; - _gameResult = 0; + _gameResult = false; _gameDone = false; initObjects(); diff --git a/engines/bbvs/minigames/bbairguitar.h b/engines/bbvs/minigames/bbairguitar.h index eba301632d..d4fd6ec30c 100644 --- a/engines/bbvs/minigames/bbairguitar.h +++ b/engines/bbvs/minigames/bbairguitar.h @@ -30,7 +30,7 @@ namespace Bbvs { class MinigameBbAirGuitar : public Minigame { public: MinigameBbAirGuitar(BbvsEngine *vm) : Minigame(vm) {}; - int run(bool fromMainGame); + bool run(bool fromMainGame); public: struct Obj { diff --git a/engines/bbvs/minigames/bbant.cpp b/engines/bbvs/minigames/bbant.cpp index 3d48132512..9786682ada 100644 --- a/engines/bbvs/minigames/bbant.cpp +++ b/engines/bbvs/minigames/bbant.cpp @@ -1167,7 +1167,7 @@ void MinigameBbAnt::updateObjs(uint mouseButtons) { } -int MinigameBbAnt::run(bool fromMainGame) { +bool MinigameBbAnt::run(bool fromMainGame) { memset(_objects, 0, sizeof(_objects)); @@ -1183,7 +1183,7 @@ int MinigameBbAnt::run(bool fromMainGame) { _hiScore = loadHiscore(kMinigameBbAnt); _gameState = 0; - _gameResult = 0; + _gameResult = false; _gameDone = false; initObjects(); initVars(); diff --git a/engines/bbvs/minigames/bbant.h b/engines/bbvs/minigames/bbant.h index b9ead3a87b..be2afe688d 100644 --- a/engines/bbvs/minigames/bbant.h +++ b/engines/bbvs/minigames/bbant.h @@ -30,7 +30,7 @@ namespace Bbvs { class MinigameBbAnt : public Minigame { public: MinigameBbAnt(BbvsEngine *vm) : Minigame(vm) {}; - int run(bool fromMainGame); + bool run(bool fromMainGame); public: struct Obj { diff --git a/engines/bbvs/minigames/bbloogie.cpp b/engines/bbvs/minigames/bbloogie.cpp index ab400e27a7..4601e9ff93 100644 --- a/engines/bbvs/minigames/bbloogie.cpp +++ b/engines/bbvs/minigames/bbloogie.cpp @@ -1117,7 +1117,7 @@ void MinigameBbLoogie::updatePrincipal(int objIndex) { obj->ticks = getAnimation(18)->frameTicks[obj->frameIndex]; } if (!isSoundPlaying(1)) { - _gameResult = 1; + _gameResult = true; if (_fromMainGame) { _principalAngry = true; if (obj->x <= 140 || obj->x >= 165) { @@ -1260,7 +1260,7 @@ void MinigameBbLoogie::playRndSound() { playSound(_playerSounds1[_vm->getRandom(_playerSounds1Count)]); } -int MinigameBbLoogie::run(bool fromMainGame) { +bool MinigameBbLoogie::run(bool fromMainGame) { memset(_objects, 0, sizeof(_objects)); @@ -1277,7 +1277,7 @@ int MinigameBbLoogie::run(bool fromMainGame) { _gameState = kGSTitleScreen; _gameTicks = 0; - _gameResult = 0; + _gameResult = false; _gameDone = false; initObjects(); initVars(); diff --git a/engines/bbvs/minigames/bbloogie.h b/engines/bbvs/minigames/bbloogie.h index 6c4ece3269..1dd4049b41 100644 --- a/engines/bbvs/minigames/bbloogie.h +++ b/engines/bbvs/minigames/bbloogie.h @@ -30,7 +30,7 @@ namespace Bbvs { class MinigameBbLoogie : public Minigame { public: MinigameBbLoogie(BbvsEngine *vm) : Minigame(vm) {}; - int run(bool fromMainGame); + bool run(bool fromMainGame); public: struct Obj { diff --git a/engines/bbvs/minigames/bbtennis.cpp b/engines/bbvs/minigames/bbtennis.cpp index 2bee57d5e5..926642cc5f 100644 --- a/engines/bbvs/minigames/bbtennis.cpp +++ b/engines/bbvs/minigames/bbtennis.cpp @@ -1181,7 +1181,7 @@ void MinigameBbTennis::hitSomething() { ++_score; } -int MinigameBbTennis::run(bool fromMainGame) { +bool MinigameBbTennis::run(bool fromMainGame) { memset(_objects, 0, sizeof(_objects)); @@ -1197,7 +1197,7 @@ int MinigameBbTennis::run(bool fromMainGame) { _hiScore = loadHiscore(kMinigameBbTennis); _gameState = 0; - _gameResult = 0; + _gameResult = false; _gameDone = false; initObjects(); initVars(); diff --git a/engines/bbvs/minigames/bbtennis.h b/engines/bbvs/minigames/bbtennis.h index 72ee719387..690bd724a0 100644 --- a/engines/bbvs/minigames/bbtennis.h +++ b/engines/bbvs/minigames/bbtennis.h @@ -30,7 +30,7 @@ namespace Bbvs { class MinigameBbTennis : public Minigame { public: MinigameBbTennis(BbvsEngine *vm) : Minigame(vm) {}; - int run(bool fromMainGame); + bool run(bool fromMainGame); public: struct Obj { diff --git a/engines/bbvs/minigames/minigame.cpp b/engines/bbvs/minigames/minigame.cpp index 2738a8892f..aae18072d9 100644 --- a/engines/bbvs/minigames/minigame.cpp +++ b/engines/bbvs/minigames/minigame.cpp @@ -31,7 +31,7 @@ Minigame::Minigame(BbvsEngine *vm) memset(_hiScoreTable, 0, sizeof(_hiScoreTable)); _gameState = 0; _gameTicks = 0; - _gameResult = 0; + _gameResult = false; _gameDone = false; _fromMainGame = false; _backgroundSpriteIndex = 0; diff --git a/engines/bbvs/minigames/minigame.h b/engines/bbvs/minigames/minigame.h index cc5a96e3c0..675dec360d 100644 --- a/engines/bbvs/minigames/minigame.h +++ b/engines/bbvs/minigames/minigame.h @@ -49,14 +49,14 @@ class Minigame { public: Minigame(BbvsEngine *vm); virtual ~Minigame(); - virtual int run(bool fromMainGame) = 0; + virtual bool run(bool fromMainGame) = 0; protected: BbvsEngine *_vm; SpriteModule *_spriteModule; int _gameState; int _gameTicks; - int _gameResult; + bool _gameResult; bool _gameDone; bool _fromMainGame; int _hiScoreTable[kMinigameCount]; |