diff options
Diffstat (limited to 'src/bossFuzzyBear.cpp')
-rw-r--r-- | src/bossFuzzyBear.cpp | 69 |
1 files changed, 63 insertions, 6 deletions
diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index 1b9cc99..4e11f29 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -35,6 +35,8 @@ class daFuzzyBear_c : public dEn_c { char roly; char isInvulnerable; + dEn_c *Kameck; + static daFuzzyBear_c *build(); void bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate); @@ -74,6 +76,9 @@ extern "C" dStageActor_c *CreateActor(u16 classID, int settings, Vec pos, char r extern "C" u8 dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(daFuzzyBear_c *, Vec pos); extern "C" dStageActor_c *GetSpecificPlayerActor(int number); +extern "C" void *StopBGMMusic(); +extern "C" void *StartBGMMusic(); + CREATE_STATE(daFuzzyBear_c, Grow); CREATE_STATE(daFuzzyBear_c, Bounce); @@ -84,9 +89,6 @@ CREATE_STATE(daFuzzyBear_c, Wait); CREATE_STATE(daFuzzyBear_c, Outro); -#define ACTIVATE 1 -#define DEACTIVATE 0 - void daFuzzyBear_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { @@ -300,14 +302,61 @@ void daFuzzyBear_c::updateModelMatrices() { } +// How to Start the Level, by Tempus +// +// Turn off the BGM (0x808B1670 ?) +// Store 1 to PointerToStage32C @ 0x15C - This should freeze Mario +// +// Spawn sprite 0x1E as a child actor - You'll need to tweak the position just right! +// It has three states - DemoWait, DemoSt, DemoSt2 - You'll need to trigger them by setting them with the REF_NINTENDO_STATE macro +// Make sure to get the timing right! +// You might also want to use RemoveUnwantedFireballsAndOtherMarioShit. I dunno. +// +// Store 0 to PointerToStage32C @ 0x15C - This should unfreeze Mario +// Start The BGM again (0x808B1680 ?) +// +// +// How to end the Level, by Tempus +// +// Turn off the BGM (0x808B1670 ?) +// +// Store 1 to PointerToStage32C @ 0x15C - This should freeze Mario +// Do the necessary shrinking actions and effect junk +// Do the Mario animation and play the victory sound? +// End the stage with WORLD_MAP, 0, 0, 4 +// +// +// + + // Grow State void daFuzzyBear_c::beginState_Grow() { OSReport("Growing when Kameck Tells me to."); this->timer = 0; + + StopBGMMusic(); + +// Store 1 to PointerToStage32C @ 0x15C - This should freeze Mario - Unimplemented because I don't know how to ref the class + + Vec pos = (Vec){this->pos.x+40.0, this->pos.y + 80.0, 3564.0}; + S16Vec rot = (S16Vec){0, 0, 0}; + + Kameck = (dEn_c*)createChild(KAMECK_FOR_CASTLE_DEMO, (dStageActor_c*)this, 0, &pos, &rot, 0); + USING_STATES(dEn_c); + REF_NINTENDO_STATE(DemoWait); + REF_NINTENDO_STATE(DemoSt); + REF_NINTENDO_STATE(DemoSt2); + + Kameck->doStateChange(&StateID_DemoWait); } void daFuzzyBear_c::executeState_Grow() { + + + if (this->timer == 30) { Kameck->doStateChange(&StateID_DemoSt); } + if (this->timer == 90) { Kameck->doStateChange(&StateID_DemoSt2); } + this->timer = this->timer + 1; @@ -338,8 +387,11 @@ void daFuzzyBear_c::executeState_Grow() { } void daFuzzyBear_c::endState_Grow() { this->Baseline = this->pos.y; - - PlaySound(this, STRM_BGM_TORIDE_BOSS); + + // Store 0 to PointerToStage32C @ 0x15C - This should unfreeze Mario + + // PlaySound(this, STRM_BGM_TORIDE_BOSS); + StartBGMMusic(); OSReport("OK. All grown up now."); } @@ -715,6 +767,8 @@ void daFuzzyBear_c::beginState_Outro() { this->removeMyActivePhysics(); this->timer = 0; + StopBGMMusic(); + // Store 1 to PointerToStage32C @ 0x15C - This should freeze Mario } void daFuzzyBear_c::executeState_Outro() { @@ -766,6 +820,8 @@ void daFuzzyBear_c::executeState_Outro() { CreateEffect(&this->pos, &(S16Vec){0,0,0}, &(Vec){2.0, 2.0, 2.0}, 957); this->timer = 0; } + + this->timer += 1; } else { this->scale.x = 0.0; @@ -777,9 +833,10 @@ void daFuzzyBear_c::executeState_Outro() { this->timer = 0; PlaySound(this, STRM_BGM_SHIRO_BOSS_CLEAR); + + this->timer += 1; } - this->timer += 1; } void daFuzzyBear_c::endState_Outro() { } |