diff options
Diffstat (limited to '')
-rw-r--r-- | src/bossFuzzyBear.cpp | 26 | ||||
-rw-r--r-- | src/effectvideo.cpp | 23 |
2 files changed, 31 insertions, 18 deletions
diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index c218f6d..4cc4128 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -64,6 +64,7 @@ extern "C" void *HandleYSpeed(daFuzzyBear_c *); extern "C" void *UpdateObjectPosBasedOnSpeedValues_real(daFuzzyBear_c *); extern "C" void *doSpriteMovement(dEn_c *); extern "C" void *PlaySound(daFuzzyBear_c *, int soundID); +extern "C" void *StopSound(int soundID); extern "C" u32 GenerateRandomNumber(int max); extern "C" dStageActor_c *CreateActor(u16 classID, int settings, Vec pos, char rot, char layer); @@ -95,6 +96,8 @@ void daFuzzyBear_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, Ac OSReport("Hit Fireball"); this->timer = 0; PlaySound(this, SE_BOSS_KOOPA_FIRE_DISAPP); + +// CreateEffect(102); this->damage++; if (this->damage > 14) { doStateChange(&StateID_DieBigFall); } } @@ -126,7 +129,7 @@ void daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhy doSpriteMovement(blah); PlaySound(this, SE_EMY_BLOW_PAKKUN_DOWN); - +// CreateEffect(161); if (this->damage > 14) { doStateChange(&StateID_DieBigFall); } else { doStateChange(&StateID_RolyPoly); } @@ -140,6 +143,8 @@ void daFuzzyBear_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics * this->timer = 0; this->damage += 3; +// CreateEffect(162); + if (this->damage > 14) { doStateChange(&StateID_DieBigFall); } else { doStateChange(&StateID_RolyPoly); } } @@ -304,6 +309,8 @@ void daFuzzyBear_c::executeState_Grow() { } void daFuzzyBear_c::endState_Grow() { this->Baseline = this->pos.y; +// StopSound(SE_BOSS_ROY_MAGIC_MAKE_FAST); + OSReport("OK. All grown up now."); } @@ -378,6 +385,7 @@ void daFuzzyBear_c::executeState_Bounce() { this->pos.y = this->pos.y + (scaleDown/10.0); if (this->pos.y > this->Baseline) { this->pos.y = this->Baseline - 1.0; } } +// else if (this->timer == 10) { CreateEffect(66); } else { float modifier; modifier = (scaleBase - 1.0) + ((this->timer - 10) * 0.1); @@ -388,7 +396,7 @@ void daFuzzyBear_c::executeState_Bounce() { PlaySound(this, SE_PLY_JUMPDAI); } - if (this->timer >= 20) { + if (this->timer > 20) { int randChoice; @@ -654,18 +662,8 @@ void daFuzzyBear_c::executeState_Wait() { if (this->timer > 60) { int randChoice; - if (BigBossFuzzyBear == 1) { - - randChoice = GenerateRandomNumber(3); - - if (randChoice == 0) { doStateChange(&StateID_Spray); } -// else if (randChoice == 1) { doStateChange(&StateID_Needles); } - else { doStateChange(&StateID_RolyPoly); } - - } - else { - doStateChange(&StateID_Bounce); - } + if (BigBossFuzzyBear == 1) { doStateChange(&StateID_Spray); } + else { doStateChange(&StateID_Bounce); } } } void daFuzzyBear_c::endState_Wait() { } diff --git a/src/effectvideo.cpp b/src/effectvideo.cpp index ec23158..cacc22d 100644 --- a/src/effectvideo.cpp +++ b/src/effectvideo.cpp @@ -3,11 +3,16 @@ #include <g3dhax.h> #include "player.h" #include "effects.h" +#include <sfx.h> + + +extern "C" void *PlaySound(dEn_c *, int soundID); class EffectVideo : public dEn_c { int onCreate(); int onExecute(); + int onDelete(); s32 timer; u32 effect; @@ -26,23 +31,33 @@ EffectVideo *EffectVideo::build() { int EffectVideo::onCreate() { this->timer = -60; - this->effect = 0; + this->effect = 900; this->onExecute(); return true; } + +int EffectVideo::onDelete() { + return true; +} + + int EffectVideo::onExecute() { - if (this->effect > 1000) { return true; } + if (this->effect >= 1001) { return true; } - if (this->timer == 30) { + if (this->timer > 60) { CreateEffect(this, this->effect); + PlaySound(this, this->effect); + this->pos.x += 16.0; + + this->effect += 1; + this->timer = 0; } - this->effect += 1; this->timer += 1; return true; } |