From baa86aba60247a79a688951e96fad9eed7c65791 Mon Sep 17 00:00:00 2001 From: Stephen Simpson Date: Tue, 11 Oct 2011 02:05:42 -0500 Subject: fixed hardcoded r13 in PlaySound to enable ntsc fun --- src/bossMegaGoomba.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/bossMegaGoomba.cpp') 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: -- cgit v1.2.3