summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Noga <Tempus@chronometry.ca>2012-03-03 17:46:23 -0600
committerColin Noga <Tempus@chronometry.ca>2012-03-03 17:46:23 -0600
commitcda9fbf8124818ee91677d86ab9c68e8afaaafd6 (patch)
treef0748de1d51716435f630f67b9039a638a269d0a /src
parentb8b1efc008e5ca2c455b8ab225b5d005449de851 (diff)
downloadkamek-cda9fbf8124818ee91677d86ab9c68e8afaaafd6.tar.gz
kamek-cda9fbf8124818ee91677d86ab9c68e8afaaafd6.zip
Fricking hate bosses
Diffstat (limited to '')
-rw-r--r--src/bossThwompaDomp.cpp62
-rw-r--r--src/shyguy.cpp30
2 files changed, 40 insertions, 52 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;
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 36072b8..d09edb2 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -226,6 +226,7 @@ daShyGuy *daShyGuy::build() {
if(hitType == 1) { // regular jump
apOther->someFlagByte |= 2;
if (this->isDown == 0) {
+ this->playEnemyDownSound1();
doStateChange(stateVar);
}
else { // Shy Guy is in throwy mode - kill it with fire
@@ -235,6 +236,7 @@ daShyGuy *daShyGuy::build() {
else if(hitType == 3) { // spinning jump or whatever?
apOther->someFlagByte |= 2;
if (this->isDown == 0) {
+ this->playEnemyDownSound1();
doStateChange(stateVar);
}
else { // Shy Guy is in throwy mode - kill it with fire
@@ -614,6 +616,7 @@ int daShyGuy::onCreate() {
// State Changers
if (type == 0) {
+ bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
doStateChange(&StateID_RealWalk);
}
else if (type == 1) {
@@ -666,6 +669,7 @@ int daShyGuy::onCreate() {
doStateChange(&StateID_Balloon_C);
}
else if (type == 9) {
+ bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
doStateChange(&StateID_RealWalk);
}
else if (type == 10) {
@@ -1174,7 +1178,6 @@ void daShyGuy::updateModelMatrices() {
///////////////
void daShyGuy::beginState_RealWalk() {
//inline this piece of code
- bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
this->max_speed.x = (this->direction) ? -this->XSpeed : this->XSpeed;
this->speed.x = (direction) ? -0.8f : 0.8f;
@@ -1199,7 +1202,6 @@ void daShyGuy::updateModelMatrices() {
// Real Turn State
///////////////
void daShyGuy::beginState_RealTurn() {
- bindAnimChr_and_setUpdateRate("c18_IDLE_R", 1, 0.0, 1.0);
this->direction ^= 1;
this->speed.x = 0.0;
@@ -1341,27 +1343,8 @@ void daShyGuy::updateModelMatrices() {
// move backwards here
if(this->chrAnimation.isAnimationDone()) {
- if (type == 0) {
- doStateChange(&StateID_RealWalk);
- }
- else if (type == 1) {
- doStateChange(&StateID_Walk);
- }
- else if (type == 2) {
- doStateChange(&StateID_RealWalk);
- }
- else if (type == 3) {
- doStateChange(&StateID_Jump);
- }
- else if (type == 4) {
- doStateChange(&StateID_Judo);
- }
- else if (type == 5) {
- doStateChange(&StateID_Spike);
- }
- else {
- doStateChange(&StateID_RealWalk);
- }
+ bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
+ doStateChange(&StateID_RealWalk);
}
}
void daShyGuy::endState_FireKnockBack() {
@@ -1403,6 +1386,7 @@ void daShyGuy::updateModelMatrices() {
calculateTileCollisions();
if(this->chrAnimation.isAnimationDone()) {
+ bindAnimChr_and_setUpdateRate("c18_EV_WIN_2_R", 1, 0.0, 1.5);
doStateChange(&StateID_RealWalk);
}
}