diff options
Diffstat (limited to '')
-rw-r--r-- | src/bossMegaGoomba.cpp | 68 |
1 files changed, 10 insertions, 58 deletions
diff --git a/src/bossMegaGoomba.cpp b/src/bossMegaGoomba.cpp index 2bfc681..e4bc270 100644 --- a/src/bossMegaGoomba.cpp +++ b/src/bossMegaGoomba.cpp @@ -114,31 +114,6 @@ daMegaGoomba_c *daMegaGoomba_c::build() { return new(buffer) daMegaGoomba_c; } -void HexDump(char* address, u32 length) { - length = (length + 0x1f) & ~0x1f; - char line[0x11] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - for(u32 ii=0; ii < length; ii += 0x10) { - for(u32 jj=0; jj < 0x10; jj++) { - if((address[ii+jj] < 0x20) || (address[ii+jj] > 0x7e)) { - line[jj] = '.'; - }else{ - line[jj] = address[ii+jj]; - } - } - OSReport("%08x: %04x %04x %04x %04x %04x %04x %04x %04x |%s|\n", - (u32)(address+ii), - *(u16*)(address+ii+0x00), - *(u16*)(address+ii+0x02), - *(u16*)(address+ii+0x04), - *(u16*)(address+ii+0x06), - *(u16*)(address+ii+0x08), - *(u16*)(address+ii+0x0a), - *(u16*)(address+ii+0x0c), - *(u16*)(address+ii+0x0e), - line); - for(u32 jj=0; jj<0x10; jj++) line[jj] = 0; - } -} @@ -179,21 +154,16 @@ bool daMegaGoomba_c::takeHit(char count) { #define DEACTIVATE 0 bool daMegaGoomba_c::preSpriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) { - //OSReport("preSpriteCollision\n"); return false; } bool daMegaGoomba_c::prePlayerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { - //OSReport("prePlayerCollision\n"); return false; } -//bool daMegaGoomba_c::preYoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("preYoshiCollision\n"); return false; } -//bool daMegaGoomba_c::stageActorCollision(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("stageActorCollision\n"); return true; } void daMegaGoomba_c::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOther) { //HE'S TOO BADASS TO STOP FOR SMALLER GOOMBAS #if 0 - OSReport("spriteCollision\n"); float me = apThis->firstFloatArray[3]; if(((this->direction == 1) && (me > 0.0)) || ((this->direction == 0) && (me < 0.0))) { dStateBase_c* state = this->acState.getCurrentState(); @@ -205,7 +175,6 @@ void daMegaGoomba_c::spriteCollision(ActivePhysics *apThis, ActivePhysics *apOth } void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther) { - OSReport("Mario collision.\n"); /* * * * * * * * * * * * * * * * * * * * * * 0=normal??,1=dontHit,2=dontKill @@ -228,22 +197,17 @@ void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth char ret = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 2); if(ret == 1) { // regular jump apOther->someFlagByte |= 2; - OSReport("ret == 1; regular jump;\n"); if(this->takeHit(1)) doStateChange(&StateID_DieFall); } else if(ret == 3) { // spinning apOther->someFlagByte |= 2; - OSReport("ret == 3; spinning collision;\n"); if(this->takeHit(1)) doStateChange(&StateID_DieFall); } else if(ret == 0) { - OSReport("calling dEn_c::playerCollsiion(apThis, apOther);\n"); this->dEn_c::playerCollision(apThis, apOther); this->_vf220(apOther->owner); } else if(ret == 2) { - OSReport("Y U USIN' MINIMARIO?\n"); } else { - OSReport("usedForDeter...() returned %d\n", ret); } //FIXME hack to make multiple playerCollisions work @@ -252,34 +216,30 @@ void daMegaGoomba_c::playerCollision(ActivePhysics *apThis, ActivePhysics *apOth this->counter_504[apOther->owner->which_player] = 0; } -//void daMegaGoomba_c::yoshiCollision(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("yoshiCollision\n"); } -void daMegaGoomba_c::collisionCat1_Fireball_E_Explosion(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit Fireball\n"); } -bool daMegaGoomba_c::collisionCat2_IceBall_15_YoshiIce(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit Iceball\n"); return false; } -void daMegaGoomba_c::collisionCat3_StarPower(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Hit StarMario\n"); } -void daMegaGoomba_c::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("MarioHit\n"); } +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) { } +void daMegaGoomba_c::collisionCat5_Mario(ActivePhysics *apThis, ActivePhysics *apOther) { } void daMegaGoomba_c::collisionCat9_RollingObject(ActivePhysics *apThis, ActivePhysics *apOther) { - OSReport("Hit Rolling Object\n"); if(this->takeHit(1)) doStateChange(&StateID_DieFall); } -void daMegaGoomba_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Penguin Attack\n"); } -void daMegaGoomba_c::collisionCatD_GroundPound(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("Groundpound\n"); } -void daMegaGoomba_c::collisionCat11_PipeCannon(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("PipeCannon Hit\n"); } +void daMegaGoomba_c::collisionCatA_PenguinMario(ActivePhysics *apThis, ActivePhysics *apOther) {} +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) { - OSReport("Hit Hammer\n"); if(this->takeHit(1)) doStateChange(&StateID_DieFall); } void daMegaGoomba_c::collisionCat14_YoshiFire(ActivePhysics *apThis, ActivePhysics *apOther) { - OSReport("Hit Yoshi Fire\n"); if(this->takeHit(1)) doStateChange(&StateID_DieFall); } -void daMegaGoomba_c::_vf120(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("_vf120:\n"); } -void daMegaGoomba_c::_vf110(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("_vf110:\n"); } -void daMegaGoomba_c::_vf108(ActivePhysics *apThis, ActivePhysics *apOther) { OSReport("_vf108:\n"); } +void daMegaGoomba_c::_vf120(ActivePhysics *apThis, ActivePhysics *apOther) { } +void daMegaGoomba_c::_vf110(ActivePhysics *apThis, ActivePhysics *apOther) { } +void daMegaGoomba_c::_vf108(ActivePhysics *apThis, ActivePhysics *apOther) { } void daMegaGoomba_c::bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate) { nw4r::g3d::ResAnmChr anmChr = this->resFile.GetResAnmChr(name); @@ -362,14 +322,12 @@ void daMegaGoomba_c::setupCollision() { int daMegaGoomba_c::onCreate() { /*80033230 daEnLkuribo_c::onCreate()*/ - OSReport("Creating MG's body model\n"); this->setupBodyModel(); this->max_speed.y = -4.0; this->direction = dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(this, this->pos); this->rot.y = (this->direction) ? 0xE000 : 0x2000; this->_518 = 2; - OSReport("Creating MegaGoomba's Physics Struct\n"); ActivePhysics::Info hm; hm.xDistToCenter = 0.0; hm.yDistToCenter = 8.0; @@ -403,10 +361,8 @@ int daMegaGoomba_c::onCreate() { this->JumpDist = 64.0; this->JumpTime = 50.0; - OSReport("Setting MegaGoomba's State\n"); doStateChange(&StateID_Grow); - OSReport("Going to Execute MegaGoomba\n"); this->onExecute(); return true; } @@ -418,7 +374,6 @@ int daMegaGoomba_c::onDelete() { int daMegaGoomba_c::onExecute() { //80033450 acState.execute(); - //OSReport("Field_34A: %02x\n", this->_34A); //if(CheckSomethingEnemyRelated()) // checks class1EC bitfield // sub_80033f10(this); // spawn hit effect and play hit sound //else @@ -675,7 +630,6 @@ void daMegaGoomba_c::endState_Turn() { void daMegaGoomba_c::beginState_Walk() { //inline this piece of code this->direction = dSprite_c__getXDirectionOfFurthestPlayerRelativeToVEC3(this, this->pos); - OSReport("Direction: %d\n", this->direction); this->speed.x = this->speed.z = 0.0; this->max_speed.x = (this->direction) ? -this->XSpeed : this->XSpeed; this->speed.y = -4.0; @@ -703,7 +657,6 @@ void daMegaGoomba_c::executeState_Walk() { } u32 bitfield2 = this->collMgr.directional_bitfields[this->direction]; if(bitfield2) { - OSReport("Found wall: %08x\n", bitfield2); this->doStateChange(&StateID_Turn); } DoStuffAndMarkDead(this, this->pos, 1.0); @@ -731,7 +684,6 @@ void daMegaGoomba_c::executeState_Walk() { #if 0 //if(CollidedWithTile(this->classAt1EC)) { if( this->collMgr.CollidedWithTile() { - OSReport("CollidedWithTile() : true [%08x]\n", this->collMgr.bitfield_for_checks); } #endif |