summaryrefslogtreecommitdiff
path: root/src/thundercloud.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2013-02-03 00:31:46 +0100
committerTreeki <treeki@gmail.com>2013-02-03 00:31:46 +0100
commit06828e3a02a0ca2eaf56d804bb6845659cfa59e7 (patch)
treebb28c665445fc622958b9614d014ba791cad2d0f /src/thundercloud.cpp
parent012efaa6343cd2bec2f728d0bec6243263712a45 (diff)
downloadkamek-06828e3a02a0ca2eaf56d804bb6845659cfa59e7.tar.gz
kamek-06828e3a02a0ca2eaf56d804bb6845659cfa59e7.zip
fix a bug in the collision headers, and assorted collision bugs
Diffstat (limited to 'src/thundercloud.cpp')
-rwxr-xr-xsrc/thundercloud.cpp65
1 files changed, 36 insertions, 29 deletions
diff --git a/src/thundercloud.cpp b/src/thundercloud.cpp
index 50fce31..d0d3b12 100755
--- a/src/thundercloud.cpp
+++ b/src/thundercloud.cpp
@@ -44,17 +44,17 @@ class dThunderCloud : public dEn_c {
void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther);
void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther);
void bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate);
@@ -83,7 +83,7 @@ CREATE_STATE(dThunderCloud, Wait);
// Collision Callbacks
extern "C" void dAcPy_vf3F4(void* mario, void* other, int t);
- extern "C" void BigHanaFireball(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther);
+ extern "C" bool BigHanaFireball(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther);
extern "C" void *dAcPy_c__ChangePowerupWithAnimation(void * Player, int powerup);
extern "C" int CheckExistingPowerup(void * Player);
@@ -105,25 +105,32 @@ CREATE_STATE(dThunderCloud, Wait);
}
void dThunderCloud::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); }
- void dThunderCloud::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); }
- void dThunderCloud::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); }
- void dThunderCloud::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); }
- void dThunderCloud::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); }
- void dThunderCloud::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); }
- void dThunderCloud::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); }
-
- void dThunderCloud::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { BigHanaFireball(this, apThis, apOther); }
- void dThunderCloud::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { BigHanaFireball(this, apThis, apOther); }
-
- void dThunderCloud::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {
- if (apThis->info.category2 == 0x9) { return; }
+ bool dThunderCloud::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); return true; }
+ bool dThunderCloud::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); return true; }
+ bool dThunderCloud::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); return true; }
+ bool dThunderCloud::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); return true; }
+ bool dThunderCloud::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); return true; }
+ bool dThunderCloud::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); return true; }
+
+ bool dThunderCloud::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { return BigHanaFireball(this, apThis, apOther); }
+ bool dThunderCloud::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { return BigHanaFireball(this, apThis, apOther); }
+
+ bool dThunderCloud::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {
+ if (apThis->info.category2 == 0x9) { return true; }
PlaySound(this, SE_EMY_DOWN);
- doStateChange(&StateID_DieFall); }
- void dThunderCloud::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCat13_Hammer(apThis, apOther); }
- void dThunderCloud::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) {
- if (apThis->info.category2 == 0x9) { return; }
+ doStateChange(&StateID_DieFall);
+ return true;
+ }
+ bool dThunderCloud::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {
+ this->collisionCat13_Hammer(apThis, apOther);
+ return true;
+ }
+ bool dThunderCloud::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) {
+ if (apThis->info.category2 == 0x9) { return true; }
dEn_c::collisionCat3_StarPower(apThis, apOther);
- this->collisionCat13_Hammer(apThis, apOther); }
+ this->collisionCat13_Hammer(apThis, apOther);
+ return true;
+ }
// These handle the ice crap