summaryrefslogtreecommitdiff
path: root/src/shyguy.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/shyguy.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/shyguy.cpp')
-rw-r--r--src/shyguy.cpp64
1 files changed, 34 insertions, 30 deletions
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index d4bf73c..ced7a41 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -94,19 +94,19 @@ class daShyGuy : public dEn_c {
void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther);
void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat14_YoshiFire(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 collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat14_YoshiFire(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 collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther);
// bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther);
- void collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther);
+ bool collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther);
void _vf148();
void _vf14C();
@@ -269,45 +269,48 @@ daShyGuy *daShyGuy::build() {
void daShyGuy::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) {
this->playerCollision(apThis, apOther);
}
- void daShyGuy::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) {
+ bool daShyGuy::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) {
PlaySound(this, SE_EMY_DOWN);
SpawnEffect("Wm_mr_hardhit", 0, &pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0});
//addScoreWhenHit accepts a player parameter.
//DON'T DO THIS:
// this->addScoreWhenHit(this);
doStateChange(&StateID_Die);
+ return true;
}
- void daShyGuy::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) {
- this->collisionCatD_GroundPound(apThis, apOther);
+ bool daShyGuy::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) {
+ return this->collisionCatD_Drill(apThis, apOther);
}
- void daShyGuy::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) {
- this->collisionCatD_GroundPound(apThis, apOther);
+ bool daShyGuy::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) {
+ return this->collisionCatD_Drill(apThis, apOther);
}
- void daShyGuy::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {
- this->collisionCatD_GroundPound(apThis, apOther);
+ bool daShyGuy::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {
+ return this->collisionCatD_Drill(apThis, apOther);
}
- void daShyGuy::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){
- this->collisionCatD_GroundPound(apThis, apOther);
+ bool daShyGuy::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){
+ return this->collisionCatD_Drill(apThis, apOther);
}
- void daShyGuy::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther){
- this->collisionCatD_GroundPound(apThis, apOther);
+ bool daShyGuy::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther){
+ return this->collisionCatD_Drill(apThis, apOther);
}
- void daShyGuy::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther){
- this->collisionCatD_GroundPound(apThis, apOther);
+ bool daShyGuy::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther){
+ return this->collisionCatD_Drill(apThis, apOther);
}
- void daShyGuy::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {
- this->collisionCatD_GroundPound(apThis, apOther);
+ bool daShyGuy::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {
+ return this->collisionCatD_Drill(apThis, apOther);
}
- void daShyGuy::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){
- dEn_c::collisionCat3_StarPower(apThis, apOther);
+ bool daShyGuy::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){
+ bool wut = dEn_c::collisionCat3_StarPower(apThis, apOther);
doStateChange(&StateID_Die);
+ return wut;
}
- void daShyGuy::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){
+ bool daShyGuy::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){
doStateChange(&StateID_DieSmoke);
+ return true;
}
- void daShyGuy::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) {
+ bool daShyGuy::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) {
this->damage += 1;
dStateBase_c *stateVar;
@@ -336,6 +339,7 @@ daShyGuy *daShyGuy::build() {
else {
doStateChange(stateVar);
}
+ return true;
}
// void daShyGuy::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) {