diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-22 03:28:23 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-22 03:28:23 -0500 |
commit | 481585f8747707bb1aee196672edc7a926ae0611 (patch) | |
tree | 15136e0af7890899e4ccf848444f5d69fd47a7ae /src/bossBalboaWrench.cpp | |
parent | 6c1a8f456a41e03f94811937f1fc62013b91cb54 (diff) | |
download | kamek-481585f8747707bb1aee196672edc7a926ae0611.tar.gz kamek-481585f8747707bb1aee196672edc7a926ae0611.zip |
Lots of boss updates
Diffstat (limited to 'src/bossBalboaWrench.cpp')
-rw-r--r-- | src/bossBalboaWrench.cpp | 86 |
1 files changed, 68 insertions, 18 deletions
diff --git a/src/bossBalboaWrench.cpp b/src/bossBalboaWrench.cpp index efb3abe..02742e7 100644 --- a/src/bossBalboaWrench.cpp +++ b/src/bossBalboaWrench.cpp @@ -37,6 +37,7 @@ class daBalboa_c : public dEn_c { int homingWrenchLifeSpan; float homingWrenchDirection; char throwCount; + char upsideDown; static daBalboa_c *build(); @@ -192,11 +193,11 @@ int daBalboa_c::onCreate() { OSReport("Creating Balboa's Physics Struct"); ActivePhysics::Info HitMeBaby; - HitMeBaby.xDistToCenter = 0.0; + HitMeBaby.xDistToCenter = 24.0; HitMeBaby.yDistToCenter = 36.0; HitMeBaby.xDistToEdge = 24.0; - HitMeBaby.yDistToEdge = 30.0; + HitMeBaby.yDistToEdge = 32.0; HitMeBaby.category1 = 0x3; HitMeBaby.category2 = 0x0; @@ -217,11 +218,13 @@ int daBalboa_c::onCreate() { this->rot.z = 0; // Z is ... an axis >.> this->direction = 0; // Heading left. this->pos.z = -800.0; + this->pos.y -= 8.0; - this->PopUp[0] = (Vec){this->pos.x, this->pos.y + 120.0, this->pos.z}; - this->PopUp[1] = (Vec){this->pos.x - 320.0, this->pos.y - 60.0, this->pos.z}; - this->PopUp[2] = (Vec){this->pos.x, this->pos.y + 120.0, this->pos.z}; - this->PopUp[3] = (Vec){this->pos.x - 320.0, this->pos.y - 60.0, this->pos.z}; + this->PopUp[0] = (Vec){this->pos.x, this->pos.y - 72.0, this->pos.z}; + this->PopUp[1] = (Vec){this->pos.x - 224.0, this->pos.y - 72.0, this->pos.z}; + this->PopUp[2] = (Vec){this->pos.x, this->pos.y + 248.0, this->pos.z}; + this->PopUp[3] = (Vec){this->pos.x - 224.0, this->pos.y + 248.0, this->pos.z}; + this->PopUp[4] = (Vec){this->pos.x - 112.0, this->pos.y - 40.0, this->pos.z}; OSReport("Setting the State"); @@ -304,7 +307,7 @@ void daBalboa_c::executeState_Grow() { float modifier; - modifier = 2.0 + ((this->timer - 60) * scaleSpeed); + modifier = 1.0 + ((this->timer - 60) * scaleSpeed); this->scale = (Vec){modifier, modifier, modifier}; // this->pos.y = this->pos.y + (yPosScaling/80); @@ -338,17 +341,48 @@ void daBalboa_c::beginState_ManholeUp() { this->timer = 0; int randChoice; - randChoice = GenerateRandomNumber(4); + randChoice = GenerateRandomNumber(5); this->pos = this->PopUp[randChoice]; - if (randChoice < 2) { // On the left side! + if (randChoice == 0) { // On the left side! this->rot.y = 0xE000; + this->rot.z = 0; + this->upsideDown = 0; this->direction = 0; } - else { // On the right side! + + else if (randChoice == 1) { // On the right side! + this->rot.y = 0x2000; + this->rot.z = 0; + this->upsideDown = 0; + this->direction = 1; } + + else if (randChoice == 2) { // On the right ceiling! + this->rot.y = 0xE000; + this->rot.z = 0x8000; + this->upsideDown = 1; + this->direction = 0; } + + else if (randChoice == 3) { // On the left ceiling! this->rot.y = 0x2000; + this->rot.z = 0x8000; + this->upsideDown = 1; this->direction = 1; } + else if (randChoice == 4) { // In the Center! + char PlayerID = NearestPlayer(this); + dStageActor_c *Player = GetSpecificPlayerActor(PlayerID); + + this->upsideDown = 0; + this->rot.z = 0; + if (Player->pos.x < this->pos.x) { + this->rot.y = 0xE000; + this->direction = 0; } + else { + this->rot.y = 0x2000; + this->direction = 1; } + } + PlaySound(this, 0x21F); } @@ -357,9 +391,13 @@ void daBalboa_c::executeState_ManholeUp() { this->bodyModel._vf1C(); if (this->timer < 30) { - this->pos.y += 0.5; } // Height is 80 pixels, move up 15 pixels. + if (this->upsideDown == 0) { + this->pos.y += 0.6; } // Height is 72 pixels, move up 18 pixels. + else { + this->pos.y -= 0.6; } // Height is 72 pixels, move down 18 pixels. + } - if (this->timer > 90) { + if (this->timer > 60) { doStateChange(&StateID_HeadPoke); } this->timer += 1; @@ -385,8 +423,12 @@ void daBalboa_c::beginState_HeadPoke() { void daBalboa_c::executeState_HeadPoke() { if (this->timer < 30) { - this->pos.y += 1.0; } // Height is 80 pixels, move up another 30 pixels. - + if (this->upsideDown == 0) { + this->pos.y += 0.6; } // Height is 72 pixels, move up 20 pixels. + else { + this->pos.y -= 0.6; } // Height is 72 pixels, move down 20 pixels. + } + if (this->timer > 90) { doStateChange(&StateID_AllOut); } @@ -406,7 +448,7 @@ void daBalboa_c::beginState_AllOut() { nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr("throw_3"); this->anmThrow_3.bind(&this->bodyModel, anmChr, 1); - this->bodyModel.bindAnim(&this->anmThrow_1, 0.0); + this->bodyModel.bindAnim(&this->anmThrow_3, 0.0); this->anmThrow_3.setUpdateRate(1.0); this->timer = 0; @@ -419,9 +461,13 @@ void daBalboa_c::executeState_AllOut() { this->bodyModel._vf1C(); if (this->timer < 30) { - this->pos.y += 1.2; } // Height is 80 pixels, move up another 35 pixels. + if (this->upsideDown == 0) { + this->pos.y += 1.2; } // Height is 72 pixels, move up last 36 pixels. + else { + this->pos.y -= 1.2; } // Height is 72 pixels, move down last 36 pixels. + } - if (this->timer > 90) { + if (this->timer > 45) { int randChoice; randChoice = GenerateRandomNumber(2); @@ -611,7 +657,11 @@ void daBalboa_c::beginState_BackDown() { void daBalboa_c::executeState_BackDown() { if (this->timer < 60) { - this->pos.y -= 2.6667; } // Height is 80 pixels, move down 80 pixels. + if (this->upsideDown == 0) { + this->pos.y -= 1.2; } // Height is 72 pixels, move down + else { + this->pos.y += 1.2; } // Height is 72 pixels, move up + } if (this->timer > 90) { doStateChange(&StateID_ManholeUp); } |