diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-02-27 11:52:36 -0600 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-02-27 11:52:36 -0600 |
commit | e45c4a7a24a6a58804261d73c14f008bff1b5a68 (patch) | |
tree | 31e735b607c67b9da54ad428780f9f6a8c5ca14a /src | |
parent | bd84055f01015239ad297fec687565976f592edd (diff) | |
download | kamek-e45c4a7a24a6a58804261d73c14f008bff1b5a68.tar.gz kamek-e45c4a7a24a6a58804261d73c14f008bff1b5a68.zip |
Started on boss junk
Diffstat (limited to 'src')
-rw-r--r-- | src/bossBalboaWrench.cpp | 12 | ||||
-rw-r--r-- | src/bossFuzzyBear.cpp | 69 | ||||
-rwxr-xr-x | src/spritetex.S | 2 |
3 files changed, 69 insertions, 14 deletions
diff --git a/src/bossBalboaWrench.cpp b/src/bossBalboaWrench.cpp index 1db7496..9760d8a 100644 --- a/src/bossBalboaWrench.cpp +++ b/src/bossBalboaWrench.cpp @@ -48,6 +48,8 @@ class daBalboa_c : public dEn_c { void collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + void collisionCat7_WMWaggleWater(ActivePhysics *apThis, ActivePhysics *apOther); + void collisionCat7_WMWaggleWaterYoshi(ActivePhysics *apThis, ActivePhysics *apOther); USING_STATES(daBalboa_c); DECLARE_STATE(Grow); @@ -124,12 +126,7 @@ void daBalboa_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) } } -void daBalboa_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { -} - -bool daBalboa_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit Iceball"); return false; } - -void daBalboa_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { +void daBalboa_c::collisionCat7_WMWaggleWater(ActivePhysics *apThis, ActivePhysics *apOther) { this->damage -= 1; apOther->someFlagByte |= 2; @@ -143,7 +140,8 @@ void daBalboa_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics } - +void daBalboa_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } +bool daBalboa_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit Iceball"); return false; } void daBalboa_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { } void daBalboa_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit Hammer"); } 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() { } diff --git a/src/spritetex.S b/src/spritetex.S index 31bc410..452d3d2 100755 --- a/src/spritetex.S +++ b/src/spritetex.S @@ -1032,7 +1032,7 @@ FlakeySnow: li r5, 0xFF li r4, 0xFF li r3, 0xFF - li r0, 0xFF + li r0, 0xA0 blr FlakeyLeavesRed: |