diff options
Diffstat (limited to 'src/bossThwompaDomp.cpp')
-rw-r--r-- | src/bossThwompaDomp.cpp | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/src/bossThwompaDomp.cpp b/src/bossThwompaDomp.cpp index 75aafdd..c821e12 100644 --- a/src/bossThwompaDomp.cpp +++ b/src/bossThwompaDomp.cpp @@ -29,6 +29,7 @@ extern "C" void *UpdateGameMgr(); class daEnMegaDosun_c : public dEn_c { int onCreate(); + int onDelete(); int onExecute(); int onDraw(); @@ -56,15 +57,10 @@ class daEnMegaDosun_c : public dEn_c { dEn_c *Kameck; void setupBodyModel(); - void updateModelMatrices(); - - void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat7_WMWaggleWater(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat7_WMWaggleWaterYoshi(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); @@ -74,7 +70,6 @@ class daEnMegaDosun_c : public dEn_c { DECLARE_STATE(UpWait); DECLARE_STATE(DownMoveWait); DECLARE_STATE(PuruMove); - DECLARE_STATE(DownMoveKameck); DECLARE_STATE(DownMove); DECLARE_STATE(DownWait); DECLARE_STATE(UpMove); @@ -85,7 +80,6 @@ class daEnMegaDosun_c : public dEn_c { CREATE_STATE(daEnMegaDosun_c, UpWait); CREATE_STATE(daEnMegaDosun_c, DownMoveWait); CREATE_STATE(daEnMegaDosun_c, PuruMove); -CREATE_STATE(daEnMegaDosun_c, DownMoveKameck); CREATE_STATE(daEnMegaDosun_c, DownMove); CREATE_STATE(daEnMegaDosun_c, DownWait); CREATE_STATE(daEnMegaDosun_c, UpMove); @@ -97,6 +91,18 @@ daEnMegaDosun_c *daEnMegaDosun_c::build() { return new(buffer) daEnMegaDosun_c; } + +// Collisions + void daEnMegaDosun_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } + bool daEnMegaDosun_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } + void daEnMegaDosun_c::collisionCat7_WMWaggleWater(ActivePhysics *apThis, ActivePhysics *apOther) { } + void daEnMegaDosun_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { } + void daEnMegaDosun_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { } + void daEnMegaDosun_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { } + void daEnMegaDosun_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { } + + + void daEnMegaDosun_c::setupBodyModel() { allocator.link(-1, GameHeaps[0], 0, 0x20); @@ -105,7 +111,7 @@ void daEnMegaDosun_c::setupBodyModel() { bodyModel.setup(mdl, &allocator, 0x224, 1, 0); SetupTextures_Enemy(&bodyModel, 0); - nw4r::g3d::ResAnmVis anmRes = this->resFile.GetResAnmVis("dossun_big"); + nw4r::g3d::ResAnmVis anmRes = this->resFile.GetResAnmVis("dossun"); this->anmVis.setup(mdl, anmRes, &this->allocator, 0); this->anmVis.bind(&bodyModel, anmRes, 1); @@ -147,9 +153,9 @@ int daEnMegaDosun_c::onCreate() { OSReport("this->collMgr.Init(this,(u8*)&this->collision_struct,(u8*)&s3,0);\n"); this->collMgr.Init(this,(u8*)&this->collision_struct,(u8*)&s3,0); - this->pos_delta2.x = 0.0; - this->pos_delta2.y = 36.0; - this->pos_delta2.z = 0.0; + // this->pos_delta2.x = 0.0; + // this->pos_delta2.y = 36.0; + // this->pos_delta2.z = 0.0; this->_320 = 0.0; this->_324 = 48.0; @@ -183,7 +189,6 @@ int daEnMegaDosun_c::onCreate() { int daEnMegaDosun_c::onExecute() { - acState.execute(); int ret = this->checkZoneBoundaries(0); @@ -192,24 +197,23 @@ int daEnMegaDosun_c::onExecute() { doStateChange(&StateID_Outro); } - return 1; -} - - -int daEnMegaDosun_c::onDraw() { - bodyModel.scheduleForDrawing(); return true; } - -void daEnMegaDosun_c::updateModelMatrices() { - // This won't work with wrap because I'm lazy. +int daEnMegaDosun_c::onDraw() { matrix.translation(pos.x, pos.y, pos.z); matrix.applyRotationYXZ(&rot.x, &rot.y, &rot.z); bodyModel.setDrawMatrix(matrix); bodyModel.setScale(&scale); bodyModel.calcWorld(false); + + bodyModel.scheduleForDrawing(); + return true; +} + +int daEnMegaDosun_c::onDelete() { + return true; } @@ -331,13 +335,13 @@ void daEnMegaDosun_c::updateModelMatrices() { // StateID_DownMoveWait void daEnMegaDosun_c::beginState_DownMoveWait() { - this->anmVis.playState = 1; + // this->anmVis.playState = 1; this->bodyModel.bindAnim(&this->anmVis, 0.5); } void daEnMegaDosun_c::executeState_DownMoveWait() { - if(this->anmVis.isAnimationDone()) - this->doStateChange(&StateID_PuruMove); - this->anmVis.process(); + // if(this->anmVis.isAnimationDone()) + // this->doStateChange(&StateID_PuruMove); + // this->anmVis.process(); } void daEnMegaDosun_c::endState_DownMoveWait() { return; @@ -367,7 +371,7 @@ void daEnMegaDosun_c::updateModelMatrices() { return; } -//StateID_DownMove +// StateID_DownMove void daEnMegaDosun_c::beginState_DownMove() { OSReport("beginState_DownMove()\n"); this->speed.y = 0.0; @@ -418,11 +422,11 @@ void daEnMegaDosun_c::updateModelMatrices() { } else{ this->countdownTimer--; - if(this->countdownTimer & 0xff == 0x20) - this->anmVis.playState = 3; + // if(this->countdownTimer & 0xff == 0x20) + // this->anmVis.playState = 3; } - this->anmVis.process(); + // this->anmVis.process(); } void daEnMegaDosun_c::endState_DownWait() { return; |