diff options
Diffstat (limited to '')
-rw-r--r-- | src/bossMegaGoomba.cpp | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/src/bossMegaGoomba.cpp b/src/bossMegaGoomba.cpp index d70f6cd..996a609 100644 --- a/src/bossMegaGoomba.cpp +++ b/src/bossMegaGoomba.cpp @@ -130,7 +130,6 @@ extern "C" dStageActor_c *GetSpecificPlayerActor(int number); extern "C" char usedForDeterminingStatePress_or_playerCollision(dEn_c* t, ActivePhysics *apThis, ActivePhysics *apOther, int unk1); extern "C" void doSpriteMovement(dStageActor_c* actor); extern "C" int SomeStrangeModification(dStageActor_c* actor); -extern "C" int CollidedWithTile(u8* c_1EC); extern "C" void DoStuffAndMarkDead(dStageActor_c *actor, Vec vector, float unk); extern "C" int SmoothRotation(short* rot, u16 amt, int unk2); @@ -194,8 +193,25 @@ 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 + * daEnBrosBase_c ::player = 0 + * daEnBrosBase_c::yoshi = 0 + * daEnPipePirahna::player = 1 + * daEnPipePirahna::yoshi = 1 + * daEnKuriboBase_c::player = 0 + * daEnKuriboBase_c::yoshi = 0 + * daEnLargeKuribo_c::player = 0 + * daEnLargeKuribo_c::yoshi = 2 + * daEnNokonoko_c::player = 0 + * daEnNokonoko_c::yoshi = 0 + * daEnSubBoss_c = 2 + * + * * * * * * * * * * * * * * * * * * * * */ //FIXME rename and make part of dStageActor_c - char ret = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 0); + //unk=0 does _vfs, unk=1 does playSeCmnStep + //char ret = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 0); + char ret = usedForDeterminingStatePress_or_playerCollision(this, apThis, apOther, 2); if(ret == 1) { // regular jump apOther->someFlagByte |= 2; OSReport("ret == 1; regular jump;\n"); @@ -303,18 +319,16 @@ void daMegaGoomba_c::setupBodyModel() { allocator.unlink(); } -extern "C" void ClassAt1EC_Init(u8*, dStageActor_c*, u8*, u8*, u8*); - void daMegaGoomba_c::setupCollision() { //POINTLESS WITH GROWTH this->scale.x = this->scale.y = this->scale.z = 0.666; - ClassAt1EC_Init(this->classAt1EC, this, struct_1, 0, struct_3); + this->collMgr.Init(this, struct_1, 0, struct_3); char foo = this->_391; - this->_D0.x = 0.0; - this->_D0.y = 16.0; - this->_D0.z = 0.0; + this->pos_delta2.x = 0.0; + this->pos_delta2.y = 16.0; + this->pos_delta2.z = 0.0; this->spriteSomeRectX = 32.0; this->spriteSomeRectY = 32.0; @@ -645,13 +659,13 @@ void daMegaGoomba_c::executeState_Walk() { int ret = SomeStrangeModification(this); if(ret & 1) this->speed.y = 0.0; - u32 bitfield = *(u32*)(this->classAt1EC+0x88); + u32 bitfield = this->collMgr.bitfield_for_checks; if(bitfield & (0x15<<this->direction)) { this->pos.x = this->last_pos.x; this->doStateChange(&StateID_Turn); //this->acState.setField10ToOne(); } - u32 bitfield2 = *(u32*)(this->classAt1EC+0xb0+(4-(this->direction*4))); + u32 bitfield2 = this->collMgr.directional_bitfields[this->direction]; if(bitfield2) { OSReport("Found wall: %08x\n", bitfield2); this->doStateChange(&StateID_Turn); @@ -679,8 +693,9 @@ void daMegaGoomba_c::executeState_Walk() { } #if 0 - if(CollidedWithTile(this->classAt1EC)) { - OSReport("CollidedWithTile() : true [%08x]\n", *(u32*)(this->classAt1EC+0x88)); + //if(CollidedWithTile(this->classAt1EC)) { + if( this->collMgr.CollidedWithTile() { + OSReport("CollidedWithTile() : true [%08x]\n", this->collMgr.bitfield_for_checks); } #endif |