diff options
Diffstat (limited to 'src/bossKoopaThrow.cpp')
-rw-r--r-- | src/bossKoopaThrow.cpp | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/src/bossKoopaThrow.cpp b/src/bossKoopaThrow.cpp index 19beadd..821a848 100644 --- a/src/bossKoopaThrow.cpp +++ b/src/bossKoopaThrow.cpp @@ -22,10 +22,10 @@ struct TypeInfo { static const TypeInfo types[6] = { {"choropoo", "g3d/choropoo.brres", "spanner", "Wm_en_hit", 0, SE_BOSS_JR_FLOOR_BREAK, 0, 8.0f, 2.0f, 0, 0, 0x1000}, {"choropoo", "g3d/choropoo.brres", "spanner", "Wm_en_burst_s", 0, SE_BOSS_JR_BOMB_BURST, 0, 8.0f, 2.0f, 0, 0, 0x1000}, - {"koopa_clown_bomb", "g3d/koopa_clown_bomb.brres", "koopa_clown_bomb", "Wm_en_burst_s", SE_BOSS_JR_BOMB_BOUND, SE_BOSS_JR_BOMB_BURST, 0, 16.0f, 0.8f, 0x200, 0x800, 0x1000}, + {"koopa_clown_bomb", "g3d/koopa_clown_bomb.brres", "koopa_clown_bomb", "Wm_en_burst_s", SE_EMY_ELCJ_THROW, SE_BOSS_JR_BOMB_BURST, 0, 16.0f, 0.8f, 0x200, 0x800, 0x1000}, {"bros", "g3d/t00.brres", "bros_hammer", "Wm_en_hit", 0, SE_OBJ_HAMMER_HIT_BOTH, SE_EMY_MEGA_BROS_HAMMER, 16.0f, 2.0f, 0, 0, 0x1000}, {"dossun", "g3d/t00.brres", "dossun", "Wm_en_hit", SE_EMY_DOSSUN, SE_EMY_DOSSUN_DEAD, 0, 16.0f, 1.0f, 0x100, 0x100, 0x100}, - {"KoopaShip", "g3d/present.brres", "PresentBox_penguin", "Wm_dm_presentopen",SE_DEMO_OP_PRESENT_THROW_2400f, SE_DEMO_OP_PRESENT_BOX_BURST, 0, 12.0f, 1.0f, 0x20, 0x40, 0x200} + {"KoopaShip", "g3d/present.brres", "PresentBox_penguin", "Wm_dm_presentopen",SE_DEMO_OP_PRESENT_THROW_2400f, SE_DEMO_OP_PRESENT_BOX_BURST, 0, 20.0f, 1.0f, 0x20, 0x40, 0x200} }; @@ -88,7 +88,7 @@ void daKoopaThrow::playerCollision(ActivePhysics *apThis, ActivePhysics *apOther if (Type == 5) { PlaySoundAsync(this, currentInfo->breakSound); SpawnEffect(currentInfo->deathEffect, 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){3.0, 3.0, 3.0}); - dStageActor_c *spawned = CreateActor(EN_HATENA_BALLOON, 0x100, this->pos, 0, 0); + dStageActor_c *spawned = CreateActor(EN_ITEM, 0x20000063, this->pos, 0, 0); spawned->pos.x = this->pos.x; spawned->pos.y = this->pos.y; this->Delete(1); @@ -141,9 +141,7 @@ void daKoopaThrow::collisionCat7_WMWaggleWater(ActivePhysics *apThis, ActivePhys daKoopaThrow *daKoopaThrow::build() { - OSReport("Building"); void *buffer = AllocFromGameHeap1(sizeof(daKoopaThrow)); - OSReport("Built"); return new(buffer) daKoopaThrow; } @@ -154,31 +152,20 @@ int daKoopaThrow::onCreate() { this->Type = (this->settings >> 4) & 0xF; this->front = (this->settings >> 8) & 0xF; - OSReport("Type is %d", this->Type); - currentInfo = &types[Type]; - OSReport("Current Info is: %s, %s, %s", currentInfo->arcName, currentInfo->brresName, currentInfo->modelName); - allocator.link(-1, GameHeaps[0], 0, 0x20); - OSReport("Allocated"); - nw4r::g3d::ResFile rf(getResource(currentInfo->arcName, currentInfo->brresName)); - OSReport("Res File Gotten"); bodyModel.setup(rf.GetResMdl(currentInfo->modelName), &allocator, 0x224, 1, 0); - OSReport("Body model setup"); SetupTextures_Enemy(&bodyModel, 0); - OSReport("Textures setup"); allocator.unlink(); - OSReport("Onwards to Physics"); - ActivePhysics::Info KoopaJunk; - KoopaJunk.xDistToCenter = 0.0; + KoopaJunk.xDistToCenter = -currentInfo->size; KoopaJunk.yDistToCenter = 0.0; KoopaJunk.xDistToEdge = currentInfo->size; KoopaJunk.yDistToEdge = currentInfo->size; @@ -266,7 +253,6 @@ int daKoopaThrow::onExecute() { float rect[] = {this->_320, this->_324, this->spriteSomeRectX, this->spriteSomeRectY}; int ret = this->outOfZone(this->pos, (float*)&rect, this->currentZoneID); if(ret) { - OSReport("Deleting"); this->Delete(1); } @@ -295,8 +281,8 @@ void daKoopaThrow::executeState_Straight() { HandleYSpeed(); doSpriteMovement(); - cmgr_returnValue = collMgr.CollidedWithTile(); - collMgr.execute(); + // cmgr_returnValue = collMgr.CollidedWithTile(); + // collMgr.execute(); // if (collMgr.CollidedWithTile() || (collMgr.bitfield_for_checks & (0x15 << direction))) { // // hit the ground or wall @@ -324,17 +310,6 @@ void daKoopaThrow::executeState_Straight() { PlaySound(this, currentInfo->flySound); } - if (Type == 5) { - if (this->speed.y < 0.0) { - PlaySoundAsync(this, currentInfo->breakSound); - SpawnEffect(currentInfo->deathEffect, 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.0, 1.0, 1.0}); - dStageActor_c *spawned = CreateActor(EN_HATENA_BALLOON, 0x100, this->pos, 0, 0); - spawned->pos.x = this->pos.x; - spawned->pos.y = this->pos.y; - this->Delete(1); - } - } - } void daKoopaThrow::endState_Straight() { } |