summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinclude/game.h2
-rw-r--r--kamek_pal.x5
-rw-r--r--src/bossBalboaWrench.cpp12
-rw-r--r--src/bossFuzzyBear.cpp69
-rwxr-xr-xsrc/spritetex.S2
5 files changed, 75 insertions, 15 deletions
diff --git a/include/game.h b/include/game.h
index cceee66..6b6a9bd 100755
--- a/include/game.h
+++ b/include/game.h
@@ -1768,7 +1768,7 @@ public:
static void create(Actors type, u32 settings, Vec *pos, S16Vec *rot, u8 layer);
- static void createChild(Actors type, u32 settings, Vec *pos, S16Vec *rot, u8 layer);
+ static dStageActor_c *createChild(Actors type, dStageActor_c *parent, u32 settings, Vec *pos, S16Vec *rot, u8 layer);
// these are valid while in onCreate
static u8 *creatingByteStorage; // 0x80429FF4
diff --git a/kamek_pal.x b/kamek_pal.x
index 86b89e6..6a7c8c4 100644
--- a/kamek_pal.x
+++ b/kamek_pal.x
@@ -45,6 +45,11 @@ SECTIONS {
instance__13dCourseFull_c = 0x8042A178;
getRectByID__9dCourse_cFUcP5mRect = 0x8008E890;
+/* Boss Related */
+
+ StopBGMMusic = 0x807DB420;
+ StartBGMMusic = 0x807DB430;
+
/* Mr Sun Related */
ActivePhysics_InitWithStruct = 0x8008C3E0;
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: