diff options
author | Colin Noga <Tempus@chronometry.ca> | 2012-12-04 02:09:02 -0600 |
---|---|---|
committer | Colin Noga <Tempus@chronometry.ca> | 2012-12-04 02:09:02 -0600 |
commit | 42069c9299c18891a81efeeb45d19007d80c70c1 (patch) | |
tree | de7263f7bd51366695f5f0a8fc6e2a1717d4fb5b /src | |
parent | e8ffbf5bdc704c4efb426f4d1c10b21527debdc3 (diff) | |
download | kamek-42069c9299c18891a81efeeb45d19007d80c70c1.tar.gz kamek-42069c9299c18891a81efeeb45d19007d80c70c1.zip |
fixed a bunch of bugs, shy guy, mega goomba, challenge star, topman boss
Diffstat (limited to '')
-rw-r--r-- | src/bossMegaGoomba.cpp | 20 | ||||
-rw-r--r-- | src/bossTopman.cpp | 4 | ||||
-rw-r--r-- | src/challengeStar.cpp | 2 | ||||
-rw-r--r-- | src/shyguy.cpp | 78 |
4 files changed, 53 insertions, 51 deletions
diff --git a/src/bossMegaGoomba.cpp b/src/bossMegaGoomba.cpp index 1350ee7..e67caac 100644 --- a/src/bossMegaGoomba.cpp +++ b/src/bossMegaGoomba.cpp @@ -77,6 +77,7 @@ class daMegaGoomba_c : public dEn_c { 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); @@ -264,11 +265,14 @@ void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth } } void daMegaGoomba_c::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { - apOther->someFlagByte |= 2; - - if(this->takeHit(1)) - doStateChange(&StateID_DieFall); + VEC2 eSpeed = {speed.x, speed.y}; + killWithSpecifiedState(apOther->owner, &eSpeed, &dEn_c::StateID_DieOther); } +void daMegaGoomba_c::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { + VEC2 eSpeed = {speed.x, speed.y}; + killWithSpecifiedState(apOther->owner, &eSpeed, &dEn_c::StateID_DieOther); +} + 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); } @@ -276,7 +280,10 @@ void daMegaGoomba_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePh if(this->takeHit(1)) doStateChange(&StateID_DieFall); } -void daMegaGoomba_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) {} +void daMegaGoomba_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { + if(this->takeHit(1)) + doStateChange(&StateID_DieFall); +} 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) { @@ -301,6 +308,7 @@ void daMegaGoomba_c::bindAnimChr_and_setUpdateRate(const char* name, int unk, fl void daMegaGoomba_c::dieFall_Begin() { this->dEn_c::dieFall_Begin(); + PlaySound(this, SE_EMY_KURIBO_L_DAMAGE_03); } void daMegaGoomba_c::dieFall_Execute() { @@ -612,6 +620,8 @@ void daMegaGoomba_c::dieOther_Begin() { speed.x = speed.y = speed.z = 0.0f; removeMyActivePhysics(); + PlaySound(this, SE_EMY_KURIBO_L_SPLIT_HPDP); + rot.y = 0; counter_500 = 60; } diff --git a/src/bossTopman.cpp b/src/bossTopman.cpp index d76af1a..5888859 100644 --- a/src/bossTopman.cpp +++ b/src/bossTopman.cpp @@ -332,9 +332,9 @@ int daDreidel::onCreate() { this->speed.x = 0.0; this->speed.y = 0.0; - this->max_speed.x = 0.8; + this->max_speed.x = 1.1; this->x_speed_inc = 0.0; - this->XSpeed = 0.8; + this->XSpeed = 1.1; this->isInSpace = this->settings & 0xF; this->fromBehind = 0; diff --git a/src/challengeStar.cpp b/src/challengeStar.cpp index 342dd1b..7724bb9 100644 --- a/src/challengeStar.cpp +++ b/src/challengeStar.cpp @@ -81,7 +81,7 @@ int dChallengeStar::onCreate() { ActivePhysics::Info HitMeBaby; HitMeBaby.xDistToCenter = 0.0; - HitMeBaby.yDistToCenter = -4.0; + HitMeBaby.yDistToCenter = 3.0; HitMeBaby.xDistToEdge = 6.0; HitMeBaby.yDistToEdge = 6.0; HitMeBaby.category1 = 0x5; diff --git a/src/shyguy.cpp b/src/shyguy.cpp index bc889f8..f78cb4d 100644 --- a/src/shyguy.cpp +++ b/src/shyguy.cpp @@ -58,7 +58,7 @@ class daShyGuy : public dEn_c { mEf::es2 effect; - int type; + int timer; int jumpCounter; int baln; @@ -106,15 +106,12 @@ class daShyGuy : public dEn_c { void collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther); - void _vf108(ActivePhysics *apThis, ActivePhysics *apOther); - void _vf110(ActivePhysics *apThis, ActivePhysics *apOther); - void collisionCat8_FencePunch(ActivePhysics *apThis, ActivePhysics *apOther); - void _vf120(ActivePhysics *apThis, ActivePhysics *apOther); void collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther); void _vf148(); void _vf14C(); bool CreateIceActors(); + void addScoreWhenHit(void *other); USING_STATES(daShyGuy); DECLARE_STATE(Walk); @@ -138,6 +135,7 @@ class daShyGuy : public dEn_c { DECLARE_STATE(Die); public: void popBalloon(); + int type; }; daShyGuy *daShyGuy::build() { @@ -185,9 +183,15 @@ daShyGuy *daShyGuy::build() { // Collision callback to help shy guy not die at inappropriate times and ruin the dinner void shyCollisionCallback(ActivePhysics *apThis, ActivePhysics *apOther) { - if (apOther->owner->name != 89) { - dEn_c::collisionCallback(apThis, apOther); + int t = ((daShyGuy*)apThis->owner)->type; + if (t == 6 || t == 7 || t == 8) { + // Should I do something about ice blocks here? + ((daShyGuy*)apThis->owner)->popBalloon(); } + + if ((apOther->owner->name == 89) && (t == 5)) { return; } + + dEn_c::collisionCallback(apThis, apOther); } void ChucklesAndKnuckles(ActivePhysics *apThis, ActivePhysics *apOther) { @@ -231,9 +235,6 @@ daShyGuy *daShyGuy::build() { 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; } else { // Ballooneers @@ -241,11 +242,6 @@ daShyGuy *daShyGuy::build() { deathState = &StateID_Die; } - // fix multiple player collisions via megazig - deathInfo.isDead = 0; - this->flags_4FC |= (1<<(31-7)); - this->counter_504[apOther->owner->which_player] = 0; - if (this->isDown == 0) { hitType = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 2); @@ -263,7 +259,6 @@ daShyGuy *daShyGuy::build() { else { // Shy Guy is in throwy mode - kill it with fire this->playEnemyDownSound1(); doStateChange(deathState); - deathInfo.isDead = 1; } } else if(hitType == 3) { // spinning jump or whatever? @@ -275,7 +270,6 @@ daShyGuy *daShyGuy::build() { else { // Shy Guy is in throwy mode - kill it with fire this->playEnemyDownSound1(); doStateChange(deathState); - deathInfo.isDead = 1; } } else if(hitType == 0) { @@ -286,26 +280,26 @@ daShyGuy *daShyGuy::build() { } void daShyGuy::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { this->playerCollision(apThis, apOther); } - void daShyGuy::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { PlaySound(this, SE_EMY_DOWN); doStateChange(&StateID_Die); } - void daShyGuy::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { PlaySound(this, SE_EMY_DOWN); doStateChange(&StateID_Die); } - void daShyGuy::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { PlaySound(this, SE_EMY_DOWN); doStateChange(&StateID_Die); } - void daShyGuy::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { doStateChange(&StateID_Die); } - - void daShyGuy::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); } - void daShyGuy::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); } - void daShyGuy::_vf108(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); } - void daShyGuy::_vf110(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); } - void daShyGuy::collisionCat8_FencePunch(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); } - void daShyGuy::_vf120(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); } - void daShyGuy::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_Die); } - - void daShyGuy::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_DieSmoke); } + void daShyGuy::collisionCatD_GroundPound(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}); + this->addScoreWhenHit(this); + doStateChange(&StateID_Die); + } + void daShyGuy::collisionCat7_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCatD_GroundPound(apThis, apOther); } + void daShyGuy::collisionCat7_GroundPoundYoshi(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCatD_GroundPound(apThis, apOther); } + void daShyGuy::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCatD_GroundPound(apThis, apOther); } + void daShyGuy::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther){ this->collisionCatD_GroundPound(apThis, apOther); } + void daShyGuy::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther){ this->collisionCatD_GroundPound(apThis, apOther); } + void daShyGuy::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther){ this->collisionCatD_GroundPound(apThis, apOther); } + void daShyGuy::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { this->collisionCatD_GroundPound(apThis, apOther); } void daShyGuy::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther){ dEn_c::collisionCat3_StarPower(apThis, apOther); doStateChange(&StateID_Die); } + void daShyGuy::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther){ doStateChange(&StateID_DieSmoke); } void daShyGuy::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { this->damage += 1; @@ -359,18 +353,16 @@ daShyGuy *daShyGuy::build() { extern "C" void __destroy_arr(void*, void(*)(void), int, int); //extern "C" __destroy_arr(struct DoSomethingCool, void(*)(void), int cnt, int bar); - bool daShyGuy::CreateIceActors() - { - struct DoSomethingCool my_struct = { 0, this->pos, {1.0, 1.5, 1.5}, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + bool daShyGuy::CreateIceActors() { + struct DoSomethingCool my_struct = { 0, this->pos, {1.2, 1.5, 1.5}, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; + if (type > 8) { my_struct.scale = (Vec3){2.4, 3.0, 3.0}; } this->frzMgr.Create_ICEACTORs( (void*)&my_struct, 1 ); __destroy_arr( (void*)&my_struct, sub_80024C20, 0x3C, 1 ); return true; } - - - void daShyGuy::collisionCat13_Hammer(ActivePhysics *apThis, ActivePhysics *apOther) { - doStateChange(&StateID_Die); + void daShyGuy::addScoreWhenHit(void *other) { + if (type < 9) { dEn_c::addScoreWhenHit(other); } } bool daShyGuy::calculateTileCollisions() { @@ -471,9 +463,9 @@ int daShyGuy::onCreate() { ActivePhysics::Info iballoonPhysics; iballoonPhysics.xDistToCenter = 0.0; - iballoonPhysics.yDistToCenter = -24.0; - iballoonPhysics.xDistToEdge = 20.0; - iballoonPhysics.yDistToEdge = 12.0; + iballoonPhysics.yDistToCenter = -18.0; + iballoonPhysics.xDistToEdge = 16.0; + iballoonPhysics.yDistToEdge = 15.0; iballoonPhysics.category1 = 0x3; iballoonPhysics.category2 = 0x0; @@ -591,7 +583,7 @@ int daShyGuy::onCreate() { HitMeBaby.xDistToCenter = 0.0; HitMeBaby.yDistToCenter = 24.0; - HitMeBaby.xDistToEdge = 28.0; + HitMeBaby.xDistToEdge = 20.0; HitMeBaby.yDistToEdge = 24.0; // giantRider.init(this, -19.5f, 18.0f, 19.5f, 18.0f); @@ -607,7 +599,7 @@ int daShyGuy::onCreate() { HitMeBaby.xDistToCenter = 0.0; HitMeBaby.yDistToCenter = 12.0; - HitMeBaby.xDistToEdge = 14.0; + HitMeBaby.xDistToEdge = 10.0; HitMeBaby.yDistToEdge = 12.0; } |