From 128ab59a90b26c54e18f8823adc26d37115fb5f5 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Thu, 29 Mar 2012 11:09:35 -0500 Subject: just adding changes in case --- NewerProject.yaml | 1 + bossCaptainBowser.yaml | 62 ++++++++++++++++++++++++++++++-- kamek_pal.x | 3 ++ src/bossCaptainBowser.cpp | 91 +++++++++++++++++++++++++++++------------------ src/koopatlas/map.cpp | 4 +-- 5 files changed, 121 insertions(+), 40 deletions(-) diff --git a/NewerProject.yaml b/NewerProject.yaml index b2c9693..c308818 100644 --- a/NewerProject.yaml +++ b/NewerProject.yaml @@ -5,6 +5,7 @@ modules: - processed/magicplatform.yaml - processed/bugfixes.yaml - processed/worldmap.yaml + # - processed/koopatlas.yaml - processed/levelnames.yaml - processed/animtiles.yaml - processed/soundPlayer.yaml diff --git a/bossCaptainBowser.yaml b/bossCaptainBowser.yaml index 3901aec..1b4fe5c 100644 --- a/bossCaptainBowser.yaml +++ b/bossCaptainBowser.yaml @@ -7,6 +7,56 @@ source_files: [../src/bossPlayerClown.cpp, ../src/bossCaptainBowser.cpp, ../src/bossKoopaThrow.cpp, ../src/bossFlameThrower.cpp] hooks: + + ################################################ + # HOOKS FOR BRIDGE BOWSER + ################################################ + # - name: PatchMagicExecute + # type: patch + # addr_pal: 0x80954BF4 + # data: '807CF460' + + # - name: PatchMagicStart + # type: patch + # addr_pal: 0x80954BF8 + # data: '807CCE10' + + - name: PatchMagicStart + type: add_func_pointer + src_addr_pal: 0x80954BF8 + target_func: 'BowserDoom(dStageActor_c *)' + + - name: PatchMagicStartTwo + type: add_func_pointer + src_addr_pal: 0x80954BF0 + target_func: 'BowserDoom(dStageActor_c *)' + + # - name: PatchMagicStartThree + # type: add_func_pointer + # src_addr_pal: 0x80954BF4 + # target_func: 'BowserDoom(dStageActor_c *)' + + # - name: PatchMagicStartFour + # type: add_func_pointer + # src_addr_pal: 0x80954BEC + # target_func: 'BowserDoom(dStageActor_c *)' + +# Mario Fanfare and animation +# Kameck spawns and does his demo state +# Kameck does his other demo state +# Bowser Emerges from the pit +# Kameck gets killed with a hit effect +# Both bowser and Kameck continue their jump arc +# Players regain control as last vestiges of effect disappear +# Bowser finishes his jump state and moves into his roar state +# Camera starts to move right automatically +# Bowser shoots a fireball +# Players finally regain control of the camera + + + ################################################ + # HOOKS FOR CAPTAIN BOWSER + ################################################ - name: BossCaptainBoswerBuild type: add_func_pointer src_addr_pal: 0x80955978 @@ -29,7 +79,9 @@ hooks: # Each string is an arcname to load - + ################################################ + # HOOKS FOR KOOPA THROW + ################################################ - name: KoopaThrowBuild type: add_func_pointer src_addr_pal: 0x80981960 @@ -49,6 +101,9 @@ hooks: # 0x8031AB4C + sprite num * 0x4 == offset + ################################################ + # HOOKS FOR KOOPA FLAME THROWER + ################################################ - name: KFlameThrowerBuild type: add_func_pointer src_addr_pal: 0x80981A3C @@ -62,8 +117,9 @@ hooks: # 0x8030A340 + sprite num * 0x28 == offset - - + ################################################ + # HOOKS FOR CLOWN CAR + ################################################ - name: ClownCarFloor type: patch addr_pal: 0x80810A40 diff --git a/kamek_pal.x b/kamek_pal.x index 9839dec..10e75c2 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -22,6 +22,9 @@ SECTIONS { getEffectiveScreenLeft__19ClassWithCameraInfoFv = 0x80082240; instance__19ClassWithCameraInfo = 0x8042A0E0; + BowserExtiDemoState = 0x8005B5D0; + MagicEnd = 0x807CCE10; + /* Back to other shit I didn't want to scroll for */ GlobalTickCount = 0x8042A648; 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 #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; -- cgit v1.2.3