aboutsummaryrefslogtreecommitdiff
path: root/engines/bbvs/minigames
diff options
context:
space:
mode:
authorjohndoe1232014-01-25 23:16:27 +0100
committerjohndoe1232014-01-29 13:27:48 +0100
commitef55f5b774b55bd085b05ab704ff9418af960670 (patch)
tree789ba1787d7f141b8820005c4d87b3bbbb421346 /engines/bbvs/minigames
parent11a58071101d84bc02ac5e9a4e3dee209d0d5df9 (diff)
downloadscummvm-rg350-ef55f5b774b55bd085b05ab704ff9418af960670.tar.gz
scummvm-rg350-ef55f5b774b55bd085b05ab704ff9418af960670.tar.bz2
scummvm-rg350-ef55f5b774b55bd085b05ab704ff9418af960670.zip
BBVS: Replace minigame flags parameter
Diffstat (limited to 'engines/bbvs/minigames')
-rw-r--r--engines/bbvs/minigames/bbairguitar.cpp6
-rw-r--r--engines/bbvs/minigames/bbairguitar.h2
-rw-r--r--engines/bbvs/minigames/bbant.cpp6
-rw-r--r--engines/bbvs/minigames/bbant.h2
-rw-r--r--engines/bbvs/minigames/bbloogie.cpp6
-rw-r--r--engines/bbvs/minigames/bbloogie.h2
-rw-r--r--engines/bbvs/minigames/bbtennis.cpp6
-rw-r--r--engines/bbvs/minigames/bbtennis.h2
-rw-r--r--engines/bbvs/minigames/minigame.h9
9 files changed, 20 insertions, 21 deletions
diff --git a/engines/bbvs/minigames/bbairguitar.cpp b/engines/bbvs/minigames/bbairguitar.cpp
index f81bb498fd..b5d9d2ad83 100644
--- a/engines/bbvs/minigames/bbairguitar.cpp
+++ b/engines/bbvs/minigames/bbairguitar.cpp
@@ -732,7 +732,7 @@ void MinigameBbAirGuitar::updateObjs() {
}
}
-int MinigameBbAirGuitar::run(uint flags) {
+int MinigameBbAirGuitar::run(bool fromMainGame) {
memset(_objects, 0, sizeof(_objects));
@@ -762,9 +762,7 @@ int MinigameBbAirGuitar::run(uint flags) {
_backgroundSpriteIndex = 97;
_titleScreenSpriteIndex = 98;
- _fromMainGame = false;
- if (flags & 1)
- _fromMainGame = true;
+ _fromMainGame = fromMainGame;
_gameState = 0;
_gameTicks = 0;
diff --git a/engines/bbvs/minigames/bbairguitar.h b/engines/bbvs/minigames/bbairguitar.h
index 70ba5800ce..5c1eb00dfd 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(uint flags);
+ int run(bool fromMainGame);
public:
struct Obj {
diff --git a/engines/bbvs/minigames/bbant.cpp b/engines/bbvs/minigames/bbant.cpp
index 131355622b..fa36c7d469 100644
--- a/engines/bbvs/minigames/bbant.cpp
+++ b/engines/bbvs/minigames/bbant.cpp
@@ -1185,7 +1185,7 @@ void MinigameBbAnt::updateObjs(uint mouseButtons) {
}
-int MinigameBbAnt::run(uint flags) {
+int MinigameBbAnt::run(bool fromMainGame) {
memset(_objects, 0, sizeof(_objects));
@@ -1194,9 +1194,7 @@ int MinigameBbAnt::run(uint flags) {
_backgroundSpriteIndex = 303;
_titleScreenSpriteIndex = 304;
- _fromMainGame = false;
- if (flags & 1)
- _fromMainGame = true;
+ _fromMainGame = fromMainGame;
_hiScore = 0;
_gameState = 0;
diff --git a/engines/bbvs/minigames/bbant.h b/engines/bbvs/minigames/bbant.h
index cdf358f94d..a133d66862 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(uint flags);
+ int run(bool fromMainGame);
public:
struct Obj {
diff --git a/engines/bbvs/minigames/bbloogie.cpp b/engines/bbvs/minigames/bbloogie.cpp
index 4098eb2d94..b79e8c7752 100644
--- a/engines/bbvs/minigames/bbloogie.cpp
+++ b/engines/bbvs/minigames/bbloogie.cpp
@@ -1264,7 +1264,7 @@ void MinigameBbloogie::playRndSound() {
playSound(_playerSounds1[_vm->getRandom(_playerSounds1Count)]);
}
-int MinigameBbloogie::run(uint flags) {
+int MinigameBbloogie::run(bool fromMainGame) {
memset(_objects, 0, sizeof(_objects));
@@ -1273,9 +1273,7 @@ int MinigameBbloogie::run(uint flags) {
_backgroundSpriteIndex = 210;
_titleScreenSpriteIndex = 211;
- _fromMainGame = false;
- if (flags & 1)
- _fromMainGame = true;
+ _fromMainGame = fromMainGame;
_hiScore = 0;
if (!_fromMainGame) {
diff --git a/engines/bbvs/minigames/bbloogie.h b/engines/bbvs/minigames/bbloogie.h
index b05536b001..d01149ad0c 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(uint flags);
+ int run(bool fromMainGame);
public:
struct Obj {
diff --git a/engines/bbvs/minigames/bbtennis.cpp b/engines/bbvs/minigames/bbtennis.cpp
index 87ea355a10..edf9cabbfb 100644
--- a/engines/bbvs/minigames/bbtennis.cpp
+++ b/engines/bbvs/minigames/bbtennis.cpp
@@ -1181,7 +1181,7 @@ void MinigameBbTennis::hitSomething() {
++_score;
}
-int MinigameBbTennis::run(uint flags) {
+int MinigameBbTennis::run(bool fromMainGame) {
memset(_objects, 0, sizeof(_objects));
@@ -1190,9 +1190,7 @@ int MinigameBbTennis::run(uint flags) {
_backgroundSpriteIndex = 272;
_titleScreenSpriteIndex = 273;
- _fromMainGame = false;
- if (flags & 1)
- _fromMainGame = true;
+ _fromMainGame = fromMainGame;
_hiScore = 0;
if (!_fromMainGame) {
diff --git a/engines/bbvs/minigames/bbtennis.h b/engines/bbvs/minigames/bbtennis.h
index 63617c968c..644eec73b2 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(uint flags);
+ int run(bool fromMainGame);
public:
struct Obj {
diff --git a/engines/bbvs/minigames/minigame.h b/engines/bbvs/minigames/minigame.h
index 09630ae228..33498be7ef 100644
--- a/engines/bbvs/minigames/minigame.h
+++ b/engines/bbvs/minigames/minigame.h
@@ -30,6 +30,13 @@
namespace Bbvs {
+enum {
+ kMinigameBbloogie = 0,
+ kMinigameBbTennis = 1,
+ kMinigameBbAnt = 2,
+ kMinigameBbAirGuitar = 3
+};
+
struct ObjAnimation {
int frameCount;
const int *frameIndices;
@@ -41,7 +48,7 @@ class Minigame {
public:
Minigame(BbvsEngine *vm);
virtual ~Minigame();
- virtual int run(uint flags) = 0;
+ virtual int run(bool fromMainGame) = 0;
public:
BbvsEngine *_vm;
SpriteModule *_spriteModule;