diff options
author | Treeki <treeki@gmail.com> | 2013-02-03 00:31:46 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-02-03 00:31:46 +0100 |
commit | 06828e3a02a0ca2eaf56d804bb6845659cfa59e7 (patch) | |
tree | bb28c665445fc622958b9614d014ba791cad2d0f /src | |
parent | 012efaa6343cd2bec2f728d0bec6243263712a45 (diff) | |
download | kamek-06828e3a02a0ca2eaf56d804bb6845659cfa59e7.tar.gz kamek-06828e3a02a0ca2eaf56d804bb6845659cfa59e7.zip |
fix a bug in the collision headers, and assorted collision bugs
Diffstat (limited to 'src')
-rw-r--r-- | src/bossBalboaWrench.cpp | 38 | ||||
-rw-r--r-- | src/bossBombDrop.cpp | 20 | ||||
-rw-r--r-- | src/bossFuzzyBear.cpp | 51 | ||||
-rw-r--r-- | src/bossKoopaThrow.cpp | 28 | ||||
-rw-r--r-- | src/bossMegaGoomba.cpp | 105 | ||||
-rw-r--r-- | src/bossPodouble.cpp | 58 | ||||
-rw-r--r-- | src/bossRamboo.cpp | 37 | ||||
-rw-r--r-- | src/bossSamurshai.cpp | 83 | ||||
-rw-r--r-- | src/bossThwompaDomp.cpp | 42 | ||||
-rw-r--r-- | src/bossTopman.cpp | 47 | ||||
-rw-r--r-- | src/bossWrenchThrow.cpp | 28 | ||||
-rw-r--r-- | src/challengeStar.cpp | 35 | ||||
-rw-r--r-- | src/fakeStarCoin.cpp | 45 | ||||
-rwxr-xr-x | src/meteor.cpp | 5 | ||||
-rwxr-xr-x | src/mrsun.cpp | 51 | ||||
-rw-r--r-- | src/penguin.cpp | 4 | ||||
-rw-r--r-- | src/pumpkinGoomba.cpp | 36 | ||||
-rw-r--r-- | src/shyguy.cpp | 64 | ||||
-rw-r--r-- | src/shyguyGiants.cpp | 69 | ||||
-rwxr-xr-x | src/thundercloud.cpp | 65 | ||||
-rw-r--r-- | src/topman.cpp | 49 |
21 files changed, 585 insertions, 375 deletions
diff --git a/src/bossBalboaWrench.cpp b/src/bossBalboaWrench.cpp index e1e39fa..1cea253 100644 --- a/src/bossBalboaWrench.cpp +++ b/src/bossBalboaWrench.cpp @@ -37,12 +37,12 @@ class daBalboa_c : public daBoss { void bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); void addScoreWhenHit(void *other); @@ -118,7 +118,7 @@ daBalboa_c *daBalboa_c::build() { this->counter_504[apOther->owner->which_player] = 0; } - void daBalboa_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daBalboa_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { dActor_c *block = apOther->owner; dEn_c *mario = (dEn_c*)block; @@ -134,10 +134,7 @@ daBalboa_c *daBalboa_c::build() { mario->doSpriteMovement(); mario->doSpriteMovement(); - if (isRevenging) { - return; - } - else { + if (!isRevenging) { this->damage -= 1; apOther->someFlagByte |= 2; @@ -147,13 +144,24 @@ daBalboa_c *daBalboa_c::build() { doStateChange(&StateID_Damage); } + return true; } - void daBalboa_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } - bool daBalboa_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } - void daBalboa_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { } - void daBalboa_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { } - void daBalboa_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { } + bool daBalboa_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daBalboa_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { + return false; + } + bool daBalboa_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daBalboa_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daBalboa_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } void daBalboa_c::setupModels() { diff --git a/src/bossBombDrop.cpp b/src/bossBombDrop.cpp index 7959268..b8e4204 100644 --- a/src/bossBombDrop.cpp +++ b/src/bossBombDrop.cpp @@ -30,12 +30,12 @@ class dDroppedBomb : public dEn_c { void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); // void spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(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); - void collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); }; void dDroppedBomb::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { @@ -49,12 +49,12 @@ dDroppedBomb *dDroppedBomb::build() { } // void dDroppedBomb::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->kill(); } -void dDroppedBomb::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } +bool dDroppedBomb::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) {return true;} bool dDroppedBomb::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } -void dDroppedBomb::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {} -void dDroppedBomb::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {} -void dDroppedBomb::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) {} -void dDroppedBomb::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) {} +bool dDroppedBomb::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {return true;} +bool dDroppedBomb::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {return true;} +bool dDroppedBomb::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) {return true;} +bool dDroppedBomb::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) {return true;} void dDroppedBomb::kill() { PlaySoundAsync(this, SE_BOSS_JR_BOMB_BURST); diff --git a/src/bossFuzzyBear.cpp b/src/bossFuzzyBear.cpp index d286b81..67fbd6e 100644 --- a/src/bossFuzzyBear.cpp +++ b/src/bossFuzzyBear.cpp @@ -43,14 +43,14 @@ class daFuzzyBear_c : public daBoss { void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(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 collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatA_PenguinMario(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 collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); USING_STATES(daFuzzyBear_c); DECLARE_STATE(Grow); @@ -81,10 +81,10 @@ CREATE_STATE(daFuzzyBear_c, Outro); void daFuzzyBear_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } void daFuzzyBear_c::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daFuzzyBear_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { - return; // added by skawo request +bool daFuzzyBear_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; // added by skawo request - if (this->isInvulnerable == 1) { return; } + if (this->isInvulnerable == 1) { return true; } this->timer = 0; PlaySound(this, SE_BOSS_KOOPA_FIRE_DISAPP); @@ -92,8 +92,9 @@ void daFuzzyBear_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, Ac SpawnEffect("Wm_mr_fireball_hit", 0, &apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); this->damage++; if (this->damage > 14) { doStateChange(&StateID_Outro); } + return true; } -void daFuzzyBear_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFuzzyBear_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { apOther->someFlagByte |= 2; dActor_c *block = apOther->owner; @@ -107,12 +108,13 @@ void daFuzzyBear_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysi mario->doSpriteMovement(); mario->doSpriteMovement(); + return true; } -void daFuzzyBear_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFuzzyBear_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->counter_504[apOther->owner->which_player] = 0; - this->collisionCat9_RollingObject(apThis, apOther); + return this->collisionCat9_RollingObject(apThis, apOther); } -void daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { dActor_c *block = apOther->owner; dEn_c *blah = (dEn_c*)block; @@ -134,7 +136,7 @@ void daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhy if (blah->direction == 0) { blah->direction = 1; } else { blah->direction = 0; } - return; + return true; } this->pos.x += blah->speed.x; @@ -148,10 +150,11 @@ void daFuzzyBear_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhy if (this->damage > 14) { doStateChange(&StateID_Outro); } else { doStateChange(&StateID_RolyPoly); } + return true; } -void daFuzzyBear_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFuzzyBear_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { - if (this->isInvulnerable == 1) { return; } + if (this->isInvulnerable == 1) { return true; } dActor_c *block = apOther->owner; dEn_c *blah = (dEn_c*)block; @@ -167,11 +170,19 @@ void daFuzzyBear_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics * if (this->damage > 14) { doStateChange(&StateID_Outro); } else { doStateChange(&StateID_RolyPoly); } + return true; } -bool daFuzzyBear_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } -void daFuzzyBear_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { } -void daFuzzyBear_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } +bool daFuzzyBear_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { + return false; +} +bool daFuzzyBear_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} +bool daFuzzyBear_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} diff --git a/src/bossKoopaThrow.cpp b/src/bossKoopaThrow.cpp index e9bd931..3b07d98 100644 --- a/src/bossKoopaThrow.cpp +++ b/src/bossKoopaThrow.cpp @@ -63,12 +63,12 @@ class daKoopaThrow : public dEn_c { void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); void spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(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); - void collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); USING_STATES(daKoopaThrow); @@ -125,12 +125,16 @@ void daKoopaThrow::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther void daKoopaThrow::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) {} -void daKoopaThrow::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } +bool daKoopaThrow::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} bool daKoopaThrow::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } -void daKoopaThrow::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {} -void daKoopaThrow::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daKoopaThrow::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} +bool daKoopaThrow::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { if (Type == 1 || Type == 2) { SpawnEffect("Wm_en_burst_s", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){0.75, 0.75, 0.75}); SpawnEffect("Wm_mr_wirehit", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.25, 1.25, 1.25}); @@ -141,9 +145,12 @@ void daKoopaThrow::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *a PlaySoundAsync(this, currentInfo->breakSound); this->Delete(1); + return true; +} +bool daKoopaThrow::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; } -void daKoopaThrow::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) {} -void daKoopaThrow::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daKoopaThrow::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); if (Type == 1 || Type == 2) { @@ -153,6 +160,7 @@ void daKoopaThrow::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysic SpawnEffect("Wm_mr_wirehit", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.25, 1.25, 1.25}); this->Delete(1); } + return true; } diff --git a/src/bossMegaGoomba.cpp b/src/bossMegaGoomba.cpp index 6314aaf..44d4de7 100644 --- a/src/bossMegaGoomba.cpp +++ b/src/bossMegaGoomba.cpp @@ -72,24 +72,26 @@ class daMegaGoomba_c : public dEn_c { void removeMyActivePhysics(); void addMyActivePhysics(); + int tryHandleJumpedOn(ActivePhysics *apThis, ActivePhysics *apOther); + void spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat3_StarPower(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 collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat3_StarPower(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 collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); void addScoreWhenHit(void *other); - void _vf120(ActivePhysics *apThis, ActivePhysics *apOther); - void _vf110(ActivePhysics *apThis, ActivePhysics *apOther); - void _vf108(ActivePhysics *apThis, ActivePhysics *apOther); + bool _vf120(ActivePhysics *apThis, ActivePhysics *apOther); + bool _vf110(ActivePhysics *apThis, ActivePhysics *apOther); + bool _vf108(ActivePhysics *apThis, ActivePhysics *apOther); void dieOther_Begin(); void dieOther_Execute(); @@ -249,6 +251,14 @@ void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth //unk=0 does _vfs, unk=1 does playSeCmnStep //char ret = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 0); + if (tryHandleJumpedOn(apThis, apOther) == 0) { + this->dEn_c::playerCollision(apThis, apOther); + this->_vf220(apOther->owner); + this->counter_504[apOther->owner->which_player] = 180; + } +} + +int daMegaGoomba_c::tryHandleJumpedOn(ActivePhysics *apThis, ActivePhysics *apOther) { float saveBounce = EnemyBounceValue; EnemyBounceValue = 5.2f; @@ -267,47 +277,68 @@ void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth apOther->someFlagByte |= 2; if(this->takeHit(1)) doStateChange(&StateID_DieFall); - } else if(ret == 0) { - this->dEn_c::playerCollision(apThis, apOther); - this->_vf220(apOther->owner); - this->counter_504[apOther->owner->which_player] = 180; - } else if(ret == 2) { - } else { } + + return ret; } -void daMegaGoomba_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { - if (this->counter_504[apOther->owner->which_player] > 0) { return; } +bool daMegaGoomba_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + if (this->counter_504[apOther->owner->which_player] > 0) { return false; } VEC2 eSpeed = {speed.x, speed.y}; killWithSpecifiedState(apOther->owner, &eSpeed, &dEn_c::StateID_DieOther); + return true; } -void daMegaGoomba_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { - if (this->counter_504[apOther->owner->which_player] > 0) { return; } - VEC2 eSpeed = {speed.x, speed.y}; - killWithSpecifiedState(apOther->owner, &eSpeed, &dEn_c::StateID_DieOther); +bool daMegaGoomba_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + return collisionCat7_GroundPound(apThis, apOther); } -void daMegaGoomba_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) {} -bool daMegaGoomba_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } -void daMegaGoomba_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_DieFall); } -void daMegaGoomba_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daMegaGoomba_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return false; +} +bool daMegaGoomba_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { + return false; +} +extern "C" void dAcPy_vf3F8(void* player, dEn_c* monster, int t); +bool daMegaGoomba_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { + if (tryHandleJumpedOn(apThis, apOther) == 0) { + dAcPy_vf3F8(apOther->owner, this, 3); + this->counter_504[apOther->owner->which_player] = 0xA; + } + return true; +} +bool daMegaGoomba_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { if(this->takeHit(1)) doStateChange(&StateID_DieFall); + return true; } -void daMegaGoomba_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daMegaGoomba_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { if(this->takeHit(1)) doStateChange(&StateID_DieFall); + return true; } -void daMegaGoomba_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { } -void daMegaGoomba_c::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther) {} -void daMegaGoomba_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) {} -void daMegaGoomba_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daMegaGoomba_c::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { + return collisionCat7_GroundPound(apThis, apOther); +} +bool daMegaGoomba_c::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} +bool daMegaGoomba_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} +bool daMegaGoomba_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { if(this->takeHit(1)) doStateChange(&StateID_DieFall); + return true; } void daMegaGoomba_c::addScoreWhenHit(void *other) {} -void daMegaGoomba_c::_vf120(ActivePhysics *apThis, ActivePhysics *apOther) { } -void daMegaGoomba_c::_vf110(ActivePhysics *apThis, ActivePhysics *apOther) { } -void daMegaGoomba_c::_vf108(ActivePhysics *apThis, ActivePhysics *apOther) { } +bool daMegaGoomba_c::_vf120(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; // Replicate existing broken behaviour +} +bool daMegaGoomba_c::_vf110(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; // Replicate existing broken behaviour +} +bool daMegaGoomba_c::_vf108(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; // Replicate existing broken behaviour +} void daMegaGoomba_c::bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate) { nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr(name); diff --git a/src/bossPodouble.cpp b/src/bossPodouble.cpp index 57c87a8..dd47463 100644 --- a/src/bossPodouble.cpp +++ b/src/bossPodouble.cpp @@ -50,16 +50,16 @@ class daPodouble : public daBoss { 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); USING_STATES(daPodouble); @@ -99,45 +99,57 @@ daPodouble *daPodouble::build() { void daPodouble::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } void daPodouble::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daPodouble::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daPodouble::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daPodouble::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } + bool daPodouble::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; + } + bool daPodouble::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; + } + bool daPodouble::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; + } - void daPodouble::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { return; } - void daPodouble::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { return; } - void daPodouble::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { return; } + bool daPodouble::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } + bool daPodouble::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } + bool daPodouble::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } - void daPodouble::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daPodouble::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { apOther->owner->kill(); - if (this->isInvulnerable) { return; } + if (this->isInvulnerable) { return true; } this->damage += 2; if (this->damage < 12) { doStateChange(&StateID_Damage); } else { doStateChange(&StateID_Outro); } + return true; } - void daPodouble::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daPodouble::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ apOther->owner->Delete(1); - if (this->isInvulnerable) { return; } + if (this->isInvulnerable) { return true; } if (this->isFire == 0) { this->damage += 3; if (this->damage < 12) { doStateChange(&StateID_Damage); } else { doStateChange(&StateID_Outro); } - } + return true; + } else return false; } - void daPodouble::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { - if (this->isInvulnerable) { return; } + bool daPodouble::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + if (this->isInvulnerable) { return true; } if (this->isFire == 0) { this->damage += 2; if (this->damage < 12) { doStateChange(&StateID_Damage); } else { doStateChange(&StateID_Outro); } - } + return true; + } else return false; } bool daPodouble::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { diff --git a/src/bossRamboo.cpp b/src/bossRamboo.cpp index bf27d51..f2af942 100644 --- a/src/bossRamboo.cpp +++ b/src/bossRamboo.cpp @@ -42,12 +42,12 @@ class daRamboo_c : public daBoss { void updateModelMatrices(); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); USING_STATES(daRamboo_c); @@ -76,12 +76,15 @@ void daRamboo_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) EN_LandbarrelPlayerCollision(this, apThis, apOther); DamagePlayer(this, apThis, apOther); } -void daRamboo_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daRamboo_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { SpawnEffect("Wm_en_obakedoor_sm", 0, &apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){0.5, 0.5, 0.5}); this->pos.x += 6.0; + return true; +} +bool daRamboo_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { + return false; } -bool daRamboo_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } -void daRamboo_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daRamboo_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { if (apOther->owner->name == 412) { // Check if it's a glow block SpawnEffect("Wm_en_obakedoor_sm", 0, &apOther->owner->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); @@ -90,11 +93,21 @@ void daRamboo_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysic doStateChange(&StateID_Flee); //FIXME changed to dStageActor_c::Delete(u8) from fBase_c::Delete(void) apOther->owner->Delete(1); - } + return true; + } + return false; +} +bool daRamboo_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} +bool daRamboo_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} +bool daRamboo_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; } -void daRamboo_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { } -void daRamboo_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daRamboo_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } diff --git a/src/bossSamurshai.cpp b/src/bossSamurshai.cpp index 3afd72b..6e09561 100644 --- a/src/bossSamurshai.cpp +++ b/src/bossSamurshai.cpp @@ -51,16 +51,16 @@ class daSamurshai : public daBoss { 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 addScoreWhenHit(void *other); int randomPlayer(); @@ -131,8 +131,10 @@ daSamurshai *daSamurshai::build() { } void daSamurshai::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daSamurshai::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { } - void daSamurshai::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daSamurshai::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { + return collisionCat7_GroundPound(apThis, apOther); + } + bool daSamurshai::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { apOther->someFlagByte |= 2; if (this->isDown == 0) { @@ -143,18 +145,25 @@ daSamurshai *daSamurshai::build() { deathInfo.isDead = 0; this->flags_4FC |= (1<<(31-7)); - this->counter_504[apOther->owner->which_player] = 0; + this->counter_504[apOther->owner->which_player] = 5; + bouncePlayerWhenJumpedOn(apOther->owner); + return true; + } + bool daSamurshai::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + return this->collisionCat7_GroundPound(apThis, apOther); } - void daSamurshai::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCat7_GroundPound(apThis, apOther); } - void daSamurshai::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daSamurshai::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { if (this->isDown == 0) { damage += 3; if (damage >= 15) { doStateChange(&StateID_Outro); } else { doStateChange(&StateID_Damage); } } + return true; } - void daSamurshai::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ } - void daSamurshai::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daSamurshai::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ + return true; + } + bool daSamurshai::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ if (this->isDown == 0) { damage += 3; if (damage >= 15) { doStateChange(&StateID_Outro); } @@ -164,24 +173,30 @@ daSamurshai *daSamurshai::build() { deathInfo.isDead = 0; this->flags_4FC |= (1<<(31-7)); this->counter_504[apOther->owner->which_player] = 0; - } - void daSamurshai::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ - damage += 4; - SpawnEffect("Wm_mr_fireball_hit", 0, &apOther->owner->pos, &apOther->owner->rot, &apOther->owner->scale); - PlaySoundAsync(this, SE_OBJ_FIREBALL_DISAPP); - if (damage >= 15) { doStateChange(&StateID_Outro); } - } - void daSamurshai::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { - damage += 1; - SpawnEffect("Wm_mr_fireball_hit", 0, &apOther->owner->pos, &apOther->owner->rot, &apOther->owner->scale); - PlaySoundAsync(this, SE_OBJ_FIREBALL_DISAPP); - if (damage >= 15) { doStateChange(&StateID_Outro); } - } - bool daSamurshai::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } - void daSamurshai::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { - damage += 2; - this->spawnHitEffectAtPosition((Vec2){apOther->owner->pos.x, apOther->owner->pos.y}); - if (damage >= 15) { doStateChange(&StateID_Outro); } + return true; + } + bool daSamurshai::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ + //damage += 4; + //SpawnEffect("Wm_mr_fireball_hit", 0, &apOther->owner->pos, &apOther->owner->rot, &apOther->owner->scale); + //PlaySoundAsync(this, SE_OBJ_FIREBALL_DISAPP); + //if (damage >= 15) { doStateChange(&StateID_Outro); } + return true; + } + bool daSamurshai::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + //damage += 1; + //SpawnEffect("Wm_mr_fireball_hit", 0, &apOther->owner->pos, &apOther->owner->rot, &apOther->owner->scale); + //PlaySoundAsync(this, SE_OBJ_FIREBALL_DISAPP); + //if (damage >= 15) { doStateChange(&StateID_Outro); } + return true; + } + bool daSamurshai::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daSamurshai::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + //damage += 2; + //this->spawnHitEffectAtPosition((Vec2){apOther->owner->pos.x, apOther->owner->pos.y}); + //if (damage >= 15) { doStateChange(&StateID_Outro); } + return true; } diff --git a/src/bossThwompaDomp.cpp b/src/bossThwompaDomp.cpp index 58254a7..5904d73 100644 --- a/src/bossThwompaDomp.cpp +++ b/src/bossThwompaDomp.cpp @@ -47,13 +47,13 @@ class daEnMegaDosun_c : public daBoss { void setupBodyModel(); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat7_GroundPound(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); - void collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); USING_STATES(daEnMegaDosun_c); DECLARE_STATE(UpWait); @@ -87,13 +87,29 @@ daEnMegaDosun_c *daEnMegaDosun_c::build() { void daEnMegaDosun_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } - 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_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, 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) { DamagePlayer(this, apThis, apOther); } + bool daEnMegaDosun_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daEnMegaDosun_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { + return false; + } + bool daEnMegaDosun_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; + } + bool daEnMegaDosun_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daEnMegaDosun_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daEnMegaDosun_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daEnMegaDosun_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; + } void daEnMegaDosun_c::setupBodyModel() { diff --git a/src/bossTopman.cpp b/src/bossTopman.cpp index 4b864ec..0637f2d 100644 --- a/src/bossTopman.cpp +++ b/src/bossTopman.cpp @@ -43,16 +43,16 @@ public: 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 addScoreWhenHit(void *other); @@ -204,26 +204,37 @@ daDreidel *daDreidel::build() { this->playerCollision(apThis, apOther); } - void daDreidel::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } - void daDreidel::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } - void daDreidel::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } + bool daDreidel::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; + } + bool daDreidel::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; + } + bool daDreidel::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; + } - void daDreidel::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daDreidel::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { if (this->isInvulnerable == 0) { doStateChange(&StateID_KnockBack); } + return true; } - void daDreidel::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daDreidel::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ if (this->isInvulnerable == 0) { doStateChange(&StateID_KnockBack); } + return true; } - void daDreidel::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ } - void daDreidel::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { } - void daDreidel::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ } - void daDreidel::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } + bool daDreidel::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ return true; } + bool daDreidel::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } + bool daDreidel::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ return true; } + bool daDreidel::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } bool daDreidel::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return true; } diff --git a/src/bossWrenchThrow.cpp b/src/bossWrenchThrow.cpp index 2629ede..252625f 100644 --- a/src/bossWrenchThrow.cpp +++ b/src/bossWrenchThrow.cpp @@ -26,12 +26,12 @@ class daWrench : public dEn_c { void updateModelMatrices(); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(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); - void collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); USING_STATES(daWrench); @@ -49,25 +49,33 @@ extern "C" void *PlayWrenchSound(dEn_c *); void daWrench::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daWrench::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } +bool daWrench::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} bool daWrench::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return false; } -void daWrench::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) {} -void daWrench::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daWrench::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} +bool daWrench::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { SpawnEffect("Wm_ob_cmnboxgrain", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){0.5, 0.5, 0.5}); PlaySoundAsync(this, SE_BOSS_JR_FLOOR_BREAK); this->Delete(1); + return true; +} +bool daWrench::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; } -void daWrench::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) {} -void daWrench::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daWrench::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->_vf220(apOther->owner); SpawnEffect("Wm_ob_cmnboxgrain", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){0.5, 0.5, 0.5}); PlaySoundAsync(this, SE_BOSS_JR_FLOOR_BREAK); this->Delete(1); + return true; } diff --git a/src/challengeStar.cpp b/src/challengeStar.cpp index 7724bb9..ec80661 100644 --- a/src/challengeStar.cpp +++ b/src/challengeStar.cpp @@ -29,11 +29,11 @@ class dChallengeStar : public dEn_c { void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat3_StarPower(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 collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat3_StarPower(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 collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); }; @@ -51,11 +51,26 @@ void dChallengeStar::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth } void dChallengeStar::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } -void dChallengeStar::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } -void dChallengeStar::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } -void dChallengeStar::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } -void dChallengeStar::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } -void dChallengeStar::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } +bool dChallengeStar::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; +} +bool dChallengeStar::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; +} +bool dChallengeStar::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; +} +bool dChallengeStar::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; +} +bool dChallengeStar::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + this->playerCollision(apThis, apOther); + return true; +} dChallengeStar *dChallengeStar::build() { diff --git a/src/fakeStarCoin.cpp b/src/fakeStarCoin.cpp index 4b35337..3c01c5c 100644 --- a/src/fakeStarCoin.cpp +++ b/src/fakeStarCoin.cpp @@ -28,11 +28,16 @@ class daFakeStarCoin : public dEn_c { void updateModelMatrices(); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther); + + bool collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther); bool collisionCat2_IceBall_15_YoshiIce(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); + bool collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther); }; @@ -46,7 +51,17 @@ void daFakeStarCoin::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth this->Delete(1); } -void daFakeStarCoin::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFakeStarCoin::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + return collisionCat9_RollingObject(apThis, apOther); +} +bool daFakeStarCoin::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + return collisionCat9_RollingObject(apThis, apOther); +} +bool daFakeStarCoin::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { + return collisionCat9_RollingObject(apThis, apOther); +} + +bool daFakeStarCoin::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { SpawnEffect("Wm_en_explosion", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); SpawnEffect("Wm_en_explosion_smk", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){3.0, 3.0, 3.0}); @@ -54,6 +69,7 @@ void daFakeStarCoin::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, A //FIXME changed to dStageActor_c::Delete(u8) from fBase_c::Delete(void) this->Delete(1); + return true; } bool daFakeStarCoin::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { SpawnEffect("Wm_ob_cmnicekira", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.5, 1.5, 1.5}); @@ -66,7 +82,7 @@ bool daFakeStarCoin::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, Ac this->Delete(1); return false; } -void daFakeStarCoin::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFakeStarCoin::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { SpawnEffect("Wm_ob_cmnboxgrain", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); SpawnEffect("Wm_en_obakedoor_sm", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); @@ -74,17 +90,12 @@ void daFakeStarCoin::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePh //FIXME changed to dStageActor_c::Delete(u8) from fBase_c::Delete(void) this->Delete(1); + return true; } -void daFakeStarCoin::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { - SpawnEffect("Wm_ob_cmnboxgrain", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); - SpawnEffect("Wm_en_obakedoor_sm", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); - - PlaySound(this, SE_BOSS_JR_FLOOR_BREAK); - - //FIXME changed to dStageActor_c::Delete(u8) from fBase_c::Delete(void) - this->Delete(1); +bool daFakeStarCoin::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + return collisionCat9_RollingObject(apThis, apOther); } -void daFakeStarCoin::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daFakeStarCoin::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { SpawnEffect("Wm_en_explosion", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); SpawnEffect("Wm_en_explosion_smk", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){3.0, 3.0, 3.0}); @@ -92,8 +103,12 @@ void daFakeStarCoin::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysi //FIXME changed to dStageActor_c::Delete(u8) from fBase_c::Delete(void) this->Delete(1); + return true; } +bool daFakeStarCoin::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { + return collisionCat9_RollingObject(apThis, apOther); +} diff --git a/src/meteor.cpp b/src/meteor.cpp index aa76f5d..352e66b 100755 --- a/src/meteor.cpp +++ b/src/meteor.cpp @@ -26,7 +26,7 @@ class dMeteor : public dEn_c { void updateModelMatrices(); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); public: void kill(); @@ -62,8 +62,9 @@ void MeteorPhysicsCallback(dMeteor *self, dEn_c *other) { } } -void dMeteor::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { +bool dMeteor::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); + return true; } diff --git a/src/mrsun.cpp b/src/mrsun.cpp index 267456a..8f8b811 100755 --- a/src/mrsun.cpp +++ b/src/mrsun.cpp @@ -51,14 +51,14 @@ class daMrSun_c : public dEn_c { void updateModelMatrices(); void playerCollision(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat1_Fireball_E_Explosion(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 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); + 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); USING_STATES(daMrSun_c); DECLARE_STATE(Follow); @@ -90,7 +90,9 @@ CREATE_STATE(daMrSun_c, Wait); void daMrSun_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daMrSun_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { } +bool daMrSun_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; +} bool daMrSun_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { if (this->settings == 1) { // It's a moon @@ -100,21 +102,36 @@ bool daMrSun_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActiveP } return false; } -void daMrSun_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { +bool daMrSun_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { this->timer = 0; PlaySound(this, SE_EMY_DOWN); - doStateChange(&StateID_DieFall); } -void daMrSun_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + doStateChange(&StateID_DieFall); + return true; +} +bool daMrSun_c::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { this->timer = 0; PlaySound(this, SE_EMY_DOWN); - doStateChange(&StateID_DieFall); } -void daMrSun_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { + doStateChange(&StateID_DieFall); + return true; +} +bool daMrSun_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { this->timer = 0; PlaySound(this, SE_EMY_DOWN); - doStateChange(&StateID_DieFall); } -void daMrSun_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daMrSun_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } -void daMrSun_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { DamagePlayer(this, apThis, apOther); } + doStateChange(&StateID_DieFall); + return true; +} +bool daMrSun_c::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} +bool daMrSun_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} +bool daMrSun_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + DamagePlayer(this, apThis, apOther); + return true; +} diff --git a/src/penguin.cpp b/src/penguin.cpp index 51bbf94..385d5b5 100644 --- a/src/penguin.cpp +++ b/src/penguin.cpp @@ -37,7 +37,7 @@ class daPengi : public dEn_c { void collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther); + void collisionCatD_Drill(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); @@ -109,7 +109,7 @@ daPengi *daPengi::build() { this->playerCollision(apThis, apOther); } - void daPengi::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + void daPengi::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Die); } diff --git a/src/pumpkinGoomba.cpp b/src/pumpkinGoomba.cpp index 1944c4d..44c23e5 100644 --- a/src/pumpkinGoomba.cpp +++ b/src/pumpkinGoomba.cpp @@ -31,15 +31,15 @@ class dGoombaPie : public dEn_c { void yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther); void spriteCollision(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); - void collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCatA_PenguinMario(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 collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); void _vf148(); void _vf14C(); @@ -110,15 +110,15 @@ dGoombaPie *dGoombaPie::build() { void dGoombaPie::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) {} void dGoombaPie::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void dGoombaPie::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); } - void dGoombaPie::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); } - void dGoombaPie::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); } - void dGoombaPie::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); } - void dGoombaPie::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Burst); } - void dGoombaPie::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); } - void dGoombaPie::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Burst); } - void dGoombaPie::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_DieSmoke); } - void dGoombaPie::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_DieSmoke); } + bool dGoombaPie::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); return true; } + bool dGoombaPie::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); return true; } + bool dGoombaPie::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); return true; } + bool dGoombaPie::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); return true; } + bool dGoombaPie::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Burst); return true; } + bool dGoombaPie::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Burst); return true; } + bool dGoombaPie::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Burst); return true; } + bool dGoombaPie::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_DieSmoke); return true; } + bool dGoombaPie::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_DieSmoke); return true; } // These handle the ice crap void dGoombaPie::_vf148() { 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) { diff --git a/src/shyguyGiants.cpp b/src/shyguyGiants.cpp index c4d7a77..e2532f1 100644 --- a/src/shyguyGiants.cpp +++ b/src/shyguyGiants.cpp @@ -61,18 +61,18 @@ class daShyGuyGiant : 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); - void collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther); + bool collisionCat13_Hammer(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 _vf148(); void _vf14C(); @@ -117,9 +117,9 @@ daShyGuyGiant *daShyGuyGiant::build() { // Collision related extern "C" void BigHanaPlayer(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); extern "C" void BigHanaYoshi(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); - extern "C" void BigHanaWeirdGP(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); - extern "C" void BigHanaGroundPound(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); - extern "C" void BigHanaFireball(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); + extern "C" bool BigHanaWeirdGP(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); + extern "C" bool BigHanaGroundPound(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); + extern "C" bool BigHanaFireball(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); extern "C" bool BigHanaIceball(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther); extern "C" void dAcPy_vf3F8(void* player, dEn_c* monster, int t); @@ -162,27 +162,35 @@ daShyGuyGiant *daShyGuyGiant::build() { void daShyGuyGiant::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daShyGuyGiant::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { - BigHanaWeirdGP(this, apThis, apOther); + bool daShyGuyGiant::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { + return BigHanaWeirdGP(this, apThis, apOther); } - void daShyGuyGiant::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { - BigHanaGroundPound(this, apThis, apOther); + bool daShyGuyGiant::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + return BigHanaGroundPound(this, apThis, apOther); } - void daShyGuyGiant::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { - BigHanaGroundPound(this, apThis, apOther); + bool daShyGuyGiant::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + return BigHanaGroundPound(this, apThis, apOther); } - void daShyGuyGiant::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daShyGuyGiant::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { apOther->owner->kill(); + return true; } - void daShyGuyGiant::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daShyGuyGiant::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ dAcPy_vf3F8(apOther->owner, this, 3); this->counter_504[apOther->owner->which_player] = 0xA; + return true; } - void daShyGuyGiant::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther){ } - void daShyGuyGiant::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther){ } - void daShyGuyGiant::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { } - void daShyGuyGiant::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daShyGuyGiant::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther){ + return true; + } + bool daShyGuyGiant::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther){ + return true; + } + bool daShyGuyGiant::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + return true; + } + bool daShyGuyGiant::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ int hitType = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 0); if (hitType == 1 || hitType == 3) { PlaySound(this, SE_EMY_CMN_STEP); @@ -192,13 +200,14 @@ daShyGuyGiant *daShyGuyGiant::build() { } this->counter_504[apOther->owner->which_player] = 0xA; + return true; } - void daShyGuyGiant::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ - BigHanaFireball(this, apThis, apOther); + bool daShyGuyGiant::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ + return BigHanaFireball(this, apThis, apOther); } - void daShyGuyGiant::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { - BigHanaFireball(this, apThis, apOther); + bool daShyGuyGiant::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + return BigHanaFireball(this, apThis, apOther); } bool daShyGuyGiant::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { return BigHanaIceball(this, apThis, apOther); 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 diff --git a/src/topman.cpp b/src/topman.cpp index 66b4454..7a345d3 100644 --- a/src/topman.cpp +++ b/src/topman.cpp @@ -43,16 +43,16 @@ class daTopman : 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 _vf148(); void _vf14C(); @@ -136,49 +136,58 @@ daTopman *daTopman::build() { this->playerCollision(apThis, apOther); } - void daTopman::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daTopman::collisionCatD_Drill(ActivePhysics *apThis, ActivePhysics *apOther) { this->dEn_c::playerCollision(apThis, apOther); this->_vf220(apOther->owner); deathInfo.isDead = 0; this->flags_4FC |= (1<<(31-7)); this->counter_504[apOther->owner->which_player] = 0; + return true; } - void daTopman::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { - this->collisionCatD_GroundPound(apThis, apOther); + bool daTopman::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { + this->collisionCatD_Drill(apThis, apOther); + return true; } - void daTopman::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { - this->collisionCatD_GroundPound(apThis, apOther); + bool daTopman::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + this->collisionCatD_Drill(apThis, apOther); + return true; } - void daTopman::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daTopman::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { backFire = apOther->owner->direction ^ 1; doStateChange(&StateID_KnockBack); + return true; } - void daTopman::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daTopman::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); + return true; } - void daTopman::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daTopman::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Die); + return true; } - void daTopman::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daTopman::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ backFire = apOther->owner->direction ^ 1; doStateChange(&StateID_KnockBack); + return true; } - void daTopman::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ + bool daTopman::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ backFire = apOther->owner->direction ^ 1; doStateChange(&StateID_KnockBack); + return true; } - void daTopman::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { + bool daTopman::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { backFire = apOther->owner->direction ^ 1; doStateChange(&StateID_KnockBack); + return true; } // void daTopman::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { |