diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-19 12:34:03 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-19 12:34:03 -0500 |
commit | 80e51e409ca322ff22431be8a33131d2f705a8c7 (patch) | |
tree | 5bef52720cfe6040733b6124fcd8913e644cd8c0 /src/bossRamboo.cpp | |
parent | ddda772916cf78e05fa96bb8782cd9f81a9ed852 (diff) | |
download | kamek-80e51e409ca322ff22431be8a33131d2f705a8c7.tar.gz kamek-80e51e409ca322ff22431be8a33131d2f705a8c7.zip |
fuzzy updates, ramboo updates, playing around with ramboo anmChrs, and added the beginnings of BalboaWrench
Diffstat (limited to '')
-rw-r--r-- | src/bossRamboo.cpp | 140 |
1 files changed, 101 insertions, 39 deletions
diff --git a/src/bossRamboo.cpp b/src/bossRamboo.cpp index 15304c5..6bc7e51 100644 --- a/src/bossRamboo.cpp +++ b/src/bossRamboo.cpp @@ -14,18 +14,19 @@ class daRamboo_c : public dEn_c { mHeapAllocator_c allocator; m3d::mdl_c bodyModel; + m3d::mdl_c hideModel; m3d::mdl_c fogModel; nw4r::g3d::ResFile resFile; - m3d::anmChr_c animationChrA; - m3d::anmChr_c animationChrB; - m3d::anmChr_c animationChrC; - m3d::anmChr_c animationChrD; - + m3d::anmChr_c anmFog; + m3d::anmChr_c anmWaitA; + m3d::anmChr_c anmShayA; + m3d::anmChr_c anmWaitB; + m3d::anmChr_c anmShayB; int timer; int ytimer; - char BigBossRamboo; + char Hiding; float Baseline; float dying; @@ -123,25 +124,33 @@ void daRamboo_c::setupModels() { bool ret; nw4r::g3d::ResMdl mdl = this->resFile.GetResMdl("fog"); - fogModel.setup(mdl, &allocator, 0x224, 1, 0); - SetupTextures_Enemy(&fogModel, 0); + this->fogModel.setup(mdl, &allocator, 0x224, 1, 0); + SetupTextures_Enemy(&this->fogModel, 0); nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr("fog"); - ret = this->animationChrA.setup(mdl, anmChr, &this->allocator, 0); + ret = this->anmFog.setup(mdl, anmChr, &this->allocator, 0); nw4r::g3d::ResMdl mdlB = this->resFile.GetResMdl("teresaA"); - bodyModel.setup(mdlB, &allocator, 0x224, 1, 0); - SetupTextures_Enemy(&bodyModel, 0); - - nw4r::g3d::ResAnmChr anmChrB = this->resFile.GetResAnmChr("move_cartain"); - ret = this->animationChrB.setup(mdlB, anmChrB, &this->allocator, 0); + this->bodyModel.setup(mdlB, &allocator, 0x224, 1, 0); + SetupTextures_Enemy(&this->bodyModel, 0); nw4r::g3d::ResAnmChr anmChrC = this->resFile.GetResAnmChr("shay_teresaA"); - ret = this->animationChrC.setup(mdlB, anmChrC, &this->allocator, 0); + ret = this->anmShayA.setup(mdlB, anmChrC, &this->allocator, 0); nw4r::g3d::ResAnmChr anmChrD = this->resFile.GetResAnmChr("wait"); - ret = this->animationChrD.setup(mdlB, anmChrD, &this->allocator, 0); + ret = this->anmWaitA.setup(mdlB, anmChrD, &this->allocator, 0); + + + nw4r::g3d::ResMdl mdlC = this->resFile.GetResMdl("teresaB"); + this->hideModel.setup(mdlC, &allocator, 0x224, 1, 0); + SetupTextures_Enemy(&this->bodyModel, 0); + + nw4r::g3d::ResAnmChr anmChrE = this->resFile.GetResAnmChr("shay_teresaB"); + ret = this->anmShayB.setup(mdlC, anmChrE, &this->allocator, 0); + + nw4r::g3d::ResAnmChr anmChrF = this->resFile.GetResAnmChr("shay_teresaB_wait"); + ret = this->anmWaitB.setup(mdlC, anmChrF, &this->allocator, 0); allocator.unlink(); } @@ -185,6 +194,7 @@ int daRamboo_c::onCreate() { this->rot.y = 0xE000; // Y is horizontal axis this->rot.z = 0; // Z is ... an axis >.> this->direction = 0; // Heading left. + this->Hiding = 0; this->speed.x = 0.0; this->ytimer = 0; @@ -194,7 +204,10 @@ int daRamboo_c::onCreate() { this->eventFlag = (u64)1 << (eventNum - 1); - bindAnimChr_and_setUpdateRates("fog", this->animationChrA, this->fogModel, 1.0); + nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr("fog"); + this->anmFog.bind(&this->fogModel, anmChr, 1); + this->fogModel.bindAnim(&this->anmFog, 0.0); + this->anmFog.setUpdateRate(1.0); OSReport("Setting the State"); doStateChange(&StateID_Grow); @@ -212,8 +225,10 @@ int daRamboo_c::onExecute() { acState.execute(); updateModelMatrices(); - if(this->animationChrA.isAnimationDone()) - this->animationChrA.setCurrentFrame(0.0); + this->fogModel._vf1C(); + + if(this->anmFog.isAnimationDone()) + this->anmFog.setCurrentFrame(0.0); if (this->aPhysics.result1 == 1) { char PlayerID = NearestPlayer(this); @@ -231,7 +246,11 @@ int daRamboo_c::onExecute() { int daRamboo_c::onDraw() { fogModel.scheduleForDrawing(); - bodyModel.scheduleForDrawing(); + + if (this->Hiding == 0) { + bodyModel.scheduleForDrawing(); } + else { + hideModel.scheduleForDrawing(); } return true; } @@ -247,9 +266,14 @@ void daRamboo_c::updateModelMatrices() { matrix.translation(pos.x + 160.0, pos.y - 80.0, pos.z + 200.0); matrix.applyRotationYXZ(&rot.x, &rot.y, &rot.z); - bodyModel.setDrawMatrix(matrix); - bodyModel.setScale(&scale); - bodyModel.calcWorld(false); + if (this->Hiding == 0) { + bodyModel.setDrawMatrix(matrix); + bodyModel.setScale(&scale); + bodyModel.calcWorld(false); } + else { + hideModel.setDrawMatrix(matrix); + hideModel.setScale(&scale); + hideModel.calcWorld(false); } } @@ -259,21 +283,17 @@ void daRamboo_c::beginState_Grow() { OSReport("Growing when Kameck Tells me to."); this->timer = 0; // PlaySound(this, SE_BOSS_ROY_MAGIC_MAKE_FAST); - bindAnimChr_and_setUpdateRates("wait", this->animationChrD, this->bodyModel, 1.0); } void daRamboo_c::executeState_Grow() { - if(this->animationChrD.isAnimationDone()) - this->animationChrD.setCurrentFrame(0.0); - this->timer = this->timer + 1; float scaleSpeed, yPosScaling; + if (this->timer == 60) { PlaySound(this, SE_BOSS_IGGY_WANWAN_TO_L); } if ((this->timer > 60) && (this->timer < 140)) { - PlaySound(this, SE_BOSS_IGGY_WANWAN_L_TO_M); scaleSpeed = 0.175; // yPosScaling = 0; @@ -311,13 +331,11 @@ void daRamboo_c::beginState_Advance() { this->speed.z = 0; this->timer = 0; - bindAnimChr_and_setUpdateRates("move_cartain", this->animationChrB, this->bodyModel, 1.0); } void daRamboo_c::executeState_Advance() { - if(this->animationChrB.isAnimationDone()) - this->animationChrB.setCurrentFrame(0.0); + this->bodyModel._vf1C(); this->pos.x -= this->timer / 32; this->pos.y = this->Baseline + sin(this->ytimer * 3.14 / 192) * 48; @@ -349,16 +367,36 @@ void daRamboo_c::beginState_Wait() { } void daRamboo_c::executeState_Wait() { + + if (this->timer == 55) { + nw4r::g3d::ResAnmChr anmChrB = this->resFile.GetResAnmChr("shay_teresaB"); + this->anmShayB.bind(&this->hideModel, anmChrB, 1); + this->hideModel.bindAnim(&this->anmShayB, 0.0); + this->anmShayB.setUpdateRate(1.0); + } + if (this->timer > 60) { PlaySound(this, SE_EMY_CS_TERESA_BEAT_YOU); doStateChange(&StateID_Advance); } + + + this->hideModel._vf1C(); this->timer += 1; } -void daRamboo_c::endState_Wait() { OSReport("No more bouncing."); } +void daRamboo_c::endState_Wait() { + + this->Hiding = 0; + + nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr("shay_teresaA"); + this->anmShayA.bind(&this->bodyModel, anmChr, 1); + this->bodyModel.bindAnim(&this->anmShayA, 0.0); + this->anmShayA.setUpdateRate(1.0); + + OSReport("No more bouncing."); } @@ -368,31 +406,55 @@ void daRamboo_c::endState_Wait() { OSReport("No more bouncing."); } void daRamboo_c::beginState_Flee() { - bindAnimChr_and_setUpdateRates("shay_teresaA", this->animationChrC, this->bodyModel, 1.0); +// bindAnimChr_and_setUpdateRates("shay_teresaA", this->animationChrC, this->bodyModel, 1.0); + + nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr("wait"); + this->anmWaitA.bind(&this->bodyModel, anmChr, 1); + this->bodyModel.bindAnim(&this->anmWaitA, 0.0); + this->anmWaitA.setUpdateRate(1.0); OSReport("Damnit that hurt."); this->timer = 0; + } void daRamboo_c::executeState_Flee() { - - if(this->animationChrC.isAnimationDone()) - this->animationChrC.setCurrentFrame(0.0); - + + if (timer == 10) { + this->Hiding = 1; + + nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr("shay_teresaB_wait"); + this->anmWaitB.bind(&this->hideModel, anmChr, 1); + this->hideModel.bindAnim(&this->anmWaitB, 0.0); + this->anmWaitB.setUpdateRate(1.0); + } + this->pos.x += (60 - this->timer) / 8; - if (this->timer > 60) { doStateChange(&StateID_Wait); } + if (timer < 10) { + this->bodyModel._vf1C(); } + else { + this->hideModel._vf1C(); } + + + if (this->timer > 60) { + doStateChange(&StateID_Wait); + } this->timer += 1; } -void daRamboo_c::endState_Flee() { OSReport("Ugh, so dizzy."); } +void daRamboo_c::endState_Flee() { + + OSReport("Ugh, so dizzy."); +} void daRamboo_c::beginState_Outro() { + this->removeMyActivePhysics(); this->timer = 0; this->rot.x = 0x0; // X is vertical axis this->rot.y = 0xE000; // Y is horizontal axis |