From 6ddd772d6546758a2602a934a6b385757b77b48e Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Fri, 9 Mar 2012 13:54:17 -0600 Subject: Bosses working once again - now slimmer and prettier than ever --- src/boss.cpp | 4 ++-- src/bossBalboaWrench.cpp | 6 +++++- src/bossFuzzyBear.cpp | 10 ++++++++-- src/bossPodouble.cpp | 12 ++++++++++-- src/bossRamboo.cpp | 6 ++++-- src/bossTopman.cpp | 6 +++++- 6 files changed, 34 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/boss.cpp b/src/boss.cpp index 98d1669..cea6d8e 100644 --- a/src/boss.cpp +++ b/src/boss.cpp @@ -117,7 +117,7 @@ bool ShrinkBoss(daBoss *actor, Vec *pos, float scale, int timer) { actor->scale.y -= scale / 80.0; actor->scale.z -= scale / 80.0; - actor->pos.y += 2.0; + // actor->pos.y += 2.0; if (actor->timer == 30) { @@ -128,7 +128,7 @@ bool ShrinkBoss(daBoss *actor, Vec *pos, float scale, int timer) { } if (actor->scale.x < 0) { return true; } - return false; + else { return false; } } diff --git a/src/bossBalboaWrench.cpp b/src/bossBalboaWrench.cpp index c74ef8f..ccff19b 100644 --- a/src/bossBalboaWrench.cpp +++ b/src/bossBalboaWrench.cpp @@ -531,7 +531,11 @@ void daBalboa_c::updateModelMatrices() { ret = ShrinkBoss(this, &this->pos, 2.25, this->timer); this->pos.y -= 0.02; - if (ret) { BossExplode(this, &this->pos); } + if (ret == true) { + BossExplode(this, &this->pos); + this->dying = 1; + this->timer = 0; + } else { PlaySound(this, SE_EMY_CHOROPU_SIGN); } this->timer += 1; diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index 8eaba1d..1661a29 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -699,7 +699,9 @@ void daFuzzyBear_c::beginState_Outro() { void daFuzzyBear_c::executeState_Outro() { if (this->dying == 1) { - if (this->timer > 180) { ExitStage(WORLD_MAP, 0, BEAT_LEVEL, MARIO_WIPE); } + if (this->timer > 180) { + ExitStage(WORLD_MAP, 0, BEAT_LEVEL, MARIO_WIPE); + } if (this->timer == 60) { PlayerVictoryCries(this); } this->timer += 1; @@ -709,7 +711,11 @@ void daFuzzyBear_c::executeState_Outro() { bool ret; ret = ShrinkBoss(this, &this->pos, 2.75, this->timer); - if (ret) { BossExplode(this, &this->pos); } + if (ret == true) { + BossExplode(this, &this->pos); + this->dying = 1; + this->timer = 0; + } this->timer += 1; diff --git a/src/bossPodouble.cpp b/src/bossPodouble.cpp index 266d2c7..26c20a9 100644 --- a/src/bossPodouble.cpp +++ b/src/bossPodouble.cpp @@ -521,7 +521,11 @@ int daPodouble::onDraw() { bool ret; ret = ShrinkBoss(this, &this->pos, 3.5, this->timer); - if (ret) { BossExplode(this, &this->pos); } + if (ret == true) { + BossExplode(this, &this->pos); + this->dying = 1; + this->timer = 0; + } else { PlaySound(this, SE_EMY_BUBBLE_EXTINCT); } this->timer += 1; @@ -546,7 +550,11 @@ int daPodouble::onDraw() { bool ret; ret = ShrinkBoss(this, &this->pos, 3.5, this->timer); - if (ret) { BossExplode(this, &this->pos); } + if (ret == true) { + BossExplode(this, &this->pos); + this->dying = 1; + this->timer = 0; + } else { PlaySound(this, SE_EMY_BUBBLE_EXTINCT); } this->timer += 1; diff --git a/src/bossRamboo.cpp b/src/bossRamboo.cpp index 8569432..c20194e 100644 --- a/src/bossRamboo.cpp +++ b/src/bossRamboo.cpp @@ -485,8 +485,10 @@ void daRamboo_c::executeState_Outro() { Vec tempPos = (Vec){this->pos.x + 160.0, this->pos.y - 80.0, 5500.0}; ret = ShrinkBoss(this, &tempPos, 15.0, this->timer); - if (ret) { - BossExplode(this, &tempPos); + if (ret == true) { + BossExplode(this, &tempPos); + this->dying = 1; + this->timer = 0; } else { PlaySound(this, SE_EMY_BIG_TERESA_DEAD); diff --git a/src/bossTopman.cpp b/src/bossTopman.cpp index e17c2b1..b538131 100644 --- a/src/bossTopman.cpp +++ b/src/bossTopman.cpp @@ -550,7 +550,11 @@ void daDreidel::updateModelMatrices() { bool ret; ret = ShrinkBoss(this, &this->pos, 0.5, this->timer); - if (ret) { BossExplode(this, &this->pos); } + if (ret == true) { + BossExplode(this, &this->pos); + this->dying = 1; + this->timer = 0; + } else { PlaySound(this, SE_EMY_BUBBLE_EXTINCT); } this->timer += 1; -- cgit v1.2.3