diff options
Diffstat (limited to '')
-rw-r--r-- | src/bossCaptainBowser.cpp | 91 | ||||
-rw-r--r-- | src/koopatlas/map.cpp | 4 |
2 files changed, 58 insertions, 37 deletions
diff --git a/src/bossCaptainBowser.cpp b/src/bossCaptainBowser.cpp index a9c36b4..0f1cf96 100644 --- a/src/bossCaptainBowser.cpp +++ b/src/bossCaptainBowser.cpp @@ -5,6 +5,15 @@ #include <stage.h> #include "boss.h" +extern "C" void *BowserExtiDemoState(void *, unsigned int); +extern "C" void *MagicEnd(dStageActor_c *); + +void BowserDoom(dStageActor_c *Controller) { + OSReport("THERE IS A FUCKING STATE HERE"); + BowserExtiDemoState(WLClass::instance, 1); + MagicEnd(Controller); + // MakeMarioExitDemoMode(); +} // const char* effects_name_list [] = { @@ -72,6 +81,7 @@ public: int homingBillSlot; int maxDamage; int playerCount; + float sinTimer; static daCaptainBowser *build(); @@ -108,7 +118,9 @@ void ShipPhysicsCallback(daCaptainBowser *self, dEn_c *other) { } self->damage -= 1; - other->doStateChange(&dEn_c::StateID_DieFumi); + SpawnEffect("Wm_en_burst_m", 0, &other->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); + PlaySound(other, SE_OBJ_TARU_BREAK); + other->Delete(1); if (self->damage == self->maxDamage/2) { self->doStateChange(&daCaptainBowser::StateID_Roar); } else if (self->damage < 0) { self->doStateChange(&daCaptainBowser::StateID_Outro); } @@ -147,7 +159,9 @@ void ShipPhysicsCallback(daCaptainBowser *self, dEn_c *other) { spawnHitEffectAtPosition((Vec2){apOther->owner->pos.x, apOther->owner->pos.y}); - ((dEn_c*)(apOther->owner))->doStateChange(&dEn_c::StateID_DieFumi); + SpawnEffect("Wm_en_burst_m", 0, &apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); + PlaySound(apOther->owner, SE_BOSS_CMN_STOMPED); + apOther->owner->Delete(1); if (this->damage == this->maxDamage/2) { doStateChange(&StateID_Roar); } else if (this->damage < 0) { doStateChange(&StateID_Outro); } @@ -281,42 +295,49 @@ int daCaptainBowser::onExecute() { bodyModel._vf1C(); shipModel._vf1C(); + float xmod = sin(this->sinTimer * 3.14 / 180.0) * 80.0; + float ymod = sin(this->sinTimer * 3.14 / 130.0) * 112.0; + + pos.x = ClassWithCameraInfo::instance->screenCentreX + 200.0 + xmod; + pos.y = ClassWithCameraInfo::instance->screenCentreY - 180.0 + ymod; - this->homingBillCountdown--; + this->sinTimer++; - if (this->homingBillCountdown == 0) { + // this->homingBillCountdown--; + + // if (this->homingBillCountdown == 0) { - Vec tempPos; - - switch (this->homingBillSlot) { - case 0: - this->homingBillSlot++; - tempPos.x = this->pos.x - 26.0; - tempPos.y = this->pos.y + 40.0; - tempPos.z = this->pos.z + 2000.0; - break; - - case 1: - this->homingBillSlot++; - tempPos.x = this->pos.x + 22.0; - tempPos.y = this->pos.y + 40.0; - tempPos.z = this->pos.z + 2000.0; - break; - - case 2: - this->homingBillSlot = 0; - tempPos.x = this->pos.x + 70.0; - tempPos.y = this->pos.y + 40.0; - tempPos.z = this->pos.z + 2000.0; - break; - } - - SpawnEffect("Wm_en_killervanish", 0, &tempPos, &(S16Vec){0,0,0}, &(Vec){0.1, 0.1, 0.1}); - PlaySoundAsync(this, SE_EMY_SR_KILLER_SHOT); - CreateActor(EN_SEARCH_KILLER, 0, tempPos, 0, 0); - - this->homingBillCountdown = (isAngry) ? 90: 180; - } + // Vec tempPos; + + // switch (this->homingBillSlot) { + // case 0: + // this->homingBillSlot++; + // tempPos.x = this->pos.x - 26.0; + // tempPos.y = this->pos.y + 40.0; + // tempPos.z = this->pos.z + 2000.0; + // break; + + // case 1: + // this->homingBillSlot++; + // tempPos.x = this->pos.x + 22.0; + // tempPos.y = this->pos.y + 40.0; + // tempPos.z = this->pos.z + 2000.0; + // break; + + // case 2: + // this->homingBillSlot = 0; + // tempPos.x = this->pos.x + 70.0; + // tempPos.y = this->pos.y + 40.0; + // tempPos.z = this->pos.z + 2000.0; + // break; + // } + + // SpawnEffect("Wm_en_killervanish", 0, &tempPos, &(S16Vec){0,0,0}, &(Vec){0.1, 0.1, 0.1}); + // PlaySoundAsync(this, SE_EMY_SR_KILLER_SHOT); + // CreateActor(EN_SEARCH_KILLER, 0, tempPos, 0, 0); + + // this->homingBillCountdown = (isAngry) ? 90: 180; + // } if(this->shipAnm.isAnimationDone()) { this->shipAnm.setCurrentFrame(0.0); diff --git a/src/koopatlas/map.cpp b/src/koopatlas/map.cpp index 258cf7c..4b90cb7 100644 --- a/src/koopatlas/map.cpp +++ b/src/koopatlas/map.cpp @@ -41,8 +41,8 @@ dWMMap_c::dWMMap_c() { int dWMMap_c::onCreate() { renderer.allocator.setup(GameHeaps[0], 0x20); bool result = renderer.setup(&renderer.allocator); - if (result) - else + // if (result) + // else bgMatrix.translation(1140.0f, -2910.0f, -500.0f); s16 rot = 0x4000; |