summaryrefslogtreecommitdiff
path: root/src/bossMegaGoomba.cpp
diff options
context:
space:
mode:
authorStephen Simpson <megazig@gmail.com>2011-10-11 02:05:42 -0500
committerStephen Simpson <megazig@gmail.com>2011-10-11 02:05:42 -0500
commitbaa86aba60247a79a688951e96fad9eed7c65791 (patch)
tree274196440f5b0ad44d42c2b7cfe5c9cfb9ac3da2 /src/bossMegaGoomba.cpp
parent731f084d304118cb6e52b144996146ba193e2eb8 (diff)
downloadkamek-baa86aba60247a79a688951e96fad9eed7c65791.tar.gz
kamek-baa86aba60247a79a688951e96fad9eed7c65791.zip
fixed hardcoded r13 in PlaySound to enable ntsc fun
Diffstat (limited to 'src/bossMegaGoomba.cpp')
-rw-r--r--src/bossMegaGoomba.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bossMegaGoomba.cpp b/src/bossMegaGoomba.cpp
index a9069ca..36f521c 100644
--- a/src/bossMegaGoomba.cpp
+++ b/src/bossMegaGoomba.cpp
@@ -51,6 +51,7 @@ class daMegaGoomba_c : public dEn_c {
int toPlay;
u32 marker8_end;
u32 marker9_start;
+ bool timeToPlay;
u32 marker9_end;
bool takeHit(char count);
@@ -259,6 +260,7 @@ int daMegaGoomba_c::onCreate() {
this->JumpTime = 50.0;
this->playIt = 0;
this->toPlay = 0;
+ this->timeToPlay = false;
OSReport("Setting MegaGoomba's State\n");
doStateChange(&StateID_Grow);
@@ -516,9 +518,15 @@ void daMegaGoomba_c::executeState_Walk() {
break;
//FIXME test case for sound effects
case 3:
- if(this->playIt = 1) {
+ OSReport("PlaySound(this, %d)\n", this->toPlay);
+ if(this->timeToPlay) {
PlaySound(this, this->toPlay);
- this->playIt = 0;
+ this->timeToPlay = false;
+ this->toPlay++;
+ if(this->toPlay > 1977)
+ this->toPlay = 0;
+ } else {
+ this->timeToPlay = true;
}
break;
default: