diff options
Diffstat (limited to '')
-rw-r--r-- | bossCaptainBowser.yaml | 15 | ||||
-rw-r--r-- | kamek_pal.x | 9 | ||||
-rw-r--r-- | src/bossCaptainBowser.cpp | 217 | ||||
-rw-r--r-- | tools/mapfile_tool.pyc | bin | 5950 -> 6073 bytes |
4 files changed, 165 insertions, 76 deletions
diff --git a/bossCaptainBowser.yaml b/bossCaptainBowser.yaml index 1b4fe5c..30dc91d 100644 --- a/bossCaptainBowser.yaml +++ b/bossCaptainBowser.yaml @@ -23,13 +23,18 @@ hooks: - name: PatchMagicStart type: add_func_pointer - src_addr_pal: 0x80954BF8 - target_func: 'BowserDoom(dStageActor_c *)' + src_addr_pal: 0x80954BF0 + target_func: 'BowserDoomStart(dStageActor_c *)' - - name: PatchMagicStartTwo + - name: PatchMagicExecute type: add_func_pointer - src_addr_pal: 0x80954BF0 - target_func: 'BowserDoom(dStageActor_c *)' + src_addr_pal: 0x80954BF4 + target_func: 'BowserDoomExecute(dStageActor_c *)' + + - name: PatchMagicEnd + type: add_func_pointer + src_addr_pal: 0x80954BF8 + target_func: 'BowserDoomEnd(dStageActor_c *)' # - name: PatchMagicStartThree # type: add_func_pointer diff --git a/kamek_pal.x b/kamek_pal.x index 5ca1042..cea244a 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -16,7 +16,7 @@ SECTIONS { getEffectiveScreenLeft__19ClassWithCameraInfoFv = 0x80082240; instance__19ClassWithCameraInfo = 0x8042A0E0; - BowserExtiDemoState = 0x8005B5D0; + BowserExitDemoState = 0x8005B5D0; MagicEnd = 0x807CCE10; /* Back to other shit I didn't want to scroll for */ @@ -84,10 +84,15 @@ SECTIONS { instance__11dStage32C_c = 0x8042A1F0; instance__7WLClass = 0x80429F74; + ShakeScreen = 0x800D8A50; + StageScreen = 0x8042A2E8; + createChild__13dStageActor_cF6ActorsP13dStageActor_cUiP7Point3dP6S16VecUc = 0x80064680; GameMgrBossEndFunc = 0x8001CDB0; MakeMarioEnterDemoMode = 0x807C7F50; MakeMarioExitDemoMode = 0x8005CA50; + ForceMarioExitDemoMode = 0x8005CA50; + ResetPlayerState = 0x80052170; UpdateGameMgr = 0x8001CDB0; UnsetShit = 0x80056CB0; @@ -337,7 +342,7 @@ SECTIONS { blockUpdate__15daEnBlockMain_cFv = 0x800217B0; blockResult__15daEnBlockMain_cFv = 0x800212C0; PhysicsCallback1__15daEnBlockMain_c = 0x80021180; - PhysicsCallback2__15daEnBlockMain_c = 0x80021170; + g = 0x80021170; PhysicsCallback3__15daEnBlockMain_c = 0x800211A0; OPhysicsCallback1__15daEnBlockMain_c = 0x80020BF0; OPhysicsCallback2__15daEnBlockMain_c = 0x80020E70; diff --git a/src/bossCaptainBowser.cpp b/src/bossCaptainBowser.cpp index 0f1cf96..c894ecd 100644 --- a/src/bossCaptainBowser.cpp +++ b/src/bossCaptainBowser.cpp @@ -5,14 +5,32 @@ #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(); +extern "C" void *BowserExitDemoState(void *, unsigned int); +extern "C" void *ForceMarioExitDemoMode(void *, unsigned int); +extern "C" void *ShakeScreen(void *, unsigned int, unsigned int, unsigned int); +extern "C" void *StageScreen; + + +void BowserDoomStart(dStageActor_c *Controller) { + OSReport("Here we go!"); + + dEn_c *Bowser = (dEn_c*)FindActorByType(EN_BOSS_KOOPA, (Actor*)Controller); + Bowser->Delete(1); + +} + +void BowserDoomExecute(dStageActor_c *Controller) { + dFlagMgr_c::instance->set(0, 0, true, false, false); + dFlagMgr_c::instance->set(1, 0, true, false, false); + dFlagMgr_c::instance->set(2, 0, true, false, false); + dFlagMgr_c::instance->set(3, 0, true, false, false); + dFlagMgr_c::instance->set(4, 0, true, false, false); + Controller->Delete(1); +} + +void BowserDoomEnd(dStageActor_c *Controller) { + OSReport("Bai bai everybody"); + Controller->Delete(1); } @@ -76,12 +94,14 @@ public: char isAngry; char isInvulnerable; + char isIntro; float scaleIncreaser; int homingBillCountdown; int homingBillSlot; int maxDamage; int playerCount; float sinTimer; + float roarLen; static daCaptainBowser *build(); @@ -110,23 +130,6 @@ daCaptainBowser *daCaptainBowser::build() { return new(buffer) daCaptainBowser; } -void ShipPhysicsCallback(daCaptainBowser *self, dEn_c *other) { - if (other->name == 657) { - OSReport("CANNON COLLISION"); - if (self->isInvulnerable) { - return; - } - self->damage -= 1; - - 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); } - } -} - /////////////////////// // Externs and States /////////////////////// @@ -169,6 +172,23 @@ void ShipPhysicsCallback(daCaptainBowser *self, dEn_c *other) { } } + void ShipPhysicsCallback(daCaptainBowser *self, dEn_c *other) { + if (other->name == 657) { + OSReport("CANNON COLLISION"); + if (self->isInvulnerable) { + return; + } + self->damage -= 1; + + 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); } + } + } + void daCaptainBowser::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } @@ -214,7 +234,7 @@ int daCaptainBowser::onCreate() { // Prep the goods this->playerCount = GetActivePlayerCount(); - this->maxDamage = (10* this->playerCount) +10; + this->maxDamage = (10 * this->playerCount) + 10; this->scale = (Vec){0.57, 0.57, 0.57}; @@ -277,7 +297,8 @@ int daCaptainBowser::onCreate() { // State Changers - doStateChange(&StateID_Wait); + this->isIntro = 3; + doStateChange(&StateID_Intro); return true; } @@ -295,49 +316,51 @@ 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; + if(this->isIntro == 0) { - pos.x = ClassWithCameraInfo::instance->screenCentreX + 200.0 + xmod; - pos.y = ClassWithCameraInfo::instance->screenCentreY - 180.0 + ymod; + float xmod = sin(this->sinTimer * 3.14 / 180.0) * 80.0; + float ymod = sin(this->sinTimer * 3.14 / 130.0) * 112.0; - this->sinTimer++; - - // this->homingBillCountdown--; - - // if (this->homingBillCountdown == 0) { + pos.x = ClassWithCameraInfo::instance->screenCentreX + 200.0 + xmod; + pos.y = ClassWithCameraInfo::instance->screenCentreY - 180.0 + ymod; + + this->sinTimer++; + } + // this->homingBillCountdown--; - // 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->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; + // } if(this->shipAnm.isAnimationDone()) { this->shipAnm.setCurrentFrame(0.0); @@ -347,6 +370,9 @@ int daCaptainBowser::onExecute() { } int daCaptainBowser::onDraw() { + + if(this->isIntro > 2) { return false; } + matrix.translation(pos.x-146.0, pos.y+122.0, pos.z-200.0); // 136.0 is the bottom of the platform footing short newrot = rot.y + 0xD800; matrix.applyRotationYXZ(&rot.x, &newrot, &rot.z); @@ -376,12 +402,65 @@ int daCaptainBowser::onDraw() { // State Intro ////////////////// void daCaptainBowser::beginState_Intro() { - + this->timer = 0; + bindAnimChr_and_setUpdateRate("kp_wait", 1, 0.0, 1.5); + this->isInvulnerable = 1; + roarLen = 300; } void daCaptainBowser::executeState_Intro() { + if (this->chrAnimation.isAnimationDone()) { + // End the intro + if (this->isIntro == 1) { + OSReport("We're done: %d", this->timer); + doStateChange(&StateID_Wait); + return; + } + this->chrAnimation.setCurrentFrame(0.0); } + + // Screen Rumble + // if ((this->timer > 180) && (this->timer < 420)) { + if (this->timer == 180) { + // Do Rumbly - 807CD3AC + + pos.x = ClassWithCameraInfo::instance->screenCentreX; + pos.y = ClassWithCameraInfo::instance->screenCentreY; + + ShakeScreen(StageScreen, 5, 1, 0); + OSReport("Shit Happens"); + PlaySound(this, SE_BOSS_KOOPA_RUMBLE1); // 0x5D4 + // Stage80::instance->ShakeScreen(self, 5, 1, 0); + } + + // Bowser Flies In + if (this->timer == 422) { this->isIntro = 2; } + if ((this->timer > 420) && (this->timer < (420 + roarLen))) { + pos.x = ClassWithCameraInfo::instance->screenCentreX + ((this->timer - 420.0) * 1.5) - ((roarLen * 1.5) - 200.0); + pos.y = ClassWithCameraInfo::instance->screenCentreY - 380.0 + ((this->timer - 420.0) * 1.5) - ((roarLen * 1.5) - 200.0); + } + + // Bowser does a shitty roar + if (this->timer == (roarLen - 190 + 420)) { + this->isIntro = 1; + bindAnimChr_and_setUpdateRate("kp_roar3", 1, 0.0, 1.0); + } + if (this->timer > (roarLen - 190 + 420)) { + + if (this->chrAnimation.getCurrentFrame() == 53.0) { + PlaySound(this, SE_VOC_KP_L_SHOUT); + } + + if (this->chrAnimation.getCurrentFrame() > 53.0) { + effect.spawn("Wm_ko_shout", 0, &(Vec){pos.x-186.0, pos.y+144.0, pos.z}, &(S16Vec){0,0,0x7000}, &(Vec){1.0, 1.0, 1.0}); + } + } + + this->timer++; + } + void daCaptainBowser::endState_Intro() { + this->isInvulnerable = 0; + this->isIntro = 0; } - void daCaptainBowser::endState_Intro() { } ////////////////// diff --git a/tools/mapfile_tool.pyc b/tools/mapfile_tool.pyc Binary files differindex 4d4ecc6..71efb90 100644 --- a/tools/mapfile_tool.pyc +++ b/tools/mapfile_tool.pyc |