summaryrefslogtreecommitdiff
path: root/src/bossFuzzyBear.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bossFuzzyBear.cpp')
-rw-r--r--src/bossFuzzyBear.cpp77
1 files changed, 28 insertions, 49 deletions
diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp
index f22cf6c..b13955c 100644
--- a/src/bossFuzzyBear.cpp
+++ b/src/bossFuzzyBear.cpp
@@ -7,15 +7,6 @@
#include "player.h"
-class daKameckDemo : public dEn_c {
-
-public:
- USING_STATES(daKameckDemo);
- REF_NINTENDO_STATE(DemoWait);
- REF_NINTENDO_STATE(DemoSt);
- REF_NINTENDO_STATE(DemoSt2);
-};
-
class daFuzzyBear_c : public dEn_c {
int onCreate();
int onDelete();
@@ -83,11 +74,15 @@ extern "C" void *StopSound(int soundID);
extern "C" u32 GenerateRandomNumber(int max);
extern "C" dStageActor_c *CreateActor(u16 classID, int settings, Vec pos, char rot, char layer);
extern "C" u8 dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(daFuzzyBear_c *, Vec pos);
-extern "C" dStageActor_c *GetSpecificPlayerActor(int number);
+extern "C" dStageActor_c *GetSpecificPlayerActor(int num);
extern "C" void *StopBGMMusic();
extern "C" void *StartBGMMusic();
+extern "C" void *MakeMarioEnterDemoMode();
+extern "C" void *MakeMarioExitDemoMode();
+extern "C" void *UpdateGameMgr();
+
CREATE_STATE(daFuzzyBear_c, Grow);
CREATE_STATE(daFuzzyBear_c, Bounce);
@@ -311,33 +306,6 @@ 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() {
@@ -347,9 +315,16 @@ void daFuzzyBear_c::beginState_Grow() {
OSReport("Stopping the Music.\n");
StopBGMMusic();
- OSReport("Setting the boss flag.\n");
- // dStage32C_c::instance->freezeMarioBossFlag = 1;
-// Store 1 to PointerToStage32C @ 0x15C - This should freeze Mario - But it doesn't. Must do something though, right?
+ OSReport("Setting the boss flag. %p\n", dStage32C_c::instance);
+ OSReport("Boss flag is; %d\n", dStage32C_c::instance->freezeMarioBossFlag);
+ dStage32C_c::instance->freezeMarioBossFlag = 1;
+
+ MakeMarioEnterDemoMode();
+
+ OSReport("WLClass Flags are; %d and %d\n", WLClass::instance->_4, WLClass::instance->_8);
+
+ WLClass::instance->_4 = 4;
+ WLClass::instance->_8 = 0;
OSReport("Creating the Vecs.\n");
Vec pos = (Vec){this->pos.x - 124.0, this->pos.y + 104.0, 3564.0};
@@ -415,11 +390,11 @@ void daFuzzyBear_c::endState_Grow() {
this->Baseline = this->pos.y;
OSReport("Ending boss flag.\n");
- // dStage32C_c::instance->freezeMarioBossFlag = 0;
+ dStage32C_c::instance->freezeMarioBossFlag = 0;
+ WLClass::instance->_8 = 1;
- // Store 0 to PointerToStage32C @ 0x15C - This should unfreeze Mario
+ MakeMarioExitDemoMode();
- // PlaySound(this, STRM_BGM_TORIDE_BOSS);
OSReport("Ending BGMusic.\n");
StartBGMMusic();
@@ -798,11 +773,16 @@ void daFuzzyBear_c::endState_Wait() { }
void daFuzzyBear_c::beginState_Outro() {
+ MakeMarioEnterDemoMode();
+
+ WLClass::instance->_4 = 5;
+ WLClass::instance->_8 = 0;
+
this->removeMyActivePhysics();
this->timer = 0;
StopBGMMusic();
- // Store 1 to PointerToStage32C @ 0x15C - This should freeze Mario
- // dStage32C_c::instance->freezeMarioBossFlag = 1;
+
+ dStage32C_c::instance->freezeMarioBossFlag = 1;
}
void daFuzzyBear_c::executeState_Outro() {
@@ -814,6 +794,8 @@ void daFuzzyBear_c::executeState_Outro() {
if (this->timer == 60) {
+ UpdateGameMgr();
+
if (GetSpecificPlayerActor(0) != 0) {
PlaySound(this, SE_VOC_MA_CLEAR_BOSS);
// Send PlBase into DemoGoal State here, kthxbai
@@ -867,11 +849,8 @@ void daFuzzyBear_c::executeState_Outro() {
this->timer = 0;
PlaySound(this, STRM_BGM_SHIRO_BOSS_CLEAR);
-
- this->timer += 1;
+ MakeMarioEnterDemoMode();
}
-
-
}
void daFuzzyBear_c::endState_Outro() { }