From 12e4a674748be41a0105f6a7b3b8132d0a3a65b4 Mon Sep 17 00:00:00 2001 From: Colin Noga Date: Mon, 27 Feb 2012 12:34:05 -0600 Subject: More boss related junk --- src/bossFuzzyBear.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index 4e11f29..1c9ab89 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -7,6 +7,15 @@ #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(); @@ -337,25 +346,22 @@ void daFuzzyBear_c::beginState_Grow() { StopBGMMusic(); + dStage32C_c::instance->freezeMarioBossFlag = 1; // 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 = (daKameckDemo*)createChild(KAMECK_FOR_CASTLE_DEMO, (dStageActor_c*)this, 0, &pos, &rot, 0); - Kameck->doStateChange(&StateID_DemoWait); + Kameck->doStateChange(&daKameckDemo::StateID_DemoWait); } void daFuzzyBear_c::executeState_Grow() { - if (this->timer == 30) { Kameck->doStateChange(&StateID_DemoSt); } - if (this->timer == 90) { Kameck->doStateChange(&StateID_DemoSt2); } + if (this->timer == 30) { Kameck->doStateChange(&daKameckDemo::StateID_DemoSt); } + if (this->timer == 90) { Kameck->doStateChange(&daKameckDemo::StateID_DemoSt2); } this->timer = this->timer + 1; @@ -388,6 +394,8 @@ void daFuzzyBear_c::executeState_Grow() { void daFuzzyBear_c::endState_Grow() { this->Baseline = this->pos.y; + dStage32C_c::instance->freezeMarioBossFlag = 0; + // Store 0 to PointerToStage32C @ 0x15C - This should unfreeze Mario // PlaySound(this, STRM_BGM_TORIDE_BOSS); @@ -769,6 +777,7 @@ void daFuzzyBear_c::beginState_Outro() { this->timer = 0; StopBGMMusic(); // Store 1 to PointerToStage32C @ 0x15C - This should freeze Mario + dStage32C_c::instance->freezeMarioBossFlag = 1; } void daFuzzyBear_c::executeState_Outro() { -- cgit v1.2.3