diff options
| author | Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> | 2024-07-06 09:47:49 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-06 09:47:49 -0300 |
| commit | c348962cab034335f5eb1ee4bc2ed4851f40542e (patch) | |
| tree | d3fffe889776bc638195982b3f16852c09cd834d /src/engine | |
| parent | 24e316a2b26ff768f15ec217798898b4b0a7b8f9 (diff) | |
Sector Z, Fortuna & General Docs (#261)
* Sector Z Docs initial
* Sector Z docs
* some other things
* correction
* Space Junk
* SectorZ_SetLevelObjects
* rename assets with correct prefix
* aSzBackgroundTex
* details
* pr review
* Sector X initials
* Meteo Initials
* Sector X things I forgot
* fox_tr360 & fox_ve1 & fox_so initials
* fox_so details
* Zones initials
* More Zones initials
* more zones initials
* area 6 initials
* fortuna inits
* fortuna actors
* some more docs
* more docs for Fortuna
* fix mistake in data incorrectly imported
* Fortuna Radars
* BossFO
* Sector Y Initials
* Venom 2 general Docs
* Some Corneria Docs
* Actor, Scenery and Boss IDs in update and draw functions of gObjectInfo
* more docs and this usage
* fox_360 this usage
* more actor types and this usages
* fox_effect type usage
* training docs
* some Sector X docs
* fix incorrect usage of "this"
* fix comment
* more docs
* funcNames
* fox_bg spacing
* boolean
* scenery corneria bumbs
* terrain bumps
* corneria arch
* more corneria objects
* hitboxes
* more corneria objects
* more corneria level objects
* more corneria objects
* aCoWaterfallDL
* corneria docs
* more corneria docs
* Granga swork start
* corneria swork
* Corneria
* Corneria Granga docs
* more granga docs
* granga work buffer enum
* CarrierParts enum use
* option
* Corneria Docs
* GRANGA_FWK
* fox_co.h header
* fix Fault_FillRectangle typo
* PR reviews
* sCsTeamInitialPos
* Doodad
Diffstat (limited to 'src/engine')
| -rw-r--r-- | src/engine/fox_360.c | 420 | ||||
| -rw-r--r-- | src/engine/fox_beam.c | 57 | ||||
| -rw-r--r-- | src/engine/fox_bg.c | 97 | ||||
| -rw-r--r-- | src/engine/fox_boss.c | 55 | ||||
| -rw-r--r-- | src/engine/fox_col1.c | 11 | ||||
| -rw-r--r-- | src/engine/fox_col2.c | 10 | ||||
| -rw-r--r-- | src/engine/fox_context.c | 4 | ||||
| -rw-r--r-- | src/engine/fox_demo.c | 489 | ||||
| -rw-r--r-- | src/engine/fox_edata.c | 6 | ||||
| -rw-r--r-- | src/engine/fox_edata_info.c | 540 | ||||
| -rw-r--r-- | src/engine/fox_edisplay.c | 60 | ||||
| -rw-r--r-- | src/engine/fox_effect.c | 2984 | ||||
| -rw-r--r-- | src/engine/fox_enmy.c | 1330 | ||||
| -rw-r--r-- | src/engine/fox_enmy2.c | 181 | ||||
| -rw-r--r-- | src/engine/fox_game.c | 2 | ||||
| -rw-r--r-- | src/engine/fox_hud.c | 29 | ||||
| -rw-r--r-- | src/engine/fox_pause.c | 3 | ||||
| -rw-r--r-- | src/engine/fox_play.c | 120 | ||||
| -rw-r--r-- | src/engine/fox_reset.c | 2 | ||||
| -rw-r--r-- | src/engine/fox_save.c | 9 | ||||
| -rw-r--r-- | src/engine/fox_tank.c | 12 | ||||
| -rw-r--r-- | src/engine/fox_versus.c | 2 |
22 files changed, 3445 insertions, 2978 deletions
diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index dfa2b95c..cb52d2ef 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -49,14 +49,15 @@ bool gShowAllRangeCountdown; s32 gAllRangeFrameCount; f32 gAllRangeCountdownScale; -void AllRange_GetStarWolfHits(Actor* actor) { +void AllRange_GetStarWolfHits(Actor* this) { s32 hits = 0; - (void) "time=%d\n"; - (void) "time=%d\n"; - (void) "time=%d\n"; - (void) "time=%d\n"; - (void) "time=%d\n"; + PRINTF("time=%d\n"); + PRINTF("time=%d\n"); + PRINTF("time=%d\n"); + PRINTF("time=%d\n"); + PRINTF("time=%d\n"); + if (gCurrentLevel == LEVEL_VENOM_2) { if (gAllRangeFrameCount < 128 * 30) { hits = 50; @@ -79,7 +80,7 @@ void AllRange_GetStarWolfHits(Actor* actor) { } } if (hits != 0) { - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, hits); + BonusText_Display(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, hits); } gHitCount += hits; D_ctx_80177850 = 15; @@ -105,49 +106,51 @@ void AllRange_DrawCountdown(void) { } } -void Boss309_Update(Boss* boss) { - OvlI4_CallFunction(OVLCALL_BOSS309_UPDATE, boss); +void Boss309_Update(Boss309* this) { + OvlI4_CallFunction(OVLCALL_BOSS309_UPDATE, this); } -void Boss309_Draw(Boss* boss) { - OvlI4_CallFunction(OVLCALL_BOSS309_DRAW, boss); +void Boss309_Draw(Boss309* this) { + OvlI4_CallFunction(OVLCALL_BOSS309_DRAW, this); } -void Boss310_Update(Boss* boss) { - OvlI4_CallFunction(OVLCALL_BOSS310_UPDATE, boss); +void Boss310_Update(Boss310* this) { + OvlI4_CallFunction(OVLCALL_BOSS310_UPDATE, this); } -void Boss310_Draw(Boss* boss) { - OvlI4_CallFunction(OVLCALL_BOSS310_DRAW, boss); +void Boss310_Draw(Boss310* this) { + OvlI4_CallFunction(OVLCALL_BOSS310_DRAW, this); } -void Actor271_Update(Actor* actor) { - OvlI4_CallFunction(OVLCALL_ACTOR271_UPDATE, actor); +void Actor271_Update(Actor271* this) { + OvlI4_CallFunction(OVLCALL_ACTOR271_UPDATE, this); } -void Actor271_Draw(Actor* actor) { - OvlI4_CallFunction(OVLCALL_ACTOR271_DRAW, actor); +void Actor271_Draw(Actor271* this) { + OvlI4_CallFunction(OVLCALL_ACTOR271_DRAW, this); } -void Actor272_Update(Actor* actor) { - OvlI4_CallFunction(OVLCALL_ACTOR272_UPDATE, actor); +void Actor272_Update(Actor272* this) { + OvlI4_CallFunction(OVLCALL_ACTOR272_UPDATE, this); } -void Actor272_Draw(Actor* actor) { - OvlI4_CallFunction(OVLCALL_ACTOR272_DRAW, actor); +void Actor272_Draw(Actor272* this) { + OvlI4_CallFunction(OVLCALL_ACTOR272_DRAW, this); } void AllRange_GreatFoxRepair(Player* player) { - Vec3f sp6C; - Vec3f sp60; + Vec3f src; + Vec3f dest; gCsFrameCount++; + switch (player->csState) { case 0: player->hitTimer = player->mercyTimer = player->damage = player->barrelRollAlpha = player->boostMeter = player->boostCooldown = player->somersault = gCsFrameCount = 0; player->zRotBarrelRoll = player->camRoll = player->boostSpeed = player->camDist = player->knockback.x = player->knockback.y = player->knockback.z = player->damageShake = player->aerobaticPitch = 0.0f; + gCsCamEyeX = 1673.0f; gCsCamEyeY = 337.0f; if (player->pos.z < 0.0f) { @@ -155,6 +158,7 @@ void AllRange_GreatFoxRepair(Player* player) { } else { gCsCamEyeZ = 480.0f; } + player->rot.y = 0.0f; player->pos.x = 2100.0f; player->baseSpeed = 30.0f; @@ -169,6 +173,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->wings.modelId = 1; player->csState++; break; + case 1: if (gCsFrameCount >= 47) { gFillScreenAlphaTarget = 255; @@ -180,6 +185,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->baseSpeed = 0.0f; } break; + case 2: if (gFillScreenAlpha == 255) { gFillScreenAlphaTarget = 0; @@ -187,12 +193,15 @@ void AllRange_GreatFoxRepair(Player* player) { player->pos.y = -420.0f; player->pos.z = 0.0f; player->rot.z = 0.0f; + gCsCamEyeX = -683.0f; gCsCamEyeY = -346.0f; gCsCamEyeZ = 305.0f; + player->shields = Play_GetMaxShields(); player->wings.rightState = WINGSTATE_INTACT; player->wings.leftState = WINGSTATE_INTACT; + if (gExpertMode) { gRightWingHealth[0] = gLeftWingHealth[0] = 10; } else { @@ -202,6 +211,7 @@ void AllRange_GreatFoxRepair(Player* player) { player->csState++; } break; + case 3: gFillScreenAlphaStep = 32; gCsCamEyeZ -= 1.0f; @@ -210,10 +220,10 @@ void AllRange_GreatFoxRepair(Player* player) { player->yRot_114 = 90.0f; player->baseSpeed = gArwingSpeed; player->csState++; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, player->sfxSource, 0); } break; + case 4: gCsCamEyeZ -= 1.0f; gCsCamEyeX -= 1.0f; @@ -235,13 +245,13 @@ void AllRange_GreatFoxRepair(Player* player) { Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 3.0f, 0); Matrix_RotateY(gCalcMatrix, (player->rot.y + player->yRot_114 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(player->rot.x * M_DTOR), MTXF_APPLY); - sp6C.x = 0.0f; - sp6C.y = 0.0f; - sp6C.z = player->baseSpeed; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp60); - player->vel.x = sp60.x; - player->vel.z = sp60.z; - player->vel.y = sp60.y; + src.x = 0.0f; + src.y = 0.0f; + src.z = player->baseSpeed; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + player->vel.x = dest.x; + player->vel.z = dest.z; + player->vel.y = dest.y; player->pos.x += player->vel.x; player->pos.y += player->vel.y; player->pos.z += player->vel.z; @@ -293,16 +303,15 @@ void ActorAllRange_SetShadowData(Actor* this) { Vec3f spA8; f32 spA0[2]; Vec3f sp94 = { 0.0f, -10.0f, 0.0f }; - s32 pad1; - s32 pad2; + s32 pad[2]; this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f; if (this->drawShadow && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3)) && + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3)) && (fabsf(scenery360->obj.pos.x - this->obj.pos.x) < 2500.0f) && (fabsf(scenery360->obj.pos.z - this->obj.pos.z) < 2500.0f)) { temp1.x = scenery360->obj.pos.x; @@ -322,6 +331,7 @@ void ActorAllRange_SetShadowData(Actor* this) { spC0.z = temp1.z; // fake? weird ordering spCC.y = spD8.y + temp1.y; spCC.z = spD8.z + temp1.z; + if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { if (scenery360->obj.id == OBJ_SCENERY_149) { colId = COL1_5; @@ -336,7 +346,7 @@ void ActorAllRange_SetShadowData(Actor* this) { } } else { colId = COL2_0; - if (scenery360->obj.id == OBJ_SCENERY_3) { + if (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; } if (func_col2_800A3690(&spCC, &spC0, colId, &spB4)) { @@ -358,22 +368,24 @@ static Vec3f sTeamSpawnPos[4] = { { 300.0f, 900.0f, 7200.0f }, }; static AllRangeAi sTeamAi[4] = { AI360_FOX, AI360_FALCO, AI360_SLIPPY, AI360_PEPPY }; -static s32 sTeamSpawnTargets[4] = { -1, AI360_10, AI360_10 + 1, AI360_10 + 2 }; -static s32 sTeamSpawnTargetsKA[4] = { -1, AI360_10 + 11, AI360_10 + 13, AI360_10 + 15 }; +static s32 sTeamSpawnTargets[4] = { -1, AI360_ENEMY, AI360_ENEMY + 1, AI360_ENEMY + 2 }; +static s32 sTeamSpawnTargetsKA[4] = { -1, AI360_ENEMY + 11, AI360_ENEMY + 13, AI360_ENEMY + 15 }; void ActorAllRange_SpawnTeam(void) { - Actor* actor; + ActorAllRange* actor; s32 i; s32 temp = 4; - for (i = 0, actor = gActors; i < temp; i++, actor++) { + for (i = 0, actor = &gActors[0]; i < temp; i++, actor++) { if ((i > 0) && (gTeamShields[i] <= 0)) { continue; } + Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; actor->obj.id = OBJ_ACTOR_ALLRANGE; Object_SetInfo(&actor->info, actor->obj.id); + if (i == 0) { actor->aiType = AI360_EVENT_HANDLER; } else { @@ -381,21 +393,28 @@ void ActorAllRange_SpawnTeam(void) { actor->obj.pos.y = sTeamSpawnPos[i].y; actor->obj.pos.z = sTeamSpawnPos[i].z; actor->aiType = sTeamAi[i]; + if (gCurrentLevel == LEVEL_KATINA) { actor->aiIndex = sTeamSpawnTargetsKA[i]; } else { actor->aiIndex = sTeamSpawnTargets[i]; } + actor->state = STATE360_2; actor->rot_0F4.y = 180.0f; + if (actor->aiIndex <= -1) { actor->state = STATE360_3; } + actor->health = 50; + if ((gLevelType == LEVELTYPE_PLANET) || (gCurrentLevel == LEVEL_BOLSE)) { actor->drawShadow = true; } + actor->iwork[11] = 1; + if (actor->aiType <= AI360_PEPPY) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gTeamHitbox); @@ -419,7 +438,7 @@ static f32 sStarWolfVE2SpawnRot[4] = { 330.0f, 90.0f, 280.0f, 70.0f }; s32 gAllRangeSpawnEvent = 96 * 30; void ActorAllRange_SpawnStarWolf(void) { - Actor* actor; + ActorAllRange* actor; s32 i; for (i = 0, actor = &gActors[4]; i < ARRAY_COUNT(sStarWolfSpawnPos); i++, actor++) { @@ -440,11 +459,14 @@ void ActorAllRange_SpawnStarWolf(void) { actor->timer_0BC = 250; actor->rot_0F4.x = -20.0f; actor->iwork[11] = 1; + if (gCurrentLevel == LEVEL_VENOM_2) { actor->obj.rot.z = sStarWolfVE2SpawnRot[i]; actor->itemDrop = DROP_SILVER_STAR; } + Object_SetInfo(&actor->info, actor->obj.id); + if (gCurrentLevel == LEVEL_VENOM_2) { AUDIO_PLAY_SFX(NA_SE_EN_WOLF_ENGINE2, actor->sfxSource, 4); } else { @@ -467,8 +489,8 @@ void ActorAllRange_StarWolfDefeatMesg(u16* msg, RadioCharacterId character) { ActorAllRange_PlayMessage(msg, character); } -void ActorAllRange_UpdateStarWolfEvents(Actor* this) { - Actor* actor; +void ActorAllRange_UpdateStarWolfEvents(ActorAllRange* this) { + ActorAllRange* actor; s32 i; if (sStarWolfKillTimer != 0) { @@ -503,6 +525,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { gPlayer[0].cam.at.y = gActors[AI360_WOLF].obj.pos.y; gPlayer[0].cam.at.z = gActors[AI360_WOLF].obj.pos.z; } + if ((gAllRangeEventTimer > gAllRangeSpawnEvent) && (gStarWolfMsgTimer == 0)) { gAllRangeFrameCount++; for (i = AI360_FALCO, actor = &gActors[AI360_FALCO]; i <= AI360_ANDREW; i++, actor++) { @@ -512,10 +535,12 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { gActors[actor->aiIndex].iwork[2] = AI360_FOX; gActors[actor->aiIndex].state = STATE360_2; gActors[actor->aiIndex].aiIndex = actor->aiType; + if (gTeamHelpActor == &gActors[actor->aiIndex]) { gTeamHelpActor = NULL; gTeamHelpTimer = 0; } + if (gActors[actor->aiIndex].iwork[3] == 0) { switch (gActors[actor->aiIndex].aiType) { case AI360_FALCO: @@ -531,6 +556,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { gActors[actor->aiIndex].iwork[3] = 200; } } + if (actor->aiType == AI360_WOLF) { if (gCurrentLevel != LEVEL_VENOM_2) { actor->state = STATE360_3; @@ -542,6 +568,7 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { } } } + if (gTeamShields[TEAM_ID_FALCO] <= 0) { gActors[AI360_LEON].aiIndex = AI360_FOX; } @@ -554,47 +581,48 @@ void ActorAllRange_UpdateStarWolfEvents(Actor* this) { } } -void ActorAllRange_ChooseNewTarget(Actor* actor) { - Actor* team; - Actor* enemy; - s32 alreadyTaken; - s32 teamId; - s32 enemyId; +void ActorAllRange_ChooseNewTarget(ActorAllRange* this) { + ActorAllRange* team; + ActorAllRange* enemy; + bool alreadyTaken; + TeamId teamId; + AllRangeAi enemyId; - for (enemyId = AI360_10, enemy = &gActors[AI360_10]; enemyId < ARRAY_COUNT(gActors); enemyId++, enemy++) { + for (enemyId = AI360_ENEMY, enemy = &gActors[AI360_ENEMY]; enemyId < ARRAY_COUNT(gActors); enemyId++, enemy++) { if ((enemy->obj.status == OBJ_ACTIVE) && (enemy->obj.id == OBJ_ACTOR_ALLRANGE) && (enemy->animFrame == 0) && (enemy->aiIndex <= -1)) { alreadyTaken = false; for (teamId = AI360_FALCO, team = &gActors[AI360_FALCO]; teamId <= AI360_PEPPY; teamId++, team++) { - if ((teamId != actor->index) && (enemyId == team->aiIndex)) { + if ((teamId != this->index) && (enemyId == team->aiIndex)) { alreadyTaken = true; } } if (!alreadyTaken) { - actor->aiIndex = enemyId; - actor->state = STATE360_2; - actor->iwork[2] = AI360_FOX; + this->aiIndex = enemyId; + this->state = STATE360_2; + this->iwork[2] = AI360_FOX; break; } } } } -void ActorAllRange_UpdateEvemyEvents(Actor* this) { - Actor* enemy; +void ActorAllRange_UpdateEnemyEvents(Actor* this) { + ActorAllRange* enemy; s32 i; - for (i = 0, enemy = &gActors[AI360_10]; i < 50; i++, enemy++) { + for (i = 0, enemy = &gActors[AI360_ENEMY]; i < 50; i++, enemy++) { if ((enemy->obj.status == OBJ_DYING) && (enemy->aiIndex >= AI360_FALCO) && (enemy->aiIndex <= AI360_PEPPY)) { - Actor* enemy2; + ActorAllRange* enemy2; s32 j; - for (j = 0, enemy2 = &gActors[AI360_10]; j <= 50; j++, enemy2++) { // bug? should be < + for (j = 0, enemy2 = &gActors[AI360_ENEMY]; j <= 50; j++, enemy2++) { // bug? should be < if ((enemy2->obj.status == OBJ_ACTIVE) && (enemy2->state == STATE360_2) && (enemy2->aiIndex == enemy->aiIndex)) { return; } } + if (gTeamShields[enemy->aiIndex] > 0) { ActorAllRange_ChooseNewTarget(&gActors[enemy->aiIndex]); if ((enemy->iwork[5] != 0) && (enemy->dmgSource == AI360_FOX + 1) && @@ -635,7 +663,7 @@ bool AllRange_SupplyEvent(void) { } void ActorAllRange_SpawnSupplies(Actor* this) { - Actor* supplies; + ActorSupplies* supplies; s32 i; if ((gCallTimer != 0) && (gControllerPress[gMainController].button & R_CBUTTONS)) { @@ -645,6 +673,7 @@ void ActorAllRange_SpawnSupplies(Actor* this) { Radio_PlayMessage(gMsg_ID_20230, RCID_ROB64); gAllRangeSupplyTimer = 160; } + if (gAllRangeSupplyTimer != 0) { gAllRangeSupplyTimer--; if (gAllRangeSupplyTimer == 0) { @@ -671,6 +700,7 @@ void ActorAllRange_SpawnSupplies(Actor* this) { } } } + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !gAllRangeSuppliesSent) { if (gAllRangeWingRepairTimer != 0) { gAllRangeWingRepairTimer--; @@ -687,7 +717,9 @@ void ActorAllRange_UpdateEvents(Actor* this) { Object_Kill(&this->obj, this->sfxSource); return; } + gAllRangeEventTimer++; + switch (gCurrentLevel) { case LEVEL_FORTUNA: Fortuna_UpdateEvents(this); @@ -719,10 +751,13 @@ s32 func_360_800301F4(Actor* this) { if (gLevelMode == LEVELMODE_ON_RAILS) { return 0; } + sinY = SIN_DEG(this->obj.rot.y); cosY = COS_DEG(this->obj.rot.y); + temp_ft4 = this->fwork[9] * 10.0f + (sinY * 650.0f); temp_ft5 = this->fwork[9] * 10.0f + (cosY * 650.0f); + for (i = 0; i < 200; i++) { if ((gScenery360[i].obj.status == OBJ_ACTIVE) && (fabsf(gScenery360[i].obj.pos.x - (this->obj.pos.x + temp_ft4)) < 1000.0f) && @@ -736,6 +771,7 @@ s32 func_360_800301F4(Actor* this) { } } } + boss = &gBosses[0]; if ((gCurrentLevel == LEVEL_SECTOR_Z) && (fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_ft4)) < 2000.0f) && (fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft5)) < 2000.0f)) { @@ -750,7 +786,7 @@ s32 func_360_800301F4(Actor* this) { return 0; } -s32 func_360_8003049C(Actor* this) { +s32 func_360_8003049C(ActorAllRange* this) { Scenery360* scenery360; s32 i; f32 sp44; @@ -765,13 +801,17 @@ s32 func_360_8003049C(Actor* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { return 0; } + if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { return func_360_800301F4(this); } + sp40 = SIN_DEG(this->obj.rot.y); sp3C = COS_DEG(this->obj.rot.y); + temp_fa0 = this->fwork[9] * 10.0f + (sp40 * 650.0f); temp_ft4 = this->fwork[9] * 10.0f + (sp3C * 650.0f); + if (gLevelMode == LEVELMODE_ALL_RANGE) { for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && @@ -781,13 +821,15 @@ s32 func_360_8003049C(Actor* this) { } } } + sp44 = 1200.0f; var_ft5 = 650.0f; + if (this->aiType < AI360_KATT) { var_ft5 = 720.0f; } - if (boss->obj.id == OBJ_BOSS_293) { + if (boss->obj.id == OBJ_BOSS_CO_CARRIER) { var_ft5 = 350.0f; } else if (boss->obj.id == OBJ_BOSS_309) { sp44 = 2000.0f; @@ -796,43 +838,50 @@ s32 func_360_8003049C(Actor* this) { sp44 = 1500.0f; var_ft5 = 700.0f; } + if ((fabsf(boss->obj.pos.x - (this->obj.pos.x + temp_fa0)) < sp44) && (fabsf(boss->obj.pos.z - (this->obj.pos.z + temp_ft4)) < sp44) && (fabsf(boss->obj.pos.y - this->obj.pos.y) < var_ft5)) { return 1; + } else { + return 0; } - return 0; } -void ActorAllRange_ApplyDamage(Actor* this) { - s32 var_a1; - Vec3f sp48; - Vec3f sp3C; +void ActorAllRange_ApplyDamage(ActorAllRange* this) { + bool var_a1; + Vec3f src; + Vec3f dest; if (this->dmgType != DMG_NONE) { if (this->aiType == AI360_GREAT_FOX) { this->dmgType = DMG_NONE; } + if ((this->dmgType >= DMG_EXPLOSION) && (this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { this->damage = 10; this->timer_0C2 = 10; } + if (((this->aiType <= AI360_PEPPY) || (this->aiType == AI360_BILL) || (this->aiType == AI360_KATT)) && (this->dmgType == DMG_EXPLOSION)) { this->dmgType = DMG_NONE; } + if ((this->dmgType == DMG_EXPLOSION) && (this->fwork[22] > 0.0f)) { this->dmgType = DMG_NONE; } + if (this->fwork[23] > 1.0f) { this->dmgType = DMG_NONE; } + if (this->dmgType != DMG_NONE) { var_a1 = false; if ((this->animFrame == 3) || ((gCurrentLevel == LEVEL_BOLSE) && (gBosses[1].obj.status != OBJ_FREE) && (this->aiType >= AI360_WOLF)) || - ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) && + ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF) && (this->aiType < AI360_ENEMY) && (this->dmgType == DMG_EXPLOSION))) { this->damage = DMG_NONE; var_a1 = true; @@ -840,6 +889,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->dmgSource = 0; } } + if (this->aiType >= AI360_WOLF) { if (!((this->dmgType == DMG_COLLISION) && (this->aiType == AI360_WOLF)) && !((this->aiType == AI360_MISSILE) && (this->dmgType == DMG_EXPLOSION))) { @@ -852,10 +902,11 @@ void ActorAllRange_ApplyDamage(Actor* this) { gTeamDamage[this->aiType] = this->damage * 2; } } + if (this->health <= 0) { this->health = 0; if (this->aiType == AI360_MISSILE) { - SectorZ_80199900(this, 1); + SectorZ_MissileExplode(this, true); if (this->dmgSource == AI360_FOX + 1) { if (gActors[AI360_KATT].obj.status == OBJ_ACTIVE) { Radio_PlayMessage(gMsg_ID_16140, RCID_KATT); @@ -881,15 +932,19 @@ void ActorAllRange_ApplyDamage(Actor* this) { } return; } + this->timer_0C6 = 50; this->iwork[8] = 20; this->obj.status = OBJ_DYING; this->fwork[23] = 0.0f; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); AUDIO_PLAY_SFX(NA_SE_EN_CRASH_DOWN, this->sfxSource, 4); + this->timer_0C2 = 10; this->timer_0BE = 0; this->timer_04C = RAND_INT(2.9f); + switch (RAND_INT(4.0f)) { case 0: this->timer_0BC = 0; @@ -904,9 +959,11 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->timer_0BC = 300; break; } + if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { this->timer_0BC = 70; } + if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { if (Rand_ZeroOne() < 0.5f) { this->timer_0BC = 10; @@ -914,18 +971,22 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->timer_0BC = RAND_INT(50.0f); } } + if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { this->timer_0BC = RAND_INT(40.0f) + 60.0f; } + if (this->damage >= 20) { this->timer_0BC = 0; } + if ((gCurrentLevel == LEVEL_KATINA) && (this->animFrame == 1) && (this->dmgSource == AI360_FOX + 1)) { if (gKaAllyKillCount < 2) { ActorAllRange_PlayMessage(gMsg_ID_18018, RCID_BILL); } gKaAllyKillCount++; } + switch (this->aiType) { case AI360_WOLF: gStarWolfTeamAlive[0] = 0; @@ -935,6 +996,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9365, RCID_WOLF); } break; + case AI360_LEON: gStarWolfTeamAlive[1] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { @@ -943,6 +1005,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9366, RCID_LEON); } break; + case AI360_PIGMA: gStarWolfTeamAlive[2] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { @@ -951,6 +1014,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { ActorAllRange_StarWolfDefeatMesg(gMsg_ID_9367, RCID_PIGMA); } break; + case AI360_ANDREW: gStarWolfTeamAlive[3] = 0; if (gCurrentLevel == LEVEL_VENOM_2) { @@ -960,12 +1024,14 @@ void ActorAllRange_ApplyDamage(Actor* this) { } break; } + if ((this->aiType >= AI360_WOLF) && (this->aiType <= AI360_ANDREW)) { sStarWolfKillTimer = 150; } + switch (this->dmgSource) { case AI360_FOX + 1: - if (this->aiType >= AI360_10) { + if (this->aiType >= AI360_ENEMY) { switch (this->iwork[2]) { case AI360_FALCO: ActorAllRange_PlayMessage(gMsg_ID_20170, RCID_FALCO); @@ -979,6 +1045,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } break; + case AI360_FALCO + NPC_SHOT_ID + 1: case AI360_SLIPPY + NPC_SHOT_ID + 1: case AI360_PEPPY + NPC_SHOT_ID + 1: @@ -1021,33 +1088,37 @@ void ActorAllRange_ApplyDamage(Actor* this) { this->timer_0C6 = 20; this->iwork[8] = 20; } + if (this->aiType == AI360_MISSILE) { AUDIO_PLAY_SFX(NA_SE_OB_DAMAGE_M, this->sfxSource, 4); } else if (this->iwork[7] == 0) { AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_S, this->sfxSource, 4); } + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); + if (this->aiType < AI360_GREAT_FOX) { Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); - sp48.x = 30.0f; + src.x = 30.0f; if (Rand_ZeroOne() < 0.5f) { - sp48.x = -30.0f; + src.x = -30.0f; } - sp48.y = RAND_FLOAT_CENTERED(30.0f); - sp48.z = 0.0f; + src.y = RAND_FLOAT_CENTERED(30.0f); + src.z = 0.0f; if (this->iwork[7] != 0) { - sp48.x *= 1.5f; - sp48.y = 30.0f; + src.x *= 1.5f; + src.y = 30.0f; if ((this->obj.pos.y > 100.0f) && (Rand_ZeroOne() < 0.5f)) { - sp48.y = -30.0f; + src.y = -30.0f; } } - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp48, &sp3C); - this->fwork[13] = sp3C.x; - this->fwork[14] = sp3C.y; - this->fwork[12] = sp3C.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + this->fwork[13] = dest.x; + this->fwork[14] = dest.y; + this->fwork[12] = dest.z; } + if ((gRadioState == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { if (this->dmgType == DMG_COLLISION) { switch (this->aiType) { @@ -1118,6 +1189,7 @@ void ActorAllRange_ApplyDamage(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_SLIPPY: if (gTeamShields[TEAM_ID_SLIPPY] >= 90) { ActorAllRange_PlayMessage(gMsg_ID_9140, RCID_SLIPPY); @@ -1129,12 +1201,14 @@ void ActorAllRange_ApplyDamage(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_PEPPY: if (gTeamShields[TEAM_ID_PEPPY] >= 90) { ActorAllRange_PlayMessage(gMsg_ID_9150, RCID_PEPPY); } else { Radio_PlayMessage(gMsg_ID_9153, RCID_PEPPY); } + if ((gTeamHelpActor == NULL) || (gTeamShields[this->aiType] <= 50)) { gTeamHelpActor = this; gTeamHelpTimer = 320; @@ -1149,27 +1223,30 @@ void ActorAllRange_ApplyDamage(Actor* this) { } } -void ActorAllRange_CheckPlayerNearby(Actor* actor) { - if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (actor->iwork[24] != 0) && - (fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && - (fabsf(actor->obj.pos.y - gPlayer[0].pos.y) < 1000.0f) && - (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { - actor->iwork[10]++; +void ActorAllRange_CheckPlayerNearby(ActorAllRange* this) { + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (this->iwork[24] != 0) && + (fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && + (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 1000.0f) && + (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 1000.0f)) { + this->iwork[10]++; } else { - actor->iwork[10] = 0; + this->iwork[10] = 0; } } -bool func_360_80031900(Actor* actor) { - Vec3f sp24; - Vec3f sp18; - - Matrix_RotateY(gCalcMatrix, -actor->obj.rot.y * M_DTOR, MTXF_NEW); - sp24.x = actor->fwork[4] - actor->obj.pos.x; - sp24.y = 0.0f; - sp24.z = actor->fwork[6] - actor->obj.pos.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &sp18); - if (sp18.z > 0.0f) { +bool func_360_80031900(ActorAllRange* this) { + Vec3f src; + Vec3f dest; + + Matrix_RotateY(gCalcMatrix, -this->obj.rot.y * M_DTOR, MTXF_NEW); + + src.x = this->fwork[4] - this->obj.pos.x; + src.y = 0.0f; + src.z = this->fwork[6] - this->obj.pos.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + if (dest.z > 0.0f) { return true; } else { return false; @@ -1181,7 +1258,7 @@ static Vec3f sSectorZRetreatPath[6] = { { -500.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, { 0.0f, 250.0f, 0.0f }, }; -void ActorAllRange_Update(Actor* this) { +void ActorAllRange_Update(ActorAllRange* this) { u8 sp10F; s32 sp108; s32 sp104; @@ -1210,9 +1287,7 @@ void ActorAllRange_Update(Actor* this) { Vec3f sp90; Vec3f sp84 = { 60.0f, 0.0f, -170.0f }; Vec3f sp78 = { -60.0f, 0.0f, -170.0f }; - s32 pad1; - s32 pad2; - s32 pad3; + s32 pad[3]; if (this->aiType == AI360_EVENT_HANDLER) { this->timer_0C2 = 10; @@ -1220,6 +1295,7 @@ void ActorAllRange_Update(Actor* this) { ActorAllRange_UpdateEvents(this); return; } + if ((this->iwork[17] != 0) && (this->iwork[16] == STATE360_0) && (this->aiType >= AI360_WOLF)) { switch (RAND_INT(3.9f)) { case 0: @@ -1228,23 +1304,28 @@ void ActorAllRange_Update(Actor* this) { this->iwork[16] = STATE360_10; } break; + case 2: this->iwork[16] = STATE360_8; break; + case 3: this->iwork[16] = STATE360_7; break; } + this->iwork[17] = 0; if (this->iwork[18] != 0) { this->iwork[18]--; this->iwork[16] = STATE360_0; } } - if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && + + if ((this->lockOnTimers[TEAM_ID_FOX] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_ENEMY) && (this->lockOnTimers[TEAM_ID_FOX] < 5) && ((gGameFrameCount % 32) == 0)) { this->iwork[16] = STATE360_10; } + if ((this->iwork[16] != STATE360_0) && (this->state < STATE360_7)) { this->state = this->iwork[16]; switch (this->state) { @@ -1255,6 +1336,7 @@ void ActorAllRange_Update(Actor* this) { } this->unk_046 = 0; break; + case STATE360_9: this->timer_0BC = RAND_INT(20.0f) + 30; if (Rand_ZeroOne() < 0.5f) { @@ -1269,6 +1351,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[19] += 360.0f; } break; + case STATE360_10: this->timer_0BC = 35; if (Rand_ZeroOne() < 0.5f) { @@ -1284,23 +1367,29 @@ void ActorAllRange_Update(Actor* this) { break; } } + this->iwork[16] = STATE360_0; spCC = spC8 = spC4 = 0.0f; + if (this->iwork[7] != 0) { this->iwork[7]--; this->fwork[22] = 1.0f; } + if (this->iwork[3] != 0) { this->iwork[3]--; } + Math_SmoothStepToF(&this->fwork[10], 0.0f, 0.1f, 0.2f, 0.00001f); Math_SmoothStepToF(&this->fwork[9], this->fwork[10], 0.1f, 2.0f, 0.00001f); + if (this->fwork[10] > 0.1f) { this->iwork[11] = 2; } else { this->iwork[11] = 1; } - if (this->aiType < AI360_10) { + + if (this->aiType < AI360_ENEMY) { ActorAllRange_CheckPlayerNearby(this); if (this->iwork[10] == 200) { switch (this->aiType) { @@ -1310,6 +1399,7 @@ void ActorAllRange_Update(Actor* this) { case AI360_ANDREW: case AI360_KATT: break; + case AI360_FALCO: if (gPlayer[0].shields < (Play_GetMaxShields() / 2)) { Radio_PlayMessage(gMsg_ID_20298, RCID_FALCO); @@ -1319,6 +1409,7 @@ void ActorAllRange_Update(Actor* this) { Radio_PlayMessage(gMsg_ID_20301, RCID_FALCO); } break; + case AI360_SLIPPY: if (gPlayer[0].shields < (Play_GetMaxShields() / 2)) { Radio_PlayMessage(gMsg_ID_20297, RCID_SLIPPY); @@ -1328,6 +1419,7 @@ void ActorAllRange_Update(Actor* this) { Radio_PlayMessage(gMsg_ID_20300, RCID_SLIPPY); } break; + case AI360_PEPPY: if (gPlayer[0].shields < (Play_GetMaxShields() / 2)) { Radio_PlayMessage(gMsg_ID_20296, RCID_PEPPY); @@ -1337,14 +1429,17 @@ void ActorAllRange_Update(Actor* this) { Radio_PlayMessage(gMsg_ID_20299, RCID_PEPPY); } break; + case AI360_BILL: Radio_PlayMessage(gMsg_ID_18120, RCID_BILL); break; } } } + sp104 = 0; this->iwork[5] = 0; + if ((this->aiType >= AI360_FALCO) && (this->aiType <= AI360_PEPPY) && (gTeamShields[this->aiType] <= 0) && (this->state != STATE360_6)) { this->state = STATE360_6; @@ -1372,6 +1467,7 @@ void ActorAllRange_Update(Actor* this) { this->iwork[1] = 0; this->timer_0C2 = 10000; } + switch (this->state) { case STATE360_6: this->timer_0C2 = 10000; @@ -1399,17 +1495,21 @@ void ActorAllRange_Update(Actor* this) { } sp104 = 2; break; + case STATE360_5: SectorZ_Missile_Update(this); sp104 = 1; break; + case STATE360_0: if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { this->fwork[0] = this->fwork[1] = 40.0f; + if (gActors[0].state == STATE360_5) { Math_SmoothStepToF(&this->rot_0F4.x, 30.0f, 0.1f, 0.5f, 0.0f); this->fwork[1] = 200.0f; } + if (this->timer_0BC == 0) { if (this->aiType == AI360_WOLF) { this->state = STATE360_3; @@ -1429,11 +1529,14 @@ void ActorAllRange_Update(Actor* this) { Math_SmoothStepToAngle(&this->obj.rot.z, 0.0f, 0.03f, 0.5f, 0.0f); } break; + case STATE360_1: this->fwork[1] = 40.0f; + if ((this->timer_0BC < 35) && (gCurrentLevel == LEVEL_FORTUNA)) { Math_SmoothStepToF(&this->rot_0F4.x, 15.0f, 0.1f, 1.0f, 0.0f); } + if (this->timer_0BC == 0) { this->state = STATE360_3; if ((gCurrentLevel == LEVEL_BOLSE) && (this->aiIndex > -1)) { @@ -1441,6 +1544,7 @@ void ActorAllRange_Update(Actor* this) { } } break; + case STATE360_2: sp104 = 1; spF8 = 800.0f; @@ -1449,14 +1553,17 @@ void ActorAllRange_Update(Actor* this) { spEC = fabsf(this->fwork[4] - this->obj.pos.x); spE8 = fabsf(this->fwork[6] - this->obj.pos.z); sp10F = 0xB; + if (this->aiType == AI360_FALCO) { spF0 = 0.5f; } else if ((this->animFrame != 2) && (this->animFrame == 3)) { spF0 = 0.5f; } + if (this->aiIndex == AI360_FOX) { spF0 = 0.2f; } + if (this->aiIndex <= -1) { this->state = STATE360_3; } else { @@ -1465,6 +1572,7 @@ void ActorAllRange_Update(Actor* this) { spF4 = spF8 = 3000.0f; this->fwork[3] = 2.0f; } + if (this->aiIndex == AI360_FOX) { if (gCurrentLevel != LEVEL_VENOM_2) { if ((gPlayer[0].somersault && (this->iwork[4] > 10)) || @@ -1481,18 +1589,21 @@ void ActorAllRange_Update(Actor* this) { break; } } + if ((this->aiType >= AI360_WOLF) && (this->aiType != AI360_KATT) && !((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType == AI360_WOLF))) { spCC = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f; spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 100.0f; spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 100.0f; } + if (!gPlayer[0].somersault) { this->fwork[4] = gPlayer[0].pos.x + spCC; this->fwork[5] = gPlayer[0].pos.y + spC8; this->fwork[6] = gPlayer[0].trueZpos + spC4; this->fwork[1] = gPlayer[0].baseSpeed + 10.0f; } + if ((gActors[0].state == STATE360_6) && (this->aiType <= AI360_PEPPY)) { this->fwork[3] = 3.0f; this->fwork[1] = gPlayer[0].baseSpeed - 5.0f; @@ -1503,8 +1614,10 @@ void ActorAllRange_Update(Actor* this) { } else { this->fwork[3] = 1.2f; } + spF4 = 2000.0f; spF8 = 700.0f; + if (gCurrentLevel == LEVEL_VENOM_2) { spF0 = 0.5f; sp10F = 3; @@ -1512,18 +1625,20 @@ void ActorAllRange_Update(Actor* this) { spF0 = 0.7f; } } else if (this->aiIndex != AI360_GREAT_FOX) { - if (this->aiType >= AI360_10) { + if (this->aiType >= AI360_ENEMY) { spCC = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f; spC8 = COS_DEG((this->index * 45) + (gGameFrameCount * 2)) * 200.0f; spC4 = SIN_DEG((this->index * 45) + gGameFrameCount) * 200.0f; } + this->fwork[4] = gActors[this->aiIndex].obj.pos.x + spCC; this->fwork[5] = gActors[this->aiIndex].obj.pos.y + spC8; this->fwork[6] = gActors[this->aiIndex].obj.pos.z + spC4; + if ((gCurrentLevel == LEVEL_VENOM_2) && (this->aiType >= AI360_WOLF)) { this->fwork[1] = 55.0f; this->fwork[3] = 1.6f; - } else if ((gCurrentLevel == LEVEL_FORTUNA) && (this->aiType > AI360_10)) { + } else if ((gCurrentLevel == LEVEL_FORTUNA) && (this->aiType > AI360_ENEMY)) { this->fwork[3] = 1.4f; this->fwork[1] = 50.0f; } else { @@ -1539,6 +1654,7 @@ void ActorAllRange_Update(Actor* this) { this->fwork[6] = gBosses[0].obj.pos.z; this->fwork[1] = 40.0f; } + if ((this->aiIndex > -1) && (this->aiIndex != AI360_GREAT_FOX) && (gActors[0].state != STATE360_6)) { if (spE8 < spF8) { if (spEC < spF8) { @@ -1557,6 +1673,7 @@ void ActorAllRange_Update(Actor* this) { this->timer_0C0 = RAND_INT(200.0f) + 200; this->fwork[10] = 20.0f; } + if ((spE8 < spF4) && (spEC < spF4)) { this->iwork[4]++; this->iwork[5] = 1; @@ -1590,6 +1707,7 @@ void ActorAllRange_Update(Actor* this) { this->iwork[0] = 1; } } + if ((gRadioState == 0) && (this->timer_0C4 == 0) && (gAllRangeEventTimer > 700) && (gStarWolfMsgTimer == 0) && (gActors[0].obj.status == OBJ_ACTIVE)) { this->timer_0C4 = 600; @@ -1610,6 +1728,7 @@ void ActorAllRange_Update(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_SLIPPY: if ((gCurrentLevel == LEVEL_VENOM_2) && (Rand_ZeroOne() < 0.5f)) { ActorAllRange_PlayMessage(gMsg_ID_19463, RCID_SLIPPY); @@ -1624,6 +1743,7 @@ void ActorAllRange_Update(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_PEPPY: if ((gCurrentLevel == LEVEL_VENOM_2) && (Rand_ZeroOne() < 0.5f)) { ActorAllRange_PlayMessage(gMsg_ID_19464, RCID_PEPPY); @@ -1638,21 +1758,25 @@ void ActorAllRange_Update(Actor* this) { gTeamHelpTimer = 320; } break; + case AI360_WOLF: if (gStarWolfTeamAlive[0] != 0) { ActorAllRange_PlayMessage(gMsg_ID_9330, RCID_WOLF); } break; + case AI360_LEON: if (gStarWolfTeamAlive[1] != 0) { ActorAllRange_PlayMessage(gMsg_ID_9340, RCID_LEON); } break; + case AI360_PIGMA: if (gStarWolfTeamAlive[2] != 0) { ActorAllRange_PlayMessage(gMsg_ID_9350, RCID_PIGMA); } break; + case AI360_ANDREW: if (gStarWolfTeamAlive[3] != 0) { ActorAllRange_PlayMessage(gMsg_ID_9360, RCID_ANDREW); @@ -1669,6 +1793,7 @@ void ActorAllRange_Update(Actor* this) { } gActors[this->aiIndex].iwork[2] = AI360_FALCO; break; + case AI360_SLIPPY: if ((gCurrentLevel == LEVEL_FORTUNA) && (Rand_ZeroOne() < 0.5f)) { ActorAllRange_PlayMessage(gMsg_ID_9212, RCID_SLIPPY); @@ -1677,6 +1802,7 @@ void ActorAllRange_Update(Actor* this) { } gActors[this->aiIndex].iwork[2] = AI360_SLIPPY; break; + case AI360_PEPPY: if ((gCurrentLevel == LEVEL_FORTUNA) && (Rand_ZeroOne() < 0.5f)) { ActorAllRange_PlayMessage(gMsg_ID_9213, RCID_PEPPY); @@ -1685,6 +1811,7 @@ void ActorAllRange_Update(Actor* this) { } gActors[this->aiIndex].iwork[2] = AI360_PEPPY; break; + case AI360_WOLF: if (gCurrentLevel != LEVEL_VENOM_2) { if (this->iwork[6] == 0) { @@ -1702,6 +1829,7 @@ void ActorAllRange_Update(Actor* this) { } } break; + case AI360_LEON: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_FALCO)) { @@ -1715,6 +1843,7 @@ void ActorAllRange_Update(Actor* this) { ActorAllRange_PlayMessage(gMsg_ID_9300, RCID_LEON); } break; + case AI360_PIGMA: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_PEPPY)) { @@ -1728,6 +1857,7 @@ void ActorAllRange_Update(Actor* this) { ActorAllRange_PlayMessage(gMsg_ID_9310, RCID_PIGMA); } break; + case AI360_ANDREW: if (gCurrentLevel == LEVEL_VENOM_2) { if ((Rand_ZeroOne() < 0.5f) && (this->aiIndex == AI360_SLIPPY)) { @@ -1747,6 +1877,7 @@ void ActorAllRange_Update(Actor* this) { } else { this->iwork[4] = 0; } + if ((this->aiIndex >= AI360_FALCO) && ((gActors[this->aiIndex].obj.status == OBJ_DYING) || (gActors[this->aiIndex].state == STATE360_6) || (gActors[this->aiIndex].obj.status == OBJ_FREE))) { @@ -1758,10 +1889,11 @@ void ActorAllRange_Update(Actor* this) { } } break; + case STATE360_3: sp104 = 1; if (this->timer_0BC == 0) { - if ((this->aiType < AI360_10) || (gCurrentLevel == LEVEL_BOLSE)) { + if ((this->aiType < AI360_ENEMY) || (gCurrentLevel == LEVEL_BOLSE)) { if (gCurrentLevel == LEVEL_VENOM_2) { if (this->aiType >= AI360_WOLF) { this->fwork[3] = 1.6f; @@ -1778,9 +1910,11 @@ void ActorAllRange_Update(Actor* this) { this->fwork[3] = 1.0f; this->fwork[1] = 38.0f; } + if ((gCurrentLevel == LEVEL_SECTOR_Z) && (gActors[0].state == STATE360_10)) { this->fwork[10] = 30.0f; } + if ((gLevelType == LEVELTYPE_SPACE) && (gCurrentLevel != LEVEL_BOLSE)) { if ((gCurrentLevel == LEVEL_SECTOR_Z) && (this->aiType == AI360_KATT)) { spE4 = RAND_FLOAT_CENTERED(0.0f); @@ -1805,6 +1939,7 @@ void ActorAllRange_Update(Actor* this) { spDC = RAND_FLOAT_CENTERED(5000.0f); } } + if ((fabsf(this->obj.pos.x - spE4) > 2000.0f) || (fabsf(this->obj.pos.z - spDC) > 2000.0f)) { this->fwork[4] = spE4; this->fwork[5] = spE0; @@ -1812,15 +1947,18 @@ void ActorAllRange_Update(Actor* this) { this->timer_0BC = RAND_INT(20.0f) + 10; } } + if (this->timer_0C0 == 0) { this->timer_0C0 = RAND_INT(200.0f) + 200; this->fwork[10] = 30.0f; } + if ((this->aiIndex >= AI360_FALCO) && (gActors[this->aiIndex].obj.id == OBJ_ACTOR_ALLRANGE) && (gActors[this->aiIndex].timer_0C2 == 0) && (gActors[this->aiIndex].obj.status == OBJ_ACTIVE)) { this->state = STATE360_2; this->iwork[2] = AI360_FOX; } + if (this->aiIndex == AI360_FOX) { if (this->counter_04E != 0) { this->counter_04E--; @@ -1831,6 +1969,7 @@ void ActorAllRange_Update(Actor* this) { } } break; + case STATE360_7: this->fwork[1] = 40.0f; Math_SmoothStepToF(&this->rot_0F4.x, 360.0f, 0.1f, 5.0f, 0.0001f); @@ -1839,6 +1978,7 @@ void ActorAllRange_Update(Actor* this) { this->state = STATE360_3; } break; + case STATE360_8: this->fwork[1] = 40.0f; if ((this->index % 2) != 0) { @@ -1846,6 +1986,7 @@ void ActorAllRange_Update(Actor* this) { } else { Math_SmoothStepToAngle(&this->obj.rot.z, 5.0f, 0.1f, 3.0f, 0.01f); } + switch (this->unk_046) { case 0: Math_SmoothStepToF(&this->rot_0F4.x, 200.0f, 0.1f, 6.0f, 0.0001f); @@ -1871,6 +2012,7 @@ void ActorAllRange_Update(Actor* this) { break; } break; + case STATE360_9: this->fwork[1] = 40.0f; if (Math_SmoothStepToAngle(&this->rot_0F4.y, this->fwork[19], 0.5f, 5.0f, 0.0f) < 0.0f) { @@ -1883,6 +2025,7 @@ void ActorAllRange_Update(Actor* this) { this->state = STATE360_3; } break; + case STATE360_10: sp104 = 1; if (this->timer_0BC == 0) { @@ -1893,6 +2036,7 @@ void ActorAllRange_Update(Actor* this) { } break; } + if (sp104 != 0) { s32 var_v0 = 4 - 1; @@ -1903,17 +2047,20 @@ void ActorAllRange_Update(Actor* this) { if (gCurrentLevel == LEVEL_VENOM_2) { var_v0 = 2 - 1; } + if (((this->index + gGameFrameCount) & var_v0) == 0) { this->fwork[19] = Math_RadToDeg(Math_Atan2F(spE4, spDC)); this->fwork[20] = Math_RadToDeg(Math_Atan2F(spE0, sqrtf(SQ(spE4) + SQ(spDC)))); } + spD8 = this->fwork[20]; spD4 = this->fwork[19]; sp108 = 0; + if (sp104 == 1) { if (this->aiType < AI360_GREAT_FOX) { sp108 = func_360_8003049C(this); - if ((sp108 != 0) && (this->aiType < AI360_10) && (this->timer_0BE == 0) && + if ((sp108 != 0) && (this->aiType < AI360_ENEMY) && (this->timer_0BE == 0) && ((this->fwork[7] < 0.01f) || (this->fwork[7] > 359.9f))) { this->timer_0BE = RAND_INT(200.0f) + 200; if (Rand_ZeroOne() < 0.5f) { @@ -1925,8 +2072,9 @@ void ActorAllRange_Update(Actor* this) { } } } + if (sp108 != 0) { - if ((this->aiType < AI360_10) || (gCurrentLevel != LEVEL_FORTUNA)) { + if ((this->aiType < AI360_ENEMY) || (gCurrentLevel != LEVEL_FORTUNA)) { spD8 += 40.0f * sp108; } else { spD8 += 20.0f * sp108; @@ -1942,13 +2090,16 @@ void ActorAllRange_Update(Actor* this) { this->rot_0F4.x = 0.0f; } } + Math_SmoothStepToAngle(&this->rot_0F4.x, spD8, 0.5f, this->fwork[2], 0.0001f); + spD0 = Math_SmoothStepToAngle(&this->rot_0F4.y, spD4, 0.5f, this->fwork[2], 0.0001f) * 30.0f; if (spD0 < 0.0f) { spD0 = spD0 * -1.0f; } else { spD0 = 360.0f - spD0; } + if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { if ((((gGameFrameCount + 15) % 32) == 0) && (gCurrentLevel != LEVEL_VENOM_2)) { this->lockOnTimers[TEAM_ID_FOX] = 0; @@ -1958,11 +2109,13 @@ void ActorAllRange_Update(Actor* this) { this->iwork[19] = 0; } } + if (this->iwork[19] != 0) { Math_SmoothStepToF(&this->fwork[7], this->fwork[8], 1.0f, 60.0f, 0.01f); } else { Math_SmoothStepToF(&this->fwork[7], this->fwork[8], 0.2f, 30.0f, 0.01f); } + if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { Math_SmoothStepToAngle(&this->obj.rot.z, this->fwork[7], 0.2f, 100.0f, 0.01f); if ((this->aiType == AI360_KATT) && ((gGameFrameCount % 2) == 0)) { @@ -1981,8 +2134,10 @@ void ActorAllRange_Update(Actor* this) { } this->obj.rot.x = -this->rot_0F4.x; this->obj.rot.y = this->rot_0F4.y; + Math_SmoothStepToF(&this->fwork[0], this->fwork[1], 0.2f, 1.0f, 0.1f); Math_SmoothStepToF(&this->fwork[2], this->fwork[3], 1.0f, 0.1f, 0.1f); + spC0 = SIN_DEG(this->obj.rot.x); spB8 = COS_DEG(this->obj.rot.x); spBC = SIN_DEG(this->obj.rot.y); @@ -1996,13 +2151,16 @@ void ActorAllRange_Update(Actor* this) { this->vel.x = this->fwork[13] + sp9C.x; this->vel.y = this->fwork[14] + sp9C.y; this->vel.z = this->fwork[12] + sp9C.z; + this->fwork[13] -= (this->fwork[13] * 0.1f); this->fwork[14] -= (this->fwork[14] * 0.1f); this->fwork[12] -= (this->fwork[12] * 0.1f); + if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) { this->obj.pos.y = gGroundHeight + 40.0f; this->vel.y = 0.0f; } + if (this->iwork[0] != 0) { this->iwork[0] = 0; @@ -2039,9 +2197,12 @@ void ActorAllRange_Update(Actor* this) { this->obj.rot.y, this->obj.rot.z); } } + ActorAllRange_ApplyDamage(this); + radarMark = &gRadarMarks[this->index]; radarMark->status = 1; + if (this->aiType == AI360_MISSILE) { radarMark->type = 100; } else { @@ -2050,10 +2211,12 @@ void ActorAllRange_Update(Actor* this) { if (gCurrentLevel == LEVEL_TRAINING) { radarMark->type = 4; } + radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; radarMark->pos.z = this->obj.pos.z; radarMark->yRot = this->rot_0F4.y + 180.0f; + if (this->iwork[1] != 0) { this->iwork[1]--; if ((this->iwork[1] == 0) && (gActors[0].state == STATE360_2) && (gRadioState == 0)) { @@ -2074,28 +2237,31 @@ void ActorAllRange_Update(Actor* this) { } } } + if ((gCurrentLevel != LEVEL_KATINA) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (this->timer_0C2 == 0)) { - if (((this->aiType >= AI360_10) && (this->aiType < AI360_GREAT_FOX)) || - ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_10) && (this->timer_0C6 != 0))) { + if (((this->aiType >= AI360_ENEMY) && (this->aiType < AI360_GREAT_FOX)) || + ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_ENEMY) && (this->timer_0C6 != 0))) { s32 var_a3 = 0; if (((gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_SECTOR_Z)) && (this->timer_0C6 == 0)) { var_a3 = 3; } + sp90.x = this->vel.x; sp90.y = this->vel.y; sp90.z = this->vel.z; + temp_v0_27 = Object_CheckCollision(this->index, &this->obj.pos, &sp90, var_a3); if (temp_v0_27 != 0) { this->obj.pos.x -= this->vel.x; this->obj.pos.y -= this->vel.y; this->obj.pos.z -= this->vel.z; - if ((temp_v0_27 >= 2) && (this->aiType > AI360_10)) { + if ((temp_v0_27 >= 2) && (this->aiType > AI360_ENEMY)) { this->timer_0BE = 2; this->obj.status = OBJ_DYING; this->itemDrop = DROP_NONE; func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 5.0f, 15); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } else { this->dmgType = DMG_BEAM; this->damage = 10; @@ -2105,6 +2271,7 @@ void ActorAllRange_Update(Actor* this) { } } } + if (gCurrentLevel == LEVEL_FORTUNA) { ActorAllRange_SetShadowData(this); } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { @@ -2113,14 +2280,16 @@ void ActorAllRange_Update(Actor* this) { this->unk_04A = 0; } } + Math_SmoothStepToF(&this->fwork[22], 0.0f, 0.8f, 0.05f, 1e-7f); Math_SmoothStepToF(&this->fwork[23], 0.0f, 1.0f, 30.0f, 0.01f); + if (this->iwork[8] != 0) { this->iwork[8]--; } } -void ActorAllRange_DrawShield(Actor* this) { +void ActorAllRange_DrawShield(ActorAllRange* this) { f32 sp24; s32 sp20; @@ -2148,7 +2317,7 @@ void ActorAllRange_DrawShield(Actor* this) { } } -void ActorAllRange_DrawBarrelRoll(Actor* this) { +void ActorAllRange_DrawBarrelRoll(ActorAllRange* this) { s32 alpha; if (this->fwork[23] > 1.0f) { @@ -2160,9 +2329,11 @@ void ActorAllRange_DrawBarrelRoll(Actor* this) { Matrix_RotateY(gGfxMatrix, M_DTOR * -this->obj.rot.y - gPlayer[0].camYaw, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, gPlayer[0].camPitch, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 20.0f * this->iwork[15] * M_DTOR, MTXF_APPLY); + if (this->iwork[15] < 0) { Matrix_RotateX(gGfxMatrix, M_PI, MTXF_APPLY); } + Matrix_Scale(gGfxMatrix, 2.0f, 2.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_67); @@ -2182,6 +2353,7 @@ bool ActorAllRange_MissileOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* po } else { RCP_SetupDL(&gMasterDisp, SETUPDL_29); } + if ((limbIndex == 1) || (limbIndex == 3)) { rot->z += gGameFrameCount * 3.0f; } @@ -2196,7 +2368,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { f32 sp38; s32 pad[3]; Vec3f sp1E4 = { 0.0f, 0.0f, 0.0f }; - Vec3f sp7C[30]; + Vec3f jointTable[30]; f32 pad2; if (this->aiType != AI360_EVENT_HANDLER) { @@ -2208,10 +2380,12 @@ void ActorAllRange_Draw(ActorAllRange* this) { Matrix_RotateZ(gGfxMatrix, M_DTOR * sp38, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } + if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPFogPosition(gMasterDisp++, gFogNear, 1005); } + switch (this->aiType) { case AI360_FOX: case AI360_FALCO: @@ -2222,6 +2396,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { Matrix_Pop(&gGfxMatrix); ActorAllRange_DrawBarrelRoll(this); break; + case AI360_WOLF: case AI360_LEON: case AI360_PIGMA: @@ -2248,27 +2423,32 @@ void ActorAllRange_Draw(ActorAllRange* this) { } } break; + case AI360_KATT: gSPDisplayList(gMasterDisp++, D_D009A40); Actor_DrawEngineAndContrails(this); break; + case AI360_BILL: gSPDisplayList(gMasterDisp++, D_D00B880); Actor_DrawEngineAndContrails(this); break; + case AI360_GREAT_FOX: Display_SetSecondLight(&this->obj.pos); this->animFrame = 1; ActorCutscene_Draw(this); break; + case AI360_MISSILE: - Animation_GetFrameData(&D_SZ_6006D64, 0, sp7C); - Animation_DrawSkeleton(3, D_SZ_6006E50, sp7C, ActorAllRange_MissileOverrideLimbDraw, NULL, this, + Animation_GetFrameData(&D_SZ_6006D64, 0, jointTable); + Animation_DrawSkeleton(3, aSzMissileSkel, jointTable, ActorAllRange_MissileOverrideLimbDraw, NULL, this, gCalcMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -400.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->fwork[29], this->fwork[29], this->fwork[29], MTXF_APPLY); Actor_DrawEngineGlow(this, 3); break; + default: if (gCurrentLevel == LEVEL_FORTUNA) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 60.0f, MTXF_APPLY); diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index 53b5276a..fa72deda 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -69,7 +69,7 @@ void PlayerShot_ExplodeBomb(PlayerShot* shot) { shot->unk_48 * 3.0f, 10); func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } else { func_enmy_80062B60(shot->obj.pos.x, shot->obj.pos.z, 0, shot->unk_48 * 3.0f); } @@ -305,10 +305,11 @@ s32 PlayerShot_CheckObjectHitbox(PlayerShot* shot, f32* hitboxData, Object* obj) if (!((obj->id >= OBJ_ACTOR_START) && (obj->id < OBJ_ACTOR_MAX))) { PlayerShot_Impact(shot); } - if ((obj->id == OBJ_SCENERY_15) || ((obj->id == OBJ_SCENERY_22) && (i == 0)) || - ((obj->id == OBJ_SCENERY_10) && (i == 0)) || ((obj->id == OBJ_SCENERY_13) && (i == 0)) || - ((obj->id == OBJ_SCENERY_12) && (i < 3)) || (obj->id == OBJ_SCENERY_16) || - (obj->id == OBJ_SCENERY_14)) { + if ((obj->id == OBJ_SCENERY_CO_BUILDING_6) || ((obj->id == OBJ_SCENERY_CO_ARCH_3) && (i == 0)) || + ((obj->id == OBJ_SCENERY_CO_BUILDING_1) && (i == 0)) || + ((obj->id == OBJ_SCENERY_CO_BUILDING_4) && (i == 0)) || + ((obj->id == OBJ_SCENERY_CO_BUILDING_3) && (i < 3)) || (obj->id == OBJ_SCENERY_CO_BUILDING_7) || + (obj->id == OBJ_SCENERY_CO_BUILDING_5)) { if (shot->obj.pos.x - (obj->pos.x + hitbox->x.offset) < -hitbox->x.size) { if (hitbox->z.size + (obj->pos.z + hitbox->z.offset) < shot->obj.pos.z) { shot->obj.pos.z = hitbox->z.size + (obj->pos.z + hitbox->z.offset) - 5.0f; @@ -336,7 +337,7 @@ s32 PlayerShot_CheckObjectHitbox(PlayerShot* shot, f32* hitboxData, Object* obj) return i + 1; } if (obj->id < OBJ_SCENERY_MAX) { - func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); } return i + 1; } @@ -485,7 +486,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj sp7C.z = obj->pos.z - shot->obj.pos.z; // undefined behavior: if this check fails, the function returns no value if (((fabsf(sp7C.x) < 1100.0f) && (fabsf(sp7C.z) < 1100.0f) && (shot->obj.pos.y < 900.0f)) || - (objId == OBJ_BOSS_SZ) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_ME_TUNNEL)) { + (objId == OBJ_BOSS_SZ_GREAT_FOX) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_ME_TUNNEL)) { Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = shot->obj.pos.x - obj->pos.x; sp7C.y = shot->obj.pos.y - obj->pos.y; @@ -506,8 +507,8 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj case OBJ_ACTOR_180: objId = COL1_0; break; - case OBJ_SCENERY_4: - case OBJ_SCENERY_5: + case OBJ_SCENERY_CO_BUMP_4: + case OBJ_SCENERY_CO_BUMP_5: objId = COL2_1; useCol2 = true; break; @@ -529,7 +530,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj case ACTOR_EVENT_ID: objId = COL1_3; break; - case OBJ_BOSS_SZ: + case OBJ_BOSS_SZ_GREAT_FOX: objId = COL1_8; break; case OBJ_SCENERY_ME_TUNNEL: @@ -555,11 +556,11 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj objId = COL2_7; useCol2 = true; break; - case OBJ_SCENERY_2: + case OBJ_SCENERY_CO_BUMP_2: objId = COL2_2; useCol2 = true; break; - case OBJ_SCENERY_3: + case OBJ_SCENERY_CO_BUMP_3: case OBJ_SCENERY_69: objId = COL2_3; useCol2 = true; @@ -612,7 +613,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj return false; } PlayerShot_Impact(shot); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_METEO) { Matrix_RotateY(gCalcMatrix, obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = sp4C.x - obj->pos.x; @@ -635,7 +636,7 @@ bool PlayerShot_CheckPolyCollision(PlayerShot* shot, ObjectId objId, Object* obj return false; } PlayerShot_Impact(shot); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); if (gCurrentLevel == LEVEL_FORTUNA) { func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); @@ -790,7 +791,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { default: if (actor->info.unk_16 != 0) { if (actor->obj.id == OBJ_ACTOR_ALLRANGE) { - if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_10) && + if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_ENEMY) && (((gCurrentLevel == LEVEL_VENOM_2) && (shot->sourceId <= NPC_SHOT_ID + AI360_PEPPY)) || ((gCurrentLevel != LEVEL_VENOM_2) && (shot->sourceId == AI360_FOX))) && @@ -906,8 +907,8 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_143) || - (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { PlayerShot_CheckPolyCollision(shot, scenery360->obj.id, &scenery360->obj); } else { PlayerShot_CheckObjectHitbox(shot, scenery360->info.hitbox, &scenery360->obj); @@ -917,13 +918,13 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } else { for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { if (scenery->obj.status == OBJ_ACTIVE) { - if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || - (scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5) || + if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || (scenery->obj.id == OBJ_SCENERY_47) || - (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_74) || - (scenery->obj.id == OBJ_SCENERY_3)) { + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3)) { PlayerShot_CheckPolyCollision(shot, scenery->obj.id, &scenery->obj); } else { temp_v0 = PlayerShot_CheckObjectHitbox(shot, scenery->info.hitbox, &scenery->obj); @@ -953,7 +954,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if ((boss->obj.status == OBJ_ACTIVE) && (boss->timer_05A == 0)) { if ((boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_309) || - (boss->obj.id == OBJ_BOSS_SZ)) { + (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX)) { PlayerShot_CheckPolyCollision(shot, boss->obj.id, &boss->obj); } else if (boss->obj.id == OBJ_BOSS_310) { test.x = fabsf(boss->obj.pos.x - shot->obj.pos.x) * .8333333f; @@ -1614,7 +1615,7 @@ void PlayerShot_UpdateBeam(PlayerShot* shot, s32 index) { PlayerShot_Impact(shot); shot->obj.pos.y = gGroundHeight + 2; if (gCurrentLevel == LEVEL_BOLSE) { - func_effect_8007A6F0(&shot->obj.pos, NA_SE_EN_REFLECT); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_EN_REFLECT); } if ((gCamCount != 4) && (gCurrentLevel != LEVEL_AQUAS)) { if ((shot->sourceId == TEAM_ID_FOX) && (gLaserStrength[0] != LASERS_SINGLE) && @@ -1660,7 +1661,7 @@ void PlayerShot_UpdateBeam(PlayerShot* shot, s32 index) { Object_Kill(&shot->obj, shot->sfxSource); return; } - if ((shot->sourceId < NPC_SHOT_ID + AI360_10) || ((shot->timer % 2) != 0)) { + if ((shot->sourceId < NPC_SHOT_ID + AI360_ENEMY) || ((shot->timer % 2) != 0)) { PlayerShot_CollisionCheck(shot); } } @@ -1863,7 +1864,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { scenery = gScenery; for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { - if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_56)) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_CO_DOORS)) { dx = scenery->obj.pos.x - shot->obj.pos.x; dy = scenery->obj.pos.y - shot->obj.pos.y; dz = scenery->obj.pos.z - shot->obj.pos.z; @@ -1904,7 +1905,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { actor->hitPos.z = shot->obj.pos.z; if (sqrtf(SQ(dx) + SQ(dy) + SQ(dz)) < radius) { if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || - (actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) || + (actor->obj.id == OBJ_MISSILE_SEEK_TEAM) || (actor->obj.id == OBJ_ACTOR_202) || (actor->obj.id == OBJ_ACTOR_201) || (actor->obj.id == OBJ_ACTOR_187) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SUPPLY_CRATE)) || ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SX_WARP_GATE)) || @@ -2093,7 +2094,7 @@ void PlayerShot_UpdateLockOnShot(PlayerShot* shot) { shot->unk_48 * 3.0f, 5); func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_OB_WATER_BOUND_M); } PlayerShot_Impact(shot); } else { @@ -2246,7 +2247,7 @@ void PlayerShot_UpdateShot(PlayerShot* shot, s32 index) { } } Object_Kill(&shot->obj, shot->sfxSource); - func_effect_8007A6F0(&shot->obj.pos, NA_SE_SPREAD_EXPLOSION); + Effect_SpawnTimedSfxAtPos(&shot->obj.pos, NA_SE_SPREAD_EXPLOSION); } else if (gCurrentLevel == LEVEL_AQUAS) { Aquas_801ABA40(shot); } else { diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 9979ac97..98c1af7a 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -168,20 +168,19 @@ void Background_DrawStarfield(void) { } void Background_DrawPartialStarfield(s32 yMin, s32 yMax) { - f32 by; // 8C - f32 bx; // 88 - s16 vy; // 84 + f32 by; + f32 bx; + s16 vy; s16 vx; - s32 i; // 80 - s32 var_s2; // 7C - f32 cos; // 78 - f32 sin; // 74 - f32 spf68; // 70 - f32 spf64; // 6C - f32* sp60; // 68 - f32* sp5C; // 64 - u32* sp58; // 60 - + s32 i; + s32 var_s2; + f32 cos; + f32 sin; + f32 spf68; + f32 spf64; + f32* sp60; + f32* sp5C; + u32* sp58; gDPPipeSync(gMasterDisp++); gDPSetCycleType(gMasterDisp++, G_CYC_FILL); gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE); @@ -261,10 +260,13 @@ void Background_DrawBackdrop(void) { levelType = LEVELTYPE_SPACE; } levelId = gCurrentLevel; + Matrix_Push(&gGfxMatrix); + if (D_ctx_80177C70 == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } + switch (levelType) { case LEVELTYPE_PLANET: RCP_SetupDL(&gMasterDisp, SETUPDL_17); @@ -277,12 +279,14 @@ void Background_DrawBackdrop(void) { sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, 7280.0f); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY); + if (gCurrentLevel == LEVEL_FORTUNA) { Matrix_Translate(gGfxMatrix, 0.0f, -2000.0f, 0, MTXF_APPLY); } else if (gCurrentLevel == LEVEL_KATINA) { Matrix_Translate(gGfxMatrix, 0.0f, -2500.0f, 0, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_VERSUS: if (gVersusStage == VS_STAGE_CORNERIA) { @@ -305,6 +309,7 @@ void Background_DrawBackdrop(void) { } Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_VERSUS: if (gVersusStage == VS_STAGE_CORNERIA) { @@ -326,6 +331,7 @@ void Background_DrawBackdrop(void) { break; } break; + case LEVEL_CORNERIA: case LEVEL_VENOM_1: sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); @@ -333,6 +339,7 @@ void Background_DrawBackdrop(void) { Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, sp13C, -2000.0f + sp134, -6000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_CORNERIA: gSPDisplayList(gMasterDisp++, D_CO_60059F0); @@ -341,8 +348,10 @@ void Background_DrawBackdrop(void) { gSPDisplayList(gMasterDisp++, D_VE1_60046F0); break; } + Matrix_Translate(gGfxMatrix, 7280.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_CORNERIA: gSPDisplayList(gMasterDisp++, D_CO_60059F0); @@ -352,6 +361,7 @@ void Background_DrawBackdrop(void) { break; } break; + case LEVEL_VENOM_ANDROSS: if (gDrawBackdrop != 6) { if ((gDrawBackdrop == 2) || (gDrawBackdrop == 7)) { @@ -412,6 +422,7 @@ void Background_DrawBackdrop(void) { } } break; + case LEVEL_AQUAS: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { sp13C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114; @@ -423,6 +434,7 @@ void Background_DrawBackdrop(void) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp13C, sp134, -7000.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { gSPDisplayList(gMasterDisp++, D_AQ_601AFF0); } else { @@ -445,6 +457,7 @@ void Background_DrawBackdrop(void) { Matrix_Pop(&gGfxMatrix); } break; + case LEVEL_SOLAR: case LEVEL_ZONESS: case LEVEL_MACBETH: @@ -452,6 +465,7 @@ void Background_DrawBackdrop(void) { sp12C = Math_RadToDeg(gPlayer[gPlayerNum].camYaw) - gPlayer[gPlayerNum].yRot_114; sp134 = (gPlayer[gPlayerNum].camPitch * -7000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.6f); sp13C = sp12C * -40.44444f * 2.0f; // close to 7280.0f / 180.0f + if ((gCurrentLevel == LEVEL_TITANIA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 3)) { D_bg_8015F968 += __sinf(gPlayer[0].camYaw) * 20.0f; @@ -462,10 +476,12 @@ void Background_DrawBackdrop(void) { D_bg_8015F968 = __sinf(gPlayer[0].camPitch) * 7000.0f; sp134 -= fabsf(D_bg_8015F968); } + sp13C = Math_ModF(sp13C, 7280.0f); RCP_SetupDL_17(); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); + if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_ZONESS)) { Matrix_Translate(gGfxMatrix, sp13C, -3000.0f + sp134, -7000.0f, MTXF_APPLY); } else if (gCurrentLevel == LEVEL_SOLAR) { @@ -474,6 +490,7 @@ void Background_DrawBackdrop(void) { Matrix_Translate(gGfxMatrix, sp13C, -4000.0f + sp134, -7000.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); + if (gCurrentLevel == LEVEL_TITANIA) { gSPDisplayList(gMasterDisp++, D_TI_6000A80); } else if (gCurrentLevel == LEVEL_MACBETH) { @@ -490,6 +507,7 @@ void Background_DrawBackdrop(void) { } Matrix_Translate(gGfxMatrix, 7280.0f * sp13C, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); + if (gCurrentLevel == LEVEL_TITANIA) { gSPDisplayList(gMasterDisp++, D_TI_6000A80); } else if (gCurrentLevel == LEVEL_MACBETH) { @@ -502,6 +520,7 @@ void Background_DrawBackdrop(void) { break; } break; + case LEVELTYPE_SPACE: if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ENTER_WARP_ZONE) { Matrix_Push(&gGfxMatrix); @@ -534,13 +553,16 @@ void Background_DrawBackdrop(void) { sp138 = Math_ModF(sp138, 480.0f); sp134 = Math_ModF(sp134, 360.0f); } + if ((sp12C < 180.0f) && (sp138 > 380.0f)) { sp138 = -(480.0f - sp138); } if ((sp130 > 180.0f) && (sp134 > 280.0f)) { sp134 = -(360.0f - sp134); } + Matrix_RotateZ(gGfxMatrix, gStarfieldRoll, MTXF_APPLY); + switch (levelId) { case LEVEL_WARP_ZONE: if ((s32) gWarpZoneBgAlpha != 0) { @@ -558,6 +580,7 @@ void Background_DrawBackdrop(void) { Matrix_Pop(&gGfxMatrix); } break; + case LEVEL_METEO: if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCsFrameCount > 260)) { Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f) - 30.0f, -290.0f, @@ -573,6 +596,7 @@ void Background_DrawBackdrop(void) { gSPDisplayList(gMasterDisp++, D_ME_600DDF0); } break; + case LEVEL_SECTOR_X: if (gSceneSetup == 0) { Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); @@ -583,6 +607,7 @@ void Background_DrawBackdrop(void) { gSPDisplayList(gMasterDisp++, D_SX_6029890); } break; + case LEVEL_TRAINING: Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.2f, 0.2f, 1.0f, MTXF_APPLY); @@ -591,6 +616,7 @@ void Background_DrawBackdrop(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gSPDisplayList(gMasterDisp++, D_TR_6003760); break; + case LEVEL_AREA_6: case LEVEL_UNK_4: sp128 = (gPathProgress * 0.00004f) + 0.5f; @@ -609,6 +635,7 @@ void Background_DrawBackdrop(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_A6_601BB40); break; + case LEVEL_FORTUNA: sp128 = 1.5f; if ((gCsFrameCount > 400) && (gMissionStatus == MISSION_COMPLETE)) { @@ -619,6 +646,7 @@ void Background_DrawBackdrop(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_FO_600B4B0); break; + case LEVEL_BOLSE: sp128 = 1.0f; if ((gCsFrameCount > 500) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { @@ -629,13 +657,15 @@ void Background_DrawBackdrop(void) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BO_600D190); break; + case LEVEL_SECTOR_Z: Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_SZ_6002F80); + gSPDisplayList(gMasterDisp++, aSzBackgroundDL); break; + case LEVEL_SECTOR_Y: Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 1.0f, MTXF_APPLY); @@ -648,6 +678,7 @@ void Background_DrawBackdrop(void) { } Matrix_Pop(&gGfxMatrix); } + if (gStarWarpDistortion > 0.0f) { f32* xStar = gStarOffsetsX; f32* yStar = gStarOffsetsY; @@ -655,7 +686,7 @@ void Background_DrawBackdrop(void) { RCP_SetupDL_14(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 128, 255, 255); - i = 0; + zRot = 0.0f; for (i = 0; i < 300; i++, xStar++, yStar++) { *xStar = RAND_FLOAT_SEEDED(480.0f) - 80.0f; @@ -690,10 +721,12 @@ void Background_DrawSun(void) { (gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) { return; } + gPlayerGlareAlphas[gPlayerNum] -= sSunGlareAlphaStep[levelType]; if (gPlayerGlareAlphas[gPlayerNum] > 300) { gPlayerGlareAlphas[gPlayerNum] = 0; } + if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) || (((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) || (gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && @@ -701,14 +734,17 @@ void Background_DrawSun(void) { gPlayerGlareReds[gPlayerNum] = 128; gPlayerGlareGreens[gPlayerNum] = 128; gPlayerGlareBlues[gPlayerNum] = 128; + camYaw = Math_RadToDeg(gPlayer[gPlayerNum].camYaw); camPitch = Math_RadToDeg(gPlayer[gPlayerNum].camPitch); if (camPitch > 180.0f) { camPitch -= 360.0f; } + camYaw -= 135.0f; gSunViewX = -camYaw * 3.2f; gSunViewY = (-camPitch * 3.2f) + 130.0f - ((gPlayer[gPlayerNum].cam.eye.y - 350.0f) * 0.015f); + if (gCurrentLevel == LEVEL_KATINA) { gSunViewY -= 80.0f; } @@ -716,6 +752,7 @@ void Background_DrawSun(void) { gSunViewY -= 60.0f; gSunViewX -= 480.0f; } + if ((gSunViewX < 120.0f) && (gSunViewX > -120.0f) && (gSunViewY < 120.0f)) { gPlayerGlareAlphas[gPlayerNum] += sSunGlareAlphaStep[levelType] * 2; if (sSunGlareMaxAlpha[levelType] < gPlayerGlareAlphas[gPlayerNum]) { @@ -723,6 +760,7 @@ void Background_DrawSun(void) { } } } + if (gPlayerGlareAlphas[gPlayerNum] != 0) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); @@ -732,12 +770,14 @@ void Background_DrawSun(void) { sunAlpha = sSunAlphas; sunDL = sSunDLs; sunScale = sSunScales; + if (gCurrentLevel == LEVEL_KATINA) { sunColor = sKaSunColors; sunAlpha = sKaSunAlphas; sunDL = sKaSunDLs; sunScale = sKaSunScales; } + for (i = 0; i < 5; i++, sunColor++, sunAlpha++, sunDL++, sunScale++) { Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, *sunScale, *sunScale, *sunScale, MTXF_APPLY); @@ -766,11 +806,13 @@ void Background_DrawLensFlare(void) { (gPlayerGlareAlphas[gPlayerNum] == 0)) { return; } + alphaMod = 1.0f; if (gPlayerGlareAlphas[gPlayerNum] < 80) { alphaMod = gPlayerGlareAlphas[gPlayerNum] / 80.0f; } alphaMod *= sLensFlareAlphaMod[gLevelType]; + Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); @@ -782,6 +824,7 @@ void Background_DrawLensFlare(void) { lensFlareDL = &sSunDLs[5]; lensFlareScale = &sSunScales[5]; lensFlareShift = &sSunShifts[5]; + if (gCurrentLevel == LEVEL_KATINA) { lensFlareColor = &sKaSunColors[5]; lensFlareAlpha = &sKaSunAlphas[5]; @@ -789,6 +832,7 @@ void Background_DrawLensFlare(void) { lensFlareScale = &sKaSunScales[5]; lensFlareShift = &sKaSunShifts[5]; } + for (i = 5; i < 13; i++, lensFlareColor++, lensFlareAlpha++, lensFlareDL++, lensFlareScale++, lensFlareShift++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, *lensFlareShift * lensFlareOffsetX, *lensFlareShift * -lensFlareOffsetY, 0.0f, @@ -828,6 +872,7 @@ void Background_DrawGround(void) { Bolse_DrawDynamicGround(); return; } + sp1D4 = 0.0f; if ((gGroundType != 10) && (gGroundType != 11)) { sp1D4 = -4000.0f; @@ -849,10 +894,13 @@ void Background_DrawGround(void) { sp1B4.x = 0; sp1B4.y = 0; sp1B4.z = -5500.0f; + Matrix_RotateY(gCalcMatrix, -gPlayer[gPlayerNum].camYaw, MTXF_NEW); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp1B4, &sp1A8); + temp_fv1 = gPlayer[gPlayerNum].cam.eye.x + sp1A8.x; temp_fa0 = gPlayer[gPlayerNum].cam.eye.z + sp1A8.z; + if (temp_fv1 > 6000.0f) { gPlayer[gPlayerNum].xPath = 12000.0f; } @@ -865,6 +913,7 @@ void Background_DrawGround(void) { if (temp_fv1 < -18000.0f) { gPlayer[gPlayerNum].xPath = -24000.0f; } + if (temp_fa0 > 6000.0f) { sp1D4 = 12000.0f; } @@ -878,12 +927,16 @@ void Background_DrawGround(void) { sp1D4 = -24000.0f; } } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, gPlayer[gPlayerNum].xPath, -3.0f + gCameraShakeY, sp1D4, MTXF_APPLY); + if (D_ctx_80177C70 == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } + Matrix_SetGfxMtx(&gMasterDisp); + switch (gCurrentLevel) { case LEVEL_CORNERIA: if (gGroundClipMode != 0) { @@ -891,6 +944,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + if (gLevelMode == LEVELMODE_ON_RAILS) { gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_CO_601B6C0)); temp_s0 = fabsf(Math_ModF(2.0f * (gPathTexScroll * 0.2133333f), 128.0f)); // 0.64f / 3.0f @@ -935,6 +989,7 @@ void Background_DrawGround(void) { } } break; + case LEVEL_VENOM_1: case LEVEL_MACBETH: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -972,6 +1027,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); break; + case LEVEL_TRAINING: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); if (gLevelMode == LEVELMODE_ON_RAILS) { @@ -1002,10 +1058,12 @@ void Background_DrawGround(void) { } } break; + case LEVEL_AQUAS: RCP_SetupDL(&gMasterDisp, SETUPDL_20); sp1C0 = D_AQ_600AB10; gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); + if ((D_bg_8015F964 == 0) && ((gAqDrawMode == 0) || (gAqDrawMode == 2))) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_600AB68), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, @@ -1029,6 +1087,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); } + if ((D_bg_8015F964 != 0) || (gAqDrawMode == 0)) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); @@ -1042,6 +1101,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL(&gMasterDisp, SETUPDL_37); } + if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gPlayer[0].csState < 2)) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { @@ -1050,6 +1110,7 @@ void Background_DrawGround(void) { } else { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_AQ_801C4188); } + Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, D_bg_8015F970, -3000.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.5f, MTXF_APPLY); @@ -1062,6 +1123,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, D_AQ_602AC40); } break; + case LEVEL_FORTUNA: case LEVEL_KATINA: case LEVEL_BOLSE: @@ -1071,6 +1133,7 @@ void Background_DrawGround(void) { } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); @@ -1087,12 +1150,14 @@ void Background_DrawGround(void) { Matrix_Pop(&gGfxMatrix); } break; + case LEVEL_VERSUS: if (gGroundClipMode != 0) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { RCP_SetupDL_20(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } + for (i = 0; i < ARRAY_COUNT(sGroundPositions360x); i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); @@ -1105,6 +1170,7 @@ void Background_DrawGround(void) { Matrix_Pop(&gGfxMatrix); } break; + case LEVEL_SOLAR: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -2000.0f, MTXF_APPLY); @@ -1116,6 +1182,7 @@ void Background_DrawGround(void) { gSPDisplayList(gMasterDisp++, D_SO_6002E60); } break; + case LEVEL_ZONESS: RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -1500.0f, MTXF_APPLY); diff --git a/src/engine/fox_boss.c b/src/engine/fox_boss.c index 722f116f..ae9235e0 100644 --- a/src/engine/fox_boss.c +++ b/src/engine/fox_boss.c @@ -11,7 +11,7 @@ s32 PAD_boss_C9EC4[14] = { 0 }; const f32 D_boss_800D55D0[] = { 6000.0f, 18000.0f, -6000.0f, -18000.0f }; // unused? -void Boss_AwardBonus(Boss* boss) { +void Boss_AwardBonus(Boss* this) { s32 bonus; f32 yOffset; @@ -26,15 +26,17 @@ void Boss_AwardBonus(Boss* boss) { } else { bonus = 0; } + if (bonus != 0) { yOffset = 0.0f; - if (boss->obj.id == OBJ_BOSS_292) { + if (this->obj.id == OBJ_BOSS_CO_GRANGA) { yOffset = 300.0f; - } else if (boss->obj.id == OBJ_BOSS_TI) { + } else if (this->obj.id == OBJ_BOSS_TI) { yOffset = 200.0f; } - BonusText_Display(boss->obj.pos.x, boss->obj.pos.y + yOffset, boss->obj.pos.z, bonus); + BonusText_Display(this->obj.pos.x, this->obj.pos.y + yOffset, this->obj.pos.z, bonus); } + gHitCount += bonus + 1; D_ctx_80177850 = 15; } @@ -57,27 +59,27 @@ void Boss300_Update(Boss300* this) { void Boss300_Draw(Boss300* this) { } -void Boss_SetupDebris(Actor* actor, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, +void Boss_SetupDebris(ActorDebris* this, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9, f32 argA, s32 argB, s32 argC) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = argB; - actor->obj.pos.x = arg1; - actor->obj.pos.y = arg2; - actor->obj.pos.z = arg3; - actor->obj.rot.x = arg4; - actor->obj.rot.y = arg5; - actor->obj.rot.z = arg6; - actor->vel.x = arg7; - actor->vel.y = arg8; - actor->vel.z = arg9; - actor->scale = argA; - actor->timer_0BC = argC; - actor->timer_0BE = 20; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_DEBRIS; + this->state = argB; + this->obj.pos.x = arg1; + this->obj.pos.y = arg2; + this->obj.pos.z = arg3; + this->obj.rot.x = arg4; + this->obj.rot.y = arg5; + this->obj.rot.z = arg6; + this->vel.x = arg7; + this->vel.y = arg8; + this->vel.z = arg9; + this->scale = argA; + this->timer_0BC = argC; + this->timer_0BE = 20; + Object_SetInfo(&this->info, this->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - actor->gravity = 0.5f; + this->gravity = 0.5f; } } @@ -93,8 +95,8 @@ void Boss_SpawnDebris(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5 } } -void Boss_SetCullDistance(Boss* boss) { - boss->info.cullDistance = 30000.0f; +void Boss_SetCullDistance(Boss* this) { + this->info.cullDistance = 30000.0f; } void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) { @@ -110,10 +112,13 @@ void Boss_CompleteLevel(Player* player, f32 xPos, f32 yPos, f32 zPos) { player->csState = 10; player->csTimer = 50; player->csEventTimer = 50; + player->unk_000 = 0.0f; player->unk_004 = 1.0f; + if (player->pos.x < player->xPath) { player->unk_004 = -1.0f; } + gPlayer[0].vel.x = 0.0f; } diff --git a/src/engine/fox_col1.c b/src/engine/fox_col1.c index f570c6fc..0739b801 100644 --- a/src/engine/fox_col1.c +++ b/src/engine/fox_col1.c @@ -194,6 +194,7 @@ void func_col1_80097C88(Vec3f* norms, Vtx_tn* quad) { __vtx1_x = quad->ob[0]; __vtx1_y = quad->ob[1]; __vtx1_z = quad->ob[2]; + quad++; __vtx2_x = quad->ob[0]; __vtx2_y = quad->ob[1]; @@ -205,17 +206,21 @@ void func_col1_80097C88(Vec3f* norms, Vtx_tn* quad) { __dy2 = __vtx2_y - __vtx1_y; __dz1 = __vtx1_z - __vtx0_z; __dz2 = __vtx2_z - __vtx1_z; + norms->x = (__dy1 * __dz2) - (__dz1 * __dy2); norms->y = (__dz1 * __dx2) - (__dx1 * __dz2); norms->z = (__dx1 * __dy2) - (__dy1 * __dx2); + temp_fv0 = VEC3F_MAG(norms); if (temp_fv0 != 0.0f) { norms->x = (norms->x / temp_fv0) * 127.0f; norms->y = (norms->y / temp_fv0) * 127.0f; norms->z = (norms->z / temp_fv0) * 127.0f; } + norms++; quad++; + __vtx1_x = __vtx2_x; __vtx1_y = __vtx2_y; __vtx1_z = __vtx2_z; @@ -223,15 +228,18 @@ void func_col1_80097C88(Vec3f* norms, Vtx_tn* quad) { __vtx2_x = quad->ob[0]; __vtx2_y = quad->ob[1]; __vtx2_z = quad->ob[2]; + __dx1 = __vtx1_x - __vtx0_x; __dx2 = __vtx2_x - __vtx1_x; __dy1 = __vtx1_y - __vtx0_y; __dy2 = __vtx2_y - __vtx1_y; __dz1 = __vtx1_z - __vtx0_z; __dz2 = __vtx2_z - __vtx1_z; + norms->x = (__dy1 * __dz2) - (__dz1 * __dy2); norms->y = (__dz1 * __dx2) - (__dx1 * __dz2); norms->z = (__dx1 * __dy2) - (__dy1 * __dx2); + temp_fv0 = VEC3F_MAG(norms); if (temp_fv0 != 0.0f) { norms->x = (norms->x / temp_fv0) * 127.0f; @@ -260,8 +268,10 @@ s32 func_col1_8009808C(Vec3f* pos, Vtx_tn* quad, Vec3f* normOut) { __vtx3_x = quad[3].ob[0]; __vtx3_y = quad[3].ob[1]; __vtx3_z = quad[3].ob[2]; + __pos_x = pos->x; __pos_z = pos->z; + test1 = TRINORM_Y(__vtx0, __vtx1, __pos); if (test1 >= 0.0f) { test1 = TRINORM_Y(__vtx1, __vtx2, __pos); @@ -277,6 +287,7 @@ s32 func_col1_8009808C(Vec3f* pos, Vtx_tn* quad, Vec3f* normOut) { } } } + if (var_v1 == 0) { test1 = TRINORM_Y(__vtx0, __vtx2, __pos); if ((test1 >= 0.0f)) { diff --git a/src/engine/fox_col2.c b/src/engine/fox_col2.c index 6d75b7fc..f1d5bc52 100644 --- a/src/engine/fox_col2.c +++ b/src/engine/fox_col2.c @@ -26,14 +26,18 @@ bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* col objRelPos.x = objPos->x - colliderPos->x; objRelPos.y = objPos->y - colliderPos->y; objRelPos.z = objPos->z - colliderPos->z; + if ((objRelPos.x < colHeader->min.x) || (objRelPos.y < colHeader->min.y) || (objRelPos.z < colHeader->min.z) || (colHeader->max.x < objRelPos.x) || (colHeader->max.y < objRelPos.y) || (colHeader->max.z < objRelPos.z)) { return false; } + above = false; count = colHeader->polyCount; + polys = SEGMENTED_TO_VIRTUAL(colHeader->polys); mesh = SEGMENTED_TO_VIRTUAL(colHeader->mesh); + for (i = 0; i < count; i++, polys++) { for (j = 0; j < 3; j++) { tri[j] = &mesh[polys->vtx[j]]; @@ -43,12 +47,15 @@ bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* col break; } } + if (above) { vtx.x = tri[0]->x; vtx.y = tri[0]->y; vtx.z = tri[0]->z; + func_col1_80098860(&triPlane, &vtx, &norm); hitDataOut->y = func_col1_800988B4(&objRelPos, &triPlane); + if (triPlane.normal.x != 0.0f) { norm.x = -triPlane.dist / triPlane.normal.x; } else { @@ -64,6 +71,7 @@ bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* col } else { norm.z = 0.0f; } + hitDataOut->x = Math_Atan2F_XY(norm.y, norm.z); if (norm.z != 0.0f) { hitDataOut->z = -Math_Atan2F_XY(__sinf(Math_Atan2F_XY(norm.y, norm.z)) * norm.z, norm.x); @@ -72,6 +80,7 @@ bool func_col2_800A36FC(Vec3f* objPos, Vec3f* colliderPos, CollisionHeader2* col } else { hitDataOut->z = -Math_Atan2F_XY(norm.y, norm.x); } + if ((objPos->y - hitDataOut->y <= 0.0f) || (gCurrentLevel == LEVEL_MACBETH)) { sp38 = true; } @@ -106,6 +115,7 @@ bool func_col2_800A3A74(Vec3f* point, Vec3f** tri, Vec3f* normOut) { ptx = point->x; ptz = point->z; + temp1 = ((vtx2.z - vtx1.z) * (ptx - vtx2.x)) - ((vtx2.x - vtx1.x) * (ptz - vtx2.z)); if (temp1 >= 0.0f) { if (((vtx3.x - vtx2.x) * (ptz - vtx3.z)) <= ((vtx3.z - vtx2.z) * (ptx - vtx3.x))) { diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index afd62d62..954a2a08 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -7,7 +7,7 @@ s32 gSceneId; s32 gSceneSetup; s32 gClearPlayerInfo; // some sort of flag -s32 D_ctx_8017782C; // some sort of flag. all range related? +bool D_ctx_8017782C; // some sort of flag. all range related? GameState gGameState; s32 gNextGameStateTimer; s32 gVsItemSpawnTimer; @@ -287,7 +287,7 @@ UNK_TYPE P_800D31A8 = 0; u16 gEnemyShotSpeed; // enemy shot speed? u8 gShowLevelClearStatusScreen; s32 gLevelStartStatusScreenTimer; -s32 gLevelClearScreenTimer; // timer for mission accomplished scrren +s32 gLevelClearScreenTimer; // timer for mission accomplished screen s32 gBossHealthBar; s32 D_ctx_80177850; // bonus text related. set to 15 but never read s32 D_ctx_80177858[4]; // set to 3 but never used. related to VS mode customization? diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 67daab35..17a1fc61 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -79,24 +79,26 @@ static Vec3f D_demo_800C9F60[] = { }; static f32 D_demo_800C9F90[] = { 75.0f, -80.0f, 85.0f, 0.0f }; -void func_demo_80048CC4(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_demo_800C9F60[arg1].x + gPlayer[0].pos.x; - actor->obj.pos.y = D_demo_800C9F60[arg1].y + gPlayer[0].pos.y; - actor->obj.pos.z = D_demo_800C9F60[arg1].z + gPlayer[0].trueZpos; - actor->rot_0F4.y = 0.0f; - actor->rot_0F4.z = D_demo_800C9F90[arg1]; - Object_SetInfo(&actor->info, actor->obj.id); - - if (arg1 == 3) { - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, actor->sfxSource, 0); - actor->animFrame = 1; +void func_demo_80048CC4(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = D_demo_800C9F60[index].x + gPlayer[0].pos.x; + this->obj.pos.y = D_demo_800C9F60[index].y + gPlayer[0].pos.y; + this->obj.pos.z = D_demo_800C9F60[index].z + gPlayer[0].trueZpos; + + this->rot_0F4.y = 0.0f; + this->rot_0F4.z = D_demo_800C9F90[index]; + Object_SetInfo(&this->info, this->obj.id); + + if (index == 3) { + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); + this->animFrame = 1; } else { - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } } @@ -109,6 +111,7 @@ void Cutscene_WarpZoneComplete(Player* player) { s32 temp_v1; gBosses[1].obj.status = OBJ_FREE; + Math_SmoothStepToF(&player->zRotBarrelRoll, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->zRotBank, 0.0f, 0.1f, 15.0f, 0.0f); Math_SmoothStepToF(&player->rot.x, 0.0f, 0.1f, 3.0f, 0.0f); @@ -190,6 +193,7 @@ void Cutscene_WarpZoneComplete(Player* player) { default: break; } + if (gCsFrameCount > 450) { Math_SmoothStepToF(&D_ctx_80177A48[0], 1.0f, 0.1f, 0.004f, 0.0f); player->baseSpeed += 2.0f; @@ -328,37 +332,40 @@ static f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f }; static s32 D_demo_800CA030[] = { 0, 0, 0, 1 }; static s32 D_demo_800CA040[] = { 0, 0, 0, 0 }; -void func_demo_80049968(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = D_demo_800C9FD0[arg1]; - actor->obj.pos.y = D_demo_800C9FE0[arg1]; - actor->obj.pos.z = D_demo_800C9FF0[arg1] + gPlayer[0].trueZpos; - actor->fwork[0] = D_demo_800CA000[arg1]; - actor->fwork[1] = D_demo_800CA010[arg1]; - actor->animFrame = D_demo_800CA030[arg1]; - actor->state = D_demo_800CA040[arg1]; - actor->obj.rot.z = D_demo_800CA020[arg1]; - actor->obj.rot.y = 180.0f; - actor->vel.z = gPlayer[0].vel.z; - Object_SetInfo(&actor->info, actor->obj.id); - actor->iwork[11] = 1; - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); +void func_demo_80049968(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = D_demo_800C9FD0[index]; + this->obj.pos.y = D_demo_800C9FE0[index]; + this->obj.pos.z = D_demo_800C9FF0[index] + gPlayer[0].trueZpos; + + this->fwork[0] = D_demo_800CA000[index]; + this->fwork[1] = D_demo_800CA010[index]; + + this->animFrame = D_demo_800CA030[index]; + this->state = D_demo_800CA040[index]; + this->obj.rot.z = D_demo_800CA020[index]; + this->obj.rot.y = 180.0f; + this->vel.z = gPlayer[0].vel.z; + Object_SetInfo(&this->info, this->obj.id); + this->iwork[11] = 1; + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } -void func_demo_80049A9C(Effect* effect, f32 x, f32 y, f32 z) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_346; - effect->timer_50 = 100; - effect->scale2 = 0.2f; - effect->obj.pos.x = x; - effect->obj.pos.y = y; - effect->obj.pos.z = z; - effect->vel.z = 40.0f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); +void func_demo_80049A9C(Effect346* this, f32 x, f32 y, f32 z) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_346; + this->timer_50 = 100; + this->scale2 = 0.2f; + this->obj.pos.x = x; + this->obj.pos.y = y; + this->obj.pos.z = z; + this->vel.z = 40.0f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_demo_80049B44(void) { @@ -659,65 +666,68 @@ static f32 D_demo_800CA05C[] = { -60.0f, -60.0f, -120.0f }; static f32 D_demo_800CA068[] = { -150.0f, -150.0f, -300.0f }; static f32 D_demo_800CA074[] = { 360.0f, -360.0f, 0.0f }; -void func_demo_8004A700(Actor* actor, s32 arg1) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos.x = gPlayer[0].pos.x; - actor->obj.pos.y = gPlayer[0].pos.y - 1000.0f; - actor->obj.pos.z = gPlayer[0].pos.z; - actor->fwork[0] = D_demo_800CA050[arg1]; - actor->fwork[1] = D_demo_800CA05C[arg1]; - actor->fwork[2] = D_demo_800CA068[arg1]; - actor->fwork[3] = 4.0f; - actor->fwork[7] = RAND_FLOAT(100.0f); - actor->fwork[8] = RAND_FLOAT(100.0f); - actor->obj.rot.z = D_demo_800CA074[arg1]; - actor->iwork[11] = 1; - Object_SetInfo(&actor->info, actor->obj.id); - AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, actor->sfxSource, 4); +void func_demo_8004A700(ActorCutscene* this, s32 index) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_CUTSCENE; + + this->obj.pos.x = gPlayer[0].pos.x; + this->obj.pos.y = gPlayer[0].pos.y - 1000.0f; + this->obj.pos.z = gPlayer[0].pos.z; + + this->fwork[0] = D_demo_800CA050[index]; + this->fwork[1] = D_demo_800CA05C[index]; + this->fwork[2] = D_demo_800CA068[index]; + + this->fwork[3] = 4.0f; + this->fwork[7] = RAND_FLOAT(100.0f); + this->fwork[8] = RAND_FLOAT(100.0f); + this->obj.rot.z = D_demo_800CA074[index]; + this->iwork[11] = 1; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } void func_demo_8004A840(s32 actor) { func_demo_8004A700(&gActors[actor], actor); } -void func_demo_8004A888(Effect* effect) { - Vec3f sp2C; - Vec3f sp20; +void func_demo_8004A888(Clouds* this) { + Vec3f src; + Vec3f dest; Matrix_RotateY(gCalcMatrix, (gPlayer[0].rot.y + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -(gPlayer[0].rot.x * M_DTOR), MTXF_APPLY); - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - sp2C.x = RAND_FLOAT_CENTERED(1500.0f); - sp2C.y = RAND_FLOAT_CENTERED(800.0f); - sp2C.z = 3000.0f; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + src.x = RAND_FLOAT_CENTERED(1500.0f); + src.y = RAND_FLOAT_CENTERED(800.0f); + src.z = 3000.0f; - Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - effect->obj.pos.x = gPlayer[0].pos.x + sp20.x; - effect->obj.pos.y = gPlayer[0].pos.y + sp20.y; - effect->obj.pos.z = gPlayer[0].pos.z + sp20.z; - sp2C.x = 0.0f; - sp2C.y = 0.0f; - sp2C.z = -80.0f; + this->obj.pos.x = gPlayer[0].pos.x + dest.x; + this->obj.pos.y = gPlayer[0].pos.y + dest.y; + this->obj.pos.z = gPlayer[0].pos.z + dest.z; + src.x = 0.0f; + src.y = 0.0f; + src.z = -80.0f; - Matrix_MultVec3f(gCalcMatrix, &sp2C, &sp20); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - effect->vel.x = sp20.x; - effect->vel.y = sp20.y; - effect->vel.z = sp20.z; - effect->obj.id = OBJ_EFFECT_352; - effect->timer_50 = 40; - effect->unk_46 = 144; - effect->scale2 = RAND_FLOAT(30.0f) + 10.0f; + this->vel.x = dest.x; + this->vel.y = dest.y; + this->vel.z = dest.z; + this->obj.id = OBJ_EFFECT_CLOUDS; + this->timer_50 = 40; + this->unk_46 = 144; + this->scale2 = RAND_FLOAT(30.0f) + 10.0f; if (Rand_ZeroOne() < 0.5f) { - effect->obj.rot.z = 180.0f; + this->obj.rot.z = 180.0f; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_demo_8004AA84(void) { @@ -740,7 +750,7 @@ void Cutscene_AllRangeMode(Player* player) { s32 pad; Vec3f sp70; Vec3f sp64; - Actor* actor; + ActorTeamBoss* actor; f32 var_s1; f32 var_s2; f32 var_s3; @@ -749,7 +759,9 @@ void Cutscene_AllRangeMode(Player* player) { s32 pad2; gCsFrameCount++; + Math_SmoothStepToAngle(&player->aerobaticPitch, 0.0f, 0.1f, 20.0f, 0.0f); + if (gCsFrameCount == 37) { gChangeTo360 = true; if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { @@ -1872,7 +1884,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; - Player* sp38 = gPlayer; + Player* sp38 = &gPlayer[0]; f32 sp34; this->fwork[7] += 3.0f; @@ -1925,6 +1937,7 @@ void func_demo_8004E4D4(ActorCutscene* this) { if (this->fwork[9] > 50.0f) { this->fwork[9] = 50.0f; } + if (this->timer_0BE == 0) { switch (this->index) { case 1: @@ -2102,55 +2115,55 @@ void func_demo_8004EBD0(ActorCutscene* this) { } } -void func_demo_8004F05C(Actor* actor) { - if (((gLevelType == LEVELTYPE_PLANET) && (actor->animFrame == 0)) || (gCurrentLevel == LEVEL_BOLSE)) { - actor->fwork[0] += 3.0f; - actor->fwork[1] = SIN_DEG(actor->fwork[0]) * 1.5f; +void func_demo_8004F05C(ActorCutscene* this) { + if (((gLevelType == LEVELTYPE_PLANET) && (this->animFrame == 0)) || (gCurrentLevel == LEVEL_BOLSE)) { + this->fwork[0] += 3.0f; + this->fwork[1] = SIN_DEG(this->fwork[0]) * 1.5f; } switch (gCurrentLevel) { case LEVEL_BOLSE: - switch (actor->animFrame) { + switch (this->animFrame) { case 0: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - actor->rot_0F4.z += actor->rot_0F4.y; - actor->vel.x = SIN_DEG(actor->rot_0F4.z) * 10.0f; - actor->obj.rot.z = SIN_DEG(actor->rot_0F4.z) * 40.0f; + this->rot_0F4.z += this->rot_0F4.y; + this->vel.x = SIN_DEG(this->rot_0F4.z) * 10.0f; + this->obj.rot.z = SIN_DEG(this->rot_0F4.z) * 40.0f; break; } - Math_SmoothStepToF(&actor->obj.rot.z, actor->fwork[1], 0.05f, 0.3f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, this->fwork[1], 0.05f, 0.3f, 0.0f); - switch (actor->state) { + switch (this->state) { case 0: break; case 1: - actor->state = 2; - actor->timer_0BC = 100; - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, actor->sfxSource, 0); - actor->fwork[29] = 5.0f; + this->state = 2; + this->timer_0BC = 100; + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, this->sfxSource, 0); + this->fwork[29] = 5.0f; case 2: - actor->iwork[11] = 2; - actor->vel.z -= 5.0f; - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + this->iwork[11] = 2; + this->vel.z -= 5.0f; + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } break; case 31: - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; case 32: - actor->obj.rot.z += actor->rot_0F4.z; - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + this->obj.rot.z += this->rot_0F4.z; + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; @@ -2160,40 +2173,40 @@ void func_demo_8004F05C(Actor* actor) { break; case LEVEL_AREA_6: - Area6_8018DA58(actor); + Area6_8018DA58(this); break; case LEVEL_SECTOR_Y: - switch (actor->animFrame) { + switch (this->animFrame) { case 0: - SectorY_8019FF00(actor); + SectorY_8019FF00(this); break; case 42: - if (actor->timer_0BC == 0) { - if (actor->obj.pos.x >= -3500.0f) { - if (actor->obj.pos.z <= 3000.0f) { - if ((fabsf(actor->obj.pos.y) <= 400.0f) && (gCsFrameCount <= 300)) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 8.0f); + if (this->timer_0BC == 0) { + if (this->obj.pos.x >= -3500.0f) { + if (this->obj.pos.z <= 3000.0f) { + if ((fabsf(this->obj.pos.y) <= 400.0f) && (gCsFrameCount <= 300)) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 8.0f); } } } - Object_Kill(&actor->obj, actor->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } break; case 43: - if (actor->timer_0BC == 0) { - Object_Kill(&actor->obj, actor->sfxSource); + if (this->timer_0BC == 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } break; case LEVEL_SECTOR_X: - if ((actor->state != 0) && (actor->state == 1)) { - actor->vel.y += 0.1f; - Math_SmoothStepToF(&actor->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); + if ((this->state != 0) && (this->state == 1)) { + this->vel.y += 0.1f; + Math_SmoothStepToF(&this->obj.rot.x, -20.0f, 0.1f, 0.5f, 0.0f); } break; @@ -2202,84 +2215,84 @@ void func_demo_8004F05C(Actor* actor) { break; default: - switch (actor->state) { + switch (this->state) { case 100: - Math_SmoothStepToF(&actor->obj.pos.x, actor->vwork[0x14].x, 0.03f, 3.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->vwork[0x14].y, 0.03f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.z, actor->vwork[0x14].z, 0.03f, 2.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.02f, 0.3f, 0); + Math_SmoothStepToF(&this->obj.pos.x, this->vwork[0x14].x, 0.03f, 3.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, this->vwork[0x14].y, 0.03f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.z, this->vwork[0x14].z, 0.03f, 2.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.02f, 0.3f, 0); break; case 0: - actor->obj.rot.z = actor->rot_0F4.z; - if (actor->animFrame == 10) { - actor->obj.pos.z = gPlayer[0].cam.eye.z + 12000.0f; + this->obj.rot.z = this->rot_0F4.z; + if (this->animFrame == 10) { + this->obj.pos.z = gPlayer[0].cam.eye.z + 12000.0f; } break; case 1: - actor->vel.y += 0.8f; - actor->vel.x += 0.8f; - Math_SmoothStepToF(&actor->obj.rot.z, 420.0f, 0.1f, 15.0f, 0.001f); + this->vel.y += 0.8f; + this->vel.x += 0.8f; + Math_SmoothStepToF(&this->obj.rot.z, 420.0f, 0.1f, 15.0f, 0.001f); break; case 2: - actor->vel.y += 0.8f; - actor->vel.x -= 0.8f; - Math_SmoothStepToF(&actor->obj.rot.z, -420.0f, 0.1f, 15.0f, 0.001f); + this->vel.y += 0.8f; + this->vel.x -= 0.8f; + Math_SmoothStepToF(&this->obj.rot.z, -420.0f, 0.1f, 15.0f, 0.001f); break; case 3: - actor->vel.y += 1.2f; - actor->vel.z += 0.1f; - Math_SmoothStepToF(&actor->obj.rot.x, -45.0f, 0.1f, 15.0f, 0.001f); + this->vel.y += 1.2f; + this->vel.z += 0.1f; + Math_SmoothStepToF(&this->obj.rot.x, -45.0f, 0.1f, 15.0f, 0.001f); break; case 10: - actor->vel.x -= 1.0f; - Math_SmoothStepToF(&actor->obj.rot.z, -45.0f, 0.05f, 0.5f, 0.0f); + this->vel.x -= 1.0f; + Math_SmoothStepToF(&this->obj.rot.z, -45.0f, 0.05f, 0.5f, 0.0f); break; case 11: - actor->vel.x -= 2.0f; - Math_SmoothStepToF(&actor->obj.rot.z, -70.0f, 0.1f, 6.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.y, 225.0f, 0.05f, 2.0f, 0.0f); + this->vel.x -= 2.0f; + Math_SmoothStepToF(&this->obj.rot.z, -70.0f, 0.1f, 6.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.y, 225.0f, 0.05f, 2.0f, 0.0f); break; case 12: - actor->vel.x += 2.0f; - actor->vel.y += 1.0f; - Math_SmoothStepToF(&actor->obj.rot.z, 80.0f, 0.1f, 6.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.x, -15.0f, 0.05f, 4.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.y, 135.0f, 0.05f, 2.0f, 0.0f); + this->vel.x += 2.0f; + this->vel.y += 1.0f; + Math_SmoothStepToF(&this->obj.rot.z, 80.0f, 0.1f, 6.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.x, -15.0f, 0.05f, 4.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.y, 135.0f, 0.05f, 2.0f, 0.0f); break; case 13: - actor->vel.y += 2.0f; - Math_SmoothStepToF(&actor->obj.rot.z, -400.0f, 0.2f, 14.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.x, -45.0f, 0.05f, 4.0f, 0.0f); + this->vel.y += 2.0f; + Math_SmoothStepToF(&this->obj.rot.z, -400.0f, 0.2f, 14.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.x, -45.0f, 0.05f, 4.0f, 0.0f); break; } break; } } -void func_demo_8004F798(Actor* actor) { - actor->iwork[11] = 2; +void func_demo_8004F798(ActorCutscene* this) { + this->iwork[11] = 2; - switch (actor->state) { + switch (this->state) { case 0: - Math_SmoothStepToF(&actor->obj.pos.x, actor->fwork[0], 0.05f, 50.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.pos.y, actor->fwork[1], 0.05f, 50.0f, 0.0f); - Math_SmoothStepToF(&actor->obj.rot.z, 0.0f, 0.05f, 1.0f, 0.0f); - actor->obj.pos.z -= 2.0f; + Math_SmoothStepToF(&this->obj.pos.x, this->fwork[0], 0.05f, 50.0f, 0.0f); + Math_SmoothStepToF(&this->obj.pos.y, this->fwork[1], 0.05f, 50.0f, 0.0f); + Math_SmoothStepToF(&this->obj.rot.z, 0.0f, 0.05f, 1.0f, 0.0f); + this->obj.pos.z -= 2.0f; break; case 1: - actor->fwork[29] = 10.0f; - actor->vel.z -= 100.0f; - if ((actor->obj.pos.z + gPathProgress) < -15000.0f) { - Object_Kill(&actor->obj, actor->sfxSource); + this->fwork[29] = 10.0f; + this->vel.z -= 100.0f; + if ((this->obj.pos.z + gPathProgress) < -15000.0f) { + Object_Kill(&this->obj, this->sfxSource); } break; } @@ -2323,7 +2336,7 @@ void ActorCutscene_Update(ActorCutscene* this) { break; case LEVEL_SECTOR_Z: - SectorZ_8019DD20(this); + SectorZ_LevelCompleteCsUpdate(this); break; case LEVEL_AREA_6: @@ -2460,19 +2473,19 @@ static Animation* D_demo_800CA1F4[] = { &D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8, }; -void func_demo_8004FCB8(Actor* actor, s32 arg1) { +void func_demo_8004FCB8(ActorCutscene* this, s32 arg1) { f32 angle; f32 scale; s32 i; - if (actor->timer_0BC == 0) { - actor->timer_0BC = 32; - actor->fwork[5] = 0.3f; + if (this->timer_0BC == 0) { + this->timer_0BC = 32; + this->fwork[5] = 0.3f; } - if (actor->fwork[5] > 0.0f) { - scale = actor->fwork[5]; - actor->fwork[5] -= 0.05f; + if (this->fwork[5] > 0.0f) { + scale = this->fwork[5]; + this->fwork[5] -= 0.05f; RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 16, 16, 240, 255); @@ -2481,9 +2494,8 @@ void func_demo_8004FCB8(Actor* actor, s32 arg1) { for (i = arg1; i < (arg1 + 4); i++) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_demo_800CA110[i].x + actor->obj.pos.x, - D_demo_800CA110[i].y + actor->obj.pos.y, D_demo_800CA110[i].z + actor->obj.pos.z, - MTXF_APPLY); + Matrix_Translate(gGfxMatrix, D_demo_800CA110[i].x + this->obj.pos.x, D_demo_800CA110[i].y + this->obj.pos.y, + D_demo_800CA110[i].z + this->obj.pos.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, angle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2492,7 +2504,7 @@ void func_demo_8004FCB8(Actor* actor, s32 arg1) { } } -void ActorCutscene_Draw(Actor* actor) { +void ActorCutscene_Draw(ActorCutscene* this) { static f32 D_800CA210 = 0.0f; static f32 D_800CA214 = 0.0f; static f32 D_800CA218 = 0.0f; @@ -2512,26 +2524,26 @@ void ActorCutscene_Draw(Actor* actor) { f32 y; f32 x; - switch (actor->animFrame) { + switch (this->animFrame) { case 1000: RCP_SetupDL(&gMasterDisp, SETUPDL_45); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->unk_046); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_046); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); - if (actor->unk_046 > 50) { - Actor_DrawEngineAndContrails(actor); + if (this->unk_046 > 50) { + Actor_DrawEngineAndContrails(this); } break; case 0: - func_edisplay_8005B388(actor); + func_edisplay_8005B388(this); break; case 1: if (gCurrentLevel == LEVEL_SECTOR_Z) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } - actor->info.bonus = 1; + this->info.bonus = 1; Cutscene_DrawGreatFox(); break; @@ -2547,12 +2559,12 @@ void ActorCutscene_Draw(Actor* actor) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 10.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->iwork[0]); - gDPSetEnvColor(gMasterDisp++, 255, 255, 00, actor->iwork[0]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->iwork[0]); + gDPSetEnvColor(gMasterDisp++, 255, 255, 00, this->iwork[0]); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -2562,42 +2574,42 @@ void ActorCutscene_Draw(Actor* actor) { case 24: gSPDisplayList(gMasterDisp++, D_D009A40); - Actor_DrawEngineAndContrails(actor); + Actor_DrawEngineAndContrails(this); break; case 25: - if ((actor->index % 2) != 0) { - gSPDisplayList(gMasterDisp++, D_SZ_6001DA0); + if ((this->index % 2) != 0) { + gSPDisplayList(gMasterDisp++, aSzSpaceJunk3DL); } else { - gSPDisplayList(gMasterDisp++, D_SZ_6001360); + gSPDisplayList(gMasterDisp++, aSzSpaceJunk1DL); } break; case 26: gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(actor, 2); + Actor_DrawEngineGlow(this, 2); break; case 28: gSPDisplayList(gMasterDisp++, D_ENMY_SPACE_400AAE0); Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(actor, 2); + Actor_DrawEngineGlow(this, 2); break; case 30: - Display_SetSecondLight(&actor->obj.pos); + Display_SetSecondLight(&this->obj.pos); - if (actor->unk_046 != 0) { + if (this->unk_046 != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_55); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Rand_SetSeed(1, 29000, 9876); for (sp2D0 = 0; sp2D0 < 30; sp2D0++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], - RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], - RAND_FLOAT_CENTERED_SEEDED(3000.0f) * actor->fwork[20], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, RAND_FLOAT_CENTERED_SEEDED(3000.0f) * this->fwork[20], + RAND_FLOAT_CENTERED_SEEDED(3000.0f) * this->fwork[20], + RAND_FLOAT_CENTERED_SEEDED(3000.0f) * this->fwork[20], MTXF_APPLY); Matrix_RotateY(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, (2.0f * gGameFrameCount) * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, 2.0f * RAND_FLOAT_SEEDED(M_PI), MTXF_APPLY); @@ -2717,13 +2729,13 @@ void ActorCutscene_Draw(Actor* actor) { break; case 33: - if ((actor->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + if ((this->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { gSPDisplayList(gMasterDisp++, D_D00B880); } else { gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); } Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); - Actor_DrawEngineGlow(actor, 0); + Actor_DrawEngineGlow(this, 0); break; case 34: @@ -2736,44 +2748,44 @@ void ActorCutscene_Draw(Actor* actor) { /* fallthrough */ case 39: gSPDisplayList(gMasterDisp++, D_SY_60097E0); - func_demo_8004FCB8(actor, 4); + func_demo_8004FCB8(this, 4); break; case 36: - Matrix_Scale(gGfxMatrix, actor->scale, actor->scale, actor->scale, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_SY_601D730); - func_demo_8004FCB8(actor, 0); + func_demo_8004FCB8(this, 0); break; case 37: RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, actor->iwork[0], actor->iwork[1], actor->iwork[2], actor->iwork[3]); - gDPSetEnvColor(gMasterDisp++, actor->iwork[4], actor->iwork[5], actor->iwork[6], actor->iwork[7]); - Matrix_Scale(gGfxMatrix, actor->scale, actor->fwork[4], 1.0f, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0, 0, this->iwork[0], this->iwork[1], this->iwork[2], this->iwork[3]); + gDPSetEnvColor(gMasterDisp++, this->iwork[4], this->iwork[5], this->iwork[6], this->iwork[7]); + Matrix_Scale(gGfxMatrix, this->scale, this->fwork[4], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); break; case 38: - animFrameData = Animation_GetFrameData(D_demo_800CA1F4[actor->iwork[4]], actor->iwork[5], sp144); - Math_SmoothStepToVec3fArray(sp144, actor->vwork, 1, animFrameData, actor->fwork[2], 100.0f, .0f); + animFrameData = Animation_GetFrameData(D_demo_800CA1F4[this->iwork[4]], this->iwork[5], sp144); + Math_SmoothStepToVec3fArray(sp144, this->vwork, 1, animFrameData, this->fwork[2], 100.0f, .0f); RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0, 0, 150, 255, 150, 255); - Animation_DrawSkeleton(1, D_SY_602D140, actor->vwork, 0, 0, actor, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_SY_602D140, this->vwork, 0, 0, this, &gIdentityMatrix); - if (actor->fwork[0] != 0.0f) { + if (this->fwork[0] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 32, 32, 255); Matrix_Translate(gGfxMatrix, 10.0f, -5.0f, -40.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, (-actor->obj.rot.y) * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, (-this->obj.rot.y) * M_DTOR, MTXF_APPLY); Graphics_SetScaleMtx(1.0f); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[0], actor->fwork[0], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[0], this->fwork[0], MTXF_APPLY); - camX = gPlayer[0].cam.eye.x - actor->obj.pos.x; - camY = gPlayer[0].cam.eye.y - actor->obj.pos.y; - camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress); + camX = gPlayer[0].cam.eye.x - this->obj.pos.x; + camY = gPlayer[0].cam.eye.y - this->obj.pos.y; + camZ = gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress); y = -Math_Atan2F(camX, camZ); x = Math_Atan2F(camY, sqrtf(SQ(camZ) + SQ(camX))); @@ -2783,29 +2795,29 @@ void ActorCutscene_Draw(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - Math_SmoothStepToF(&actor->fwork[0], 0.0f, 0.1f, 0.2f, 0.05f); + Math_SmoothStepToF(&this->fwork[0], 0.0f, 0.1f, 0.2f, 0.05f); } - if (actor->fwork[6] != 0.0f) { + if (this->fwork[6] != 0.0f) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 48, 0, 255); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gCalcMatrix, (actor->obj.rot.y - 90.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, (this->obj.rot.y - 90.0f) * M_DTOR, MTXF_NEW); sp2B8.x = 210.0f; sp2B8.y = 0.0f; sp2B8.z = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2B8, &sp2AC); - Matrix_Translate(gGfxMatrix, actor->obj.pos.x + sp2AC.x, actor->obj.pos.y + sp2AC.y, - actor->obj.pos.z + sp2AC.z, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->fwork[6], actor->fwork[6], actor->fwork[6], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, this->obj.pos.x + sp2AC.x, this->obj.pos.y + sp2AC.y, + this->obj.pos.z + sp2AC.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[6], this->fwork[6], this->fwork[6], MTXF_APPLY); - camX = gPlayer[0].cam.eye.x - actor->obj.pos.x; - camY = gPlayer[0].cam.eye.y - actor->obj.pos.y; - camZ = gPlayer[0].cam.eye.z - (actor->obj.pos.z + gPathProgress); + camX = gPlayer[0].cam.eye.x - this->obj.pos.x; + camY = gPlayer[0].cam.eye.y - this->obj.pos.y; + camZ = gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress); y = -Math_Atan2F(camX, camZ); x = Math_Atan2F(camY, sqrtf(SQ(camZ) + SQ(camX))); @@ -2815,7 +2827,7 @@ void ActorCutscene_Draw(Actor* actor) { Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - Math_SmoothStepToF(&actor->fwork[6], 0.00f, 0.1f, 0.6f, 0); + Math_SmoothStepToF(&this->fwork[6], 0.00f, 0.1f, 0.6f, 0); } break; @@ -2824,7 +2836,7 @@ void ActorCutscene_Draw(Actor* actor) { break; case 41: - Aquas_801BE0F0(actor); + Aquas_801BE0F0(this); break; case 42: @@ -2834,28 +2846,28 @@ void ActorCutscene_Draw(Actor* actor) { case 43: RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, actor->iwork[0]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->iwork[0]); gDPSetEnvColor(gMasterDisp++, 255, 192, 128, 255); Matrix_RotateY( gGfxMatrix, Math_Atan2F(gPlayer[0].cam.eye.x - gPlayer[0].cam.at.x, gPlayer[0].cam.eye.z - gPlayer[0].cam.at.z), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, actor->fwork[0], actor->fwork[0], actor->fwork[0], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[0], this->fwork[0], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); - if (actor->iwork[0] != 0) { - actor->iwork[0] -= 7; + if (this->iwork[0] != 0) { + this->iwork[0] -= 7; } - actor->fwork[0] += 0.2f; + this->fwork[0] += 0.2f; break; case 44: - Animation_GetFrameData(&D_AQ_6020A40, actor->iwork[0], actor->vwork); + Animation_GetFrameData(&D_AQ_6020A40, this->iwork[0], this->vwork); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Animation_DrawSkeleton(1, D_AQ_6020C6C, actor->vwork, 0, 0, &actor->index, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_AQ_6020C6C, this->vwork, 0, 0, &this->index, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; @@ -2882,9 +2894,9 @@ void Cutscene_DrawGreatFox(void) { f32 sp9C[4]; Gfx* var_fp; - (void) "Demo_Time=%d\n"; - (void) "Demo_Time=%d\n"; - (void) "d Enm->wrk0 %d\n"; + PRINTF("Demo_Time=%d\n"); + PRINTF("Demo_Time=%d\n"); + PRINTF("d Enm->wrk0 %d\n"); if (gGameState == GSTATE_TITLE) { var_fp = D_TITLE_60320E0; @@ -2933,6 +2945,7 @@ void Cutscene_DrawGreatFox(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 48); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 48); + for (i = 0, var_s6_2 = D_demo_800CA0EC; i < 3; i++, var_s6_2++) { sp9C[i] = D_demo_800CA190[gGameFrameCount % 2U]; Matrix_Push(&gGfxMatrix); diff --git a/src/engine/fox_edata.c b/src/engine/fox_edata.c index c58f1357..56b5af5e 100644 --- a/src/engine/fox_edata.c +++ b/src/engine/fox_edata.c @@ -4,7 +4,7 @@ f32* D_edata_800CF964[] = { NULL }; // Likely a scrapped array of scenery shadow boxes -void func_edata_800594F0(Scenery* scenery) { +void Scenery48_Draw(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -12,7 +12,7 @@ void func_edata_800594F0(Scenery* scenery) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edata_800595D0(Scenery* scenery) { +void Scenery49_Draw(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -20,5 +20,5 @@ void func_edata_800595D0(Scenery* scenery) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edata_800596B0(Actor* actor) { +void Actor289_Draw(Actor* actor) { } diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index 3f551440..241d4b4e 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -93,72 +93,72 @@ f32 gWarpZoneEvent93Hitbox[] = { // clang-format off ObjectInfo gObjectInfo[] = { - /* OBJ_SCENERY_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_6, */ {(void*) D_CO_60132B0, 0, (ObjectFunc) NULL, D_CO_603DCA4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_7, */ {(void*) D_CO_602E080, 0, (ObjectFunc) NULL, D_CO_603DD40, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_10, */ {(void*) D_CO_602D5F0, 0, (ObjectFunc) NULL, D_CO_603DDF0, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_11, */ {(void*) D_CO_601A7D0, 0, (ObjectFunc) NULL, D_CO_603DE8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_12, */ {(void*) D_CO_6014B50, 0, (ObjectFunc) NULL, D_CO_603DEF4, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_13, */ {(void*) D_CO_6016580, 0, (ObjectFunc) NULL, D_CO_603DF8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_14, */ {(void*) D_CO_601B560, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603DFDC, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_15, */ {(void*) D_CO_60361F0, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E014, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_16, */ {(void*) D_CO_6018E80, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E030, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_17, */ {(void*) D_CO_6035F10, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E09C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_18, */ {(void*) Corneria_8018753C, 1, (ObjectFunc) Corneria_80187530, D_CO_603E98C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_19, */ {(void*) D_CO_60153B0, 0, (ObjectFunc) NULL, D_CO_603E118, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_20, */ {(void*) D_CO_601F5A0, 0, (ObjectFunc) NULL, D_CO_603E14C, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_21, */ {(void*) D_CO_60137B0, 0, (ObjectFunc) NULL, D_CO_603E1B4, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_22, */ {(void*) D_CO_6006A80, 0, (ObjectFunc) NULL, D_CO_603E21C, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_23, */ {(void*) D_CO_6016270, 0, (ObjectFunc) NULL, D_CO_603E4A0, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_24, */ {(void*) D_CO_6010E00, 0, (ObjectFunc) NULL, D_CO_603E9EC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_25, */ {(void*) D_CO_6014670, 0, (ObjectFunc) NULL, D_CO_603EA08, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_26, */ {(void*) D_CO_6010A50, 0, (ObjectFunc) NULL, D_CO_603EA74, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_27, */ {(void*) D_CO_60143E0, 0, (ObjectFunc) NULL, D_CO_603EAE0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_28, */ {(void*) D_CO_6014A20, 0, (ObjectFunc) NULL, D_CO_603EB0C, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_SKULL, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60064FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_0, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006518, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_1, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006564, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_2, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60065B0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_3, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60065FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_4, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006648, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_5, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006694, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_6, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_7, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_TI_RIB_8, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_STONE_ARCH, */ {(void*) aCoStoneArchDL, 0, (ObjectFunc) NULL, aCoStoneArchHitbox, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_1, */ {(void*) aCoBump1DL, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_2, */ {(void*) aCoBump2DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_3, */ {(void*) aCoBump3DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_4, */ {(void*) aCoBump4DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUMP_5, */ {(void*) aCoBump5DL, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_1, */ {(void*) aCoHighway1DL, 0, (ObjectFunc) NULL, aCoHighway1Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_2, */ {(void*) aCoHighway2DL, 0, (ObjectFunc) NULL, aCoHighway2Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_3, */ {(void*) aCoHighway3DL, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_4, */ {(void*) aCoHighway4DL, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_1, */ {(void*) aCoBuilding1DL, 0, (ObjectFunc) NULL, aCoBuilding1Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_2, */ {(void*) aCoBuilding2DL, 0, (ObjectFunc) NULL, aCoBuilding2Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_3, */ {(void*) aCoBuilding3DL, 0, (ObjectFunc) NULL, aCoBuilding3Hitbox, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_4, */ {(void*) aCoBuilding4DL, 0, (ObjectFunc) NULL, aCoBuilding4Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_5, */ {(void*) aCoBuilding5DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding5Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_6, */ {(void*) aCoBuilding6DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding6Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_7, */ {(void*) aCoBuilding7DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding7Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_8, */ {(void*) aCoBuilding8DL, 0, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding8Hitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_ON_FIRE, */ {(void*) Corneria_BuildingOnFire_Draw, 1, (ObjectFunc) Corneria_BuildingOnFire_Update, aCoBuildingOnFireHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_TOWER, */ {(void*) aCoTowerDL, 0, (ObjectFunc) NULL, aCoTowerHitbox, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_ARCH_1, */ {(void*) aCoArch1DL, 0, (ObjectFunc) NULL, aCoArch1Hitbox, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_ARCH_2, */ {(void*) aCoArch2DL, 0, (ObjectFunc) NULL, aCoArch2Hitbox, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_ARCH_3, */ {(void*) aCoArch3DL, 0, (ObjectFunc) NULL, aCoArch3Hitbox, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_RADAR, */ {(void*) aRadarDL, 0, (ObjectFunc) NULL, aCoRadarHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_5, */ {(void*) aCoHighway5DL, 0, (ObjectFunc) NULL, aCoHighway5Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_6, */ {(void*) aCoHighway6DL, 0, (ObjectFunc) NULL, aCoHighway6Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_7, */ {(void*) aCoHighway7DL, 0, (ObjectFunc) NULL, aCoHighway7Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_8, */ {(void*) aCoHighway8DL, 0, (ObjectFunc) NULL, aCoHighway8Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_HIGHWAY_9, */ {(void*) aCoHighway9DL, 0, (ObjectFunc) NULL, aCoHighway9Hitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_SKULL, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiSkullHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_0, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib0Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_1, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib1Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_2, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib2Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_3, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib3Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_4, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib4Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_5, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib5Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_6, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib6Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_7, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib7Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_TI_RIB_8, */ {(void*) Scenery_DrawTitaniaBones, 1, (ObjectFunc) Scenery_UpdateTitaniaBones, aTiRib8Hitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_ME_TUNNEL, */ {(void*) MeteoTunnel_Draw, 1, (ObjectFunc) MeteoTunnel_Update, gNoHitbox, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_42, */ {(void*) Scenery42_Draw, 1, (ObjectFunc) Scenery42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_43, */ {(void*) D_ZO_6024AC0, 0, (ObjectFunc) NULL, D_ZO_602B9EC, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_9, */ {(void*) CoBuilding9_Draw, 1, (ObjectFunc) CoBuilding9_Update, aCoBuilding9Hitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_BUILDING_10, */ {(void*) CoBuilding10_Draw, 1, (ObjectFunc) SceneryRotateTowardsCamera, aCoBuilding10Hitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_IBEAM, */ {(void*) CoIBeam_Draw, 1, (ObjectFunc) CoIBeam_Update, aCoIBeamHitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_ZO_ROCK_1, */ {(void*) aZoRock1DL, 0, (ObjectFunc) NULL, aZoRock1Hitbox, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_44, */ {(void*) D_ZO_600F560, 0, (ObjectFunc) NULL, D_ZO_602BA20, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_45, */ {(void*) D_ZO_600EC90, 0, (ObjectFunc) NULL, D_ZO_602BAE4, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_46, */ {(void*) D_ZO_600E820, 0, (ObjectFunc) NULL, D_ZO_602BBD8, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_47, */ {(void*) D_ZO_601FCB0, 0, (ObjectFunc) NULL, D_ZO_602BC54, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_48, */ {(void*) func_edata_800594F0, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_49, */ {(void*) func_edata_800595D0, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_48, */ {(void*) Scenery48_Draw, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_49, */ {(void*) Scenery49_Draw, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_50, */ {(void*) D_VE1_6007410, 0, (ObjectFunc) NULL, D_VE1_601B518, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_80193540, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_Scenery52_Update, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Scenery54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_55, */ {(void*) D_CO_6013B50, 0, (ObjectFunc) NULL, D_CO_603E88C, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_56, */ {(void*) Corneria_8018F31C, 2, (ObjectFunc) Corneria_8018F044, D_CO_603E8A8, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_SCENERY_57, */ {(void*) Titania_8018F8B8, 1, (ObjectFunc) Titania_8018F4D8, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_WATERFALL, */ {(void*) aCoWaterfallDL, 0, (ObjectFunc) CoWaterfall_Update, aCoWaterfallHitbox, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_ROCKWALL, */ {(void*) aCoRockwallDL, 0, (ObjectFunc) NULL, aCoRockwallHitbox, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_CO_DOORS, */ {(void*) Corneria_Doors_Draw, 2, (ObjectFunc) Corneria_Doors_Update, aCoDoorsHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_57, */ {(void*) Titania_Scenery57_Draw, 1, (ObjectFunc) Titania_Scenery57_Update, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_58, */ {(void*) D_TI1_700BE00, 0, (ObjectFunc) NULL, D_TI_6006C44, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_SCENERY_61, */ {(void*) Macbeth_801A2A78, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_61, */ {(void*) Macbeth_Scenery61_Draw, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_65, */ {(void*) Macbeth_801A6608, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_65, */ {(void*) Macbeth_Scenery65_Draw, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_66, */ {(void*) D_MA_601F1D0, 0, (ObjectFunc) NULL, D_MA_60362D8, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_67, */ {(void*) D_MA_60238F0, 0, (ObjectFunc) NULL, D_MA_6036328, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, /* OBJ_SCENERY_68, */ {(void*) D_MA_601B7C0, 0, (ObjectFunc) NULL, D_MA_60362F4, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, @@ -170,42 +170,42 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_77, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_104 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) Macbeth_801A0BD8, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_105 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_77, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_78, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_79, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_80, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_81, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_82, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_83, */ {(void*) Macbeth_Scenery83_Draw, 1, (ObjectFunc) Macbeth_Scenery83_Update, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_84, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_85, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_86, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_87, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_88, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_89, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_90, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_91, */ {(void*) Macbeth_SceneryDoodad2_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_92, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_93, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_94, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_95, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_96, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_97, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_98, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_99, */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_100 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_101 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_102 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_103 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_104 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) Macbeth_Scenery104_Update, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_105 */ {(void*) Macbeth_SceneryDoodad_Draw, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SCENERY_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_107 */ {(void*) D_SY_601D730, 0, (ObjectFunc) NULL, D_SY_603450C, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_Scenery109_Update, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_111 */ {(void*) Scenery111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SCENERY_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_Scenery112_Update, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -219,13 +219,13 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_801924A8, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_126 */ {(void*) Aquas_Scenery126_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_Scenery127_Update, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_SCENERY_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_SCENERY_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, /* OBJ_SCENERY_130 */ {(void*) D_VE1_900F1D0, 0, (ObjectFunc) NULL, D_VE1_601B75C, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_SCENERY_131 */ {(void*) Andross_801935D4, 1, (ObjectFunc) Andross_8019356C, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_SCENERY_132 */ {(void*) Andross_8019350C, 1, (ObjectFunc) Andross_80193380, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_131 */ {(void*) Andross_Scenery131_Draw, 1, (ObjectFunc) Andross_Scenery131_Update, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_132 */ {(void*) Andross_Scenery132_Draw, 1, (ObjectFunc) Andross_Scenery132_Update, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, /* OBJ_SCENERY_133 */ {(void*) D_TR_60030F0, 0, (ObjectFunc) NULL, D_TR_6009CC4, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, /* OBJ_SCENERY_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, /* OBJ_SCENERY_135 */ {(void*) D_VE2_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, @@ -249,172 +249,172 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_154 */ {(void*) aKaFLBaseDL, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_158 */ {(void*) D_SZ_6001360, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_156 */ {(void*) SectorY_Scenery156_Draw, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_157 */ {(void*) aSzSpaceJunk3DL, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_158 */ {(void*) aSzSpaceJunk1DL, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_POLE */ {(void*) D_CO_602F7C0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E468, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_TREE */ {(void*) D_CO_601C9B0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E484, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_FO_POLE */ {(void*) D_FO_600A420, 0, (ObjectFunc) Sprite_UpdateDoodad, D_FO_600FE9C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_POLE */ {(void*) aCoPoleDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aCoPoleHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_TREE */ {(void*) aCoTreeDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aCoTreeHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_FO_POLE */ {(void*) aFoPoleDL, 0, (ObjectFunc) Sprite_UpdateDoodad, aFoPoleHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gNoHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_TI_CACTUS */ {(void*) D_TI_60023B0, 0, (ObjectFunc) Titania_Cactus_Update, D_TI_60068BC, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_TI_CACTUS */ {(void*) aTiCactusDL, 0, (ObjectFunc) Titania_Cactus_Update, aTiCactusHitbox, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_Smoke_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_VE1_BOSS_TRIGGER4 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger4_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_SPRITE_GFOX_TARGET */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_176 */ {(void*) Corneria_8018BAAC, 2, (ObjectFunc) Corneria_8018AED0, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, - /* OBJ_ACTOR_177 */ {(void*) Corneria_8018BBA4, 2, (ObjectFunc) Corneria_8018B15C, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, - /* OBJ_ACTOR_178 */ {(void*) Corneria_8018BBF8, 2, (ObjectFunc) Corneria_8018B418, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, - /* OBJ_ACTOR_179 */ {(void*) Corneria_8018BD7C, 2, (ObjectFunc) Corneria_8018B58C, D_CO_603E604, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_8018756C, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_182 */ {(void*) func_edisplay_8005B71C, 1, (ObjectFunc) Meteo_80187650, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_186 */ {(void*) func_edisplay_8005B7CC, 1, (ObjectFunc) Meteo_8018795C, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_801877C4, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_188 */ {(void*) Aquas_801BEC74, 1, (ObjectFunc) Aquas_801BEC68, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_CO_GARUDA_1 */ {(void*) Corneria_CoGaruda1_Draw, 2, (ObjectFunc) Corneria_CoGaruda1_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, + /* OBJ_ACTOR_CO_GARUDA_2 */ {(void*) Corneria_CoGaruda2_Draw, 2, (ObjectFunc) Corneria_CoGaruda2_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, + /* OBJ_ACTOR_CO_GARUDA_3 */ {(void*) Corneria_CoGaruda3_Draw, 2, (ObjectFunc) Corneria_CoGaruda3_Update, CoGarudaHitbox, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, + /* OBJ_ACTOR_CO_GARUDA_DESTROY */ {(void*) Corneria_CoGarudaDestroy_Draw, 2, (ObjectFunc) Corneria_CoGarudaDestroy_Update, aCoGarudaDestroyHitbox, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, + /* OBJ_ACTOR_180 */ {(void*) Actor180_Draw, 1, (ObjectFunc) Actor180_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_Actor181_Update, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_182 */ {(void*) Actor182_Draw, 1, (ObjectFunc) Meteo_Actor182_Update, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_183 */ {(void*) Meteo_Actor183_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_184 */ {(void*) Meteo_Actor184_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_185 */ {(void*) Meteo_Actor185_Draw, 1, (ObjectFunc) Meteo_ActorDoodad_Update, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_186 */ {(void*) Actor186_Draw, 1, (ObjectFunc) Meteo_Actor186_Update, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_Actor187_Update, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_188 */ {(void*) Aquas_Actor188_Draw, 1, (ObjectFunc) Aquas_Actor188_Update, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_DEBRIS */ {(void*) ActorDebris_Draw, 1, (ObjectFunc) ActorDebris_Update, gNoHitbox, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_192 */ {(void*) func_edisplay_8005B9A4, 1, (ObjectFunc) func_enmy_8006654C, D_CO_603E54C, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, - /* OBJ_ACTOR_193 */ {(void*) func_edisplay_8005BA30, 1, (ObjectFunc) func_enmy_800669A0, D_CO_603E598, 100.0f, 0, 1, 39, 0, 0.0f, 0 }, + /* OBJ_MISSILE_SEEK_TEAM */ {(void*) Actor190_191_Draw, 1, (ObjectFunc) Actors190_191_Update, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, + /* OBJ_MISSILE_SEEK_PLAYER */ {(void*) Actor190_191_Draw, 1, (ObjectFunc) Actors190_191_Update, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_192 */ {(void*) Actor192_Draw, 1, (ObjectFunc) Actor192_Update, D_CO_603E54C, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, + /* OBJ_ACTOR_193 */ {(void*) Actor193_Draw, 1, (ObjectFunc) Actor193_Update, D_CO_603E598, 100.0f, 0, 1, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_194 */ {(void*) Actor194_Draw, 1, (ObjectFunc) Actor194_Update, gActor194Hitbox, 200.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_CUTSCENE */ {(void*) ActorCutscene_Draw, 1, (ObjectFunc) ActorCutscene_Update, gNoHitbox, 20000.0f, 0, 1, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_196 */ {(void*) Actor196_Draw, 1, (ObjectFunc) Actor196_Update, D_CO_603E5B4, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_ALLRANGE */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorAllRange_Update, gActorAllRangeHItbox, 20000.0f, 0, 1, 39, 1, 1.0f, 1 }, /* OBJ_ACTOR_TEAM_BOSS */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorTeamBoss_Update, gTeamHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_199 */ {(void*) Andross_Actor199_Draw, 1, (ObjectFunc) Andross_Actor199_Update, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gNoHitbox, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_201 */ {(void*) Actor201_Draw, 1, (ObjectFunc) Actor201_Update, D_ME_602F684, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_202 */ {(void*) Actor202_Draw, 1, (ObjectFunc) Actor202_Update, D_ME_602F6A0, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, - /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_Slippy_Draw, 1, (ObjectFunc) SectorX_Slippy_Update, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_204 */ {(void*) SectorY_Actor204_Draw, 1, (ObjectFunc) SectorY_Actor204_Update, D_SY_603405C, 1000.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_205 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019C778, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_206 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_801AC438, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_207 */ {(void*) Macbeth_801AC294, 2, (ObjectFunc) Macbeth_801A7E7C, D_MA_603677C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_208 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019EA60, D_MA_6035A14, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_209 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019D700, D_MA_6035AE0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_210 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019CE88, D_MA_6035D9C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_211 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019E410, D_MA_6035E04, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_212 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019FF9C, D_MA_60360C0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_213 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019EE68, D_MA_6036154, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_214 */ {(void*) Macbeth_801A43BC, 1, (ObjectFunc) Macbeth_801A3E98, D_MA_6036458, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_215 */ {(void*) Macbeth_801A4A64, 1, (ObjectFunc) Macbeth_801A46A0, D_MA_60364C0, 300.0f, 0, 1, 40, 1, 0.0f, 1 }, - /* OBJ_ACTOR_216 */ {(void*) Macbeth_801A5F90, 1, (ObjectFunc) Macbeth_801A5E54, D_MA_60366EC, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_217 */ {(void*) Macbeth_801A6100, 1, (ObjectFunc) Macbeth_801A5FD0, D_MA_6036708, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_218 */ {(void*) Macbeth_801A6540, 1, (ObjectFunc) Macbeth_801A6144, D_MA_6036728, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_219 */ {(void*) Macbeth_801A68EC, 1, (ObjectFunc) Macbeth_801A67C8, D_MA_6036744, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_220 */ {(void*) Macbeth_801ADAC8, 1, (ObjectFunc) Macbeth_801AD6F0, D_MA_6036930, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_221 */ {(void*) Macbeth_801AE2C0, 1, (ObjectFunc) Macbeth_801ADD68, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, - /* OBJ_ACTOR_222 */ {(void*) Macbeth_801AEEFC, 1, (ObjectFunc) Macbeth_801AEC04, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, - /* OBJ_ACTOR_223 */ {(void*) Macbeth_801A54E8, 1, (ObjectFunc) Macbeth_801A4B24, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, gNoHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_8018AB44, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, - /* OBJ_ACTOR_226 */ {(void*) Titania_80189AFC, 1, (ObjectFunc) Titania_801895B8, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, - /* OBJ_ACTOR_227 */ {(void*) Titania_8018E5B4, 1, (ObjectFunc) Titania_8018E54C, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_228 */ {(void*) Titania_8018EF14, 1, (ObjectFunc) Titania_8018E5F8, D_TI_6006808, 0.0f, 0, 0, 39, 1, 1.0f, 1 }, - /* OBJ_ACTOR_229 */ {(void*) Titania_8018E2D8, 1, (ObjectFunc) Titania_8018C8A8, D_TI_6006A3C, 1000.0f, 0, 0, 20, 1, 0.0f, 1 }, - /* OBJ_ACTOR_230 */ {(void*) Titania_8018AABC, 1, (ObjectFunc) Titania_8018A544, D_TI_600683C, 0.0f, 0, 1, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_231 */ {(void*) Titania_8018BE84, 1, (ObjectFunc) Titania_8018B9D0, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_232 */ {(void*) Titania_8018B6AC, 1, (ObjectFunc) Titania_8018B268, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, - /* OBJ_ACTOR_233 */ {(void*) Titania_8018A1C0, 1, (ObjectFunc) Titania_80189CC8, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, + /* OBJ_ACTOR_205 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor205_Update, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_206 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor206_Update, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_207 */ {(void*) Macbeth_Actor207_Draw, 2, (ObjectFunc) Macbeth_Actor207_Update, D_MA_603677C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_208 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor208_Update, D_MA_6035A14, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_209 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor209_Update, D_MA_6035AE0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_210 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor210_Update, D_MA_6035D9C, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_211 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor211_Update, D_MA_6035E04, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_212 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor212_Update, D_MA_60360C0, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_213 */ {(void*) Macbeth_ActorDoodad_Draw, 1, (ObjectFunc) Macbeth_Actor213_Update, D_MA_6036154, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_214 */ {(void*) Macbeth_Actor214_Draw, 1, (ObjectFunc) Macbeth_Actor214_Update, D_MA_6036458, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_215 */ {(void*) Macbeth_Actor215_Draw, 1, (ObjectFunc) Macbeth_Actor215_Update, D_MA_60364C0, 300.0f, 0, 1, 40, 1, 0.0f, 1 }, + /* OBJ_ACTOR_216 */ {(void*) Macbeth_Actor216_Draw, 1, (ObjectFunc) Macbeth_Actor216_Update, D_MA_60366EC, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_217 */ {(void*) Macbeth_Actor217_Draw, 1, (ObjectFunc) Macbeth_Actor217_Update, D_MA_6036708, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_218 */ {(void*) Macbeth_Actor218_Draw, 1, (ObjectFunc) Macbeth_Actor218_Update, D_MA_6036728, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_219 */ {(void*) Macbeth_Actor219_Draw, 1, (ObjectFunc) Macbeth_Actor219_Update, D_MA_6036744, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_220 */ {(void*) Macbeth_Actor220_Draw, 1, (ObjectFunc) Macbeth_Actor220_Update, D_MA_6036930, 200.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_221 */ {(void*) Macbeth_Actor221_Draw, 1, (ObjectFunc) Macbeth_Actor221_Update, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, + /* OBJ_ACTOR_222 */ {(void*) Macbeth_Actor222_Draw, 1, (ObjectFunc) Macbeth_Actor222_Update, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, + /* OBJ_ACTOR_223 */ {(void*) Macbeth_Actor223_Draw, 1, (ObjectFunc) Macbeth_Actor223_Update, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_Actor224_Update, gNoHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_Actor225_Update, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, + /* OBJ_ACTOR_226 */ {(void*) Titania_Actor226_Draw, 1, (ObjectFunc) Titania_Actor226_Update, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, + /* OBJ_ACTOR_227 */ {(void*) Titania_Actor227_Draw, 1, (ObjectFunc) Titania_Actor227_Update, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_228 */ {(void*) Titania_Actor228_Draw, 1, (ObjectFunc) Titania_Actor228_Update, D_TI_6006808, 0.0f, 0, 0, 39, 1, 1.0f, 1 }, + /* OBJ_ACTOR_229 */ {(void*) Titania_Actor229_Draw, 1, (ObjectFunc) Titania_Actor229_Update, D_TI_6006A3C, 1000.0f, 0, 0, 20, 1, 0.0f, 1 }, + /* OBJ_ACTOR_230 */ {(void*) Titania_Actor230_Draw, 1, (ObjectFunc) Titania_Actor230_Update, D_TI_600683C, 0.0f, 0, 1, 39, 1, 0.0f, 1 }, + /* OBJ_ACTOR_231 */ {(void*) Titania_Actor231_Draw, 1, (ObjectFunc) Titania_Actor231_Update, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, + /* OBJ_ACTOR_232 */ {(void*) Titania_Actor232_Draw, 1, (ObjectFunc) Titania_Actor232_Update, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, + /* OBJ_ACTOR_233 */ {(void*) Titania_Actor233_Draw, 1, (ObjectFunc) Titania_Actor233_Update, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gNoHitbox, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, - /* OBJ_ACTOR_235 */ {(void*) Zoness_80190430, 2, (ObjectFunc) Zoness_801904CC, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_236 */ {(void*) Zoness_80190F08, 1, (ObjectFunc) Zoness_80190A00, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_235 */ {(void*) Zoness_Actor235_Draw, 2, (ObjectFunc) Zoness_Actor235_Update, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_236 */ {(void*) Zoness_Actor236_Draw, 1, (ObjectFunc) Zoness_Actor236_Update, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gNoHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, - /* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, gCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_238 */ {(void*) Zoness_Actor238_Draw, 2, (ObjectFunc) Zoness_Actor238_Update, gCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, gCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, - /* OBJ_ACTOR_241 */ {(void*) Zoness_80191DB0, 1, (ObjectFunc) Zoness_80191BC4, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_242 */ {(void*) Zoness_80191FFC, 2, (ObjectFunc) Zoness_80192094, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, gCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_244 */ {(void*) Zoness_80193240, 2, (ObjectFunc) Zoness_80192E64, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, - /* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, gCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_247 */ {(void*) Zoness_8019D3C4, 1, (ObjectFunc) Zoness_8019D15C, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_250 */ {(void*) Zoness_8019B7DC, 1, (ObjectFunc) Zoness_8019B548, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_251 */ {(void*) Zoness_8019BDE0, 2, (ObjectFunc) Zoness_8019B854, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_252 */ {(void*) Zoness_8019C1CC, 1, (ObjectFunc) Zoness_8019BE48, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, - /* OBJ_ACTOR_253 */ {(void*) Zoness_8019C83C, 1, (ObjectFunc) Zoness_8019C454, D_ZO_602C250, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_254 */ {(void*) Zoness_8019CE58, 1, (ObjectFunc) Zoness_8019CBEC, D_ZO_602C2B0, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_255 */ {(void*) Aquas_801AE168, 1, (ObjectFunc) Aquas_801AD6C0, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_256 */ {(void*) Aquas_801AEB44, 1, (ObjectFunc) Aquas_801AE3D8, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_257 */ {(void*) Aquas_801B099C, 1, (ObjectFunc) Aquas_801AFA5C, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_259 */ {(void*) Aquas_801B619C, 2, (ObjectFunc) Aquas_801B638C, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_260 */ {(void*) Aquas_801B90DC, 2, (ObjectFunc) Aquas_801B7C78, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_261 */ {(void*) Aquas_801B504C, 2, (ObjectFunc) Aquas_801B50E8, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_262 */ {(void*) Aquas_801B7A24, 2, (ObjectFunc) Aquas_801B6FF8, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_263 */ {(void*) Aquas_801BA108, 2, (ObjectFunc) Aquas_801B91A4, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, gCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_265 */ {(void*) Aquas_801BAD7C, 1, (ObjectFunc) Aquas_801BA6A4, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_266 */ {(void*) Aquas_801BB204, 2, (ObjectFunc) Aquas_801BADF8, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_267 */ {(void*) Aquas_801BC930, 2, (ObjectFunc) Aquas_801BB79C, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_268 */ {(void*) Aquas_801BDE6C, 1, (ObjectFunc) Aquas_801BD54C, D_AQ_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_269 */ {(void*) Aquas_801BD264, 1, (ObjectFunc) Aquas_801BC9A0, D_AQ_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_270 */ {(void*) Aquas_801BEB1C, 1, (ObjectFunc) Aquas_801BE3F8, D_AQ_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_240 */ {(void*) Zoness_Actor240_Draw, 1, (ObjectFunc) Zoness_Actor240_Update, gCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, + /* OBJ_ACTOR_241 */ {(void*) Zoness_Actor241_Draw, 1, (ObjectFunc) Zoness_Actor241_Update, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_242 */ {(void*) Zoness_Actor242_Draw, 2, (ObjectFunc) Zoness_Actor242_Update, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_243 */ {(void*) Zoness_Actor243_Draw, 2, (ObjectFunc) Zoness_Actor243_Update, gCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_244 */ {(void*) Zoness_Actor244_Draw, 2, (ObjectFunc) Zoness_Actor244_Update, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, + /* OBJ_ACTOR_245 */ {(void*) Zoness_Actor245_Draw, 1, (ObjectFunc) Zoness_Actor245_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_246 */ {(void*) Zoness_Actor246_Draw, 1, (ObjectFunc) Zoness_Actor246_Update, gCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_247 */ {(void*) Zoness_Actor247_Draw, 1, (ObjectFunc) Zoness_Actor247_Update, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_248 */ {(void*) Zoness_Actor248_Draw, 1, (ObjectFunc) Zoness_Actor248_Update, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_249 */ {(void*) Zoness_Actor249_Draw, 1, (ObjectFunc) Zoness_Actor249_Update, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_250 */ {(void*) Zoness_Actor250_Draw, 1, (ObjectFunc) Zoness_Actor250_Update, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_251 */ {(void*) Zoness_Actor251_Draw, 2, (ObjectFunc) Zoness_Actor251_Update, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_252 */ {(void*) Zoness_Actor252_Draw, 1, (ObjectFunc) Zoness_Actor252_Update, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, + /* OBJ_ACTOR_253 */ {(void*) Zoness_Actor253_Draw, 1, (ObjectFunc) Zoness_Actor253_Update, D_ZO_602C250, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_254 */ {(void*) Zoness_Actor254_Draw, 1, (ObjectFunc) Zoness_Actor254_Update, D_ZO_602C2B0, 300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_255 */ {(void*) Aquas_Actor255_Draw, 1, (ObjectFunc) Aquas_Actor255_Update, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_256 */ {(void*) Aquas_Actor256_Draw, 1, (ObjectFunc) Aquas_Actor256_Update, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_257 */ {(void*) Aquas_Actor257_Draw, 1, (ObjectFunc) Aquas_Actor257_Update, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_258 */ {(void*) Aquas_Actor258_Draw, 1, (ObjectFunc) Aquas_Actor258_Update, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_259 */ {(void*) Aquas_Actor259_Draw, 2, (ObjectFunc) Aquas_Actor259_Update, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_260 */ {(void*) Aquas_Actor260_Draw, 2, (ObjectFunc) Aquas_Actor260_Update, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_261 */ {(void*) Aquas_Actor261_Draw, 2, (ObjectFunc) Aquas_Actor261_Update, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_262 */ {(void*) Aquas_Actor262_Draw, 2, (ObjectFunc) Aquas_Actor262_Update, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_263 */ {(void*) Aquas_Actor263_Draw, 2, (ObjectFunc) Aquas_Actor263_Update, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_264 */ {(void*) Aquas_Actor264_Draw, 1, (ObjectFunc) Aquas_Actor264_Update, gCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_265 */ {(void*) Aquas_Actor265_Draw, 1, (ObjectFunc) Aquas_Actor265_Update, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, + /* OBJ_ACTOR_266 */ {(void*) Aquas_Actor266_Draw, 2, (ObjectFunc) Aquas_Actor266_Update, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_267 */ {(void*) Aquas_Actor267_Draw, 2, (ObjectFunc) Aquas_Actor267_Update, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_268 */ {(void*) Aquas_Actor268_Draw, 1, (ObjectFunc) Aquas_Actor268_Update, D_AQ_6031570, 10000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_269 */ {(void*) Aquas_Actor269_Draw, 1, (ObjectFunc) Aquas_Actor269_Update, D_AQ_6030D20, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_270 */ {(void*) Aquas_Actor270_Draw, 1, (ObjectFunc) Aquas_Actor270_Update, D_AQ_60314C8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_271 */ {(void*) Actor271_Draw, 2, (ObjectFunc) Actor271_Update, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, /* OBJ_ACTOR_272 */ {(void*) Actor272_Draw, 1, (ObjectFunc) Actor272_Update, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, - /* OBJ_ACTOR_273 */ {(void*) Fortuna_80188FE4, 2, (ObjectFunc) Fortuna_80188AD0, D_FO_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, - /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_80192518, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_281 */ {(void*) Venom1_80192E2C, 1, (ObjectFunc) Venom1_80192CD4, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_80192CD4, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_80192EB0, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_284 */ {(void*) Venom1_801934D0, 1, (ObjectFunc) Venom1_801933DC, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, - /* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, gNoHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, gNoHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_FO_RADAR */ {(void*) Fortuna_Radar_Draw, 2, (ObjectFunc) Fortuna_Radar_Update, aFoRadarHitbox, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, + /* OBJ_ACTOR_SZ_SPACE_JUNK */ {(void*) SectorZ_SpaceJunkDraw, 1, (ObjectFunc) SectorZ_SpaceJunkUpdate, gCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_275 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_276 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_277 */ {(void*) Solar_Doodad_Draw, 1, (ObjectFunc) Solar_Doodad_Update, gCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_Actor278_Update, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_Actor279_Update, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_Actor280_Update, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_281 */ {(void*) Venom1_Actor281_Draw, 1, (ObjectFunc) Venom1_Doodad_Update, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_Doodad_Update, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_Actor283_Update, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_284 */ {(void*) Venom1_Actor284_Draw, 1, (ObjectFunc) Venom1_Actor284_Update, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_285 */ {(void*) Andross_Actor285_Draw, 1, (ObjectFunc) Andross_Actor285_Update, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, + /* OBJ_ACTOR_286 */ {(void*) Andross_Actor286_Draw, 1, (ObjectFunc) Andross_Actor286_Update, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor287_Update, gNoHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor288_Update, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_289 */ {(void*) Actor289_Draw, 1, (ObjectFunc) Andross_Actor289_Update, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_Actor290_Update, gNoHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, - /* OBJ_BOSS_292 */ {(void*) Corneria_8018AA74, 2, (ObjectFunc) Corneria_80189058, D_CO_603E620, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_293 */ {(void*) Corneria_8018ECAC, 1, (ObjectFunc) Corneria_8018C19C, D_CO_603E840, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_294 */ {(void*) Corneria_8018ED78, 1, (ObjectFunc) Corneria_8018DDAC, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_295 */ {(void*) Corneria_8018EE84, 1, (ObjectFunc) Corneria_8018E290, D_CO_603E748, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_296 */ {(void*) Corneria_8018EF90, 1, (ObjectFunc) Corneria_8018E76C, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_297 */ {(void*) Meteo_8018BACC, 1, (ObjectFunc) Meteo_8018978C, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_298 */ {(void*) Meteo_801887D0, 1, (ObjectFunc) Meteo_80188344, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_CO_GRANGA */ {(void*) Corneria_Granga_Draw, 2, (ObjectFunc) Corneria_Granga_Update, aCoGrangaHitbox, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_CO_CARRIER */ {(void*) Corneria_Carrier_Draw, 1, (ObjectFunc) Corneria_Carrier_Update, aCoCarrierHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_294 */ {(void*) Corneria_Boss294_Draw, 1, (ObjectFunc) Corneria_Boss294_Update, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_295 */ {(void*) Corneria_Boss295_Draw, 1, (ObjectFunc) Corneria_Boss295_Update, D_CO_603E748, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_296 */ {(void*) Corneria_Boss296_Draw, 1, (ObjectFunc) Corneria_Boss296_Update, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_297 */ {(void*) Meteo_Boss297_Draw, 1, (ObjectFunc) Meteo_Boss297_Update, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_298 */ {(void*) Meteo_Boss298_Draw, 1, (ObjectFunc) Meteo_Boss298_Update, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_301 */ {(void*) Aquas_Boss301_Draw, 1, (ObjectFunc) Aquas_Boss301_Update, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_A6 */ {(void*) Area6_Boss_Draw, 1, (ObjectFunc) Area6_Boss_Update, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_303 */ {(void*) SectorX_80193434, 2, (ObjectFunc) SectorX_80190078, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, - /* OBJ_BOSS_304 */ {(void*) SectorX_8018FF84, 2, (ObjectFunc) SectorX_8018FE38, D_SX_6032488, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, - /* OBJ_BOSS_305 */ {(void*) SectorX_80190020, 2, (ObjectFunc) SectorX_8018FF20, D_SX_60324EC, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_SX_SPYBORG */ {(void*) SectorX_Boss_Draw, 2, (ObjectFunc) SectorX_Boss_Update, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_304 */ {(void*) SectorX_Boss304_Draw, 2, (ObjectFunc) SectorX_Boss304_Update, D_SX_6032488, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, + /* OBJ_BOSS_305 */ {(void*) SectorX_Boss305_Draw, 2, (ObjectFunc) SectorX_Boss305_Update, D_SX_60324EC, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_TI */ {(void*) Titania_Boss_Draw, 1, (ObjectFunc) Titania_Boss_Update,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_ZO */ {(void*) Zoness_Boss_Draw, 2, (ObjectFunc) Zoness_Boss_Update, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, /* OBJ_BOSS_FO */ {(void*) HUD_BossFO_Draw, 1, (ObjectFunc) HUD_BossFO_Update, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_311 */ {(void*) Bolse_Boss311_Draw, 2, (ObjectFunc) Bolse_Boss311_Update, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_VE2 */ {(void*) Venom2_Boss_Draw, 2, (ObjectFunc) Venom2_Boss_Update, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_SZ */ {(void*) SectorZ_Boss_Draw, 1, (ObjectFunc) SectorZ_Boss_Update, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SZ_GREAT_FOX */ {(void*) SectorZ_GreatFoxDraw, 1, (ObjectFunc) SectorZ_GreatFoxUpdate, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_SY */ {(void*) SectorY_Boss_Draw, 2, (ObjectFunc) SectorY_Boss_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_SO */ {(void*) Solar_Boss_Draw, 2, (ObjectFunc) Solar_Boss_Update, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_KA */ {(void*) Katina_BossDraw, 1, (ObjectFunc) Katina_BossUpdate, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_KA_BASE */ {(void*) Katina_Base_Draw, 1, (ObjectFunc) Katina_BaseUpdate, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_AQ */ {(void*) Aquas_Boss_Draw, 2, (ObjectFunc) Aquas_Boss_Update, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_VE1 */ {(void*) Venom1_Boss_Draw, 1, (ObjectFunc) Venom1_Boss_Update,D_VE1_8019A9B8, 3000.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_320 */ {(void*) Andross_801928C8, 2, (ObjectFunc) Andross_8018DBF0, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_321 */ {(void*) Andross_8018B8C0, 1, (ObjectFunc) Andross_80189B70, D_ANDROSS_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_320 */ {(void*) Andross_Boss320_Draw, 2, (ObjectFunc) Andross_Boss320_Update, D_ANDROSS_C038DC0, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_321 */ {(void*) Andross_Boss321_Draw, 1, (ObjectFunc) Andross_Boss321_Update, D_ANDROSS_C038F24, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_ITEM_LASERS */ {(void*) ItemLasers_Draw, 1, (ObjectFunc) ItemLasers_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_CHECKPOINT */ {(void*) ItemCheckpoint_Draw, 1, (ObjectFunc) ItemCheckpoint_Update, gItemCheckpointHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_SILVER_RING */ {(void*) ItemSilverRing_Draw, 1, (ObjectFunc) ItemSupplyRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, @@ -430,68 +430,68 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ITEM_RING_CHECK */ {(void*) NULL, 1, (ObjectFunc) ItemRingCheck_Update, gItemRingCheckHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_WING_REPAIR */ {(void*) aArwingItemLasersDL, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_FIRE_SMOKE */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D2F4, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_340 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D748, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_341 */ {(void*) func_effect_8007D55C, 1, (ObjectFunc) func_effect_8007D8A8, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_342 */ {(void*) func_effect_8007E330, 1, (ObjectFunc) func_effect_8007E298, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_343 */ {(void*) func_effect_8007CAF0, 1, (ObjectFunc) func_effect_8007C9E0, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_344 */ {(void*) func_effect_8007868C, 1, (ObjectFunc) func_effect_8007E014, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_345 */ {(void*) func_effect_8007879C, 1, (ObjectFunc) func_effect_8007E258, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_346 */ {(void*) func_effect_800788B0, 1, (ObjectFunc) func_effect_8007F438, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_347 */ {(void*) func_effect_800783C0, 1, (ObjectFunc) func_effect_8007B758, NULL, 100.0f, 1, 0, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_348 */ {(void*) func_effect_80078A64, 1, (ObjectFunc) func_effect_8007F6B0, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_349 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007F958, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_350 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007FBE0, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_351 */ {(void*) func_effect_80078438, 1, (ObjectFunc) func_effect_8007E3E4, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_352 */ {(void*) func_effect_800784B4, 1, (ObjectFunc) func_effect_8007B62C, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_353 */ {(void*) func_effect_80078B8C, 1, (ObjectFunc) func_effect_8007FE88, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_354 */ {(void*) SectorY_80197C64, 1, (ObjectFunc) func_effect_8007FE88, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_355 */ {(void*) func_effect_80078AEC, 1, (ObjectFunc) func_effect_800802B8, NULL, 100.0f, 1, 0, 20, 1, 0.0f, 0 }, - /* OBJ_EFFECT_356 */ {(void*) func_effect_80078C84, 1, (ObjectFunc) func_effect_800802F8, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_357 */ {(void*) func_effect_800798F0, 1, (ObjectFunc) func_effect_8007968C, NULL, 100.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_FIRE_SMOKE */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect339_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_340 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect340_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_341 */ {(void*) Effect_FireSmoke_Draw, 1, (ObjectFunc) Effect_Effect341_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_342 */ {(void*) Effect_Effect342_Draw, 1, (ObjectFunc) Effect_Effect342_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_343 */ {(void*) Effect_Effect343_Draw, 1, (ObjectFunc) Effect_Effect343_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_344 */ {(void*) Effect_Effect344_Draw, 1, (ObjectFunc) Effect_Effect344_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_345 */ {(void*) Effect_Effect345_Draw, 1, (ObjectFunc) Effect_Effect345_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_346 */ {(void*) Effect_Effect346_Draw, 1, (ObjectFunc) Effect_Effect346_Update, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_347 */ {(void*) Effect_Effect347_Draw, 1, (ObjectFunc) Effect_Effect347_Update, NULL, 100.0f, 1, 0, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_348 */ {(void*) Effect_Effect348_Draw, 1, (ObjectFunc) Effect_Effect348_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_349 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect349_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_350 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect350_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_351 */ {(void*) Effect_Effect351_Draw, 1, (ObjectFunc) Effect_Effect351_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_CLOUDS */ {(void*) Effect_Clouds_Draw, 1, (ObjectFunc) Effect_Clouds_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_ENEMY_LASER_1 */ {(void*) Effect_Effect353_Draw, 1, (ObjectFunc) Effect_Effect353_354_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_354 */ {(void*) SectorY_Effect354_Draw, 1, (ObjectFunc) Effect_Effect353_354_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_355 */ {(void*) Effect_Effect355_Draw, 1, (ObjectFunc) Effect_Effect355_Update, NULL, 100.0f, 1, 0, 20, 1, 0.0f, 0 }, + /* OBJ_EFFECT_356 */ {(void*) Effect_Effect356_Draw, 1, (ObjectFunc) Effect_Effect356_Update, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_357 */ {(void*) Effect_Effect357_Draw, 1, (ObjectFunc) Effect_Effect357_Update, NULL, 100.0f, 0, 1, 0, 0, 0.0f, 0 }, /* OBJ_EFFECT_358 */ {(void*) Katina_LaserEnergyParticlesDraw, 1, (ObjectFunc) Katina_LaserEnergyParticlesUpdate, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_359 */ {(void*) func_effect_8007AA60, 1, (ObjectFunc) func_effect_8007A994, NULL, -100.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_360 */ {(void*) func_effect_8007BEE8, 1, (ObjectFunc) func_effect_8007BE54, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_361 */ {(void*) func_effect_8007BEE8, 1, (ObjectFunc) func_effect_8007BDE0, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_362 */ {(void*) func_effect_8007BEE8, 1, (ObjectFunc) func_effect_8007BCE8, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_363 */ {(void*) func_hud_80094BBC, 1, (ObjectFunc) func_hud_80094954, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_364 */ {(void*) func_effect_8007B9DC, 1, (ObjectFunc) func_effect_8007B960, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_365 */ {(void*) func_effect_8007E5CC, 1, (ObjectFunc) func_effect_8007E45C, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_366 */ {(void*) func_effect_80078550, 1, (ObjectFunc) Aquas_801AC918, NULL, 100.0f, 1, 2, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_367 */ {(void*) func_effect_80078604, 1, (ObjectFunc) func_effect_8007E648, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_368 */ {(void*) Titania_80188FA8, 1, (ObjectFunc) Titania_80188F60, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_369 */ {(void*) Meteo_8018DCE4, 1, (ObjectFunc) Meteo_80188CAC, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_370 */ {(void*) Meteo_8018DBEC, 1, (ObjectFunc) Meteo_80188FAC, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_371 */ {(void*) Meteo_8018DE14, 1, (ObjectFunc) Meteo_80189114, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_372 */ {(void*) func_effect_80077A00, 1, (ObjectFunc) func_effect_8007AB50, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_373 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007A748, NULL, 500.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_374 */ {(void*) func_effect_8007DED4, 1, (ObjectFunc) func_effect_8007DB70, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_375 */ {(void*) func_effect_8007DAE4, 1, (ObjectFunc) func_effect_8007DA58, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_376 */ {(void*) func_effect_80078CE8, 1, (ObjectFunc) func_effect_80080360, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_377 */ {(void*) func_effect_80078BE0, 1, (ObjectFunc) func_effect_800802D8, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_378 */ {(void*) Macbeth_801A5AF0, 1, (ObjectFunc) Macbeth_801A57D0, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_379 */ {(void*) Macbeth_801AEAA0, 1, (ObjectFunc) Macbeth_801AE87C, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_380 */ {(void*) Macbeth_801A5D68, 1, (ObjectFunc) Macbeth_801A5B4C, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_381 */ {(void*) func_effect_80077A7C, 1, (ObjectFunc) func_effect_8007B0F4, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_382 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007B040, NULL, 200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_383 */ {(void*) func_effect_8007A3C0, 1, (ObjectFunc) func_effect_8007A28C, NULL, 10000.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_384 */ {(void*) func_effect_80077B84, 1, (ObjectFunc) func_effect_8007B3B8, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_385 */ {(void*) func_effect_80078038, 1, (ObjectFunc) func_effect_8007B5C0, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_386 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007C250, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_387 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007C8C4, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_388 */ {(void*) func_effect_80077B78, 1, (ObjectFunc) func_effect_8007B670, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_389 */ {(void*) func_effect_800780F8, 1, (ObjectFunc) func_effect_8007B67C, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_390 */ {(void*) NULL, 1, (ObjectFunc) func_effect_8007C50C, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_391 */ {(void*) func_effect_80083B8C, 1, (ObjectFunc) func_effect_800837EC, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_392 */ {(void*) Solar_801A0AF0, 1, (ObjectFunc) Solar_801A0120, NULL, 300.0f, 1, 2, 10, 0, 0.0f, 0 }, - /* OBJ_EFFECT_393 */ {(void*) func_effect_80078F78, 1, (ObjectFunc) func_effect_80078EBC, NULL, 300.0f, 1, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_394 */ {(void*) func_effect_80080D04, 1, (ObjectFunc) func_effect_80080ACC, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, - /* OBJ_EFFECT_395 */ {(void*) func_effect_80082F78, 1, (ObjectFunc) func_effect_80081C5C, NULL, 300.0f, 0, 1, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_396 */ {(void*) Andross_8018CF98, 1, (ObjectFunc) Andross_8018CAD4, NULL, 2000.0f, 0, 1, 40, 2, 0.0f, 0 }, - /* OBJ_EFFECT_397 */ {(void*) Bolse_80191180, 1, (ObjectFunc) Bolse_80191054, NULL, 2000.0f, 0, 1, 20, 0, 0.0f, 0 }, - /* OBJ_EFFECT_398 */ {(void*) func_effect_8008092C, 1, (ObjectFunc) func_effect_8008040C, NULL, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_EFFECT_399 */ {(void*) func_effect_80084194, 1, (ObjectFunc) func_effect_80083FA8, NULL, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_359 */ {(void*) Effect_Effect359_Draw, 1, (ObjectFunc) Effect_Effect359_Update, NULL, -100.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_360 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect360_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_361 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect361_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_362 */ {(void*) Effect_Effect360_361_362_Draw, 1, (ObjectFunc) Effect_Effect362_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_363 */ {(void*) Hud_Effect363_Draw, 1, (ObjectFunc) Hud_Effect363_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_364 */ {(void*) Effect_Effect364_Draw, 1, (ObjectFunc) Effect_Effect364_Update, NULL, -200.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_365 */ {(void*) Effect_Effect365_Draw, 1, (ObjectFunc) Effect_Effect365_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_366 */ {(void*) Effect_Effect366_Draw, 1, (ObjectFunc) Aquas_Effect366_Update, NULL, 100.0f, 1, 2, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_367 */ {(void*) Effect_Effect367_Draw, 1, (ObjectFunc) Effect_Effect367_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_368 */ {(void*) Titania_Effect368_Draw, 1, (ObjectFunc) Titania_Effect368_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_369 */ {(void*) Meteo_Effect369_Draw, 1, (ObjectFunc) Meteo_Effect369_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_370 */ {(void*) Meteo_Effect370_Draw, 1, (ObjectFunc) Meteo_Effect370_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_371 */ {(void*) Meteo_Effect371_Draw, 1, (ObjectFunc) Meteo_Effect371_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_372 */ {(void*) Effect_Effect372_Draw, 1, (ObjectFunc) Effect_Effect372_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_TIMED_SFX */ {(void*) NULL, 1, (ObjectFunc) Effect_TimedSfx_Update, NULL, 500.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_374 */ {(void*) Macbeth_Effect374_Draw, 1, (ObjectFunc) Effect_Effect374_Update, NULL, 100.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_375 */ {(void*) Macbeth_Effect375_Draw, 1, (ObjectFunc) Effect_Effect375_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_376 */ {(void*) Macbeth_Effect376_Draw, 1, (ObjectFunc) Effect_Effect376_Update, NULL, -200.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_377 */ {(void*) Macbeth_Effect377_Draw, 1, (ObjectFunc) Effect_Effect377_Update, NULL, 100.0f, 1, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_378 */ {(void*) Macbeth_Effect378_Draw, 1, (ObjectFunc) Macbeth_Effect378_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_379 */ {(void*) Macbeth_Effect379_Draw, 1, (ObjectFunc) Macbeth_Effect379_Update, NULL, 100.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_380 */ {(void*) Macbeth_Effect380_Draw, 1, (ObjectFunc) Macbeth_Effect380_Update, NULL, 100.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_381 */ {(void*) Effect_Effect382_Draw, 1, (ObjectFunc) Effect_Effect381_Update, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_382 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect382_Update, NULL, 200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_383 */ {(void*) Effect_Effect383_Draw, 1, (ObjectFunc) Effect_Effect383_Update, NULL, 10000.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_384 */ {(void*) Effect_Effect384_Draw, 1, (ObjectFunc) Effect_Effect384_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_385 */ {(void*) Effect_Effect385_Draw, 1, (ObjectFunc) Effect_Effect385_Update, NULL, -200.0f, -1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_386 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect386_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_387 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect387_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_388 */ {(void*) Effect_Effect388_Draw, 1, (ObjectFunc) Effect_Effect388_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_389 */ {(void*) Effect_Effect389_Draw, 1, (ObjectFunc) Effect_Effect389_Update, NULL, -200.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_390 */ {(void*) NULL, 1, (ObjectFunc) Effect_Effect390_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_391 */ {(void*) Effect_Effect391_Draw, 1, (ObjectFunc) Effect_Effect391_Update, NULL, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_392 */ {(void*) Solar_Effect392_Draw, 1, (ObjectFunc) Solar_Effect392_Update, NULL, 300.0f, 1, 2, 10, 0, 0.0f, 0 }, + /* OBJ_EFFECT_393 */ {(void*) Effect_Effect393_Draw, 1, (ObjectFunc) Effect_Effect393_Update, NULL, 300.0f, 1, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_394 */ {(void*) Effect_Effect394_Draw, 1, (ObjectFunc) Effect_Effect394_Update, NULL, -200.0f, 0, 1, 0, 0, 0.0f, 0 }, + /* OBJ_EFFECT_395 */ {(void*) Effect_Effect395_Draw, 1, (ObjectFunc) Effect_Effect395_Update, NULL, 300.0f, 0, 1, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_396 */ {(void*) Andross_Effect396_Draw, 1, (ObjectFunc) Andross_Effect396_Update, NULL, 2000.0f, 0, 1, 40, 2, 0.0f, 0 }, + /* OBJ_EFFECT_397 */ {(void*) Bolse_Effect397_Draw, 1, (ObjectFunc) Bolse_Effect397_Update, NULL, 2000.0f, 0, 1, 20, 0, 0.0f, 0 }, + /* OBJ_EFFECT_398 */ {(void*) Effect_Effect398_Draw, 1, (ObjectFunc) Effect_Effect398_Update, NULL, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_EFFECT_399 */ {(void*) Effect_Effect399_Draw, 1, (ObjectFunc) Effect_Effect399_Update, NULL, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, }; // clang-format on diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 92d72551..d53269c3 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -114,7 +114,7 @@ void Scenery_DrawTitaniaBones(Scenery* scenery) { void func_edisplay_80059BB0(void* arg0) { } -void Scenery42_Draw(Scenery_42* this) { +void CoIBeam_Draw(CoIBeam* this) { gSPDisplayList(gMasterDisp++, D_CO_6023AC0); } @@ -134,33 +134,33 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180); switch (this->sceneryId) { - case OBJ_SCENERY_0: + case OBJ_SCENERY_CO_STONE_ARCH: Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_SCENERY_21: + case OBJ_SCENERY_CO_ARCH_2: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_SCENERY_6: - case OBJ_SCENERY_7: + case OBJ_SCENERY_CO_HIGHWAY_1: + case OBJ_SCENERY_CO_HIGHWAY_2: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20); break; - case OBJ_SCENERY_56: + case OBJ_SCENERY_CO_DOORS: Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_SCENERY_20: + case OBJ_SCENERY_CO_ARCH_1: Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_SCENERY_22: + case OBJ_SCENERY_CO_ARCH_3: Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); @@ -169,22 +169,22 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edisplay_80059F68(Scenery* scenery) { +void CoBuilding9_Draw(Scenery* scenery) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_602DA20); } -void func_edisplay_80059FDC(Scenery* scenery) { +void CoBuilding10_Draw(Scenery* scenery) { gSPDisplayList(gMasterDisp++, D_CO_6035DA0); } -// repurposed into OBJ_SCENERY_15 +// repurposed into OBJ_SCENERY_CO_BUILDING_6 void func_edisplay_8005A010(Sprite* sprite) { if (!sprite->toLeft) { Matrix_RotateY(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_CO_60361F0); + gSPDisplayList(gMasterDisp++, aCoBuilding6DL); } } @@ -209,7 +209,7 @@ Gfx* D_edisplay_800CFADC[] = { }; Gfx* D_edisplay_800CFB08[] = { D_ZO_6020F10, D_ZO_6021100, D_ZO_60214B0 }; Gfx* D_edisplay_800CFB14[] = { D_ZO_60163E0, D_ZO_60165D0, D_ZO_6016880, D_ZO_6016B50, D_ZO_6000C40 }; -Gfx* D_edisplay_800CFB28[] = { D_CO_6018E80, D_ZO_601F620, D_ZO_601F420, D_ZO_6018C80, D_ZO_601F940, D_ZO_601F260 }; +Gfx* D_edisplay_800CFB28[] = { aCoBuilding7DL, D_ZO_601F620, D_ZO_601F420, D_ZO_6018C80, D_ZO_601F940, D_ZO_601F260 }; Gfx* D_edisplay_800CFB40[] = { D_SO_6014DB0, D_SO_60146D0, D_SO_6014B80, D_SO_6014470, D_SO_6014930, D_SO_60138A0, D_SO_60151A0, D_SO_600F750, D_SO_6015810, @@ -556,25 +556,25 @@ void func_edisplay_8005B388(Actor* actor) { Actor_DrawEngineAndContrails(actor); } -void func_edisplay_8005B6A4(Actor* actor) { +void Actor180_Draw(Actor* actor) { Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6024B60); } -void func_edisplay_8005B71C(Actor* actor) { +void Actor182_Draw(Actor* actor) { RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ME_6018C00); } -void func_edisplay_8005B7CC(Actor* actor) { +void Actor186_Draw(Actor* actor) { RCP_SetupDL_29(actor->unk_046, gFogGreen, gFogBlue, gFogAlpha, actor->unk_048, gFogFar); gSPDisplayList(gMasterDisp++, D_ME_6022920); } -void func_edisplay_8005B848(Actor* actor) { +void Actor190_191_Draw(Actor* actor) { f32 scale; switch (actor->eventType) { @@ -599,13 +599,13 @@ void func_edisplay_8005B848(Actor* actor) { Actor_DrawEngineGlow(actor, 2); } -void func_edisplay_8005B9A4(Actor* actor) { +void Actor192_Draw(Actor* actor) { Matrix_Translate(gGfxMatrix, 0.0f, -124.0f, 0.0f, MTXF_APPLY); Animation_GetFrameData(&D_CO_6029528, actor->animFrame, actor->vwork); Animation_DrawSkeleton(1, D_CO_6029674, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); } -void func_edisplay_8005BA30(Actor* actor) { +void Actor193_Draw(Actor* actor) { if (actor->timer_0BC != 0) { RCP_SetupDL_27(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 0, 0, 255); @@ -667,7 +667,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { break; } break; - case OBJ_BOSS_292: + case OBJ_BOSS_CO_GRANGA: gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; case OBJ_BOSS_KA: @@ -679,7 +679,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Graphics_SetScaleMtx(150.0f); gSPDisplayList(gMasterDisp++, D_102A8A0); break; - case OBJ_BOSS_293: + case OBJ_BOSS_CO_CARRIER: case OBJ_BOSS_294: case OBJ_BOSS_295: case OBJ_BOSS_296: @@ -690,7 +690,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 150); } switch (objId) { - case OBJ_BOSS_293: + case OBJ_BOSS_CO_CARRIER: gSPDisplayList(gMasterDisp++, D_CO_6036840); break; case OBJ_BOSS_294: @@ -946,8 +946,8 @@ void Scenery_Draw(Scenery* this, s32 arg1) { func_edisplay_8005D008(&this->obj, this->info.drawType); this->obj.pos.y -= gCameraShakeY; if (this->info.drawType == 0) { - if ((this->obj.id == OBJ_SCENERY_19) || (this->obj.id == OBJ_SCENERY_55) || (this->obj.id == OBJ_SCENERY_9) || - (this->obj.id == OBJ_SCENERY_50)) { + if ((this->obj.id == OBJ_SCENERY_CO_TOWER) || (this->obj.id == OBJ_SCENERY_CO_ROCKWALL) || + (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_4) || (this->obj.id == OBJ_SCENERY_50)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); if (arg1 < 0) { @@ -956,7 +956,7 @@ void Scenery_Draw(Scenery* this, s32 arg1) { gSPDisplayList(gMasterDisp++, this->info.dList); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { - if (this->obj.id == OBJ_SCENERY_8) { + if (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3) { if (arg1 < 0) { return; // weird control flow } @@ -967,7 +967,7 @@ void Scenery_Draw(Scenery* this, s32 arg1) { Object_ApplyWaterDistortion(); } gSPDisplayList(gMasterDisp++, this->info.dList); - if (this->obj.id == OBJ_SCENERY_8) { + if (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } } @@ -999,7 +999,7 @@ void Actor_DrawOnRails(Actor* this) { Actor194_Draw(this); return; case OBJ_ACTOR_236: - Zoness_80190F08(this); + Zoness_Actor236_Draw(this); return; } if ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_200)) { @@ -1154,7 +1154,7 @@ void Boss_Draw(Boss* this, s32 arg1) { var_fv0 = 6000.0f; var_ft5 = 0.9f; var_fv1 = -20000.0f; - } else if (this->obj.id == OBJ_BOSS_SZ) { + } else if (this->obj.id == OBJ_BOSS_SZ_GREAT_FOX) { var_fv1 = -25000.0f; var_ft5 = 0.7f; var_fa1 = 3000.0f; @@ -1198,7 +1198,7 @@ void Effect_DrawOnRails(Effect* this, s32 arg1) { if ((arg1 < 0) && (this->obj.pos.y < 7.0f)) { return; } - if ((this->obj.id == OBJ_EFFECT_353) || (this->obj.id == OBJ_EFFECT_369)) { + if ((this->obj.id == OBJ_EFFECT_ENEMY_LASER_1) || (this->obj.id == OBJ_EFFECT_369)) { func_edisplay_8005D3CC(&this->obj, this->unk_60.x, this->unk_60.y, this->unk_60.z, 0); } else if (this->info.unk_14 == -1) { this->obj.pos.y += gCameraShakeY; @@ -1245,7 +1245,7 @@ void Effect_DrawAllRange(Effect* this) { } } Object_SetSfxSourceToView(this->sfxSource, &sp40); - if (!drawn && (this->obj.id != OBJ_EFFECT_352) && (this->obj.id != OBJ_EFFECT_373) && (!gVersusMode)) { + if (!drawn && (this->obj.id != OBJ_EFFECT_CLOUDS) && (this->obj.id != OBJ_EFFECT_TIMED_SFX) && (!gVersusMode)) { Object_Kill(&this->obj, this->sfxSource); } } diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index e0098b77..b3e5d6b3 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -42,7 +42,7 @@ void BonusText_Update(void) { BonusText* bonus; s32 i; - for (i = 0, bonus = gBonusText; i < ARRAY_COUNT(gBonusText); i++, bonus++) { + for (i = 0, bonus = &gBonusText[0]; i < ARRAY_COUNT(gBonusText); i++, bonus++) { if (bonus->hits != BONUS_TEXT_FREE) { if (bonus->timer != 0) { bonus->timer -= 1; // can't be -- @@ -164,25 +164,26 @@ Effect* func_effect_8007783C(ObjectId objId) { return effect; } -void func_effect_800778C4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; +void func_effect_800778C4(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, + f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->scale2 = scale2; - effect->unk_4C = 0; - effect->scale1 = 0.5f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); - effect->unk_44 = 255; + this->scale2 = scale2; + this->unk_4C = 0; + this->scale1 = 0.5f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + this->unk_44 = 255; } void func_effect_8007797C(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { @@ -196,92 +197,92 @@ void func_effect_8007797C(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 } } -void func_effect_80077A00(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); +void Effect_Effect372_Draw(Effect372* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_arwing_3016B30); } -void func_effect_80077A7C(Effect* effect) { +void Effect_Effect382_Draw(Effect382* this) { RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 255, 255, 255, effect->unk_44); - Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 1.0f, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 255, 255, this->unk_44); + Matrix_Scale(gGfxMatrix, this->scale1, this->scale2, 1.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_6024220); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80077B78(Effect* effect) { +void Effect_Effect388_Draw(Effect388* this) { } -void func_effect_80077B84(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); +void Effect_Effect384_Draw(Effect384* this) { + Graphics_SetScaleMtx(this->scale2); - if ((effect->scale1 == 71.0f) || + if ((this->scale1 == 71.0f) || ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCurrentLevel == LEVEL_CORNERIA))) { RCP_SetupDL(&gMasterDisp, SETUPDL_38); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_67); } - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); - switch (effect->unk_4C) { + switch (this->unk_4C) { case 0: - gDPSetEnvColor(gMasterDisp++, 0, 128, 255, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 128, 255, this->unk_44); break; case 1: - gDPSetEnvColor(gMasterDisp++, 255, 64, 255, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 64, 255, this->unk_44); break; case 2: - gDPSetEnvColor(gMasterDisp++, 255, 128, 0, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 128, 0, this->unk_44); break; case 3: - gDPSetEnvColor(gMasterDisp++, 255, 48, 48, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 48, 48, this->unk_44); break; case 4: - gDPSetEnvColor(gMasterDisp++, 255, 255, 48, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 255, 48, this->unk_44); break; case 5: - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 255, 32, 32, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 32, 32, this->unk_44); break; case 6: if (gCurrentLevel == LEVEL_BOLSE) { RCP_SetupDL(&gMasterDisp, SETUPDL_38); } - switch ((effect->index + gGameFrameCount) % 4U) { + switch ((this->index + gGameFrameCount) % 4U) { case 0: - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 0, 0, this->unk_44); break; case 1: - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, this->unk_44); break; case 2: - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 255, this->unk_44); break; case 3: - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, this->unk_44); break; } - gDPSetEnvColor(gMasterDisp++, 0, 0, 0, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->unk_44); break; case 7: - gDPSetEnvColor(gMasterDisp++, 48, 48, 255, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 48, 48, 255, this->unk_44); break; case 10: - gDPSetEnvColor(gMasterDisp++, 255, 255, 32, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 255, 32, this->unk_44); break; case 11: - gDPSetEnvColor(gMasterDisp++, 255, 32, 32, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 255, 32, 32, this->unk_44); break; case 12: - gDPSetEnvColor(gMasterDisp++, 32, 255, 32, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 32, 255, 32, this->unk_44); break; case 13: - gDPSetEnvColor(gMasterDisp++, 32, 32, 255, effect->unk_44); + gDPSetEnvColor(gMasterDisp++, 32, 32, 255, this->unk_44); break; } @@ -289,12 +290,12 @@ void func_effect_80077B84(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80078038(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); +void Effect_Effect385_Draw(Effect385* this) { + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL_49(); RCP_SetupDL(&gMasterDisp, SETUPDL_38); - gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 192, 255, effect->unk_44); - gDPSetEnvColor(gMasterDisp++, 0, 0, 0, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 192, 255, this->unk_44); + gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->unk_44); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -329,25 +330,25 @@ static f32 D_800D1534[][10] = { 41.706547f }, }; -void func_effect_800780F8(Effect* effect) { +void Effect_Effect389_Draw(Effect389* this) { s32 i; - if (effect->unk_4A > 10) { - if (((effect->index + gGameFrameCount) % 2) == 0) { + if (this->unk_4A > 10) { + if (((this->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 128, 32); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 128, 128, 128); } - } else if (((effect->index + gGameFrameCount) % 2) == 0) { + } else if (((this->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); } - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); for (i = 0; i < 10; i++) { - if ((i >= effect->unk_48) && (i < effect->unk_46)) { + if ((i >= this->unk_48) && (i < this->unk_46)) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -60.0f, 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f, 3.0f, 1.0f, MTXF_APPLY); @@ -356,52 +357,52 @@ void func_effect_800780F8(Effect* effect) { Matrix_Pop(&gGfxMatrix); } Matrix_Translate(gGfxMatrix, 0.0f, -120.0f, 0.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, D_800D1534[effect->unk_4C][i] * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, D_800D1534[this->unk_4C][i] * M_DTOR, MTXF_APPLY); } } -void func_effect_800783C0(Effect* effect) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); - Graphics_SetScaleMtx(effect->scale2); +void Effect_Effect347_Draw(Effect347* this) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_BG_SPACE_2006F50); } -void func_effect_80078438(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); +void Effect_Effect351_Draw(Effect351* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gSPDisplayList(gMasterDisp++, D_102A8A0); } -void func_effect_800784B4(Effect* effect) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_46); - Graphics_SetScaleMtx(effect->scale2); +void Effect_Clouds_Draw(Clouds* this) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_46); + Graphics_SetScaleMtx(this->scale2); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_BG_PLANET_200D750); } -void func_effect_80078550(Effect* effect) { +void Effect_Effect366_Draw(Effect366* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gDPSetEnvColor(gMasterDisp++, 101, 138, 153, 255); gSPDisplayList(gMasterDisp++, D_blue_marine_3000660); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80078604(Effect* effect) { - if (effect->timer_50 == 0) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); +void Effect_Effect367_Draw(Effect367* this) { + if (this->timer_50 == 0) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); } } -void func_effect_8007868C(Effect* effect) { +void Effect_Effect344_Draw(Effect344* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); - if (effect->unk_44 >= 2) { + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); + if (this->unk_44 >= 2) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); @@ -409,10 +410,10 @@ void func_effect_8007868C(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007879C(Effect* effect) { +void Effect_Effect345_Draw(Effect345* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - Matrix_Scale(gGfxMatrix, effect->scale2 * 0.6f, 1.0f, effect->scale2 * 3.5f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2 * 0.6f, 1.0f, this->scale2 * 3.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1029780); @@ -421,52 +422,52 @@ void func_effect_8007879C(Effect* effect) { static s32 D_800D173C[] = { 255, 255, 255, 0, 0, 0, 255, 0, 255, 0, 0, 0, 255, 255, 0, 0, 0, 255, 0, 0 }; -void func_effect_800788B0(Effect* effect) { +void Effect_Effect346_Draw(Effect346* this) { s32 temp_ft3; s32 tmp; switch (gCurrentLevel) { case LEVEL_METEO: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 128, 128, 128, 255); gSPDisplayList(gMasterDisp++, D_ME_601FF80); break; case LEVEL_AQUAS: RCP_SetupDL(&gMasterDisp, SETUPDL_67); - temp_ft3 = Math_ModF(effect->index, 4.0f); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) effect->scale1); + temp_ft3 = Math_ModF(this->index, 4.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) this->scale1); tmp = temp_ft3 * 4.0f; gDPSetEnvColor(gMasterDisp++, D_800D173C[tmp + 0], D_800D173C[tmp + 1], D_800D173C[tmp + 2], 255); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } } -void func_effect_80078A64(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); +void Effect_Effect348_Draw(Effect348* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20112C0); } -void func_effect_80078AE0(void* effect) { +void func_effect_80078AE0(Effect* this) { } -void func_effect_80078AEC(Effect* effect) { +void Effect_Effect355_Draw(Effect355* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 180); - Graphics_SetScaleMtx(effect->scale2 * (13.0f + ((s32) (gGameFrameCount % 2U) * 2.5f))); + Graphics_SetScaleMtx(this->scale2 * (13.0f + ((s32) (gGameFrameCount % 2U) * 2.5f))); gSPDisplayList(gMasterDisp++, D_102ED50); } -void func_effect_80078B8C(Effect* effect) { +void Effect_Effect353_Draw(Effect353* this) { RCP_SetupDL_21(); gSPDisplayList(gMasterDisp++, D_101ABD0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80078BE0(Effect* effect) { +void Macbeth_Effect377_Draw(Effect377* this) { f32 var_fv0; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 160); @@ -475,45 +476,45 @@ void func_effect_80078BE0(Effect* effect) { if ((gGameFrameCount % 2) != 0) { var_fv0 *= 1.2f; } - Graphics_SetScaleMtx(effect->scale2 * var_fv0); + Graphics_SetScaleMtx(this->scale2 * var_fv0); gSPDisplayList(gMasterDisp++, D_SX_600F8A0); } -void func_effect_80078C84(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); +void Effect_Effect356_Draw(Effect356* this) { + Graphics_SetScaleMtx(this->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 192); gSPDisplayList(gMasterDisp++, D_ME_6000A80); } -void func_effect_80078CE8(Effect* effect) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); - Graphics_SetScaleMtx(effect->scale2); +void Macbeth_Effect376_Draw(Effect376* this) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_CO_6033000); } -void func_effect_80078D60(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_393; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->scale2 = scale2; +void func_effect_80078D60(Effect393* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_393; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->scale2 = scale2; if (scale2 == 3.1f) { - effect->vel.x = gActors[8].vel.x; - effect->vel.y = gActors[8].vel.y; - effect->vel.z = gActors[8].vel.z; + this->vel.x = gActors[8].vel.x; + this->vel.y = gActors[8].vel.y; + this->vel.z = gActors[8].vel.z; } if (scale2 != 30.0f) { - effect->state = 1; + this->state = 1; } if (scale2 == 3.5f) { - effect->state = 2; + this->state = 2; } - effect->timer_50 = 14; - Object_SetInfo(&effect->info, effect->obj.id); + this->timer_50 = 14; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_80078E50(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -527,39 +528,39 @@ void func_effect_80078E50(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_80078EBC(Effect* effect) { - if (effect->state == 2) { - effect->vel.x = gPlayer[0].vel.x; - effect->vel.y = gPlayer[0].vel.y; - effect->vel.z = gPlayer[0].vel.z; +void Effect_Effect393_Update(Effect393* this) { + if (this->state == 2) { + this->vel.x = gPlayer[0].vel.x; + this->vel.y = gPlayer[0].vel.y; + this->vel.z = gPlayer[0].vel.z; } - effect->obj.rot.z += 35.0f; + this->obj.rot.z += 35.0f; - if (effect->timer_50 >= 7) { - effect->scale1 += 0.25f; + if (this->timer_50 >= 7) { + this->scale1 += 0.25f; } else { - effect->scale1 -= 0.25f; + this->scale1 -= 0.25f; } - if (effect->scale1 <= 0.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->scale1 <= 0.0f) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_80078F78(Effect* effect) { - if (effect->state != 0) { +void Effect_Effect393_Draw(Effect393* this) { + if (this->state != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_63); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); - Graphics_SetScaleMtx(effect->scale2 * effect->scale1); + Graphics_SetScaleMtx(this->scale2 * this->scale1); gSPDisplayList(gMasterDisp++, D_101C2E0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { +void func_effect_8007905C(Effect357* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, u8 arg5) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; @@ -567,26 +568,26 @@ void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal f32 xAng; f32 yAng; - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_357; + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_357; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_4C = arg5; + this->unk_4C = arg5; if (scale2 == 1.6f) { - effect->vel.x = (xPos - gBosses[1].obj.pos.x) * 0.1f; - effect->vel.z = (zPos - gBosses[1].obj.pos.z) * 0.1f; + this->vel.x = (xPos - gBosses[1].obj.pos.x) * 0.1f; + this->vel.z = (zPos - gBosses[1].obj.pos.z) * 0.1f; } else if (scale2 == 1.3f) { - effect->vel.x = (RAND_FLOAT(0.05f) + 0.03f) * xPos; - effect->vel.z = (RAND_FLOAT(0.05f) + 0.03f) * zPos; - effect->vel.y = 5.0f; + this->vel.x = (RAND_FLOAT(0.05f) + 0.03f) * xPos; + this->vel.z = (RAND_FLOAT(0.05f) + 0.03f) * zPos; + this->vel.y = 5.0f; } else if (scale2 == 1.55f) { - effect->vel.x = RAND_FLOAT_CENTERED(10.0f); - effect->vel.z = RAND_FLOAT_CENTERED(10.0f); + this->vel.x = RAND_FLOAT_CENTERED(10.0f); + this->vel.z = RAND_FLOAT_CENTERED(10.0f); } else if ((gCurrentLevel == LEVEL_BOLSE) && ((scale2 == 5.11f) || (scale2 == 7.22f))) { sp3C.x = gPlayer[0].pos.x; sp3C.y = gPlayer[0].pos.y; @@ -600,21 +601,21 @@ void func_effect_8007905C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scal sp54.y = RAND_FLOAT_CENTERED(50.0f); sp54.z = RAND_FLOAT(10.0f) + 150.0f; Matrix_MultVec3f(gCalcMatrix, &sp54, &sp48); - effect->vel.x = sp48.x; - effect->vel.y = sp48.y; - effect->vel.z = sp48.z; + this->vel.x = sp48.x; + this->vel.y = sp48.y; + this->vel.z = sp48.z; } else { - effect->vel.y = (gLevelType == LEVELTYPE_PLANET) ? RAND_FLOAT(7.0f) + 7.0f : RAND_FLOAT_CENTERED(10.0f); - effect->vel.x = RAND_FLOAT_CENTERED(10.0f); - effect->vel.z = RAND_FLOAT_CENTERED(10.0f); + this->vel.y = (gLevelType == LEVELTYPE_PLANET) ? RAND_FLOAT(7.0f) + 7.0f : RAND_FLOAT_CENTERED(10.0f); + this->vel.x = RAND_FLOAT_CENTERED(10.0f); + this->vel.z = RAND_FLOAT_CENTERED(10.0f); } - effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; - effect->timer_50 = RAND_INT(50.0f) + 70; - effect->obj.rot.x = RAND_FLOAT(360.0f); - effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; + this->timer_50 = RAND_INT(50.0f) + 70; + this->obj.rot.x = RAND_FLOAT(360.0f); + this->unk_60.x = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.y = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.z = RAND_FLOAT_CENTERED(30.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_800794CC(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -662,42 +663,42 @@ void func_effect_80079618(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_8007968C(Effect* effect) { - if ((gCurrentLevel != LEVEL_MACBETH) || (effect->unk_44 != 7)) { - if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundHeight)) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect357_Update(Effect357* this) { + if ((gCurrentLevel != LEVEL_MACBETH) || (this->unk_44 != 7)) { + if ((this->timer_50 == 0) || (this->obj.pos.y < gGroundHeight)) { + Object_Kill(&this->obj, this->sfxSource); } } else { if (((gGameFrameCount % 4) == 0)) { - func_effect_8007D2C8(effect->obj.pos.x, effect->obj.pos.y + 550.0f, effect->obj.pos.z, 10.0f); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 550.0f, this->obj.pos.z, 10.0f); } - if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundHeight - 100.0f))) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((this->timer_50 == 0) || (this->obj.pos.y < (gGroundHeight - 100.0f))) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - effect->obj.rot.z += effect->unk_60.z; + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + this->obj.rot.z += this->unk_60.z; if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y -= 0.5f; + this->vel.y -= 0.5f; } if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gCsFrameCount > 175)) { - effect->vel.x *= 0.95f; - effect->vel.y *= 0.95f; - effect->vel.z *= 0.95f; - } - - if ((gCurrentLevel == LEVEL_MACBETH) && (effect->unk_44 == 10)) { - effect->obj.rot.x = 0.0f; - effect->obj.rot.y = 0.0f; - if (effect->timer_50 >= 25) { - effect->scale1 = 0.5f; - } else if (effect->scale1 > 0.03) { - effect->scale1 -= 0.02f; + this->vel.x *= 0.95f; + this->vel.y *= 0.95f; + this->vel.z *= 0.95f; + } + + if ((gCurrentLevel == LEVEL_MACBETH) && (this->unk_44 == 10)) { + this->obj.rot.x = 0.0f; + this->obj.rot.y = 0.0f; + if (this->timer_50 >= 25) { + this->scale1 = 0.5f; + } else if (this->scale1 > 0.03) { + this->scale1 -= 0.02f; } } } @@ -709,11 +710,11 @@ bool func_effect_800798C4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, vo return false; } -void func_effect_800798F0(Effect* effect) { +void Effect_Effect357_Draw(Effect357* this) { Vec3f frameJointTable[50]; if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - Display_SetSecondLight(&effect->obj.pos); + Display_SetSecondLight(&this->obj.pos); } RCP_SetupDL(&gMasterDisp, SETUPDL_29); @@ -722,13 +723,13 @@ void func_effect_800798F0(Effect* effect) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); switch (gCurrentLevel) { case LEVEL_MACBETH: - switch (effect->unk_44) { + switch (this->unk_44) { case 1: - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_MA_6022530); } else { gSPDisplayList(gMasterDisp++, D_MA_6022450); @@ -737,7 +738,7 @@ void func_effect_800798F0(Effect* effect) { case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_57); - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_MA_601A7A0); } else { gSPDisplayList(gMasterDisp++, D_MA_60223C0); @@ -747,7 +748,7 @@ void func_effect_800798F0(Effect* effect) { case 7: Animation_GetFrameData(&D_MA_6027320, 0, frameJointTable); - Animation_DrawSkeleton(1, D_MA_602742C, frameJointTable, func_effect_800798C4, NULL, effect, + Animation_DrawSkeleton(1, D_MA_602742C, frameJointTable, func_effect_800798C4, NULL, this, &gIdentityMatrix); break; @@ -767,7 +768,7 @@ void func_effect_800798F0(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 80, 0, 255); - Graphics_SetScaleMtx(effect->scale1); + Graphics_SetScaleMtx(this->scale1); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -814,7 +815,7 @@ void func_effect_800798F0(Effect* effect) { break; default: - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_10194C0); } else { gSPDisplayList(gMasterDisp++, D_1024290); @@ -830,9 +831,9 @@ void func_effect_800798F0(Effect* effect) { break; default: - switch (effect->unk_4C) { + switch (this->unk_4C) { case 0: - if ((effect->index % 2) != 0) { + if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, D_10194C0); } else { gSPDisplayList(gMasterDisp++, D_1024290); @@ -840,7 +841,7 @@ void func_effect_800798F0(Effect* effect) { break; case 1: - switch ((s32) (effect->index % 4U)) { + switch ((s32) (this->index % 4U)) { case 0: Matrix_Scale(gGfxMatrix, 1.0f, 0.3f, 1.0f, MTXF_APPLY); break; @@ -871,41 +872,41 @@ void func_effect_800798F0(Effect* effect) { } } -void func_effect_8007A28C(Effect* effect) { +void Effect_Effect383_Update(Effect383* this) { Texture_Scroll(D_10190C0, 16, 32, 0); gGroundClipMode = 2; - effect->obj.rot.y += 1.0f; - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 1.5f, 0.001f); + this->obj.rot.y += 1.0f; + Math_SmoothStepToF(&this->scale2, this->scale1, 0.05f, 1.5f, 0.001f); - if (effect->timer_50 > 10) { + if (this->timer_50 > 10) { D_ctx_801779A8[0] = 60.0f; } - if (effect->timer_50 == 48) { + if (this->timer_50 == 48) { gFillScreenAlpha = 150; } - if (effect->timer_50 > 45) { + if (this->timer_50 > 45) { gFillScreenAlphaTarget = 0; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } gFillScreenAlphaStep = 3; - if (effect->timer_50 == 0) { - effect->unk_44 -= 2; - if (effect->unk_44 < 0) { - effect->unk_44 = 0; - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + this->unk_44 -= 2; + if (this->unk_44 < 0) { + this->unk_44 = 0; + Object_Kill(&this->obj, this->sfxSource); gGroundClipMode = 0; } } } -void func_effect_8007A3C0(Effect* effect) { +void Effect_Effect383_Draw(Effect383* this) { if (gReflectY > 0) { - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_10182C0); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -913,20 +914,20 @@ void func_effect_8007A3C0(Effect* effect) { } } -void func_effect_8007A4B8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_383; - effect->scale1 = scale1; - effect->timer_50 = 50; - effect->unk_44 = 200; +void func_effect_8007A4B8(Effect383* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_383; + this->scale1 = scale1; + this->timer_50 = 50; + this->unk_44 = 200; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, effect->sfxSource, 4); - Object_SetInfo(&effect->info, effect->obj.id); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, this->sfxSource, 4); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007A568(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -941,73 +942,73 @@ void func_effect_8007A568(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { func_effect_8007B344(xPos, yPos, zPos, 80.0f, 4); } -void func_effect_8007A5F8(Effect* effect, Vec3f* pos, u32 sfxId) { - Effect_Initialize(effect); - effect->obj.status = OBJ_ACTIVE; - effect->obj.id = OBJ_EFFECT_373; +void Effect_SetupTimedSfxAtPos(TimedSfx* this, Vec3f* pos, u32 sfxId) { + Effect_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_EFFECT_TIMED_SFX; - effect->obj.pos.x = pos->x; - effect->obj.pos.y = pos->y; - effect->obj.pos.z = pos->z; + this->obj.pos.x = pos->x; + this->obj.pos.y = pos->y; + this->obj.pos.z = pos->z; - effect->timer_50 = 50; + this->timer_50 = 50; if ((sfxId == NA_SE_OB_EXPLOSION_S) || (sfxId == NA_SE_OB_SMOKE)) { - AUDIO_PLAY_SFX(sfxId, effect->sfxSource, 0); + AUDIO_PLAY_SFX(sfxId, this->sfxSource, 0); if (sfxId == NA_SE_OB_SMOKE) { - effect->timer_50 = 300; + this->timer_50 = 300; } } else { - AUDIO_PLAY_SFX(sfxId, effect->sfxSource, 4); + AUDIO_PLAY_SFX(sfxId, this->sfxSource, 4); } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } -void func_effect_8007A6F0(Vec3f* pos, s32 sfxId) { +void Effect_SpawnTimedSfxAtPos(Vec3f* pos, s32 sfxId) { s32 i; for (i = 0; i < ARRAY_COUNT(gEffects); i++) { if (gEffects[i].obj.status == OBJ_FREE) { - func_effect_8007A5F8(&gEffects[i], pos, sfxId); + Effect_SetupTimedSfxAtPos(&gEffects[i], pos, sfxId); break; } } } -void func_effect_8007A748(Effect* effect) { - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_TimedSfx_Update(TimedSfx* this) { + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } -bool func_effect_8007A774(Player* player, Effect* effect, f32 arg2) { - if ((fabsf(player->trueZpos - effect->obj.pos.z) < arg2) && (fabsf(player->pos.x - effect->obj.pos.x) < arg2) && - (fabsf(player->pos.y - effect->obj.pos.y) < arg2) && (player->mercyTimer == 0)) { - Player_ApplyDamage(player, 0, effect->info.damage); +bool func_effect_8007A774(Player* player, Effect* this, f32 arg2) { + if ((fabsf(player->trueZpos - this->obj.pos.z) < arg2) && (fabsf(player->pos.x - this->obj.pos.x) < arg2) && + (fabsf(player->pos.y - this->obj.pos.y) < arg2) && (player->mercyTimer == 0)) { + Player_ApplyDamage(player, 0, this->info.damage); return true; } else { return false; } } -void func_effect_8007A818(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg5, u8 arg6, u16 arg7) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_359; +void func_effect_8007A818(Effect359* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg5, u8 arg6, u16 arg7) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_359; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale1 = scale1; - effect->unk_44 = arg5; - effect->unk_46 = arg6; - effect->unk_60.z = RAND_FLOAT_CENTERED(10.0f); - effect->unk_60.y = scale1 * 0.1f; + this->scale1 = scale1; + this->unk_44 = arg5; + this->unk_46 = arg6; + this->unk_60.z = RAND_FLOAT_CENTERED(10.0f); + this->unk_60.y = scale1 * 0.1f; if (arg7 != 0) { - effect->vel.x = RAND_FLOAT_CENTERED(30.0f); + this->vel.x = RAND_FLOAT_CENTERED(30.0f); } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007A900(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg4, u8 arg5, u16 arg6) { @@ -1023,70 +1024,70 @@ void func_effect_8007A900(f32 xPos, f32 yPos, f32 zPos, f32 scale1, u8 arg4, u8 } } -void func_effect_8007A994(Effect* effect) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.01f); - effect->obj.rot.z += effect->unk_60.z; - effect->vel.y += effect->unk_60.y; +void Effect_Effect359_Update(Effect359* this) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.01f); + this->obj.rot.z += this->unk_60.z; + this->vel.y += this->unk_60.y; - if ((effect->unk_4A % 2) != 0) { - effect->unk_48++; - if (effect->unk_48 > 5) { - effect->unk_48 = 5; + if ((this->unk_4A % 2) != 0) { + this->unk_48++; + if (this->unk_48 > 5) { + this->unk_48 = 5; } } - effect->unk_44 -= effect->unk_46; - if (effect->unk_44 <= 20) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= this->unk_46; + if (this->unk_44 <= 20) { + Object_Kill(&this->obj, this->sfxSource); } - effect->unk_4A++; + this->unk_4A++; } static Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TI_6003760 }; -void func_effect_8007AA60(Effect* effect) { +void Effect_Effect359_Draw(Effect359* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 31, 10, 00, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 31, 10, 00, this->unk_44); gDPSetEnvColor(gMasterDisp++, 141, 73, 5, 0); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, 1.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_800D178C[effect->unk_4C]); - effect->unk_4C = effect->unk_48; + gSPDisplayList(gMasterDisp++, D_800D178C[this->unk_4C]); + this->unk_4C = this->unk_48; RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007AB50(Effect* effect) { - if (effect->state == 0) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.0f); - effect->unk_44 -= 20; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect372_Update(Effect372* this) { + if (this->state == 0) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.0f); + this->unk_44 -= 20; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } else { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.0f); - effect->unk_44 -= 10; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.0f); + this->unk_44 -= 10; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007AC0C(Effect* effect, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_372; +void func_effect_8007AC0C(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_372; - effect->obj.pos.x = xPos; - effect->obj.pos.y = gGroundHeight; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = gGroundHeight; + this->obj.pos.z = zPos; - effect->unk_44 = 180; - effect->scale2 = scale2; - effect->scale1 = scale1; - effect->obj.rot.y = yRot; - effect->vel.x = gPlayer[0].vel.x * 0.6f; - effect->vel.z = gPlayer[0].vel.z * 0.6; // Forgotten f means bad codegen - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_44 = 180; + this->scale2 = scale2; + this->scale1 = scale1; + this->obj.rot.y = yRot; + this->vel.x = gPlayer[0].vel.x * 0.6f; + this->vel.z = gPlayer[0].vel.z * 0.6; // Forgotten f means bad codegen + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007ACE0(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { @@ -1100,21 +1101,21 @@ void func_effect_8007ACE0(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, } } -void func_effect_8007AD58(Effect* effect, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_372; - effect->state = 1; +void func_effect_8007AD58(Effect372* this, f32 xPos, f32 unused_posY, f32 zPos, f32 scale2, f32 scale1, f32 yRot) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_372; + this->state = 1; - effect->obj.pos.x = xPos; - effect->obj.pos.y = gGroundHeight; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = gGroundHeight; + this->obj.pos.z = zPos; - effect->unk_44 = 180; - effect->scale2 = scale2; - effect->scale1 = scale1; - effect->obj.rot.y = yRot; - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_44 = 180; + this->scale2 = scale2; + this->scale1 = scale1; + this->obj.rot.y = yRot; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1) { @@ -1136,20 +1137,20 @@ void func_effect_8007ADF4(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1) } } -void func_effect_8007AF30(Effect* effect, f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_382; +void func_effect_8007AF30(Effect382* this, f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_382; - effect->obj.pos.x = xPos; - effect->obj.pos.y = -10.0f; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = -10.0f; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.z = zVel - gPathVelZ; - effect->scale1 = scale1; - effect->timer_50 = 100; - Object_SetInfo(&effect->info, effect->obj.id); + this->vel.x = xVel; + this->vel.z = zVel - gPathVelZ; + this->scale1 = scale1; + this->timer_50 = 100; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007AFD0(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { @@ -1163,42 +1164,42 @@ void func_effect_8007AFD0(f32 xPos, f32 zPos, f32 xVel, f32 zVel, f32 scale1) { } } -void func_effect_8007B040(Effect* effect) { +void Effect_Effect382_Update(Effect382* this) { f32 sp2C; s32 sp28; - if (Play_CheckDynaFloorCollision(&sp2C, &sp28, effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z)) { - D_ctx_801782EC[sp28] = effect->scale1; - D_ctx_801782EC[sp28 + 1] = effect->scale1 * 0.7f; - D_ctx_801782EC[sp28 - 1] = effect->scale1 * 0.7f; + if (Play_CheckDynaFloorCollision(&sp2C, &sp28, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { + D_ctx_801782EC[sp28] = this->scale1; + D_ctx_801782EC[sp28 + 1] = this->scale1 * 0.7f; + D_ctx_801782EC[sp28 - 1] = this->scale1 * 0.7f; } - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007B0F4(Effect* effect) { - Math_SmoothStepToF(&effect->scale2, effect->scale1 * 3.0f, 0.1f, 10.0f, 0.0f); - effect->unk_44 -= 13; - effect->obj.rot.y = 180.0f - effect->obj.rot.y; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect381_Update(Effect381* this) { + Math_SmoothStepToF(&this->scale2, this->scale1 * 3.0f, 0.1f, 10.0f, 0.0f); + this->unk_44 -= 13; + this->obj.rot.y = 180.0f - this->obj.rot.y; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007B180(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_381; +void func_effect_8007B180(Effect381* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_381; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_44 = 255; - effect->scale1 = scale1; - Object_SetInfo(&effect->info, effect->obj.id); - AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_L, effect->sfxSource, 0); + this->unk_44 = 255; + this->scale1 = scale1; + Object_SetInfo(&this->info, this->obj.id); + AUDIO_PLAY_SFX(NA_SE_SPLASH_LEVEL_L, this->sfxSource, 0); } void func_effect_8007B228(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1212,22 +1213,22 @@ void func_effect_8007B228(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { } } -void func_effect_8007B2BC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_384; +void func_effect_8007B2BC(Effect384* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_384; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale1 = scale1; - effect->unk_44 = 255; - effect->unk_4C = arg5; - Object_SetInfo(&effect->info, effect->obj.id); + this->scale1 = scale1; + this->unk_44 = 255; + this->unk_4C = arg5; + Object_SetInfo(&this->info, this->obj.id); } -// Orange-yellowish light effect simulating an explosion +// Orange-yellowish light this simulating an explosion void func_effect_8007B344(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { s32 i; @@ -1239,16 +1240,16 @@ void func_effect_8007B344(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { } } -void func_effect_8007B3B8(Effect* effect) { +void Effect_Effect384_Update(Effect384* this) { f32 var_fv0; f32 var_fv1; s32 var_v0; - if (effect->unk_4C == 6) { + if (this->unk_4C == 6) { var_fv0 = 15.0f; var_fv1 = 0.05f; var_v0 = 4; - } else if ((effect->unk_4C == 5) && ((gCurrentLevel == LEVEL_KATINA) || (gCurrentLevel == LEVEL_METEO))) { + } else if ((this->unk_4C == 5) && ((gCurrentLevel == LEVEL_KATINA) || (gCurrentLevel == LEVEL_METEO))) { var_fv0 = 10.0f; var_fv1 = 0.1f; var_v0 = 4; @@ -1258,35 +1259,35 @@ void func_effect_8007B3B8(Effect* effect) { var_v0 = 8; } - Math_SmoothStepToF(&effect->scale2, effect->scale1, var_fv1, var_fv0, 0.0f); + Math_SmoothStepToF(&this->scale2, this->scale1, var_fv1, var_fv0, 0.0f); - effect->unk_44 -= var_v0; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= var_v0; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007B494(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_385; +void func_effect_8007B494(Effect385* this, f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_385; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->obj.rot.x = 90.0f; - effect->scale1 = scale1; - effect->unk_44 = arg5; + this->obj.rot.x = 90.0f; + this->scale1 = scale1; + this->unk_44 = arg5; if (arg5 < 60) { - effect->unk_46 = 1; + this->unk_46 = 1; } else if (arg5 < 90) { - effect->unk_46 = 2; + this->unk_46 = 2; } else { - effect->unk_46 = 3; + this->unk_46 = 3; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007B550(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { @@ -1300,83 +1301,83 @@ void func_effect_8007B550(f32 xPos, f32 yPos, f32 zPos, f32 scale1, s32 arg4) { } } -void func_effect_8007B5C0(Effect* effect) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.1f); - effect->unk_44 -= effect->unk_46; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect385_Update(Effect385* this) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.1f); + this->unk_44 -= this->unk_46; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007B62C(Effect* effect) { - if (effect->timer_50 == 0) { - effect->unk_46 -= 4; - if (effect->unk_46 <= 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Clouds_Update(Clouds* this) { + if (this->timer_50 == 0) { + this->unk_46 -= 4; + if (this->unk_46 <= 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007B670(Effect* effect) { +void Effect_Effect388_Update(Effect388* this) { } -void func_effect_8007B67C(Effect* effect) { +void Effect_Effect389_Update(Effect389* this) { s32 var_v1; - effect->unk_46 += 2; + this->unk_46 += 2; - if (effect->unk_46 >= 10) { - effect->unk_46 = 10; + if (this->unk_46 >= 10) { + this->unk_46 = 10; } - if (effect->unk_46 >= 9) { - effect->unk_48++; - if (effect->unk_48 >= 10) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_46 >= 9) { + this->unk_48++; + if (this->unk_48 >= 10) { + Object_Kill(&this->obj, this->sfxSource); } } - var_v1 = effect->unk_4A; + var_v1 = this->unk_4A; if (var_v1 != 0) { if (var_v1 > 10) { var_v1 -= 10; } - effect->vel.x = gPlayer[var_v1 - 1].vel.x; - effect->vel.y = gPlayer[var_v1 - 1].vel.y; - effect->vel.z = gPlayer[var_v1 - 1].vel.z; + this->vel.x = gPlayer[var_v1 - 1].vel.x; + this->vel.y = gPlayer[var_v1 - 1].vel.y; + this->vel.z = gPlayer[var_v1 - 1].vel.z; } } -void func_effect_8007B758(Effect* effect) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 10.0f, 0.1f); - effect->unk_44 -= 2; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect347_Update(Effect347* this) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 10.0f, 0.1f); + this->unk_44 -= 2; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } - func_effect_8007A774(gPlayer, effect, effect->scale2 * 20.0f); + func_effect_8007A774(gPlayer, this, this->scale2 * 20.0f); } -void func_effect_8007B7E8(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_364; +void func_effect_8007B7E8(Effect364* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_364; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = RAND_FLOAT_CENTERED(5.0f); - effect->vel.y = RAND_FLOAT_CENTERED(3.0f); - effect->unk_48 = 3; + this->vel.x = RAND_FLOAT_CENTERED(5.0f); + this->vel.y = RAND_FLOAT_CENTERED(3.0f); + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 50; - effect->unk_46 = 1; - effect->scale2 = scale2 * 0.2f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_4A = 50; + this->unk_46 = 1; + this->scale2 = scale2 * 0.2f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007B8F8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -1390,26 +1391,26 @@ void func_effect_8007B8F8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_8007B960(Effect* effect) { - effect->scale2 += 0.07f; - effect->unk_4A -= effect->unk_46; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect364_Update(Effect364* this) { + this->scale2 += 0.07f; + this->unk_4A -= this->unk_46; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.2f; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.2f; } -void func_effect_8007B9DC(Effect* effect) { +void Effect_Effect364_Draw(Effect364* this) { //! DEBUG: Hold Z on controller 4 to set up a display list. if (gControllerHold[3].button & Z_TRIG) { RCP_SetupDL(&gMasterDisp, SETUPDL_4); } - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); if (gCurrentLevel != LEVEL_MACBETH) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 140, 99, 58, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 140, 99, 58, this->unk_4A); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, (gGameFrameCount % 4U) + 5, (gGameFrameCount % 4U) + 3, (gGameFrameCount % 4U) + 3, 220); @@ -1424,38 +1425,38 @@ void func_effect_8007B9DC(Effect* effect) { } } -void func_effect_8007BB14(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_362; +void func_effect_8007BB14(Effect362* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_362; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = RAND_FLOAT_CENTERED(5.0f); - effect->vel.y = RAND_FLOAT_CENTERED(3.0f); - effect->unk_48 = 3; + this->vel.x = RAND_FLOAT_CENTERED(5.0f); + this->vel.y = RAND_FLOAT_CENTERED(3.0f); + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 180; - effect->unk_46 = 8; + this->unk_4A = 180; + this->unk_46 = 8; if (scale2 > 15.0f) { - effect->unk_46 = 5; - effect->unk_4A = 80; + this->unk_46 = 5; + this->unk_4A = 80; } - effect->scale2 = scale2 * 0.25f; - effect->obj.rot.z = RAND_FLOAT(360.0f); + this->scale2 = scale2 * 0.25f; + this->obj.rot.z = RAND_FLOAT(360.0f); if (scale2 == 6.0f) { - effect->vel.z = gPlayer[0].vel.z * 0.6f; + this->vel.z = gPlayer[0].vel.z * 0.6f; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -1469,69 +1470,69 @@ void func_effect_8007BC7C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_8007BCE8(Effect* effect) { +void Effect_Effect362_Update(Effect362* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); - effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + this->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); + this->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { - effect->unk_46 = 2; - effect->vel.y -= 0.13f; + this->unk_46 = 2; + this->vel.y -= 0.13f; } - effect->scale2 += 0.07f; - effect->unk_4A -= effect->unk_46; + this->scale2 += 0.07f; + this->unk_4A -= this->unk_46; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.2f; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.2f; } -void func_effect_8007BDE0(Effect* effect) { - effect->scale2 += 0.04f; - effect->unk_4A -= 2; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect361_Update(Effect361* this) { + this->scale2 += 0.04f; + this->unk_4A -= 2; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += effect->scale1; + this->obj.rot.z += this->unk_48; + this->vel.y += this->scale1; } -void func_effect_8007BE54(Effect* effect) { - effect->scale2 += 0.02f; - effect->unk_4A -= 3; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect360_Update(Effect360* this) { + this->scale2 += 0.02f; + this->unk_4A -= 3; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->vel.z = gPlayer[0].vel.z + 7.0f; - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.1f; + this->vel.z = gPlayer[0].vel.z + 7.0f; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.1f; } -void func_effect_8007BEE8(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); +void Effect_Effect360_361_362_Draw(Effect* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } -void func_effect_8007BF64(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, +void func_effect_8007BF64(Effect386* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_386; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_386; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - effect->scale2 = scale2; - effect->timer_50 = timer50; - Object_SetInfo(&effect->info, effect->obj.id); + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->scale2 = scale2; + this->timer_50 = timer50; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007BFFC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { @@ -1545,22 +1546,22 @@ void func_effect_8007BFFC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 } } -void func_effect_8007C088(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, +void func_effect_8007C088(Effect390* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_390; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_390; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - effect->scale2 = scale2; - effect->timer_50 = timer50; - Object_SetInfo(&effect->info, effect->obj.id); + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->scale2 = scale2; + this->timer_50 = timer50; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007C120(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 timer50) { @@ -1586,53 +1587,53 @@ void func_effect_8007C1AC(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 } } -void func_effect_8007C250(Effect* effect) { +void Effect_Effect386_Update(Effect386* this) { f32 randX; f32 randY; f32 randOther; s32 var_v0; - Math_SmoothStepToF(&effect->vel.x, 0.0f, 0.2f, 10.0f, 0.1f); - Math_SmoothStepToF(&effect->vel.y, 0.0f, 0.2f, 10.0f, 0.1f); - Math_SmoothStepToF(&effect->vel.z, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->vel.x, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->vel.y, 0.0f, 0.2f, 10.0f, 0.1f); + Math_SmoothStepToF(&this->vel.z, 0.0f, 0.2f, 10.0f, 0.1f); var_v0 = 4 - 1; if (gLevelMode == LEVELMODE_ALL_RANGE) { var_v0 = 2 - 1; } - if ((effect->timer_50 & var_v0) == 0) { + if ((this->timer_50 & var_v0) == 0) { randX = RAND_FLOAT_CENTERED(40.0f); randY = RAND_FLOAT_CENTERED(40.0f); randOther = RAND_FLOAT(0.5f) + 1.0f; - func_effect_8007D0E0(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z, - effect->scale2 * randOther); - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_8007D0E0(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, + this->scale2 * randOther); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007C3B4(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, +void func_effect_8007C3B4(Effect389* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg8) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_389; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_389; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->scale2 = scale2; - effect->unk_4A = arg8; - effect->unk_4C = RAND_INT(12.0f); - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); - effect->unk_44 = 255; + this->scale2 = scale2; + this->unk_4A = arg8; + this->unk_4C = RAND_INT(12.0f); + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); + this->unk_44 = 255; } void func_effect_8007C484(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2, s32 arg7) { @@ -1646,35 +1647,35 @@ void func_effect_8007C484(f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 } } -void func_effect_8007C50C(Effect* effect) { +void Effect_Effect390_Update(Effect390* this) { f32 randX; f32 randY; f32 randOther; - if ((effect->timer_50 % 8) == 0) { - randX = RAND_FLOAT_CENTERED(40.0f) * effect->scale2; - randY = RAND_FLOAT_CENTERED(40.0f) * effect->scale2; + if ((this->timer_50 % 8) == 0) { + randX = RAND_FLOAT_CENTERED(40.0f) * this->scale2; + randY = RAND_FLOAT_CENTERED(40.0f) * this->scale2; randOther = RAND_FLOAT(1.0f) + 1.0f; - func_effect_8007C484(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z, effect->vel.x, - effect->vel.y, effect->vel.z, effect->scale2 * randOther, 0); - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_8007C484(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, this->scale2 * randOther, 0); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007C608(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_387; +void func_effect_8007C608(Effect387* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_387; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->timer_50 = timer50; - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = scale2; + this->timer_50 = timer50; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007C688(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { @@ -1688,37 +1689,37 @@ void func_effect_8007C688(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) } } -void func_effect_8007C6FC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_343; +void func_effect_8007C6FC(Effect343* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_343; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_48 = 3; - effect->vel.y = 5.0f; + this->unk_48 = 3; + this->vel.y = 5.0f; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } if ((gCurrentLevel == LEVEL_FORTUNA) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_NEXT)) { - effect->unk_4A = 180; + this->unk_4A = 180; } else { - effect->unk_4A = 255; + this->unk_4A = 255; } - effect->scale2 = scale2 * 0.25f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_44 = 0; + this->scale2 = scale2 * 0.25f; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_44 = 0; if (Rand_ZeroOne() < 0.3f) { - effect->unk_44 = 1; - effect->unk_4A = 255; - effect->scale2 = scale2 * 0.3f; + this->unk_44 = 1; + this->unk_4A = 255; + this->scale2 = scale2 * 0.3f; } - effect->scale1 = RAND_FLOAT(0.2f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale1 = RAND_FLOAT(0.2f); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007C85C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -1732,7 +1733,7 @@ void func_effect_8007C85C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { } } -void func_effect_8007C8C4(Effect* effect) { +void Effect_Effect387_Update(Effect387* this) { f32 randX; f32 randY; f32 randOther; @@ -1743,121 +1744,121 @@ void func_effect_8007C8C4(Effect* effect) { var_v0 = 4 - 1; } - if (((effect->timer_50 & var_v0) == 0) && (gLevelType == LEVELTYPE_PLANET)) { + if (((this->timer_50 & var_v0) == 0) && (gLevelType == LEVELTYPE_PLANET)) { randX = RAND_FLOAT_CENTERED(10.0f); randY = RAND_FLOAT_CENTERED(10.0f); randOther = RAND_FLOAT(0.5f) + 1.0f; - func_effect_8007C85C(effect->obj.pos.x + randX, effect->obj.pos.y + randY, effect->obj.pos.z, - effect->scale2 * randOther); - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_8007C85C(this->obj.pos.x + randX, this->obj.pos.y + randY, this->obj.pos.z, + this->scale2 * randOther); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007C9E0(Effect* effect) { - if (effect->unk_44 == 0) { - effect->scale2 *= 1.03f; - effect->unk_4A -= 3; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect343_Update(Effect343* this) { + if (this->unk_44 == 0) { + this->scale2 *= 1.03f; + this->unk_4A -= 3; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.3f; - effect->vel.x += effect->scale1; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.3f; + this->vel.x += this->scale1; } else { - effect->scale2 *= 1.03f; - effect->unk_4A -= 7; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->scale2 *= 1.03f; + this->unk_4A -= 7; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.3f; - effect->vel.x += effect->scale1; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.3f; + this->vel.x += this->scale1; } } -void func_effect_8007CAF0(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - if (effect->unk_44 == 0) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A); +void Effect_Effect343_Draw(Effect343* this) { + Graphics_SetScaleMtx(this->scale2); + if (this->unk_44 == 0) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, this->unk_4A); gSPDisplayList(gMasterDisp++, D_102A010); } else { Matrix_Scale(gGfxMatrix, 1.5f, 1.5f, 1.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gSPDisplayList(gMasterDisp++, D_BG_PLANET_20031B0); } } -void func_effect_8007CC00(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_FIRE_SMOKE; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->scale1 = 0.5f; - effect->unk_4C = 0; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); +void func_effect_8007CC00(EffectFireSmoke* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_FIRE_SMOKE; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->scale2 = scale2; + this->scale1 = 0.5f; + this->unk_4C = 0; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - effect->unk_44 = 230; + this->unk_44 = 230; } else { - effect->unk_44 = 255; + this->unk_44 = 255; } } -void func_effect_8007CCBC(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_340; +void func_effect_8007CCBC(Effect340* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_340; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->unk_4C = 3; - effect->scale1 = 0.2f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = scale2; + this->unk_4C = 3; + this->scale1 = 0.2f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - effect->unk_44 = 230; + this->unk_44 = 230; } else { - effect->unk_44 = 255; + this->unk_44 = 255; } } -void func_effect_8007CD7C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_342; - effect->timer_50 = timer50; +void func_effect_8007CD7C(Effect342* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_342; + this->timer_50 = timer50; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_48 = 3; + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 255; - effect->scale2 = scale2; - effect->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_4A = 255; + this->scale2 = scale2; + this->obj.rot.z = RAND_FLOAT(360.0f); if ((Rand_ZeroOne() < 0.5f) && (gLevelType == LEVELTYPE_PLANET) && (timer50 != 1)) { - effect->unk_44 = 1; + this->unk_44 = 1; } if (timer50 == 2) { - effect->unk_44 = 1; + this->unk_44 = 1; } if (scale2 == 2.2f) { - effect->unk_44 = 0; + this->unk_44 = 0; } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007CEBC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 timer50) { @@ -1923,22 +1924,22 @@ void func_effect_8007D10C(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { func_effect_8007CF9C(xPos, yPos, zPos, scale2); } -void func_effect_8007D138(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_341; +void func_effect_8007D138(Effect341* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_341; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = scale2; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); if (gLevelType == LEVELTYPE_PLANET) { - effect->unk_4C = 15; + this->unk_4C = 15; } - effect->unk_44 = 180; + this->unk_44 = 180; } void func_effect_8007D1E0(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -1965,58 +1966,58 @@ void func_effect_8007D2C8(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { func_effect_8007D008(xPos, yPos, zPos, scale2); } -void func_effect_8007D2F4(Effect* effect) { +void Effect_Effect339_Update(EffectFireSmoke* this) { if (gLevelType == LEVELTYPE_PLANET) { if ((gCurrentLevel == LEVEL_KATINA) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - effect->vel.y += 0.1f; - if (effect->timer_50 == 0) { - effect->unk_4C++; - effect->timer_50 = 4; - if (effect->unk_4C > 15) { - effect->timer_50 = 5; + this->vel.y += 0.1f; + if (this->timer_50 == 0) { + this->unk_4C++; + this->timer_50 = 4; + if (this->unk_4C > 15) { + this->timer_50 = 5; } - if (effect->unk_4C > 20) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4C > 20) { + Object_Kill(&this->obj, this->sfxSource); } } } else { if ((gCurrentLevel == LEVEL_MACBETH) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) && - (effect->vel.x != 0)) { - Math_SmoothStepToF(&effect->vel.x, -1.0f, 1.0f, 1.0f, 0.0f); - Math_SmoothStepToF(&effect->vel.z, 4.0f, 1.0f, 1.0f, 0.0f); - effect->vel.y += 1.7f; + (this->vel.x != 0)) { + Math_SmoothStepToF(&this->vel.x, -1.0f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&this->vel.z, 4.0f, 1.0f, 1.0f, 0.0f); + this->vel.y += 1.7f; } - effect->vel.y += 0.3f; - if (effect->timer_50 == 0) { - effect->unk_4C++; - if (effect->unk_4C > 15) { - effect->timer_50 = 2; + this->vel.y += 0.3f; + if (this->timer_50 == 0) { + this->unk_4C++; + if (this->unk_4C > 15) { + this->timer_50 = 2; } - if (effect->unk_4C > 20) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4C > 20) { + Object_Kill(&this->obj, this->sfxSource); } } } } else { - if (effect->timer_50 == 0) { - effect->unk_4C++; - effect->timer_50 = effect->unk_46; - if (effect->unk_4C > 13) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + this->unk_4C++; + this->timer_50 = this->unk_46; + if (this->unk_4C > 13) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->unk_44 -= 15; + this->unk_44 -= 15; } - if (gLight3Brightness < effect->scale1) { - gLight3Brightness = effect->scale1; - gLight3x = effect->obj.pos.x; - gLight3y = effect->obj.pos.y; - gLight3z = effect->obj.pos.z; + if (gLight3Brightness < this->scale1) { + gLight3Brightness = this->scale1; + gLight3x = this->obj.pos.x; + gLight3y = this->obj.pos.y; + gLight3z = this->obj.pos.z; gLight3R = 255; gLight3G = 50; gLight3B = 0; } - Math_SmoothStepToF(&effect->scale1, 0.0f, 1.0f, 0.05f, 0.0f); + Math_SmoothStepToF(&this->scale1, 0.0f, 1.0f, 0.05f, 0.0f); } static Gfx* D_800D17A4[] = { @@ -2047,95 +2048,99 @@ static Gfx* D_800D18A0[] = { D_BG_SPACE_20019B0, D_BG_SPACE_2001120, D_BG_SPACE_2000890, D_BG_SPACE_2000000, }; -void func_effect_8007D55C(Effect* effect) { +// Effects 339 to 341 +void Effect_FireSmoke_Draw(EffectFireSmoke* this) { f32 scale; - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); + if (gLevelType == LEVELTYPE_PLANET) { - gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[effect->unk_4C].r, D_800D184C[effect->unk_4C].g, - D_800D184C[effect->unk_4C].b, D_800D184C[effect->unk_4C].a); - scale = D_800D17F8[effect->unk_4C] - 0.5f; + gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D184C[this->unk_4C].r, D_800D184C[this->unk_4C].g, + D_800D184C[this->unk_4C].b, D_800D184C[this->unk_4C].a); + scale = D_800D17F8[this->unk_4C] - 0.5f; Matrix_Scale(gGfxMatrix, scale, scale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_800D17A4[effect->unk_4C]); + gSPDisplayList(gMasterDisp++, D_800D17A4[this->unk_4C]); return; } - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 100, effect->unk_44); - if (effect->unk_4C == 0) { + + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 100, this->unk_44); + + if (this->unk_4C == 0) { Matrix_Scale(gGfxMatrix, 2.5f, 2.5f, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_800D18A0[effect->unk_4C]); + gSPDisplayList(gMasterDisp++, D_800D18A0[this->unk_4C]); return; } - gSPDisplayList(gMasterDisp++, D_800D18A0[effect->unk_4C]); + gSPDisplayList(gMasterDisp++, D_800D18A0[this->unk_4C]); } -void func_effect_8007D748(Effect* effect) { +void Effect_Effect340_Update(Effect340* this) { if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y += 0.3f; - if (effect->timer_50 == 0) { - if (effect->unk_4C > 15) { - effect->timer_50 = 2; - effect->unk_4C = effect->unk_4C + 1; + this->vel.y += 0.3f; + if (this->timer_50 == 0) { + if (this->unk_4C > 15) { + this->timer_50 = 2; + this->unk_4C = this->unk_4C + 1; } else { - effect->unk_4C = effect->unk_4C + 2; + this->unk_4C = this->unk_4C + 2; } - if (effect->unk_4C > 20) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4C > 20) { + Object_Kill(&this->obj, this->sfxSource); } } } else { - if (effect->timer_50 == 0) { - effect->unk_4C++; - effect->timer_50 = 0; - if (effect->unk_4C > 13) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + this->unk_4C++; + this->timer_50 = 0; + if (this->unk_4C > 13) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->unk_44 -= 15; + this->unk_44 -= 15; } - if (gLight3Brightness < effect->scale1) { - gLight3Brightness = effect->scale1; - gLight3x = effect->obj.pos.x; - gLight3y = effect->obj.pos.y; - gLight3z = effect->obj.pos.z; + if (gLight3Brightness < this->scale1) { + gLight3Brightness = this->scale1; + gLight3x = this->obj.pos.x; + gLight3y = this->obj.pos.y; + gLight3z = this->obj.pos.z; gLight3R = 255; gLight3G = 50; gLight3B = 0; } - Math_SmoothStepToF(&effect->scale1, 0, 1.0f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->scale1, 0, 1.0f, 0.1f, 0.0f); } -void func_effect_8007D8A8(Effect* effect) { +void Effect_Effect341_Update(Effect341* this) { if (gLevelType == LEVELTYPE_SPACE) { - func_effect_8007D2F4(effect); + Effect_Effect339_Update(this); return; } - effect->vel.y += 0.3f; - if (effect->timer_50 == 0) { - effect->unk_4C++; - effect->timer_50 = 2; - if (effect->unk_4C >= 20) { - Object_Kill(&effect->obj, effect->sfxSource); + this->vel.y += 0.3f; + if (this->timer_50 == 0) { + this->unk_4C++; + this->timer_50 = 2; + if (this->unk_4C >= 20) { + Object_Kill(&this->obj, this->sfxSource); } } - if (effect->unk_4C > 15) { - effect->unk_44 -= 20; + if (this->unk_4C > 15) { + this->unk_44 -= 20; } } -void func_effect_8007D94C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_367; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->unk_44 = 80; - effect->scale2 = scale2; - effect->scale1 = scale1; - effect->timer_50 = timer50; - Object_SetInfo(&effect->info, effect->obj.id); +void func_effect_8007D94C(Effect367* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_367; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_44 = 80; + this->scale2 = scale2; + this->scale1 = scale1; + this->timer_50 = timer50; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007D9DC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, s32 timer50) { @@ -2149,88 +2154,87 @@ void func_effect_8007D9DC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, f32 scale1, } } -void func_effect_8007DA58(Effect* effect) { - effect->scale2 += effect->scale1; - if (effect->scale1 > 0.0f) { - effect->scale1 -= 0.01f; +void Effect_Effect375_Update(Effect375* this) { + this->scale2 += this->scale1; + if (this->scale1 > 0.0f) { + this->scale1 -= 0.01f; } else { - effect->scale1 -= 0.001f; + this->scale1 -= 0.001f; } - effect->obj.rot.y += effect->unk_60.y; - if (effect->scale2 < 0.01f) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.y += this->unk_60.y; + if (this->scale2 < 0.01f) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007DAE4(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); +void Macbeth_Effect375_Draw(Effect375* this) { + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_CO_6004900); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_8007DB70(Effect* effect) { +void Effect_Effect374_Update(Effect374* this) { Vec3f sp54 = { 0.0f, -10.0f, 0.0f }; - switch (effect->state) { + switch (this->state) { case 0: - effect->vel.y -= 0.5f; - if ((effect->timer_50 == 0) && ((Object_CheckCollision(1000, &effect->obj.pos, &sp54, 1) != 0) || - (effect->obj.pos.y < (gGroundHeight + 10.0f)))) { - effect->vel.y = 0.0f; - if (effect->obj.pos.y < (gGroundHeight + 10.0f)) { - effect->obj.pos.y = gGroundHeight; + this->vel.y -= 0.5f; + if ((this->timer_50 == 0) && ((Object_CheckCollision(1000, &this->obj.pos, &sp54, 1) != 0) || + (this->obj.pos.y < (gGroundHeight + 10.0f)))) { + this->vel.y = 0.0f; + if (this->obj.pos.y < (gGroundHeight + 10.0f)) { + this->obj.pos.y = gGroundHeight; } - effect->state = 1; - effect->timer_50 = 30; - effect->unk_44 = 192; - effect->scale2 = 2.5f; - effect->scale1 = 2.5f; - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, effect->sfxSource, 4); - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f); - func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, - 4.0f, 5); - if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundSurface != SURFACE_WATER)) { - PlayerShot_SpawnEffect344(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, - effect->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); + this->state = 1; + this->timer_50 = 30; + this->unk_44 = 192; + this->scale2 = 2.5f; + this->scale1 = 2.5f; + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 7.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, + 5); + if ((this->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundSurface != SURFACE_WATER)) { + PlayerShot_SpawnEffect344(this->obj.pos.x, 3.0f, this->obj.pos.z, this->obj.pos.x, this->obj.pos.z, + 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); break; } } break; case 1: - effect->scale2 += ((20.0f - effect->scale2) * 0.1f); - if (effect->scale2 > 19.0f) { - effect->scale1 -= 0.3f; - effect->unk_44 -= 20; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->scale2 += ((20.0f - this->scale2) * 0.1f); + if (this->scale2 > 19.0f) { + this->scale1 -= 0.3f; + this->unk_44 -= 20; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->obj.rot.y = 180.0f - effect->obj.rot.y; - if ((fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 40.0f) && - (fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < 80.0f)) { - if ((effect->obj.pos.y < gPlayer[0].pos.y) && - ((gPlayer[0].pos.y - effect->obj.pos.y) < (effect->scale2 * 35.0f)) && - (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(gPlayer, 0, effect->info.damage); + this->obj.rot.y = 180.0f - this->obj.rot.y; + if ((fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < 40.0f) && + (fabsf(gPlayer[0].pos.x - this->obj.pos.x) < 80.0f)) { + if ((this->obj.pos.y < gPlayer[0].pos.y) && + ((gPlayer[0].pos.y - this->obj.pos.y) < (this->scale2 * 35.0f)) && (gPlayer[0].mercyTimer == 0)) { + Player_ApplyDamage(gPlayer, 0, this->info.damage); } } break; } } -void func_effect_8007DED4(Effect* effect) { - switch (effect->state) { +void Macbeth_Effect374_Draw(Effect374* this) { + switch (this->state) { case 0: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_4008CE0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 1: - Matrix_Scale(gGfxMatrix, effect->scale1, effect->scale2, 2.5f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale1, this->scale2, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_40(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -2240,144 +2244,143 @@ void func_effect_8007DED4(Effect* effect) { } } -void func_effect_8007E014(Effect* effect) { +void Effect_Effect344_Update(Effect344* this) { s32 i; f32 x; f32 z; f32 y; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x, effect->obj.pos.z + gPathProgress, &x, &y, &z); - effect->obj.pos.y = y + 3.0f; - effect->obj.rot.x = RAD_TO_DEG(x); - effect->obj.rot.z = RAD_TO_DEG(z); + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &x, &y, &z); + this->obj.pos.y = y + 3.0f; + this->obj.rot.x = RAD_TO_DEG(x); + this->obj.rot.z = RAD_TO_DEG(z); } - if (((effect->unk_44 == 1) || (effect->unk_44 == 3)) && ((s32) (effect->timer_50 % 4U) == 1) && - (Rand_ZeroOne() < 0.5f)) { - func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y + (effect->scale2 * 5.0f), effect->obj.pos.z + 3.0f, - (RAND_FLOAT(0.7f) + 1.0f) * (effect->scale2 * 1.2f)); + if (((this->unk_44 == 1) || (this->unk_44 == 3)) && ((s32) (this->timer_50 % 4U) == 1) && (Rand_ZeroOne() < 0.5f)) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y + (this->scale2 * 5.0f), this->obj.pos.z + 3.0f, + (RAND_FLOAT(0.7f) + 1.0f) * (this->scale2 * 1.2f)); } for (i = 0; i < ARRAY_COUNT(gEffects); i++) { - if ((gEffects[i].obj.status == OBJ_ACTIVE) && (gEffects[i].obj.id == OBJ_EFFECT_344) && (i != effect->index) && - (fabsf(effect->obj.pos.z - gEffects[i].obj.pos.z) < 20.0f) && - (fabsf(effect->obj.pos.x - gEffects[i].obj.pos.x) < 20.0f) && - (fabsf(effect->obj.pos.y - gEffects[i].obj.pos.y) < 20.0f)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((gEffects[i].obj.status == OBJ_ACTIVE) && (gEffects[i].obj.id == OBJ_EFFECT_344) && (i != this->index) && + (fabsf(this->obj.pos.z - gEffects[i].obj.pos.z) < 20.0f) && + (fabsf(this->obj.pos.x - gEffects[i].obj.pos.x) < 20.0f) && + (fabsf(this->obj.pos.y - gEffects[i].obj.pos.y) < 20.0f)) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007E258(Effect* effect) { - if ((gCamCount != 1) && (effect->timer_50 == 0)) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect345_Update(Effect345* this) { + if ((gCamCount != 1) && (this->timer_50 == 0)) { + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_8007E298(Effect* effect) { - if (effect->timer_50 == 0) { - effect->scale2 *= 1.035f; - effect->unk_4A -= 8; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect342_Update(Effect342* this) { + if (this->timer_50 == 0) { + this->scale2 *= 1.035f; + this->unk_4A -= 8; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->obj.rot.z += effect->unk_48; + this->obj.rot.z += this->unk_48; if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y += 0.2f; + this->vel.y += 0.2f; } } -void func_effect_8007E330(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - if (effect->unk_44 == 0) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A); +void Effect_Effect342_Draw(Effect342* this) { + Graphics_SetScaleMtx(this->scale2); + if (this->unk_44 == 0) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, this->unk_4A); } else { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); } gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } -void func_effect_8007E3E4(Effect* effect) { - effect->scale2 += 0.02f; - effect->unk_4A -= 4; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect351_Update(Effect351* this) { + this->scale2 += 0.02f; + this->unk_4A -= 4; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->unk_48; - effect->vel.y += 0.05f; + this->obj.rot.z += this->unk_48; + this->vel.y += 0.05f; } -void func_effect_8007E45C(Effect* effect) { - switch (effect->state) { +void Effect_Effect365_Update(Effect365* this) { + switch (this->state) { case 0: - if (effect->unk_4C != 0) { - Math_SmoothStepToF(&effect->scale2, 5.0f, 0.05f, 0.5f, 0.0f); - effect->unk_44 -= 10; - effect->obj.rot.z += effect->scale1; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_4C != 0) { + Math_SmoothStepToF(&this->scale2, 5.0f, 0.05f, 0.5f, 0.0f); + this->unk_44 -= 10; + this->obj.rot.z += this->scale1; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } - effect->scale2 += 0.02f; - effect->unk_44--; + this->scale2 += 0.02f; + this->unk_44--; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } - effect->obj.rot.z += effect->scale1; - Math_SmoothStepToF(&effect->vel.y, 0.5f, 0.05f, 0.2f, 0.00001f); + this->obj.rot.z += this->scale1; + Math_SmoothStepToF(&this->vel.y, 0.5f, 0.05f, 0.2f, 0.00001f); break; case 1: - effect->vel.y = 3.0f; - Math_SmoothStepToF(&effect->scale2, 5.0f, 0.05f, 0.5f, 0.0f); - effect->unk_44 -= 10; - effect->obj.rot.z += effect->scale1; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->vel.y = 3.0f; + Math_SmoothStepToF(&this->scale2, 5.0f, 0.05f, 0.5f, 0.0f); + this->unk_44 -= 10; + this->obj.rot.z += this->scale1; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } } -void func_effect_8007E5CC(Effect* effect) { - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); +void Effect_Effect365_Draw(Effect365* this) { + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gSPDisplayList(gMasterDisp++, D_BG_PLANET_2010A30); } -void func_effect_8007E648(Effect* effect) { - if (effect->timer_50 == 0) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.05f, 100.0f, 0.0f); - effect->unk_44 -= 2; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); +void Effect_Effect367_Update(Effect367* this) { + if (this->timer_50 == 0) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.05f, 100.0f, 0.0f); + this->unk_44 -= 2; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { +void func_effect_8007E6B8(Effect* this, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { f32 sp54; f32 sp50; f32 temp_ft4; Vec3f sp40; Vec3f sp34; - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = objId; - effect->timer_50 = 100; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; + this->timer_50 = 100; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); sp50 = Math_Atan2F(gPlayer[0].pos.x - xPos, gPlayer[0].trueZpos - zPos); temp_ft4 = sqrtf(SQ(gPlayer[0].pos.x - xPos) + SQ(gPlayer[0].trueZpos - zPos)); sp54 = -Math_Atan2F(gPlayer[0].pos.y - yPos, temp_ft4); @@ -2391,47 +2394,47 @@ void func_effect_8007E6B8(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); - effect->vel.x = sp34.x + gPathVelX; - effect->vel.y = sp34.y + gPathVelY; - effect->vel.z = sp34.z - gPathVelZ; + this->vel.x = sp34.x + gPathVelX; + this->vel.y = sp34.y + gPathVelY; + this->vel.z = sp34.z - gPathVelZ; - if ((objId == OBJ_EFFECT_353) || (objId == OBJ_EFFECT_354)) { - effect->obj.rot.x = RAD_TO_DEG(sp54); - effect->obj.rot.y = RAD_TO_DEG(sp50); + if ((objId == OBJ_EFFECT_ENEMY_LASER_1) || (objId == OBJ_EFFECT_354)) { + this->obj.rot.x = RAD_TO_DEG(sp54); + this->obj.rot.y = RAD_TO_DEG(sp50); } if (objId == OBJ_EFFECT_356) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } if (objId == OBJ_EFFECT_376) { - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_4A = 180; - effect->scale2 = 5.0f; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_4A = 180; + this->scale2 = 5.0f; } else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } } -void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { +void func_effect_8007E93C(Effect* this, u32 objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { f32 sp54; f32 sp50; f32 temp_ft4; Vec3f sp40; Vec3f sp34; - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = objId; - effect->timer_50 = 100; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; + this->timer_50 = 100; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); sp50 = Math_Atan2F(gPlayer[0].cam.eye.x - xPos, gPlayer[0].cam.eye.z - zPos); temp_ft4 = sqrtf(SQ(gPlayer[0].cam.eye.x - xPos) + SQ(gPlayer[0].cam.eye.z - zPos)); sp54 = -Math_Atan2F(gPlayer[0].cam.eye.y - yPos, temp_ft4); @@ -2445,53 +2448,53 @@ void func_effect_8007E93C(Effect* effect, u32 objId, f32 xPos, f32 yPos, f32 zPo Matrix_MultVec3f(gCalcMatrix, &sp40, &sp34); - effect->vel.x = sp34.x + gPathVelX; - effect->vel.y = sp34.y + gPathVelY; - effect->vel.z = sp34.z - gPathVelZ; + this->vel.x = sp34.x + gPathVelX; + this->vel.y = sp34.y + gPathVelY; + this->vel.z = sp34.z - gPathVelZ; - if (objId == OBJ_EFFECT_353) { - effect->obj.rot.x = RAD_TO_DEG(sp54); - effect->obj.rot.y = RAD_TO_DEG(sp50); + if (objId == OBJ_EFFECT_ENEMY_LASER_1) { + this->obj.rot.x = RAD_TO_DEG(sp54); + this->obj.rot.y = RAD_TO_DEG(sp50); } if (objId == OBJ_EFFECT_356) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } if (objId == OBJ_EFFECT_376) { - effect->obj.rot.z = RAND_FLOAT(360.0f); - effect->unk_4A = 180; - effect->scale2 = 5.0f; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->unk_4A = 180; + this->scale2 = 5.0f; } else if ((objId == OBJ_EFFECT_355) || (objId == OBJ_EFFECT_377)) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } } -void func_effect_8007EBB8(Effect* effect, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, +void func_effect_8007EBB8(Effect* this, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = objId; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->timer_50 = 100; + this->timer_50 = 100; - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->scale2 = scale2; + this->scale2 = scale2; if (objId == OBJ_EFFECT_355) { - AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_ENERGY_BEAM, this->sfxSource, 4); } else { - AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007ECB4(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { @@ -2505,38 +2508,38 @@ void func_effect_8007ECB4(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xVel } } -void func_effect_8007ED54(Effect* effect, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, +void func_effect_8007ED54(Effect* this, ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 unkX, f32 unkY, f32 unkZ, f32 xVel, f32 yVel, f32 zVel, f32 scale2) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = objId; + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = objId; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->timer_50 = 100; + this->timer_50 = 100; if (gCurrentLevel == LEVEL_AQUAS) { - effect->timer_50 = 75; + this->timer_50 = 75; } - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; - effect->obj.rot.x = xRot; - effect->obj.rot.y = yRot; - effect->obj.rot.z = zRot; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->obj.rot.z = zRot; - effect->unk_60.x = unkX; - effect->unk_60.y = unkY; - effect->unk_60.z = unkZ; + this->unk_60.x = unkX; + this->unk_60.y = unkY; + this->unk_60.z = unkZ; - effect->scale2 = scale2; - if (effect->obj.id != OBJ_EFFECT_380) { - AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, effect->sfxSource, 4); + this->scale2 = scale2; + if (this->obj.id != OBJ_EFFECT_380) { + AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, this->sfxSource, 4); } - Object_SetInfo(&effect->info, effect->obj.id); + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8007EE68(ObjectId objId, Vec3f* pos, Vec3f* rot, Vec3f* arg3, Vec3f* arg4, f32 scale2) { @@ -2574,7 +2577,7 @@ void func_effect_8007F04C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 xRot } } -void func_effect_8007F11C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { +void Effect_EnemyLaser(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 speed) { s32 i; if ((fabsf(zPos - gPlayer[0].trueZpos) > 300.0f) || (fabsf(xPos - gPlayer[0].pos.x) > 300.0f)) { @@ -2604,94 +2607,96 @@ void func_effect_8007F20C(ObjectId objId, f32 xPos, f32 yPos, f32 zPos, f32 spee } } -void func_effect_8007F2FC(Effect* effect) { - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); +// Unused ? +void func_effect_8007F2FC(Effect* this) { + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } - if ((effect->obj.pos.y < gGroundHeight) && (gLevelType == LEVELTYPE_PLANET)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((this->obj.pos.y < gGroundHeight) && (gLevelType == LEVELTYPE_PLANET)) { + Object_Kill(&this->obj, this->sfxSource); } if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y -= 0.3f; + this->vel.y -= 0.3f; } - if (effect->obj.pos.y < gWaterLevel) { - effect->vel.y += 0.2f; - effect->obj.pos.y -= effect->vel.y * 0.5f; - effect->obj.pos.x -= effect->vel.x * 0.5f; - effect->obj.pos.z -= effect->vel.z * 0.5f; + if (this->obj.pos.y < gWaterLevel) { + this->vel.y += 0.2f; + this->obj.pos.y -= this->vel.y * 0.5f; + this->obj.pos.x -= this->vel.x * 0.5f; + this->obj.pos.z -= this->vel.z * 0.5f; } - if ((effect->unk_44 == 1) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.5f); + if ((this->unk_44 == 1) && ((gGameFrameCount % 2) == 0)) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); } } -void func_effect_8007F438(Effect* effect) { +void Effect_Effect346_Update(Effect346* this) { if (gCurrentLevel == LEVEL_AQUAS) { - effect->obj.rot.z += 3.5f; - effect->vel.z = 5.0f; + this->obj.rot.z += 3.5f; + this->vel.z = 5.0f; - if (effect->unk_44 != 0) { - Math_SmoothStepToF(&effect->scale1, 100.0f, 1.0f, 20.0f, 0.0001f); + if (this->unk_44 != 0) { + Math_SmoothStepToF(&this->scale1, 100.0f, 1.0f, 20.0f, 0.0001f); } else { - Math_SmoothStepToF(&effect->scale1, 0.0f, 1.0f, 20.0f, 0.0001f); + Math_SmoothStepToF(&this->scale1, 0.0f, 1.0f, 20.0f, 0.0001f); } - if (effect->unk_46 == 0) { - effect->unk_46 = 30; - effect->unk_44++; - effect->unk_44 &= 1; + if (this->unk_46 == 0) { + this->unk_46 = 30; + this->unk_44++; + this->unk_44 &= 1; } else { - effect->unk_46--; + this->unk_46--; } if (gPathVelZ < 0.0f) { - effect->vel.z = -10.0f; + this->vel.z = -10.0f; } - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } else { - effect->obj.rot.z += 3.5f; + this->obj.rot.z += 3.5f; if (gLevelType == LEVELTYPE_PLANET) { - effect->vel.y += 0.2f; + this->vel.y += 0.2f; } - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_effect_8007F5AC(Effect* effect) { - if (effect->unk_4C == 0) { - effect->unk_46++; - if ((effect->unk_46 & 0x20) == 0) { - effect->vel.x += 0.5f; +// Unused ? +void func_effect_8007F5AC(Effect* this) { + if (this->unk_4C == 0) { + this->unk_46++; + if ((this->unk_46 & 0x20) == 0) { + this->vel.x += 0.5f; } else { - effect->vel.x -= 0.5f; + this->vel.x -= 0.5f; } - if (((gGameFrameCount % 2) == 0)) { - effect->unk_44--; - if (effect->unk_44 < 20) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((gGameFrameCount % 2) == 0) { + this->unk_44--; + if (this->unk_44 < 20) { + Object_Kill(&this->obj, this->sfxSource); } } - effect->scale2 += 0.02f; + this->scale2 += 0.02f; if ((gGameFrameCount & 0x10) == 0) { - effect->scale2 += 0.01f; + this->scale2 += 0.01f; } else { - effect->scale2 -= 0.01f; + this->scale2 -= 0.01f; } } } -void func_effect_8007F6B0(Effect* effect) { +void Effect_Effect348_Update(Effect348* this) { s32 i; f32 temp; f32 cos; @@ -2702,38 +2707,38 @@ void func_effect_8007F6B0(Effect* effect) { f32 y; f32 yPos; - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.1f, 12.0f, 0.1f); + Math_SmoothStepToF(&this->scale2, this->scale1, 0.1f, 12.0f, 0.1f); - effect->unk_44 -= 2; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= 2; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } - if (((gGameFrameCount % 4) == 0) && (effect->state == 0)) { + if (((gGameFrameCount % 4) == 0) && (this->state == 0)) { randfloat = RAND_FLOAT(30.0f); for (i = 0; i < 36; i += 2) { temp = (i * 10.0f * M_DTOR) + randfloat; - sin = __sinf(temp) * effect->scale2 * 8.0f; - cos = __cosf(temp) * effect->scale2 * 8.0f; + sin = __sinf(temp) * this->scale2 * 8.0f; + cos = __cosf(temp) * this->scale2 * 8.0f; yPos = gGroundHeight + 40.0f; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + gPathProgress, &x, &y, &z); + Ground_801B6E20(this->obj.pos.x + sin, this->obj.pos.z + cos + gPathProgress, &x, &y, &z); yPos = y + 30.0f; } if (gCurrentLevel == LEVEL_AQUAS) { - func_effect_8007B8F8(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 20.0f); + func_effect_8007B8F8(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 20.0f); } else if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 20.0f); + func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 20.0f); } else if (gCurrentLevel == LEVEL_TITANIA) { - func_effect_8007A900(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 10.0f, 255, 15, 0); + func_effect_8007A900(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 10.0f, 255, 15, 0); } } } } -void func_effect_8007F958(Effect* effect) { +void Effect_Effect349_Update(Effect349* this) { s32 i; f32 x; f32 z; @@ -2744,41 +2749,41 @@ void func_effect_8007F958(Effect* effect) { f32 randFloat; f32 yPos; - effect->scale2 += effect->scale1; - effect->scale1 -= 0.08f; - if (effect->scale1 < 0.1f) { - effect->scale1 = 0.1f; + this->scale2 += this->scale1; + this->scale1 -= 0.08f; + if (this->scale1 < 0.1f) { + this->scale1 = 0.1f; } - effect->unk_44 -= 9; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= 9; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); return; } - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { randFloat = RAND_FLOAT(144.0f); for (i = 0; i < 5; i++) { temp = (i * 72.0f * M_DTOR) + randFloat; - sin = __sinf(temp) * effect->scale2 * 16.0f; - cos = __cosf(temp) * effect->scale2 * 16.0f; + sin = __sinf(temp) * this->scale2 * 16.0f; + cos = __cosf(temp) * this->scale2 * 16.0f; yPos = gGroundHeight + 10.0f; if (gGroundType == 4) { - Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + gPathProgress, &x, &y, &z); + Ground_801B6E20(this->obj.pos.x + sin, this->obj.pos.z + cos + gPathProgress, &x, &y, &z); yPos = y + 10.0f; } if (gCurrentLevel == LEVEL_FORTUNA) { - func_effect_8007BC7C(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 8.0f); + func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 8.0f); } else if (gCurrentLevel == LEVEL_TITANIA) { - func_effect_8007A900(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 8.0f, 255, 15, 0); + func_effect_8007A900(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 8.0f, 255, 15, 0); } } } } -void func_effect_8007FBE0(Effect* effect) { +void Effect_Effect350_Update(Effect350* this) { s32 i; f32 temp; f32 sin; @@ -2786,30 +2791,30 @@ void func_effect_8007FBE0(Effect* effect) { f32 randFloat; f32 yPos; - effect->scale2 += effect->scale1; - effect->scale1 -= .1f; - if (effect->scale1 < 0.1f) { - effect->scale1 = 0.1f; + this->scale2 += this->scale1; + this->scale1 -= .1f; + if (this->scale1 < 0.1f) { + this->scale1 = 0.1f; } - effect->unk_44 -= 6; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44 -= 6; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } if (((gGameFrameCount % 2) == 0)) { randFloat = RAND_FLOAT(144.0f); for (i = 0; i < 10; i++) { temp = (i * 36.0f * M_DTOR) + randFloat; - sin = __sinf(temp) * effect->scale2 * 16.0f; - cos = __cosf(temp) * effect->scale2 * 16.0f; + sin = __sinf(temp) * this->scale2 * 16.0f; + cos = __cosf(temp) * this->scale2 * 16.0f; yPos = gGroundHeight + 10.0f; - func_effect_8007BC7C(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 12.0f); + func_effect_8007BC7C(this->obj.pos.x + sin, yPos, this->obj.pos.z + cos, 12.0f); } } } -bool func_effect_8007FD84(Effect* effect) { +bool func_effect_8007FD84(Effect* this) { s32 i; Actor* actor; @@ -2817,13 +2822,13 @@ bool func_effect_8007FD84(Effect* effect) { actor = &gActors[gTeamEventActorIndex[i]]; if (actor->obj.status == OBJ_ACTIVE) { if ((actor->iwork[12] >= TEAM_ID_FALCO) && (actor->iwork[12] <= TEAM_ID_BILL) && - (fabsf(actor->obj.pos.z - effect->obj.pos.z) < 100.0f) && - (fabsf(actor->obj.pos.x - effect->obj.pos.x) < 100.0f) && - (fabsf(actor->obj.pos.y - effect->obj.pos.y) < 100.0f)) { + (fabsf(actor->obj.pos.z - this->obj.pos.z) < 100.0f) && + (fabsf(actor->obj.pos.x - this->obj.pos.x) < 100.0f) && + (fabsf(actor->obj.pos.y - this->obj.pos.y) < 100.0f)) { actor->dmgType = DMG_BEAM; actor->dmgPart = 0; actor->damage = 10; - if (effect->obj.id == OBJ_EFFECT_354) { + if (this->obj.id == OBJ_EFFECT_354) { actor->damage = 30; } actor->dmgSource = CS_SHOT_ID; @@ -2834,19 +2839,19 @@ bool func_effect_8007FD84(Effect* effect) { return false; } -void func_effect_8007FE88(Effect* effect) { +void Effect_Effect353_354_Update(Effect* this) { Vec3f srcVelocity; Vec3f destVelocity; Vec3f velocity; f32 var_fa0 = 0.0f; - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); return; } - if (func_effect_8007FD84(effect)) { - Object_Kill(&effect->obj, effect->sfxSource); + if (func_effect_8007FD84(this)) { + Object_Kill(&this->obj, this->sfxSource); return; } @@ -2854,98 +2859,98 @@ void func_effect_8007FE88(Effect* effect) { var_fa0 = 100.0f; } - if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < (50.0f + var_fa0)) { - if ((fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < (30.0f + var_fa0)) && - (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) { + if (fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < (50.0f + var_fa0)) { + if ((fabsf(gPlayer[0].pos.x - this->obj.pos.x) < (30.0f + var_fa0)) && + (fabsf(gPlayer[0].pos.y - this->obj.pos.y) < (30.0f + var_fa0))) { if ((gPlayer[0].barrelRollAlpha != 0) || (gPlayer[0].meteoWarpTimer != 0)) { - effect->obj.rot.y = 90.0f; - effect->obj.rot.x = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + this->obj.rot.y = 90.0f; + this->obj.rot.x = RAND_FLOAT(360.0f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); srcVelocity.x = 0.0f; srcVelocity.y = 0.0f; srcVelocity.z = 100.0f; Matrix_MultVec3f(gCalcMatrix, &srcVelocity, &destVelocity); - effect->vel.x = destVelocity.x; - effect->vel.y = destVelocity.y; - effect->vel.z = destVelocity.z; + this->vel.x = destVelocity.x; + this->vel.y = destVelocity.y; + this->vel.z = destVelocity.z; gPlayer[0].deflectCount++; - AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, this->sfxSource, 0); } if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(gPlayer, 0, effect->info.damage); + Player_ApplyDamage(gPlayer, 0, this->info.damage); gPlayer[0].knockback.x = 20.0f; - if (effect->vel.x < 0.0f) { + if (this->vel.x < 0.0f) { gPlayer[0].knockback.x *= -1.0f; } if (gCurrentLevel != LEVEL_MACBETH) { gPlayer[0].knockback.y = 20.0f; - if (effect->vel.y < 0.0f) { + if (this->vel.y < 0.0f) { gPlayer[0].knockback.y *= -1.0f; } } - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } } if (gGroundType == 4) { - if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + gPathProgress) != 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (Ground_801B6AEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress) != 0) { + Object_Kill(&this->obj, this->sfxSource); } - } else if (effect->obj.pos.y < gGroundHeight) { - Object_Kill(&effect->obj, effect->sfxSource); + } else if (this->obj.pos.y < gGroundHeight) { + Object_Kill(&this->obj, this->sfxSource); if (gGroundSurface != SURFACE_WATER) { - effect->obj.pos.y = gGroundHeight; - func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); + this->obj.pos.y = gGroundHeight; + func_effect_8007D074(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); } } - velocity.x = effect->vel.x; - velocity.y = effect->vel.y; - velocity.z = effect->vel.z; + velocity.x = this->vel.x; + velocity.y = this->vel.y; + velocity.z = this->vel.z; if (gCurrentLevel != LEVEL_MACBETH) { - if (Object_CheckCollision(1000, &effect->obj.pos, &velocity, 2) != 0) { - func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); - Object_Kill(&effect->obj, effect->sfxSource); + if (Object_CheckCollision(1000, &this->obj.pos, &velocity, 2) != 0) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); + Object_Kill(&this->obj, this->sfxSource); } - } else if (Macbeth_801A55D4(1000, &effect->obj.pos, &velocity, 0) != 0) { - func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); - Object_Kill(&effect->obj, effect->sfxSource); + } else if (Macbeth_801A55D4(1000, &this->obj.pos, &velocity, 0) != 0) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); + Object_Kill(&this->obj, this->sfxSource); } } -void func_effect_800802B8(Effect* effect) { - func_effect_8007FE88(effect); +void Effect_Effect355_Update(Effect355* this) { + Effect_Effect353_354_Update(this); } -void func_effect_800802D8(Effect* effect) { - func_effect_8007FE88(effect); +void Effect_Effect377_Update(Effect377* this) { + Effect_Effect353_354_Update(this); } -void func_effect_800802F8(Effect* effect) { - func_effect_8007FE88(effect); - effect->obj.rot.z += 10.0f; - effect->scale2 = 3.0f; +void Effect_Effect356_Update(Effect356* this) { + Effect_Effect353_354_Update(this); + this->obj.rot.z += 10.0f; + this->scale2 = 3.0f; if ((gGameFrameCount % 2) != 0) { - effect->scale2 = 3.5f; + this->scale2 = 3.5f; } } -void func_effect_80080360(Effect* effect) { - effect->obj.rot.z += 8.0f; - effect->scale2 += 0.1f; +void Effect_Effect376_Update(Effect376* this) { + this->obj.rot.z += 8.0f; + this->scale2 += 0.1f; // It seems they forgot that unk_4A is s16 and not a float... - effect->unk_4A -= 3.5f; - if (effect->unk_4A < 50.0f) { - effect->unk_4A = 50; + this->unk_4A -= 3.5f; + if (this->unk_4A < 50.0f) { + this->unk_4A = 50; } - func_effect_8007A774(gPlayer, effect, 50.0f); + func_effect_8007A774(gPlayer, this, 50.0f); } -void func_effect_8008040C(Effect* effect) { +void Effect_Effect398_Update(Effect398* this) { f32 xRot; f32 yRot; f32 temp; @@ -2954,32 +2959,32 @@ void func_effect_8008040C(Effect* effect) { Vec3f destVelocity; Vec3f sp3C; - switch (effect->state) { + switch (this->state) { case 0: - yRot = Math_Atan2F(gPlayer[0].pos.x - effect->obj.pos.x, gPlayer[0].trueZpos - effect->obj.pos.z); - temp = sqrtf(SQ(gPlayer[0].pos.x - effect->obj.pos.x) + SQ(gPlayer[0].trueZpos - effect->obj.pos.z)); - xRot = -Math_Atan2F(gPlayer[0].pos.y - effect->obj.pos.y, temp); + yRot = Math_Atan2F(gPlayer[0].pos.x - this->obj.pos.x, gPlayer[0].trueZpos - this->obj.pos.z); + temp = sqrtf(SQ(gPlayer[0].pos.x - this->obj.pos.x) + SQ(gPlayer[0].trueZpos - this->obj.pos.z)); + xRot = -Math_Atan2F(gPlayer[0].pos.y - this->obj.pos.y, temp); Matrix_RotateY(gCalcMatrix, yRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, xRot, MTXF_APPLY); srcVelocity.y = 0.0f; srcVelocity.x = 0.0f; srcVelocity.z = 100.0f; Matrix_MultVec3f(gCalcMatrix, &srcVelocity, &destVelocity); - effect->vel.x = destVelocity.x + gPathVelX; - effect->vel.y = destVelocity.y + gPathVelY; - effect->vel.z = destVelocity.z - gPathVelZ; - effect->state++; + this->vel.x = destVelocity.x + gPathVelX; + this->vel.y = destVelocity.y + gPathVelY; + this->vel.z = destVelocity.z - gPathVelZ; + this->state++; break; case 1: - effect->obj.rot.z = 360.0f - effect->obj.rot.z; - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.z = 360.0f - this->obj.rot.z; + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); return; } - if (func_effect_8007FD84(effect)) { - Object_Kill(&effect->obj, effect->sfxSource); + if (func_effect_8007FD84(this)) { + Object_Kill(&this->obj, this->sfxSource); return; } @@ -2987,68 +2992,68 @@ void func_effect_8008040C(Effect* effect) { var_fa0 = 100.0f; } - if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < (50.0f + var_fa0)) { - if ((fabsf(gPlayer[0].pos.x - effect->obj.pos.x) < (30.0f + var_fa0)) && - (fabsf(gPlayer[0].pos.y - effect->obj.pos.y) < (30.0f + var_fa0))) { + if (fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < (50.0f + var_fa0)) { + if ((fabsf(gPlayer[0].pos.x - this->obj.pos.x) < (30.0f + var_fa0)) && + (fabsf(gPlayer[0].pos.y - this->obj.pos.y) < (30.0f + var_fa0))) { if ((gPlayer[0].barrelRollAlpha != 0) || (gPlayer[0].meteoWarpTimer != 0)) { - effect->obj.rot.y = 90.0f; - effect->obj.rot.x = RAND_FLOAT(360.0f); - Matrix_RotateY(gCalcMatrix, effect->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, effect->obj.rot.x * M_DTOR, MTXF_APPLY); + this->obj.rot.y = 90.0f; + this->obj.rot.x = RAND_FLOAT(360.0f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); srcVelocity.y = 0.0f; srcVelocity.x = 0.0f; srcVelocity.z = 100.0f; Matrix_MultVec3f(gCalcMatrix, &srcVelocity, &destVelocity); - effect->vel.x = destVelocity.x; - effect->vel.y = destVelocity.y; - effect->vel.z = destVelocity.z; + this->vel.x = destVelocity.x; + this->vel.y = destVelocity.y; + this->vel.z = destVelocity.z; gPlayer[0].deflectCount++; - AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, effect->sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_ROLLING_REFLECT, this->sfxSource, 0); } if ((gPlayer[0].barrelRollAlpha == 0) && (gPlayer[0].mercyTimer == 0)) { - Player_ApplyDamage(gPlayer, 0, effect->info.damage); + Player_ApplyDamage(gPlayer, 0, this->info.damage); gPlayer[0].knockback.x = 20.0f; - if (effect->vel.x < 0.0f) { + if (this->vel.x < 0.0f) { gPlayer[0].knockback.x *= -1.0f; } gPlayer[0].knockback.y = 20.0f; - if (effect->vel.y < 0.0f) { + if (this->vel.y < 0.0f) { gPlayer[0].knockback.y *= -1.0f; } - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } } if (gGroundType == 4) { - if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + gPathProgress) != 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (Ground_801B6AEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress) != 0) { + Object_Kill(&this->obj, this->sfxSource); } - } else if (effect->obj.pos.y < gGroundHeight) { - Object_Kill(&effect->obj, effect->sfxSource); + } else if (this->obj.pos.y < gGroundHeight) { + Object_Kill(&this->obj, this->sfxSource); if (gGroundSurface != SURFACE_WATER) { - effect->obj.pos.y = gGroundHeight; - func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); + this->obj.pos.y = gGroundHeight; + func_effect_8007D074(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); } } - sp3C.x = effect->vel.x; - sp3C.y = effect->vel.y; - sp3C.z = effect->vel.z; + sp3C.x = this->vel.x; + sp3C.y = this->vel.y; + sp3C.z = this->vel.z; - if (Object_CheckCollision(1000, &effect->obj.pos, &sp3C, 2) != 0) { - func_effect_8007D10C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); - Object_Kill(&effect->obj, effect->sfxSource); + if (Object_CheckCollision(1000, &this->obj.pos, &sp3C, 2) != 0) { + func_effect_8007D10C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); + Object_Kill(&this->obj, this->sfxSource); } } break; } - func_effect_8007A774(gPlayer, effect, 50.0f); + func_effect_8007A774(gPlayer, this, 50.0f); } -void func_effect_8008092C(Effect* effect) { - switch (effect->unk_44) { +void Effect_Effect398_Draw(Effect398* this) { + switch (this->unk_44) { case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_49); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -3070,118 +3075,118 @@ void func_effect_8008092C(Effect* effect) { } } -void func_effect_80080ACC(Effect* effect) { +void Effect_Effect394_Update(Effect394* this) { s16 temp_ft2; - switch (effect->unk_78) { + switch (this->unk_78) { case 0: break; case 1: - effect->unk_46--; + this->unk_46--; break; case 10: - effect->unk_44--; - if (effect->unk_44 <= 0) { - effect->unk_44 = effect->unk_46; + this->unk_44--; + if (this->unk_44 <= 0) { + this->unk_44 = this->unk_46; } - temp_ft2 = (((f32) effect->unk_44 / (f32) effect->unk_46) * 255.0f); - effect->unk_48 = temp_ft2; + temp_ft2 = (((f32) this->unk_44 / (f32) this->unk_46) * 255.0f); + this->unk_48 = temp_ft2; if (temp_ft2 > 255) { - effect->unk_48 = 255; + this->unk_48 = 255; } - if (effect->unk_48 < 32) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->unk_48 < 32) { + Object_Kill(&this->obj, this->sfxSource); } break; case 11: - effect->obj.rot.z += effect->unk_60.z; - effect->scale2 += 0.07f; - effect->vel.y += 0.2f; - effect->unk_44 += effect->unk_46; - if (effect->unk_44 < 10) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.z += this->unk_60.z; + this->scale2 += 0.07f; + this->vel.y += 0.2f; + this->unk_44 += this->unk_46; + if (this->unk_44 < 10) { + Object_Kill(&this->obj, this->sfxSource); } break; case 12: - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - effect->obj.rot.z += effect->unk_60.z; - if ((effect->unk_44 == 0) && (effect->obj.pos.y < gGroundHeight)) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + this->obj.rot.z += this->unk_60.z; + if ((this->unk_44 == 0) && (this->obj.pos.y < gGroundHeight)) { + Object_Kill(&this->obj, this->sfxSource); } - if (effect->unk_44 != 0) { - effect->unk_44--; + if (this->unk_44 != 0) { + this->unk_44--; } - effect->vel.y -= 4.0f; + this->vel.y -= 4.0f; break; case 16: break; case 100: - func_effect_8007E45C(effect); + Effect_Effect365_Update(this); break; case 101: - func_effect_8007BCE8(effect); + Effect_Effect362_Update(this); break; case 102: - func_effect_8007B758(effect); + Effect_Effect347_Update(this); break; } } -void func_effect_80080D04(Effect* effect) { +void Effect_Effect394_Draw(Effect394* this) { static s32 D_800D18E4 = 0; s32 i; s32 alpha; - switch (effect->unk_7A) { + switch (this->unk_7A) { case 0: - if (effect->unk_44 != 64) { - RCP_SetupDL(&gMasterDisp, effect->unk_44); + if (this->unk_44 != 64) { + RCP_SetupDL(&gMasterDisp, this->unk_44); } - gSPDisplayList(gMasterDisp++, effect->unk_74); - if (effect->unk_44 != 64) { + gSPDisplayList(gMasterDisp++, this->unk_74); + if (this->unk_44 != 64) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } break; case 1: - if (effect->unk_48 == 0) { - effect->unk_48 = effect->unk_46; + if (this->unk_48 == 0) { + this->unk_48 = this->unk_46; } - if (effect->unk_44 != 64) { - RCP_SetupDL(&gMasterDisp, effect->unk_44); + if (this->unk_44 != 64) { + RCP_SetupDL(&gMasterDisp, this->unk_44); } - alpha = (((f32) effect->unk_46 / (f32) effect->unk_48) * 255.0f); + alpha = (((f32) this->unk_46 / (f32) this->unk_48) * 255.0f); if (alpha > 255) { alpha = 255; } if (alpha < 32) { - Object_Kill(&effect->obj, effect->sfxSource); + Object_Kill(&this->obj, this->sfxSource); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); - gSPDisplayList(gMasterDisp++, effect->unk_74); + gSPDisplayList(gMasterDisp++, this->unk_74); } - if (effect->unk_44 != 64) { + if (this->unk_44 != 64) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); } break; case 10: RCP_SetupDL(&gMasterDisp, SETUPDL_65); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_48); - Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, effect->scale2, MTXF_APPLY); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_48); + Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TI_A000000); RCP_SetupDL(&gMasterDisp, SETUPDL_64); @@ -3189,49 +3194,49 @@ void func_effect_80080D04(Effect* effect) { case 11: RCP_SetupDL(&gMasterDisp, SETUPDL_68); - Graphics_SetScaleMtx(effect->scale2); - gDPSetPrimColor(gMasterDisp++, 0, 0, 120, 60, 0, effect->unk_44); + Graphics_SetScaleMtx(this->scale2); + gDPSetPrimColor(gMasterDisp++, 0, 0, 120, 60, 0, this->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_1023750); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 12: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_23); gSPDisplayList(gMasterDisp++, D_VE1_9013C20); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 13: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 0); gSPDisplayList(gMasterDisp++, D_1023750); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 14: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 0); gSPDisplayList(gMasterDisp++, D_1023750); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 15: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 0); gSPDisplayList(gMasterDisp++, D_1023750); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; case 16: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); Matrix_Translate(gGfxMatrix, 34.14f, 0.0f, 0.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); @@ -3250,7 +3255,7 @@ void func_effect_80080D04(Effect* effect) { gSPDisplayList(gMasterDisp++, D_102F5E0); Matrix_Pop(&gGfxMatrix); } - effect->obj.rot.z += 1.0f; + this->obj.rot.z += 1.0f; break; case 17: @@ -3262,13 +3267,13 @@ void func_effect_80080D04(Effect* effect) { D_800D18E4++; } - if (((effect->index + gGameFrameCount) % 2) == 0) { + if (((this->index + gGameFrameCount) % 2) == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 96, 96, 255, 255); } - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); for (i = 0; i < 10; i++) { Matrix_Push(&gGfxMatrix); @@ -3286,7 +3291,7 @@ void func_effect_80080D04(Effect* effect) { RCP_SetupDL(&gMasterDisp, SETUPDL_48); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 190, 255); gDPSetEnvColor(gMasterDisp++, 239, 15, 0, 255); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_1024AC0); break; } @@ -3305,90 +3310,90 @@ void func_effect_800815DC(void) { } } -void func_effect_8008165C(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg5) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_395; +void func_effect_8008165C(Effect395* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg5) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_395; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = scale2; - effect->state = arg5; - Object_SetInfo(&effect->info, effect->obj.id); - effect->timer_50 = 300; + this->scale2 = scale2; + this->state = arg5; + Object_SetInfo(&this->info, this->obj.id); + this->timer_50 = 300; - switch (effect->state) { + switch (this->state) { case 4: - effect->unk_4A = 255; - effect->unk_46 = 1; + this->unk_4A = 255; + this->unk_46 = 1; break; case 5: - effect->vel.x = RAND_FLOAT_CENTERED(20.0f); - effect->vel.y = RAND_FLOAT(20.0f) + 30.0f; - effect->vel.z = RAND_FLOAT(30.0f); - - effect->unk_46 = 5; - effect->unk_44 = RAND_FLOAT_CENTERED(20.0f) * 1.5f; - effect->info.unk_14 = 0; - effect->unk_4A = 255; + this->vel.x = RAND_FLOAT_CENTERED(20.0f); + this->vel.y = RAND_FLOAT(20.0f) + 30.0f; + this->vel.z = RAND_FLOAT(30.0f); + + this->unk_46 = 5; + this->unk_44 = RAND_FLOAT_CENTERED(20.0f) * 1.5f; + this->info.unk_14 = 0; + this->unk_4A = 255; break; case 6: - effect->unk_4A = 255; - effect->unk_46 = 10; + this->unk_4A = 255; + this->unk_46 = 10; break; case 7: - effect->vel.y = RAND_FLOAT(7.0f) + 7.0f; - effect->vel.x = RAND_FLOAT_CENTERED(10.0f); - effect->vel.z = RAND_FLOAT_CENTERED(10.0f); + this->vel.y = RAND_FLOAT(7.0f) + 7.0f; + this->vel.x = RAND_FLOAT_CENTERED(10.0f); + this->vel.z = RAND_FLOAT_CENTERED(10.0f); - effect->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; - effect->timer_50 = RAND_INT(50.0f) + 70; - effect->obj.rot.x = RAND_FLOAT(360.0f); + this->scale2 = (RAND_FLOAT(0.8f) + 0.3f) * scale2; + this->timer_50 = RAND_INT(50.0f) + 70; + this->obj.rot.x = RAND_FLOAT(360.0f); - effect->unk_60.x = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.y = RAND_FLOAT_CENTERED(30.0f); - effect->unk_60.z = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.x = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.y = RAND_FLOAT_CENTERED(30.0f); + this->unk_60.z = RAND_FLOAT_CENTERED(30.0f); - effect->info.unk_14 = 0; + this->info.unk_14 = 0; break; case 9: - effect->obj.pos.x += RAND_FLOAT_CENTERED(600.0f); - effect->obj.pos.y += RAND_FLOAT_CENTERED(600.0f); - effect->obj.pos.z += RAND_FLOAT_CENTERED(300.0f) + 300.0f; - effect->scale1 = 0.0f; - effect->scale2 = RAND_FLOAT(1.0f) + 1.0f; + this->obj.pos.x += RAND_FLOAT_CENTERED(600.0f); + this->obj.pos.y += RAND_FLOAT_CENTERED(600.0f); + this->obj.pos.z += RAND_FLOAT_CENTERED(300.0f) + 300.0f; + this->scale1 = 0.0f; + this->scale2 = RAND_FLOAT(1.0f) + 1.0f; break; case 10: - effect->timer_50 = 10; - AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_BEAM, effect->sfxSource, 4); + this->timer_50 = 10; + AUDIO_PLAY_SFX(NA_SE_EN_A6BOSS_BEAM, this->sfxSource, 4); break; case 11: - effect->scale1 = 255.0f; - effect->vel.y = 20.0f; - if (effect->scale2 > 10.0f) { - effect->scale2 = 10.0f; + this->scale1 = 255.0f; + this->vel.y = 20.0f; + if (this->scale2 > 10.0f) { + this->scale2 = 10.0f; } break; case 12: - effect->scale1 = scale2; - effect->scale2 = 1.0f; - effect->timer_50 = 50; - effect->unk_44 = 100; + this->scale1 = scale2; + this->scale2 = 1.0f; + this->timer_50 = 50; + this->unk_44 = 100; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, effect->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_STAR_EXPLOSION, this->sfxSource, 4); gControllerRumbleTimers[0] = 60; break; } @@ -3452,7 +3457,7 @@ void func_effect_80081BEC(f32 xPos, f32 yPos, f32 zPos, f32 scale2, s32 arg4) { static f32 D_800D18E8 = 0.0f; static f32 D_800D18EC = 0.0f; -void func_effect_80081C5C(Effect* effect) { +void Effect_Effect395_Update(Effect395* this) { f32 sp84; f32 posXDiff; f32 posYDiff; @@ -3464,183 +3469,182 @@ void func_effect_80081C5C(Effect* effect) { Vec3f velocity; Vec3f velocityDest; - velocity.x = effect->vel.x; - velocity.y = effect->vel.y; - velocity.z = effect->vel.z; + velocity.x = this->vel.x; + velocity.y = this->vel.y; + velocity.z = this->vel.z; //! FAKE: Probably some debug stuff printing different messages depending on what unk_4E is. - if (effect->state != 0 && effect->state != 6 && effect->state != 7 && effect->state != 11) { + if ((this->state != 0) && (this->state != 6) && (this->state != 7) && (this->state != 11)) { if (gCurrentLevel) {} PRINTF("ZO_MOVE HELP %d\n"); } - if (effect->state != 1 && effect->state != 2 && effect->state != 4 && effect->state != 5 && effect->state != 8 && - effect->state != 9) { + if ((this->state != 1) && (this->state != 2) && (this->state != 4) && (this->state != 5) && (this->state != 8) && + (this->state != 9)) { if (gCurrentLevel) {} PRINTF("AC_MOVE HELP %d\n"); } - switch (effect->state) { + switch (this->state) { case 0: - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); break; } - if (((gGameFrameCount % 2) == 0)) { - func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.x, - RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.y, - RAND_FLOAT_CENTERED(50.0f) + effect->obj.pos.z, effect->vel.x, effect->vel.y, - effect->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0); + if ((gGameFrameCount % 2) == 0) { + func_effect_8007C484(RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.x, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.y, + RAND_FLOAT_CENTERED(50.0f) + this->obj.pos.z, this->vel.x, this->vel.y, + this->vel.z, RAND_FLOAT(0.05f) + 0.05f, 0); } - if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { - func_effect_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7); - Object_Kill(&effect->obj, effect->sfxSource); + if (Object_CheckCollision(this->index, &this->obj.pos, &velocity, 1) != 0) { + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 7); + Object_Kill(&this->obj, this->sfxSource); } sp84 = 50.0f; break; case 1: - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); break; } - effect->unk_60.z += 10.0f; - effect->vel.z = 5.0f; + this->unk_60.z += 10.0f; + this->vel.z = 5.0f; - if (((gGameFrameCount % 8) == 0)) { - effect->unk_44++; - effect->unk_44 &= 1; + if ((gGameFrameCount % 8) == 0) { + this->unk_44++; + this->unk_44 &= 1; } - if (effect->unk_44 == 0) { - Math_SmoothStepToF(&effect->scale2, 0.2f, 0.01f, 0.02f, 0.0f); + if (this->unk_44 == 0) { + Math_SmoothStepToF(&this->scale2, 0.2f, 0.01f, 0.02f, 0.0f); } else { - Math_SmoothStepToF(&effect->scale2, 0.5f, 0.01f, 0.02f, 0.0f); + Math_SmoothStepToF(&this->scale2, 0.5f, 0.01f, 0.02f, 0.0f); } - if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { - Object_Kill(&effect->obj, effect->sfxSource); - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f); + if (Object_CheckCollision(this->index, &this->obj.pos, &velocity, 1) != 0) { + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f); } break; case 2: - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); break; } - switch (effect->unk_44) { + switch (this->unk_44) { case 1: case 2: break; case 0: - Math_SmoothStepToF(&effect->scale2, 1.0f, 0.1f, 5.0f, 0.0001f); - if (effect->scale2 >= 1.0f) { - effect->unk_44++; + Math_SmoothStepToF(&this->scale2, 1.0f, 0.1f, 5.0f, 0.0001f); + if (this->scale2 >= 1.0f) { + this->unk_44++; } break; case 3: - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.1f, 10.0f, 0.0001f); - if (effect->scale2 < 0.3f) { - Object_Kill(&effect->obj, effect->sfxSource); + Math_SmoothStepToF(&this->scale2, 0.0f, 0.1f, 10.0f, 0.0001f); + if (this->scale2 < 0.3f) { + Object_Kill(&this->obj, this->sfxSource); } break; } - if (((gGameFrameCount % 4) == 0)) { - func_effect_8007C120((RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.x, - (RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.y, - (RAND_FLOAT_CENTERED(effect->scale2) * 50.0f) + effect->obj.pos.z, effect->vel.x, - effect->vel.y, effect->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10); + if ((gGameFrameCount % 4) == 0) { + func_effect_8007C120((RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.x, + (RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.y, + (RAND_FLOAT_CENTERED(this->scale2) * 50.0f) + this->obj.pos.z, this->vel.x, + this->vel.y, this->vel.z, RAND_FLOAT(0.03f) + 0.05f, 10); } - if (Object_CheckCollision(effect->index, &effect->obj.pos, &velocity, 1) != 0) { - func_effect_8007B344(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 3.0f, 7); - Object_Kill(&effect->obj, effect->sfxSource); + if (Object_CheckCollision(this->index, &this->obj.pos, &velocity, 1) != 0) { + func_effect_8007B344(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f, 7); + Object_Kill(&this->obj, this->sfxSource); } sp84 = 50.0f; break; case 3: - effect->info.unk_19 = 2; - if (effect->unk_44 != 0) { - Object_Kill(&effect->obj, effect->sfxSource); - func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 5.0f); - } else if (fabsf(gPlayer[0].trueZpos - effect->obj.pos.z) < 1000.0f) { - ActorEvent_SpawnEffect347(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 15.0f); - Object_Kill(&effect->obj, effect->sfxSource); + this->info.unk_19 = 2; + if (this->unk_44 != 0) { + Object_Kill(&this->obj, this->sfxSource); + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + } else if (fabsf(gPlayer[0].trueZpos - this->obj.pos.z) < 1000.0f) { + ActorEvent_SpawnEffect347(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 15.0f); + Object_Kill(&this->obj, this->sfxSource); } sp84 = 50.0f; break; case 4: - effect->scale2 += 0.07f; - effect->unk_4A -= effect->unk_46; - effect->obj.rot.z += 3.0f; - effect->vel.y += 0.2f; - if (effect->unk_4A < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->scale2 += 0.07f; + this->unk_4A -= this->unk_46; + this->obj.rot.z += 3.0f; + this->vel.y += 0.2f; + if (this->unk_4A < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; case 5: - func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 5.0f, 6); - effect->unk_4A -= effect->unk_46; - effect->obj.rot.x += effect->unk_44; - effect->obj.rot.y += effect->unk_44; - effect->obj.rot.z += effect->unk_44; - effect->vel.y -= 2.0f; - if ((effect->unk_4A < 0) || (effect->timer_50 == 0)) { - Object_Kill(&effect->obj, effect->sfxSource); + func_effect_80081A8C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f, 6); + this->unk_4A -= this->unk_46; + this->obj.rot.x += this->unk_44; + this->obj.rot.y += this->unk_44; + this->obj.rot.z += this->unk_44; + this->vel.y -= 2.0f; + if ((this->unk_4A < 0) || (this->timer_50 == 0)) { + Object_Kill(&this->obj, this->sfxSource); } break; case 6: - effect->unk_4A -= effect->unk_46; - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.1f, 1.0f, 0.00001f); - if ((effect->unk_4A < 0) || (effect->timer_50 == 0)) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_4A -= this->unk_46; + Math_SmoothStepToF(&this->scale2, 0.0f, 0.1f, 1.0f, 0.00001f); + if ((this->unk_4A < 0) || (this->timer_50 == 0)) { + Object_Kill(&this->obj, this->sfxSource); } break; case 7: switch (gCurrentLevel) { case LEVEL_AQUAS: - if (((gGameFrameCount % 4) == 0)) { - func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2, - 6); + if ((gGameFrameCount % 4) == 0) { + func_effect_80081A8C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale2, 6); } - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - effect->obj.rot.z += effect->unk_60.z; - effect->vel.y -= 0.5f; - if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundHeight)) { - Object_Kill(&effect->obj, effect->sfxSource); + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + this->obj.rot.z += this->unk_60.z; + this->vel.y -= 0.5f; + if ((this->timer_50 == 0) || (this->obj.pos.y < gGroundHeight)) { + Object_Kill(&this->obj, this->sfxSource); } break; case LEVEL_ZONESS: - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { // clang-format off - func_effect_80081A8C(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, effect->scale2 * 3.0f, 6); + func_effect_80081A8C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->scale2 * 3.0f, 6); // clang-format on } - effect->obj.rot.x += effect->unk_60.x; - effect->obj.rot.y += effect->unk_60.y; - effect->obj.rot.z += effect->unk_60.z; + this->obj.rot.x += this->unk_60.x; + this->obj.rot.y += this->unk_60.y; + this->obj.rot.z += this->unk_60.z; - effect->vel.y -= 1.0f; + this->vel.y -= 1.0f; - if ((Play_CheckDynaFloorCollision(&posYOut, &unusedOut, effect->obj.pos.x, effect->obj.pos.y, - effect->obj.pos.z)) || - (effect->timer_50 == 0)) { - func_effect_8007B228(effect->obj.pos.x, posYOut, effect->obj.pos.z, effect->scale2); - Object_Kill(&effect->obj, effect->sfxSource); + if ((Play_CheckDynaFloorCollision(&posYOut, &unusedOut, this->obj.pos.x, this->obj.pos.y, + this->obj.pos.z)) || + (this->timer_50 == 0)) { + func_effect_8007B228(this->obj.pos.x, posYOut, this->obj.pos.z, this->scale2); + Object_Kill(&this->obj, this->sfxSource); } break; } @@ -3655,65 +3659,65 @@ void func_effect_80081C5C(Effect* effect) { velocity.x = 0; velocity.z = 250.0f; - if (effect->unk_44 > 0) { + if (this->unk_44 > 0) { velocity.z = 2000.0f; } Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - effect->obj.pos.x = gBosses[0].obj.pos.x + velocityDest.x; - effect->obj.pos.y = gBosses[0].obj.pos.y + velocityDest.y; - effect->obj.pos.z = gBosses[0].obj.pos.z + velocityDest.z; + this->obj.pos.x = gBosses[0].obj.pos.x + velocityDest.x; + this->obj.pos.y = gBosses[0].obj.pos.y + velocityDest.y; + this->obj.pos.z = gBosses[0].obj.pos.z + velocityDest.z; - switch (effect->unk_44) { + switch (this->unk_44) { case 0: - func_effect_80081BEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f, 9); - Math_SmoothStepToF(&effect->scale2, 6.0f, 0.01f, 0.05f, 0.00001f); - if (effect->scale2 >= 5.0f) { + func_effect_80081BEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f, 9); + Math_SmoothStepToF(&this->scale2, 6.0f, 0.01f, 0.05f, 0.00001f); + if (this->scale2 >= 5.0f) { gEffects[ARRAY_COUNT(gEffects) - 1].obj.status = gEffects[ARRAY_COUNT(gEffects) - 2].obj.status = OBJ_FREE; - func_effect_80081BEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 1.0f, 10); + func_effect_80081BEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.0f, 10); gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 25; - effect->timer_50 = 10; + this->timer_50 = 10; D_800D18EC = 0.0f; D_800D18E8 = 0.0f; gBosses[0].timer_050 = 150; gBosses[0].state = 6; - effect->unk_44++; + this->unk_44++; } break; case 1: - Math_SmoothStepToF(&effect->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); - if (effect->timer_50 == 0) { + Math_SmoothStepToF(&this->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); + if (this->timer_50 == 0) { if (gFillScreenAlpha != 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; } - effect->timer_50 = gBosses[0].timer_050; - effect->unk_44++; + this->timer_50 = gBosses[0].timer_050; + this->unk_44++; } break; case 2: - if (effect->timer_50 == 0) { - Math_SmoothStepToF(&effect->scale2, 0.0f, 1.0f, 10.0f, 0.00001f); - if (effect->scale2 == 0.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Math_SmoothStepToF(&this->scale2, 0.0f, 1.0f, 10.0f, 0.00001f); + if (this->scale2 == 0.0f) { + Object_Kill(&this->obj, this->sfxSource); } } else { - Math_SmoothStepToF(&effect->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->scale2, 8.0f, 0.1f, 1.0f, 0.00001f); } break; } break; case 9: - posXDiff = gBosses[0].obj.pos.x - effect->obj.pos.x; - posYDiff = gBosses[0].obj.pos.y - effect->obj.pos.y; - posZDiff = gBosses[0].obj.pos.z - effect->obj.pos.z; + posXDiff = gBosses[0].obj.pos.x - this->obj.pos.x; + posYDiff = gBosses[0].obj.pos.y - this->obj.pos.y; + posZDiff = gBosses[0].obj.pos.z - this->obj.pos.z; yRotDeg = Math_RadToDeg(Math_Atan2F(posXDiff, posZDiff)); xRotDeg = Math_RadToDeg(-Math_Atan2F(posYDiff, sqrtf(SQ(posXDiff) + SQ(posZDiff)))); @@ -3726,38 +3730,38 @@ void func_effect_80081C5C(Effect* effect) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - effect->vel.x = velocityDest.x; - effect->vel.y = velocityDest.y; - effect->vel.z = -50.0f; + this->vel.x = velocityDest.x; + this->vel.y = velocityDest.y; + this->vel.z = -50.0f; - effect->unk_44++; - Math_SmoothStepToF(&effect->scale1, 255.0f, 1.0f, 20.0f, 0.0f); - Math_SmoothStepToF(&effect->vel.z, -70.0f, 0.01f, 0.1f, 0.0f); - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.1f, 0.5f, 0.00001f); - if (effect->scale2 == 0.0f) { - Object_Kill(&effect->obj, effect->sfxSource); + this->unk_44++; + Math_SmoothStepToF(&this->scale1, 255.0f, 1.0f, 20.0f, 0.0f); + Math_SmoothStepToF(&this->vel.z, -70.0f, 0.01f, 0.1f, 0.0f); + Math_SmoothStepToF(&this->scale2, 0.0f, 0.1f, 0.5f, 0.00001f); + if (this->scale2 == 0.0f) { + Object_Kill(&this->obj, this->sfxSource); } break; case 10: - switch (effect->unk_44) { + switch (this->unk_44) { case 0: D_ctx_801779A8[0] = 50.0f; - if (effect->unk_46 == 10) { + if (this->unk_46 == 10) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaTarget = 0; gFillScreenAlphaStep = 25; gCameraShake = 50; } - if (effect->unk_46 == 0) { + if (this->unk_46 == 0) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 0; - effect->unk_46 = 50; + this->unk_46 = 50; } - if (effect->unk_46 != 0) { - effect->unk_46--; + if (this->unk_46 != 0) { + this->unk_46--; } - if ((((gGameFrameCount % 16) == 0)) && (effect->timer_50 == 0)) { + if (((gGameFrameCount % 16) == 0) && (this->timer_50 == 0)) { D_800D18EC = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x, gPlayer[0].cam.eye.z - (gBosses[0].obj.pos.z + gPathProgress))); @@ -3768,8 +3772,8 @@ void func_effect_80081C5C(Effect* effect) { SQ(gPlayer[0].cam.eye.x - gBosses[0].obj.pos.x)))); } if (gBosses[0].timer_050 == 0) { - gBosses[0].swork[39] = effect->index; - effect->unk_44 = 1; + gBosses[0].swork[39] = this->index; + this->unk_44 = 1; } break; @@ -3778,14 +3782,14 @@ void func_effect_80081C5C(Effect* effect) { break; } - effect->info.unk_14 = 0; + this->info.unk_14 = 0; Math_SmoothStepToAngle(&gBosses[0].obj.rot.x, D_800D18E8, 0.1f, 1.0f, 0.00001f); Math_SmoothStepToAngle(&gBosses[0].obj.rot.y, D_800D18EC, 0.1f, 1.0f, 0.00001f); - effect->obj.rot.x = gBosses[0].obj.rot.x; - effect->obj.rot.y = gBosses[0].obj.rot.y; - effect->obj.rot.z += 30.0f; + this->obj.rot.x = gBosses[0].obj.rot.x; + this->obj.rot.y = gBosses[0].obj.rot.y; + this->obj.rot.z += 30.0f; Matrix_RotateY(gCalcMatrix, gBosses[0].obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, gBosses[0].obj.rot.x * M_DTOR, MTXF_APPLY); @@ -3795,68 +3799,68 @@ void func_effect_80081C5C(Effect* effect) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - effect->obj.pos.x = gBosses[0].obj.pos.x + velocityDest.x; - effect->obj.pos.y = gBosses[0].obj.pos.y + velocityDest.y; - effect->obj.pos.z = gBosses[0].obj.pos.z + velocityDest.z; + this->obj.pos.x = gBosses[0].obj.pos.x + velocityDest.x; + this->obj.pos.y = gBosses[0].obj.pos.y + velocityDest.y; + this->obj.pos.z = gBosses[0].obj.pos.z + velocityDest.z; - if (effect->unk_44 == 0) { - Math_SmoothStepToF(&effect->unk_60.x, 5.0f, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&effect->unk_60.y, 5.0f, 0.1f, 1.0f, 0.00001f); - Math_SmoothStepToF(&effect->unk_60.z, 50.0f, 1.0f, 2.0f, 0.00001f); + if (this->unk_44 == 0) { + Math_SmoothStepToF(&this->unk_60.x, 5.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->unk_60.y, 5.0f, 0.1f, 1.0f, 0.00001f); + Math_SmoothStepToF(&this->unk_60.z, 50.0f, 1.0f, 2.0f, 0.00001f); } velocity.x = velocity.y = 0.0f; - velocity.z = fabsf(gPlayer[0].trueZpos - effect->obj.pos.z); + velocity.z = fabsf(gPlayer[0].trueZpos - this->obj.pos.z); Matrix_MultVec3fNoTranslate(gCalcMatrix, &velocity, &velocityDest); - if ((((effect->timer_50 == 0) && - (fabsf(gPlayer[0].pos.x - (effect->obj.pos.x + velocityDest.x)) <= (effect->unk_60.x * 50.0f))) && - (fabsf(gPlayer[0].pos.y - (effect->obj.pos.y + velocityDest.y)) <= (effect->unk_60.y * 50.0f))) && + if ((((this->timer_50 == 0) && + (fabsf(gPlayer[0].pos.x - (this->obj.pos.x + velocityDest.x)) <= (this->unk_60.x * 50.0f))) && + (fabsf(gPlayer[0].pos.y - (this->obj.pos.y + velocityDest.y)) <= (this->unk_60.y * 50.0f))) && (gPlayer[0].mercyTimer == 0)) { Player_ApplyDamage(gPlayer, 0, 40); } break; case 11: - effect->obj.rot.z += 20.0f; - effect->vel.y -= 2.0f; - if (effect->vel.y < (-20.0f)) { - effect->vel.y = -20.0f; + this->obj.rot.z += 20.0f; + this->vel.y -= 2.0f; + if (this->vel.y < (-20.0f)) { + this->vel.y = -20.0f; } - Math_SmoothStepToF(&effect->scale1, 0.0f, 0.1f, 100.0f, 0.00001f); + Math_SmoothStepToF(&this->scale1, 0.0f, 0.1f, 100.0f, 0.00001f); - if ((effect->scale1 < 1.0f) || (effect->timer_50 == 0)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((this->scale1 < 1.0f) || (this->timer_50 == 0)) { + Object_Kill(&this->obj, this->sfxSource); } break; case 12: - func_effect_8007A28C(effect); + Effect_Effect383_Update(this); break; } - if ((effect->state == 2) && (effect->unk_44 == 2)) { - func_effect_8007FE88(effect); + if ((this->state == 2) && (this->unk_44 == 2)) { + Effect_Effect353_354_Update(this); } - if ((effect->state < 4) && (effect->state != 1)) { - func_effect_8007A774(gPlayer, effect, sp84); + if ((this->state < 4) && (this->state != 1)) { + func_effect_8007A774(gPlayer, this, sp84); } } -void func_effect_80082F78(Effect* effect) { +void Effect_Effect395_Draw(Effect395* this) { //! FAKE: Probably some debug stuff printing different messages depending on what unk_4E is. - if (effect->state != 0 && effect->state != 6) { - if (effect->unk_4A && effect->unk_4A) {} + if ((this->state != 0) && (this->state != 6)) { + if (this->unk_4A && this->unk_4A) {} PRINTF("ZO_DISP HELP %d\n"); } - if (effect->state != 1 && effect->state != 2 && effect->state != 4 && effect->state != 5 && effect->state != 7) { - if (effect->unk_4A && !effect->scale2) {} + if ((this->state != 1) && (this->state != 2) && (this->state != 4) && (this->state != 5) && (this->state != 7)) { + if (this->unk_4A && !this->scale2) {} PRINTF("AC_DISP HELP %d\n"); } - switch (effect->state) { + switch (this->state) { case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_49); Matrix_Scale(gGfxMatrix, 0.7f, 0.7f, 1.0f, MTXF_APPLY); @@ -3869,13 +3873,13 @@ void func_effect_80082F78(Effect* effect) { case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_101C2E0); break; case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); @@ -3888,16 +3892,16 @@ void func_effect_80082F78(Effect* effect) { break; case 4: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_68); - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, this->unk_4A); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 0); gSPDisplayList(gMasterDisp++, D_1023750); break; case 5: case 7: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); RCP_SetupDL(&gMasterDisp, SETUPDL_60); if (gCurrentLevel == LEVEL_AQUAS) { gSPDisplayList(gMasterDisp++, D_AQ_600A220); @@ -3908,18 +3912,18 @@ void func_effect_80082F78(Effect* effect) { break; case 6: - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); if (gCurrentLevel == LEVEL_ZONESS) { - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); } RCP_SetupDL(&gMasterDisp, SETUPDL_64); - gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, effect->unk_4A); + gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 255, 0, this->unk_4A); gSPDisplayList(gMasterDisp++, D_1023750); break; case 8: RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 255); @@ -3928,9 +3932,9 @@ void func_effect_80082F78(Effect* effect) { case 9: RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->scale1); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 128, 255); gSPDisplayList(gMasterDisp++, D_1024AC0); break; @@ -3940,7 +3944,7 @@ void func_effect_80082F78(Effect* effect) { Texture_Scroll(D_A6_6012840, 16, 16, 0); } RCP_SetupDL(&gMasterDisp, SETUPDL_53); - Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->unk_60.y, effect->unk_60.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->unk_60.x, this->unk_60.y, this->unk_60.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_A6_6012550); @@ -3948,39 +3952,39 @@ void func_effect_80082F78(Effect* effect) { case 11: RCP_SetupDL(&gMasterDisp, SETUPDL_67); - gDPSetPrimColor(gMasterDisp++, 0, 0, 111, 111, 111, (s32) effect->scale1); + gDPSetPrimColor(gMasterDisp++, 0, 0, 111, 111, 111, (s32) this->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255); - Graphics_SetScaleMtx(effect->scale2); + Graphics_SetScaleMtx(this->scale2); gSPDisplayList(gMasterDisp++, D_1024AC0); break; case 12: - func_effect_8007A3C0(effect); + Effect_Effect383_Draw(this); break; } RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_800836C0(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 scale) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_391; +void func_effect_800836C0(Effect391* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 scale) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_391; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->unk_60.x = scale * 0.8f; - effect->unk_60.y = 1.2f; + this->unk_60.x = scale * 0.8f; + this->unk_60.y = 1.2f; if (arg4 != 0.0f) { - effect->unk_60.y = arg4; + this->unk_60.y = arg4; } - effect->unk_44 = 230; - effect->scale1 = scale; - effect->scale2 = 0.1f; - Object_SetInfo(&effect->info, effect->obj.id); + this->unk_44 = 230; + this->scale1 = scale; + this->scale2 = 0.1f; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_8008377C(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 scale) { @@ -3994,92 +3998,92 @@ void func_effect_8008377C(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 scale) { } } -void func_effect_800837EC(Effect* effect) { +void Effect_Effect391_Update(Effect391* this) { s32 pad[2]; f32 var_fv1; s32 var_s2; s32 i; - switch (effect->state) { + switch (this->state) { case 0: - if (effect->unk_60.y == 1.2f) { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 0.5f, effect->scale1, 0.01f); + if (this->unk_60.y == 1.2f) { + Math_SmoothStepToF(&this->scale2, this->scale1, 0.5f, this->scale1, 0.01f); } else { - Math_SmoothStepToF(&effect->scale2, effect->scale1, 1.0f, effect->scale1 * 0.1f, 0.01f); + Math_SmoothStepToF(&this->scale2, this->scale1, 1.0f, this->scale1 * 0.1f, 0.01f); } - if (effect->scale2 > (effect->scale1 * 0.7f)) { - Math_SmoothStepToF(&effect->unk_60.x, effect->scale2 * 1.3f, 0.1f, 0.5f, 0.0001f); + if (this->scale2 > (this->scale1 * 0.7f)) { + Math_SmoothStepToF(&this->unk_60.x, this->scale2 * 1.3f, 0.1f, 0.5f, 0.0001f); } - if (effect->scale2 == effect->scale1) { - var_s2 = effect->scale2 * 5.0f; + if (this->scale2 == this->scale1) { + var_s2 = this->scale2 * 5.0f; if (var_s2 < 5) { var_s2 = 5; } if (var_s2 > 10) { var_s2 = 10; } - var_fv1 = effect->unk_60.y * 300.0f; - if (effect->unk_60.y == 1.2f) { - var_fv1 = effect->unk_60.y * 100.0f; + var_fv1 = this->unk_60.y * 300.0f; + if (this->unk_60.y == 1.2f) { + var_fv1 = this->unk_60.y * 100.0f; } for (i = 0; i < var_s2; i++) { - func_effect_80081BEC(effect->obj.pos.x + RAND_FLOAT_CENTERED(effect->scale2 * 200.0f), - effect->obj.pos.y + var_fv1 + RAND_FLOAT_CENTERED(effect->scale2 * 100.0f), - effect->obj.pos.z + RAND_FLOAT_CENTERED(effect->scale2 * 200.0f), + func_effect_80081BEC(this->obj.pos.x + RAND_FLOAT_CENTERED(this->scale2 * 200.0f), + this->obj.pos.y + var_fv1 + RAND_FLOAT_CENTERED(this->scale2 * 100.0f), + this->obj.pos.z + RAND_FLOAT_CENTERED(this->scale2 * 200.0f), 0.3f - RAND_FLOAT_CENTERED(0.2f), 11); } - effect->state++; + this->state++; } break; case 1: - effect->vel.y -= 4.0f; - Math_SmoothStepToF(&effect->scale2, 0.0f, 0.01f, 0.1f, 0.0001f); - Math_SmoothStepToF(&effect->unk_60.x, effect->scale2 * 1.3f, 0.1f, 0.5f, 0.0001f); - effect->unk_44 -= 35; - if (effect->unk_44 < 0) { - Object_Kill(&effect->obj, effect->sfxSource); + this->vel.y -= 4.0f; + Math_SmoothStepToF(&this->scale2, 0.0f, 0.01f, 0.1f, 0.0001f); + Math_SmoothStepToF(&this->unk_60.x, this->scale2 * 1.3f, 0.1f, 0.5f, 0.0001f); + this->unk_44 -= 35; + if (this->unk_44 < 0) { + Object_Kill(&this->obj, this->sfxSource); } break; } - effect->obj.rot.y = RAD_TO_DEG(Math_Atan2F(gPlayer[0].cam.eye.x - effect->obj.pos.x, - gPlayer[0].cam.eye.z - (effect->obj.pos.z + gPathProgress))); + this->obj.rot.y = RAD_TO_DEG( + Math_Atan2F(gPlayer[0].cam.eye.x - this->obj.pos.x, gPlayer[0].cam.eye.z - (this->obj.pos.z + gPathProgress))); } -void func_effect_80083B8C(Effect* effect) { +void Effect_Effect391_Draw(Effect391* this) { RCP_SetupDL_49(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, effect->unk_44); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 36, 45, 28, 255); - Matrix_Scale(gGfxMatrix, effect->unk_60.x, effect->scale2 * effect->unk_60.y, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->unk_60.x, this->scale2 * this->unk_60.y, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_ZO_601BAD0); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } -void func_effect_80083C70(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, +void func_effect_80083C70(Effect399* this, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 arg7, s32 arg8) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_399; - effect->obj.pos.x = xPos; - effect->unk_60.x = xPos; - effect->unk_60.y = yPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - - effect->vel.x = xVel; - effect->vel.y = yVel; - effect->vel.z = zVel; - - effect->unk_60.z = arg7; - effect->scale2 = 1.6f; - effect->scale1 = 0.0f; - effect->timer_50 = 100; - effect->unk_44 = arg8; - Object_SetInfo(&effect->info, effect->obj.id); + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_399; + this->obj.pos.x = xPos; + this->unk_60.x = xPos; + this->unk_60.y = yPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + + this->unk_60.z = arg7; + this->scale2 = 1.6f; + this->scale1 = 0.0f; + this->timer_50 = 100; + this->unk_44 = arg8; + Object_SetInfo(&this->info, this->obj.id); } void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { @@ -4138,46 +4142,46 @@ void func_effect_80083D2C(f32 xPos, f32 yPos, f32 zPos, f32 srcZ) { } } -void func_effect_80083FA8(Effect* effect) { +void Effect_Effect399_Update(Effect399* this) { Vec3f src; Vec3f dest; - if (effect->timer_50 == 0) { - Object_Kill(&effect->obj, effect->sfxSource); + if (this->timer_50 == 0) { + Object_Kill(&this->obj, this->sfxSource); return; } - effect->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); - effect->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); - effect->obj.rot.z += 20.0f; + this->obj.rot.y = RAD_TO_DEG(-gPlayer[0].camYaw); + this->obj.rot.x = RAD_TO_DEG(gPlayer[0].camPitch); + this->obj.rot.z += 20.0f; - Matrix_RotateZ(gCalcMatrix, effect->unk_60.z * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, effect->unk_46 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, this->unk_60.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, this->unk_46 * M_DTOR, MTXF_APPLY); src.x = 0.0f; - src.y = effect->scale1; + src.y = this->scale1; src.z = 0.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - effect->unk_60.x += effect->vel.x; - effect->unk_60.y += effect->vel.y; + this->unk_60.x += this->vel.x; + this->unk_60.y += this->vel.y; - effect->obj.pos.x = effect->unk_60.x + dest.x; - effect->obj.pos.y = effect->unk_60.y + dest.y; + this->obj.pos.x = this->unk_60.x + dest.x; + this->obj.pos.y = this->unk_60.y + dest.y; - effect->unk_48 += 2; - if (effect->unk_48 > 20) { - effect->unk_48 = 20; + this->unk_48 += 2; + if (this->unk_48 > 20) { + this->unk_48 = 20; } - effect->unk_46 += effect->unk_48; + this->unk_46 += this->unk_48; - Math_SmoothStepToF(&effect->scale1, 350.0f, 1.0f, 20.0f, 0.00001f); + Math_SmoothStepToF(&this->scale1, 350.0f, 1.0f, 20.0f, 0.00001f); - if ((effect->scale1 >= 349.0f) && (effect->timer_50 > 50)) { - effect->timer_50 = 50; + if ((this->scale1 >= 349.0f) && (this->timer_50 > 50)) { + this->timer_50 = 50; } - func_effect_8007A774(gPlayer, effect, 100.0f); + func_effect_8007A774(gPlayer, this, 100.0f); } // RGB Values. Used like an array of [8][3], but only matches this way. @@ -4186,21 +4190,21 @@ static s32 D_800D18F0[] = { 32, 32, 255, 0, 255, 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, // Alpha values static s32 D_800D1950[] = { 255, 210, 180, 120, 70, 30, 0, 0 }; -void func_effect_80084194(Effect* effect) { +void Effect_Effect399_Draw(Effect399* this) { s32 tmp; if (gCurrentLevel != LEVEL_AQUAS) { RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - tmp = effect->unk_44 * 4; + tmp = this->unk_44 * 4; gDPSetEnvColor(gMasterDisp++, D_800D18F0[tmp + 0], D_800D18F0[tmp + 1], D_800D18F0[tmp + 2], 255); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_49); - Matrix_Scale(gGfxMatrix, effect->scale2, effect->scale2, effect->scale2, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[effect->unk_44]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[this->unk_44]); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_1024AC0); diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 6dccb46b..8273a1bf 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -24,12 +24,15 @@ s32 gLastPathChange; u8 gMissedZoSearchlight; ObjectInit* gLevelObjectInits[] = { - D_CO_60371A4, D_ME_6026CC4, D_SX_602A164, D_A6_6023F64, D_A6_60287A4, D_SY_602E4F4, D_VE1_6007E74, - D_SO_601F234, D_ZO_6026714, D_ANDROSS_C035154, D_TR_6006AA4, D_MA_6031000, D_TI_6006C60, D_AQ_602E5C8, - D_FO_600EAD4, NULL, D_KA_6011044, D_BO_600FF74, D_SZ_6006EB4, D_VE2_6014D94, D_versus_302DE3C, + aCoOnRailsLevelObjects, D_ME_6026CC4, D_SX_602A164, D_A6_6023F64, + D_A6_60287A4, D_SY_602E4F4, D_VE1_6007E74, D_SO_601F234, + D_ZO_6026714, D_ANDROSS_C035154, D_TR_6006AA4, D_MA_6031000, + D_TI_6006C60, D_AQ_602E5C8, D_FO_600EAD4, NULL, + D_KA_6011044, D_BO_600FF74, D_SZ_6006EB4, D_VE2_6014D94, + D_versus_302DE3C, }; static s32 D_enmy_800CFDF4[] = { - /* 0 */ OBJ_SCENERY_0, + /* 0 */ OBJ_SCENERY_CO_STONE_ARCH, /* 1 */ OBJ_ITEM_SILVER_RING, /* 2 */ OBJ_ITEM_SILVER_RING, /* 3 */ OBJ_ITEM_SILVER_RING, @@ -53,7 +56,7 @@ static s32 D_enmy_800CFDF4[] = { /* 21 */ OBJ_ITEM_SILVER_RING, /* 22 */ OBJ_ITEM_SILVER_RING, /* 23 */ OBJ_ITEM_WING_REPAIR, - /* 24 */ OBJ_SCENERY_0, + /* 24 */ OBJ_SCENERY_CO_STONE_ARCH, /* 25 */ OBJ_ITEM_SILVER_STAR, }; static f32 D_enmy_800CFE5C[] = { @@ -92,41 +95,48 @@ void Object_Kill(Object* obj, f32* sfxSrc) { } bool func_enmy_80060FE4(Vec3f* arg0, f32 arg1) { - Vec3f sp2C; - Vec3f sp20; + Vec3f src; + Vec3f dest; if ((gLevelMode != LEVELMODE_ALL_RANGE) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { return true; } + Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); - sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; - sp2C.y = 0.0f; - sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); - if ((sp20.z < 1000.0f) && (arg1 < sp20.z) && (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 2000.0f))) { + src.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; + src.y = 0.0f; + src.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + if ((dest.z < 1000.0f) && (arg1 < dest.z) && (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 2000.0f))) { return true; } return false; } bool func_enmy_80061148(Vec3f* arg0, f32 arg1) { - Vec3f sp2C; - Vec3f sp20; + Vec3f src; + Vec3f dest; if (gLevelMode != LEVELMODE_ALL_RANGE) { return true; } + if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { return func_enmy_80060FE4(arg0, arg1); } + Matrix_RotateY(gCalcMatrix, gPlayer[gPlayerNum].camYaw, MTXF_NEW); - sp2C.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; - sp2C.y = 0.0f; - sp2C.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp2C, &sp20); - if ((sp20.z < 0.0f) && (arg1 < sp20.z) && (fabsf(sp20.x) < (fabsf(sp20.z * 0.5f) + 500.0f))) { + src.x = arg0->x - gPlayer[gPlayerNum].cam.eye.x; + src.y = 0.0f; + src.z = arg0->z - gPlayer[gPlayerNum].cam.eye.z; + + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + + if ((dest.z < 0.0f) && (arg1 < dest.z) && (fabsf(dest.x) < (fabsf(dest.z * 0.5f) + 500.0f))) { return true; } return false; @@ -140,152 +150,156 @@ void Object_SetInfo(ObjectInfo* info, u32 objId) { } } -void Scenery_Initialize(Scenery* scenery) { +void Scenery_Initialize(Scenery* this) { s32 i; - u8* ptr = (u8*) scenery; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Scenery); i++, ptr++) { *ptr = 0; } } -void Sprite_Initialize(Sprite* sprite) { +void Sprite_Initialize(Sprite* this) { s32 i; - u8* ptr = (u8*) sprite; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Sprite); i++, ptr++) { *ptr = 0; } } -void Actor_Initialize(Actor* actor) { +void Actor_Initialize(Actor* this) { s32 i; - u8* ptr = (u8*) actor; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Actor); i++, ptr++) { *ptr = 0; } - actor->scale = 1.0f; + this->scale = 1.0f; } -void Boss_Initialize(Boss* boss) { +void Boss_Initialize(Boss* this) { s32 i; - u8* ptr = (u8*) boss; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Boss); i++, ptr++) { *ptr = 0; } - boss->scale = 1.0f; + this->scale = 1.0f; } -void Item_Initialize(Item* item) { +void Item_Initialize(Item* this) { s32 i; - u8* ptr = (u8*) item; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Item); i++, ptr++) { *ptr = 0; } } -void Effect_Initialize(Effect* effect) { +void Effect_Initialize(Effect* this) { s32 i; - u8* ptr = (u8*) effect; + u8* ptr = (u8*) this; for (i = 0; i < sizeof(Effect); i++, ptr++) { *ptr = 0; } - effect->scale2 = 1.0f; -} - -void Scenery_Load(Scenery* scenery, ObjectInit* objInit) { - Scenery_Initialize(scenery); - scenery->obj.status = OBJ_INIT; - scenery->obj.pos.z = -objInit->zPos1; - scenery->obj.pos.z += -3000.0f + objInit->zPos2; - scenery->obj.pos.x = objInit->xPos; - scenery->obj.pos.y = objInit->yPos; - scenery->obj.rot.x = objInit->rot.x; - scenery->obj.rot.y = objInit->rot.y; - scenery->obj.rot.z = objInit->rot.z; - scenery->obj.id = objInit->id; - Object_SetInfo(&scenery->info, scenery->obj.id); -} - -void Sprite_Load(Sprite* sprite, ObjectInit* objInit) { - Sprite_Initialize(sprite); - sprite->obj.status = OBJ_INIT; - sprite->obj.pos.z = -objInit->zPos1; - sprite->obj.pos.z += -3000.0f + objInit->zPos2; - sprite->obj.pos.x = objInit->xPos; - sprite->obj.pos.y = objInit->yPos; - sprite->obj.rot.y = objInit->rot.y; - sprite->obj.rot.x = objInit->rot.x; - sprite->obj.rot.z = objInit->rot.z; - sprite->obj.id = objInit->id; - Object_SetInfo(&sprite->info, sprite->obj.id); -} - -void Actor_Load(Actor* actor, ObjectInit* objInit) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.pos.z = -objInit->zPos1; - actor->obj.pos.z += -3000.0f + objInit->zPos2; - actor->obj.pos.x = objInit->xPos; - actor->obj.pos.y = objInit->yPos; - actor->obj.rot.y = objInit->rot.y; - actor->obj.rot.x = objInit->rot.x; - actor->obj.rot.z = objInit->rot.z; - actor->obj.id = objInit->id; - Object_SetInfo(&actor->info, actor->obj.id); -} - -void Boss_Load(Boss* boss, ObjectInit* objInit) { - Boss_Initialize(boss); - boss->obj.status = OBJ_INIT; - boss->obj.pos.z = -objInit->zPos1; - boss->obj.pos.z += -3000.0f + objInit->zPos2; - boss->obj.pos.x = objInit->xPos; - boss->obj.pos.y = objInit->yPos; - boss->obj.rot.y = objInit->rot.y; - boss->obj.rot.x = objInit->rot.x; - boss->obj.rot.z = objInit->rot.z; - boss->obj.id = objInit->id; - Object_SetInfo(&boss->info, boss->obj.id); -} - -void Item_Load(Item* item, ObjectInit* objInit) { - Item_Initialize(item); - item->obj.status = OBJ_INIT; - item->obj.pos.z = -objInit->zPos1; - item->obj.pos.z += -3000.0f + objInit->zPos2; - item->obj.pos.x = objInit->xPos; - item->obj.pos.y = objInit->yPos; - item->obj.rot.y = objInit->rot.y; - item->obj.rot.x = objInit->rot.x; - item->obj.rot.z = objInit->rot.z; - item->obj.id = objInit->id; - item->width = 1.0f; - Object_SetInfo(&item->info, item->obj.id); -} - -void func_enmy_80061958(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_346; - effect->timer_50 = 50; - effect->scale2 = 0.2f; + this->scale2 = 1.0f; +} + +void Scenery_Load(Scenery* this, ObjectInit* objInit) { + Scenery_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + Object_SetInfo(&this->info, this->obj.id); +} + +void Sprite_Load(Sprite* this, ObjectInit* objInit) { + Sprite_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + Object_SetInfo(&this->info, this->obj.id); +} + +void Actor_Load(Actor* this, ObjectInit* objInit) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + Object_SetInfo(&this->info, this->obj.id); +} + +void Boss_Load(Boss* this, ObjectInit* objInit) { + Boss_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + Object_SetInfo(&this->info, this->obj.id); +} + +void Item_Load(Item* this, ObjectInit* objInit) { + Item_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = objInit->rot.y; + this->obj.rot.x = objInit->rot.x; + this->obj.rot.z = objInit->rot.z; + this->obj.id = objInit->id; + this->width = 1.0f; + Object_SetInfo(&this->info, this->obj.id); +} + +void func_enmy_80061958(Effect346* this, f32 xPos, f32 yPos, f32 zPos) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_346; + this->timer_50 = 50; + this->scale2 = 0.2f; + if (gCurrentLevel == LEVEL_AQUAS) { - effect->timer_50 = 200; - effect->scale2 = 0.3f; - effect->scale1 = RAND_FLOAT(255.0f); - } - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->timer_50 = 200; + this->scale2 = 0.3f; + this->scale1 = RAND_FLOAT(255.0f); + } + + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.z = RAND_FLOAT(360.0f); + + Object_SetInfo(&this->info, this->obj.id); + if (gLevelType == LEVELTYPE_PLANET) { - effect->info.cullDistance = 100.0f; + this->info.cullDistance = 100.0f; } } @@ -353,57 +367,57 @@ void func_enmy_80061CD0(void) { } } -void func_enmy_80061E48(Actor* actor, f32 xPos, f32 yPos, f32 zPos) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_181; +void func_enmy_80061E48(Actor* this, f32 xPos, f32 yPos, f32 zPos) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_181; if (Rand_ZeroOne() < 0.5f) { - actor->obj.id = OBJ_ACTOR_186; + this->obj.id = OBJ_ACTOR_186; } if (Rand_ZeroOne() < 0.5f) { - actor->obj.id = OBJ_ACTOR_182; - } - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->vel.z = 10.0f; - Object_SetInfo(&actor->info, actor->obj.id); -} - -void ActorEvent_Load(Actor* actor, ObjectInit* objInit, s32 index) { - Vec3f sp24; - - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->index = index; - actor->obj.pos.z = -objInit->zPos1; - actor->obj.pos.z += -3000.0f + objInit->zPos2; - actor->obj.pos.x = objInit->xPos; - actor->obj.pos.y = objInit->yPos; - actor->obj.rot.y = actor->rot_0F4.y = objInit->rot.y; - actor->obj.rot.x = actor->rot_0F4.x = objInit->rot.x; - actor->rot_0F4.z = objInit->rot.z; - actor->obj.id = OBJ_ACTOR_EVENT; - actor->timer_0C2 = 10; - actor->eventType = EVID_FFF; - actor->aiType = objInit->id - ACTOR_EVENT_ID; - - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.cullDistance = 3000.0f; - actor->fwork[25] = 20000.0f; - actor->iwork[1] = gPrevEventActorIndex; - actor->iwork[10] = gActors[gPrevEventActorIndex].aiType; - actor->fwork[22] = gArwingSpeed; + this->obj.id = OBJ_ACTOR_182; + } + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->vel.z = 10.0f; + Object_SetInfo(&this->info, this->obj.id); +} + +void ActorEvent_Load(ActorEvent* this, ObjectInit* objInit, s32 index) { + Vec3f src; + + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->index = index; + this->obj.pos.z = -objInit->zPos1; + this->obj.pos.z += -3000.0f + objInit->zPos2; + this->obj.pos.x = objInit->xPos; + this->obj.pos.y = objInit->yPos; + this->obj.rot.y = this->rot_0F4.y = objInit->rot.y; + this->obj.rot.x = this->rot_0F4.x = objInit->rot.x; + this->rot_0F4.z = objInit->rot.z; + this->obj.id = OBJ_ACTOR_EVENT; + this->timer_0C2 = 10; + this->eventType = EVID_FFF; + this->aiType = objInit->id - ACTOR_EVENT_ID; + + Object_SetInfo(&this->info, this->obj.id); + this->info.cullDistance = 3000.0f; + this->fwork[25] = 20000.0f; + this->iwork[1] = gPrevEventActorIndex; + this->iwork[10] = gActors[gPrevEventActorIndex].aiType; + this->fwork[22] = gArwingSpeed; Matrix_RotateZ(gCalcMatrix, -gFormationInitRot.z * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -gFormationInitRot.x * M_DTOR, MTXF_APPLY); Matrix_RotateY(gCalcMatrix, -gFormationInitRot.y * M_DTOR, MTXF_APPLY); - sp24.x = actor->obj.pos.x - gFormationInitPos.x; - sp24.y = actor->obj.pos.y - gFormationInitPos.y; - sp24.z = actor->obj.pos.z - gFormationInitPos.z; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp24, &actor->vwork[28]); - actor->iwork[9] = gFormationLeaderIndex; + src.x = this->obj.pos.x - gFormationInitPos.x; + src.y = this->obj.pos.y - gFormationInitPos.y; + src.z = this->obj.pos.z - gFormationInitPos.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &this->vwork[28]); + this->iwork[9] = gFormationLeaderIndex; gPrevEventActorIndex = index; - Actor_Update(actor); + Actor_Update(this); } void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { @@ -505,14 +519,15 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { void func_enmy_80062568(void) { ObjectInit* objInit; - s32 var_s0; + s32 i; s32 temp = gCurrentLevel; // seems fake + if (1) {} gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[temp]); - var_s0 = gSavedObjectLoadIndex - 40; - objInit = &gLevelObjects[var_s0]; + i = gSavedObjectLoadIndex - 40; + objInit = &gLevelObjects[i]; - for (; var_s0 < gSavedObjectLoadIndex; var_s0++, objInit++) { + for (; i < gSavedObjectLoadIndex; i++, objInit++) { Object_Load(objInit, 4000.0f, -4000.0f, 4000.0f, -4000.0f); } } @@ -748,8 +763,8 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o objPos.y = obj->pos.y; objPos.z = obj->pos.z; if ((objId == OBJ_ACTOR_180) || (objId == OBJ_SCENERY_149) || (objId == OBJ_SCENERY_150) || - (objId == OBJ_BOSS_FO) || (objId == OBJ_BOSS_SZ) || (objId == OBJ_BOSS_VE2) || (objId == OBJ_BOSS_309) || - (objId == OBJ_SCENERY_ME_TUNNEL)) { + (objId == OBJ_BOSS_FO) || (objId == OBJ_BOSS_SZ_GREAT_FOX) || (objId == OBJ_BOSS_VE2) || + (objId == OBJ_BOSS_309) || (objId == OBJ_SCENERY_ME_TUNNEL)) { colId = COL1_0; if (objId == OBJ_BOSS_VE2) { colId = COL1_9; @@ -764,7 +779,7 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o colId = COL1_5; } else if (objId == OBJ_SCENERY_150) { colId = COL1_6; - } else if (objId == OBJ_BOSS_SZ) { + } else if (objId == OBJ_BOSS_SZ_GREAT_FOX) { colId = COL1_8; } if (func_col1_800998FC(&relPos, &objPos, vel, colId, &sp44, sp30) > 0) { @@ -772,10 +787,10 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o } } else { colId = COL2_0; - if (objId == OBJ_SCENERY_2) { + if (objId == OBJ_SCENERY_CO_BUMP_2) { colId = COL2_2; } - if (objId == OBJ_SCENERY_3) { + if (objId == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; } if (objId == OBJ_SCENERY_140) { @@ -786,7 +801,7 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o } if (objId == OBJ_SCENERY_117) { colId = COL2_14; - } else if ((objId == OBJ_SCENERY_4) || (objId == OBJ_SCENERY_5)) { + } else if ((objId == OBJ_SCENERY_CO_BUMP_4) || (objId == OBJ_SCENERY_CO_BUMP_5)) { colId = COL2_1; } if (func_col2_800A3690(&relPos, &objPos, colId, &sp44)) { @@ -810,7 +825,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { scenery360 = gScenery360; for (i = 0; i < 200; i++, scenery360++) { if (scenery360->obj.status == OBJ_ACTIVE) { - if ((scenery360->obj.id == OBJ_SCENERY_1) || (scenery360->obj.id == OBJ_SCENERY_3) || + if ((scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_140)) { @@ -826,12 +841,13 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } } - scenery = gScenery; + + scenery = &gScenery[0]; for (i = 0; (i < ARRAY_COUNT(gScenery)) && (gLevelMode == LEVELMODE_ON_RAILS); i++, scenery++) { if (scenery->obj.status == OBJ_ACTIVE) { - if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || - (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_2) || - (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || (scenery->obj.id == OBJ_SCENERY_3)) { + if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || + (scenery->obj.id == OBJ_SCENERY_ME_TUNNEL) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3)) { if (Object_CheckPolyCollision(pos, vel, scenery->obj.id, &scenery->obj)) { return 2; } @@ -843,7 +859,8 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } } - sprite = gSprites; + + sprite = &gSprites[0]; for (i = 0; i < ARRAY_COUNT(gSprites); i++, sprite++) { if ((sprite->obj.status == OBJ_ACTIVE) && (fabsf(pos->x - sprite->obj.pos.x) < 500.0f) && (fabsf(pos->z - sprite->obj.pos.z) < 500.0f) && @@ -855,13 +872,14 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 0; } } + if ((mode == 0) || (mode == 2) || (mode == 3)) { if (mode != 2) { - boss = gBosses; + boss = &gBosses[0]; for (i = 0; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { if ((boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_VE2) || - (boss->obj.id == OBJ_BOSS_SZ) || (boss->obj.id == OBJ_BOSS_309)) { + (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX) || (boss->obj.id == OBJ_BOSS_309)) { if (Object_CheckPolyCollision(pos, vel, boss->obj.id, &boss->obj)) { return 2; } @@ -892,7 +910,8 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { } } } - actor = gActors; + + actor = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(pos->x - actor->obj.pos.x) < 1000.0f) && (fabsf(pos->z - actor->obj.pos.z) < 1500.0f) && (index != i) && (actor->info.unk_16 != 2) && @@ -919,7 +938,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { actor->dmgPart = -1; if (!(((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->iwork[12] != 0)) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && - ((actor->aiType < AI360_10) || (actor->aiType >= AI360_GREAT_FOX))))) { + ((actor->aiType < AI360_ENEMY) || (actor->aiType >= AI360_GREAT_FOX))))) { actor->health = 0; } actor->hitPos.x = pos->x; @@ -934,7 +953,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 0; } -void func_enmy_80063CAC(Scenery* scenery) { +void func_enmy_80063CAC(Scenery* this) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { @@ -942,9 +961,9 @@ void func_enmy_80063CAC(Scenery* scenery) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; gActors[i].obj.id = OBJ_ACTOR_193; - gActors[i].obj.pos.x = scenery->obj.pos.x; - gActors[i].obj.pos.y = scenery->obj.pos.y; - gActors[i].obj.pos.z = scenery->obj.pos.z; + gActors[i].obj.pos.x = this->obj.pos.x; + gActors[i].obj.pos.y = this->obj.pos.y; + gActors[i].obj.pos.z = this->obj.pos.z; gActors[i].obj.rot.y = RAND_FLOAT(360.0f); Object_SetInfo(&gActors[i].info, gActors[i].obj.id); break; @@ -952,34 +971,37 @@ void func_enmy_80063CAC(Scenery* scenery) { } } -void func_enmy_80063D58(Scenery* scenery) { +void func_enmy_80063D58(CoDoors* this) { s32 i; - scenery->obj.pos.y = gGroundHeight; + this->obj.pos.y = gGroundHeight; + for (i = 0; i < ARRAY_COUNT(gSprites); i++) { if (gSprites[i].obj.status == OBJ_FREE) { Sprite_Initialize(&gSprites[i]); gSprites[i].obj.status = OBJ_INIT; gSprites[i].obj.id = OBJ_SPRITE_FOG_SHADOW; - gSprites[i].sceneryId = scenery->obj.id; - gSprites[i].obj.pos.x = scenery->obj.pos.x; + gSprites[i].sceneryId = this->obj.id; + gSprites[i].obj.pos.x = this->obj.pos.x; gSprites[i].obj.pos.y = 5.0f; - gSprites[i].obj.pos.z = scenery->obj.pos.z; - if ((scenery->obj.id == OBJ_SCENERY_0) || (scenery->obj.id == OBJ_SCENERY_6) || - (scenery->obj.id == OBJ_SCENERY_7) || (scenery->obj.id == OBJ_SCENERY_56) || - (scenery->obj.id == OBJ_SCENERY_20) || (scenery->obj.id == OBJ_SCENERY_21) || - (scenery->obj.id == OBJ_SCENERY_22)) { - gSprites[i].obj.rot.y = scenery->obj.rot.y; + gSprites[i].obj.pos.z = this->obj.pos.z; + + if ((this->obj.id == OBJ_SCENERY_CO_STONE_ARCH) || (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_1) || + (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_2) || (this->obj.id == OBJ_SCENERY_CO_DOORS) || + (this->obj.id == OBJ_SCENERY_CO_ARCH_1) || (this->obj.id == OBJ_SCENERY_CO_ARCH_2) || + (this->obj.id == OBJ_SCENERY_CO_ARCH_3)) { + gSprites[i].obj.rot.y = this->obj.rot.y; } else { gSprites[i].obj.rot.y = 44.9f; } + Object_SetInfo(&gSprites[i].info, gSprites[i].obj.id); break; } } } -void func_enmy_80063E5C(Scenery* scenery, f32* hitboxData) { +void func_enmy_80063E5C(Scenery* this, f32* hitboxData) { s32 i; Item* item; @@ -988,10 +1010,10 @@ void func_enmy_80063E5C(Scenery* scenery, f32* hitboxData) { Item_Initialize(&gItems[i]); item->obj.status = OBJ_INIT; item->obj.id = OBJ_ITEM_RING_CHECK; - item->obj.pos.x = scenery->obj.pos.x; - item->obj.pos.y = scenery->obj.pos.y; - item->obj.pos.z = scenery->obj.pos.z; - item->obj.rot.y = scenery->obj.rot.y; + item->obj.pos.x = this->obj.pos.x; + item->obj.pos.y = this->obj.pos.y; + item->obj.pos.z = this->obj.pos.z; + item->obj.rot.y = this->obj.rot.y; Object_SetInfo(&item->info, item->obj.id); item->info.hitbox = SEGMENTED_TO_VIRTUAL(hitboxData); break; @@ -1020,12 +1042,12 @@ void Object_Init(s32 index, ObjectId objId) { switch (objId) { case OBJ_SPRITE_CO_SMOKE: - func_effect_8007A6F0(&gSprites[index].obj.pos, NA_SE_OB_SMOKE); + Effect_SpawnTimedSfxAtPos(&gSprites[index].obj.pos, NA_SE_OB_SMOKE); break; case OBJ_ACTOR_234: AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[index].sfxSource, 0); break; - case OBJ_SCENERY_54: + case OBJ_SCENERY_CO_WATERFALL: AUDIO_PLAY_SFX(NA_SE_FALL, gScenery[index].sfxSource, 0); break; case OBJ_ACTOR_TEAM_BOSS: @@ -1075,7 +1097,7 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_SCENERY_TI_RIB_8: func_enmy_80063E5C(&gScenery[index], D_TI_6006A20); break; - case OBJ_SCENERY_23: + case OBJ_SCENERY_CO_RADAR: func_enmy_80063CAC(&gScenery[index]); break; case OBJ_ITEM_CHECKPOINT: @@ -1105,15 +1127,15 @@ void Object_Init(s32 index, ObjectId objId) { gItems[index].obj.status = OBJ_FREE; } break; - case OBJ_SCENERY_0: + case OBJ_SCENERY_CO_STONE_ARCH: func_enmy_80063E5C(&gScenery[index], gItemRingCheckHitbox); /* fallthrough */ - case OBJ_SCENERY_6: - case OBJ_SCENERY_7: - case OBJ_SCENERY_20: - case OBJ_SCENERY_21: - case OBJ_SCENERY_22: - case OBJ_SCENERY_56: + case OBJ_SCENERY_CO_HIGHWAY_1: + case OBJ_SCENERY_CO_HIGHWAY_2: + case OBJ_SCENERY_CO_ARCH_1: + case OBJ_SCENERY_CO_ARCH_2: + case OBJ_SCENERY_CO_ARCH_3: + case OBJ_SCENERY_CO_DOORS: func_enmy_80063D58(&gScenery[index]); break; case OBJ_ACTOR_187: @@ -1179,8 +1201,8 @@ void Object_Init(s32 index, ObjectId objId) { gActors[index].obj.status = OBJ_FREE; } break; - case OBJ_ACTOR_190: - case OBJ_ACTOR_191: + case OBJ_MISSILE_SEEK_TEAM: + case OBJ_MISSILE_SEEK_PLAYER: AUDIO_PLAY_SFX(NA_SE_EN_MISSILE_ENGINE, gActors[index].sfxSource, 4); break; case OBJ_ACTOR_192: @@ -1227,11 +1249,11 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_SCENERY_65: Macbeth_801A65E0(&gScenery[index]); break; - case OBJ_ACTOR_177: - case OBJ_ACTOR_178: - Corneria_8018B0B4(&gActors[index]); + case OBJ_ACTOR_CO_GARUDA_2: + case OBJ_ACTOR_CO_GARUDA_3: + Corneria_IBeam_Init(&gActors[index]); /* fallthrough */ - case OBJ_ACTOR_176: + case OBJ_ACTOR_CO_GARUDA_1: gActors[index].health = 24; AUDIO_PLAY_SFX(NA_SE_EN_TANK_RB_ENGINE, gActors[index].sfxSource, 4); break; @@ -1244,11 +1266,11 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_BOSS_300: Boss300_Init(&gBosses[index]); break; - case OBJ_BOSS_292: - Corneria_Boss292_Init(&gBosses[index]); + case OBJ_BOSS_CO_GRANGA: + Corneria_Granga_Init(&gBosses[index]); break; - case OBJ_BOSS_293: - Corneria_Boss293_Init(&gBosses[index]); + case OBJ_BOSS_CO_CARRIER: + Corneria_Carrier_Init(&gBosses[index]); break; case OBJ_BOSS_A6: Area6_BossA6_Init(&gBosses[index]); @@ -1344,37 +1366,37 @@ void Object_Init(s32 index, ObjectId objId) { } } -void Scenery_UpdateTitaniaBones(Scenery* scenery) { +void Scenery_UpdateTitaniaBones(Scenery* this) { f32 sp2C; f32 sp28; f32 sp24; - if ((gGroundType == 4) && (scenery->state == 0)) { - Ground_801B6E20(scenery->obj.pos.x, scenery->obj.pos.z + gPathProgress, &sp2C, &sp24, &sp28); - scenery->obj.pos.y = sp24 + 3.0f; - scenery->obj.rot.x = RAD_TO_DEG(sp2C); - scenery->obj.rot.z = RAD_TO_DEG(sp28); - scenery->state++; - } -} - -void func_enmy_80065380(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_182; - actor->timer_0BC = RAND_INT(10.0f) + 10; - actor->timer_0C2 = 30; - actor->vel.x = arg4; - actor->vel.y = arg5; - actor->vel.z = arg6; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->unk_046 = 255; - actor->unk_048 = 900; - actor->obj.rot.z = RAND_FLOAT(360.0f); - actor->obj.rot.y = RAND_FLOAT(360.0f); - Object_SetInfo(&actor->info, actor->obj.id); + if ((gGroundType == 4) && (this->state == 0)) { + Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp2C, &sp24, &sp28); + this->obj.pos.y = sp24 + 3.0f; + this->obj.rot.x = RAD_TO_DEG(sp2C); + this->obj.rot.z = RAD_TO_DEG(sp28); + this->state++; + } +} + +void func_enmy_80065380(Actor182* this, f32 xPos, f32 yPos, f32 zPos, f32 arg4, f32 arg5, f32 arg6) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_182; + this->timer_0BC = RAND_INT(10.0f) + 10; + this->timer_0C2 = 30; + this->vel.x = arg4; + this->vel.y = arg5; + this->vel.z = arg6; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_046 = 255; + this->unk_048 = 900; + this->obj.rot.z = RAND_FLOAT(360.0f); + this->obj.rot.y = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_enmy_8006546C(f32 xPos, f32 yPos, f32 zPos, f32 arg3, f32 arg4, f32 arg5) { @@ -1400,20 +1422,20 @@ void func_enmy_800654E4(Object* obj) { } } -void func_enmy_800655C8(Actor* actor, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_190; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->eventType = arg4; - actor->timer_0BE = 50; - if (actor->eventType == 1) { - actor->timer_0BE = 30; +void func_enmy_800655C8(Actor190* this, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_MISSILE_SEEK_TEAM; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->eventType = arg4; + this->timer_0BE = 50; + if (this->eventType == 1) { + this->timer_0BE = 30; } - actor->fwork[5] = 15.0f; - Object_SetInfo(&actor->info, actor->obj.id); + this->fwork[5] = 15.0f; + Object_SetInfo(&this->info, this->obj.id); } void func_enmy_8006566C(f32 xPos, f32 yPos, f32 zPos, s32 arg3) { @@ -1427,7 +1449,8 @@ void func_enmy_8006566C(f32 xPos, f32 yPos, f32 zPos, s32 arg3) { } } -void func_enmy_800656D4(Actor* actor) { +// Actors 190 & 191 +void Actors190_191_Update(Actor* this) { s32 i; s32 j; f32 spD4; @@ -1449,12 +1472,13 @@ void func_enmy_800656D4(Actor* actor) { var_ra = (gLevelMode == LEVELMODE_ALL_RANGE) ? 2 : 0; - if (actor->iwork[2] == 0) { - if (actor->obj.id == OBJ_ACTOR_190) { + if (this->iwork[2] == 0) { + if (this->obj.id == OBJ_MISSILE_SEEK_TEAM) { for (i = 0; i < 3; i++) { spB4[i] = gTeamShields[i + 1]; spA8[i] = var_ra + i; } + for (i = 0; i < 3; i++) { for (j = i + 1; j < 3; j++) { if (spB4[i] < spB4[j]) { @@ -1467,6 +1491,7 @@ void func_enmy_800656D4(Actor* actor) { } } } + switch (gGameFrameCount % 6U) { case 0: case 1: @@ -1484,155 +1509,166 @@ void func_enmy_800656D4(Actor* actor) { if (gLevelMode == LEVELMODE_ALL_RANGE) { if (gTeamShields[spC4 - 1] > 0) { - actor->iwork[1] = spC4; + this->iwork[1] = spC4; goto label; } else { - actor->iwork[1] = 10000; + this->iwork[1] = 10000; } } else { if (gTeamShields[spC4 + 1] > 0) { - actor->iwork[1] = spC4; + this->iwork[1] = spC4; goto label; } else { - actor->iwork[1] = 10000; + this->iwork[1] = 10000; } } } - actor->iwork[1] = 10000; + this->iwork[1] = 10000; label: - actor->iwork[2] = 1; + this->iwork[2] = 1; } - spC4 = actor->iwork[1]; + + spC4 = this->iwork[1]; if ((spC4 == var_ra) || ((var_ra + 1) == spC4) || ((var_ra + 2) == spC4)) { - actor->fwork[29] = gActors[spC4].obj.pos.z; - actor->fwork[28] = gActors[spC4].obj.pos.y; - actor->fwork[27] = gActors[spC4].obj.pos.x; - if ((fabsf(actor->obj.pos.x - gActors[spC4].obj.pos.x) < 400.0f) && - (fabsf(actor->obj.pos.z - gActors[spC4].obj.pos.z) < 400.0f)) { + this->fwork[29] = gActors[spC4].obj.pos.z; + this->fwork[28] = gActors[spC4].obj.pos.y; + this->fwork[27] = gActors[spC4].obj.pos.x; + if ((fabsf(this->obj.pos.x - gActors[spC4].obj.pos.x) < 400.0f) && + (fabsf(this->obj.pos.z - gActors[spC4].obj.pos.z) < 400.0f)) { if (RAND_FLOAT(spC4 - 1) < 0.6f) { gActors[spC4].iwork[10] = 1; } } - } else { - actor->fwork[29] = gPlayer[0].trueZpos; - actor->fwork[28] = gPlayer[0].pos.y; - actor->fwork[27] = gPlayer[0].pos.x; + this->fwork[29] = gPlayer[0].trueZpos; + this->fwork[28] = gPlayer[0].pos.y; + this->fwork[27] = gPlayer[0].pos.x; } - if (actor->timer_0BC != 0) { - Math_SmoothStepToAngle(&actor->obj.rot.x, 0.0f, 0.3f, 4.0f, 0.001f); + + if (this->timer_0BC != 0) { + Math_SmoothStepToAngle(&this->obj.rot.x, 0.0f, 0.3f, 4.0f, 0.001f); } else { - if ((actor->iwork[10] == 0) && ((fabsf(actor->fwork[27] - actor->obj.pos.x) > 300.0f) || - (fabsf(actor->fwork[29] - actor->obj.pos.z) > 300.0f))) { - actor->fwork[0] += 5.0f; - actor->fwork[1] += 8.0f; - sp88 = actor->fwork[27] - actor->obj.pos.x; - sp80 = actor->fwork[29] - actor->obj.pos.z; + if ((this->iwork[10] == 0) && ((fabsf(this->fwork[27] - this->obj.pos.x) > 300.0f) || + (fabsf(this->fwork[29] - this->obj.pos.z) > 300.0f))) { + this->fwork[0] += 5.0f; + this->fwork[1] += 8.0f; + sp88 = this->fwork[27] - this->obj.pos.x; + sp80 = this->fwork[29] - this->obj.pos.z; sp80 = sqrtf(SQ(sp88) + SQ(sp80)) * 0.2f; - if (actor->eventType == 1) { + if (this->eventType == 1) { sp80 = 0.1f; } - spD0 = SIN_DEG(actor->fwork[0]) * sp80; - sp88 = COS_DEG(actor->fwork[1]) * sp80; - spD4 = COS_DEG(actor->obj.rot.y) * sp88; - spCC = -SIN_DEG(actor->obj.rot.y) * sp88; + spD0 = SIN_DEG(this->fwork[0]) * sp80; + sp88 = COS_DEG(this->fwork[1]) * sp80; + spD4 = COS_DEG(this->obj.rot.y) * sp88; + spCC = -SIN_DEG(this->obj.rot.y) * sp88; - sp88 = (actor->fwork[27] + spD4) - actor->obj.pos.x; - sp84 = (actor->fwork[28] + spD0) - actor->obj.pos.y; - sp80 = (actor->fwork[29] + spCC) - actor->obj.pos.z; + sp88 = (this->fwork[27] + spD4) - this->obj.pos.x; + sp84 = (this->fwork[28] + spD0) - this->obj.pos.y; + sp80 = (this->fwork[29] + spCC) - this->obj.pos.z; sp78 = Math_RadToDeg(Math_Atan2F(sp88, sp80)); sp80 = sqrtf(SQ(sp88) + SQ(sp80)); sp7C = Math_RadToDeg(-Math_Atan2F(sp84, sp80)); - sp84 = Math_SmoothStepToAngle(&actor->obj.rot.y, sp78, 0.3f, 4.0f, 0.001f); - Math_SmoothStepToAngle(&actor->obj.rot.x, sp7C, 0.3f, 4.0f, 0.001f); + sp84 = Math_SmoothStepToAngle(&this->obj.rot.y, sp78, 0.3f, 4.0f, 0.001f); + Math_SmoothStepToAngle(&this->obj.rot.x, sp7C, 0.3f, 4.0f, 0.001f); } - if ((fabsf(actor->fwork[27] - actor->obj.pos.x) < 60.0f) && - (fabsf(actor->fwork[28] - actor->obj.pos.y) < 60.0f) && - (fabsf(actor->fwork[29] - actor->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) { + + if ((fabsf(this->fwork[27] - this->obj.pos.x) < 60.0f) && (fabsf(this->fwork[28] - this->obj.pos.y) < 60.0f) && + (fabsf(this->fwork[29] - this->obj.pos.z) < 60.0f) && ((spC4 == 2) || (spC4 == 3) || (spC4 == 4))) { gActors[spC4].dmgType = DMG_BEAM; gActors[spC4].damage = 20; gActors[spC4].dmgSource = DMG_SRC_2; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); - Object_Kill(&actor->obj, actor->sfxSource); - } - } - Math_Vec3fFromAngles(&sp98, actor->obj.rot.x, actor->obj.rot.y, actor->fwork[5]); - actor->vel.x = sp98.x; - actor->vel.y = sp98.y; - actor->vel.z = sp98.z - gPathVelZ; - if (actor->eventType == 0) { - actor->obj.rot.z += 5.0f; - } - if (actor->eventType == 1) { - if (actor->timer_0BE == 0) { - actor->timer_0BE = 30; - Math_Vec3fFromAngles(&sp98, actor->obj.rot.x, actor->obj.rot.y, 120.0f); - func_effect_8007F04C(OBJ_EFFECT_353, actor->obj.pos.x + sp98.x, actor->obj.pos.y + sp98.y, - actor->obj.pos.z + sp98.z, actor->obj.rot.x, actor->obj.rot.y, actor->obj.rot.z, 0.0f, + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + Object_Kill(&this->obj, this->sfxSource); + } + } + + Math_Vec3fFromAngles(&sp98, this->obj.rot.x, this->obj.rot.y, this->fwork[5]); + + this->vel.x = sp98.x; + this->vel.y = sp98.y; + this->vel.z = sp98.z - gPathVelZ; + + if (this->eventType == 0) { + this->obj.rot.z += 5.0f; + } + if (this->eventType == 1) { + if (this->timer_0BE == 0) { + this->timer_0BE = 30; + Math_Vec3fFromAngles(&sp98, this->obj.rot.x, this->obj.rot.y, 120.0f); + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + sp98.x, this->obj.pos.y + sp98.y, + this->obj.pos.z + sp98.z, this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, 0.0f, 0.0f, 0.0f, sp98.x, sp98.y, sp98.z, 1.0f); } var_fv0 = 330.0f; if (sp84 < 0.0f) { var_fv0 = 30.0f; } - Math_SmoothStepToAngle(&actor->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); - } - if ((gGroundType == 4) && Ground_801B6AEC(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + gPathProgress)) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 5.0f); - Object_Kill(&actor->obj, actor->sfxSource); - } - sp8C.x = actor->vel.x; - sp8C.y = actor->vel.y; - sp8C.z = actor->vel.z; - if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->dmgType != DMG_NONE) || - (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); - Object_Kill(&actor->obj, actor->sfxSource); - if (actor->dmgType != DMG_NONE) { - actor->itemDrop = DROP_SILVER_RING_50p; + Math_SmoothStepToAngle(&this->obj.rot.z, var_fv0, 0.1f, 3.0f, 0.01f); + } + + if ((gGroundType == 4) && Ground_801B6AEC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + gPathProgress)) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + Object_Kill(&this->obj, this->sfxSource); + } + + sp8C.x = this->vel.x; + sp8C.y = this->vel.y; + sp8C.z = this->vel.z; + + if ((Object_CheckCollision(this->index, &this->obj.pos, &sp8C, 1) != 0) || (this->dmgType != DMG_NONE) || + (this->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 3.0f); + Object_Kill(&this->obj, this->sfxSource); + if (this->dmgType != DMG_NONE) { + this->itemDrop = DROP_SILVER_RING_50p; if ((gCurrentLevel == LEVEL_CORNERIA)) { if (gLevelMode == LEVELMODE_ALL_RANGE) { - actor->itemDrop = DROP_SILVER_RING_50p; + this->itemDrop = DROP_SILVER_RING_50p; } else { - actor->itemDrop = DROP_SILVER_RING_25p; + this->itemDrop = DROP_SILVER_RING_25p; } } if (gCurrentLevel == LEVEL_AREA_6) { - actor->itemDrop = DROP_SILVER_RING_10p; + this->itemDrop = DROP_SILVER_RING_10p; } - Actor_Despawn(actor); + Actor_Despawn(this); } - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } + if (gLevelMode == LEVELMODE_ON_RAILS) { - if (fabsf(actor->obj.pos.z - gPlayer[0].trueZpos) < 100.0f) { - actor->iwork[10] = 1; + if (fabsf(this->obj.pos.z - gPlayer[0].trueZpos) < 100.0f) { + this->iwork[10] = 1; } - if (gPlayer[0].cam.eye.z < (actor->obj.pos.z + gPathProgress)) { - Object_Kill(&actor->obj, actor->sfxSource); + if (gPlayer[0].cam.eye.z < (this->obj.pos.z + gPathProgress)) { + Object_Kill(&this->obj, this->sfxSource); } } } -void func_enmy_800660F0(Actor* actor) { - Item* item = gItems; +void func_enmy_800660F0(Actor* this) { + Item* item; s32 i; - for (i = 0; i < ARRAY_COUNT(gItems); i++, item++) { + for (item = &gItems[0], i = 0; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status == OBJ_FREE) { Item_Initialize(item); item->obj.status = OBJ_INIT; - item->obj.id = D_enmy_800CFDF4[actor->itemDrop]; - item->obj.pos.x = actor->obj.pos.x; - item->obj.pos.y = actor->obj.pos.y; - item->obj.pos.z = actor->obj.pos.z; + item->obj.id = D_enmy_800CFDF4[this->itemDrop]; + item->obj.pos.x = this->obj.pos.x; + item->obj.pos.y = this->obj.pos.y; + item->obj.pos.z = this->obj.pos.z; item->timer_4A = 8; + Object_SetInfo(&item->info, item->obj.id); + if ((item->obj.id == OBJ_ITEM_SILVER_RING) || (item->obj.id == OBJ_ITEM_BOMB) || (item->obj.id == OBJ_ITEM_LASERS)) { item->unk_50 = 90.0f; } + if ((item->obj.id >= OBJ_ITEM_GOLD_RING) || (item->obj.id == OBJ_ITEM_1UP)) { item->unk_50 = 90.0f; AUDIO_PLAY_SFX(NA_SE_ITEM_APPEAR, gDefaultSfxSource, 4); @@ -1646,18 +1682,19 @@ void func_enmy_800660F0(Actor* actor) { } } -void Actor_Despawn(Actor* actor) { +void Actor_Despawn(Actor* this) { Actor* otherActor; s32 i; if (gVersusMode) { - if ((actor->dmgSource >= 1) && (actor->dmgSource < 4 + 1) && !VS_TIME_UP(gVsCountdown)) { - gPlayerScores[actor->dmgSource - 1] += actor->info.bonus; + if ((this->dmgSource >= 1) && (this->dmgSource < 4 + 1) && !VS_TIME_UP(gVsCountdown)) { + gPlayerScores[this->dmgSource - 1] += this->info.bonus; } - } else if (!((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->animFrame == 1))) { - if ((actor->dmgSource == AI360_FOX + 1) && (actor->info.bonus != 0)) { - gHitCount += actor->info.bonus; + } else if (!((this->obj.id == OBJ_ACTOR_ALLRANGE) && (this->animFrame == 1))) { + if ((this->dmgSource == AI360_FOX + 1) && (this->info.bonus != 0)) { + gHitCount += this->info.bonus; D_ctx_80177850 = 15; + if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gDropHitCountItem != 0)) { switch (gDropHitCountItem) { case 9: @@ -1668,32 +1705,34 @@ void Actor_Despawn(Actor* actor) { case 4: case 19: case 29: - actor->itemDrop = DROP_GOLD_RING_1; + this->itemDrop = DROP_GOLD_RING_1; break; case 14: - actor->itemDrop = DROP_LASERS; + this->itemDrop = DROP_LASERS; break; } gDropHitCountItem = 0; } - if (actor->obj.id == OBJ_ACTOR_ALLRANGE) { - if ((actor->aiType >= AI360_WOLF) && (actor->aiType < AI360_KATT)) { - AllRange_GetStarWolfHits(actor); + + if (this->obj.id == OBJ_ACTOR_ALLRANGE) { + if ((this->aiType >= AI360_WOLF) && (this->aiType < AI360_KATT)) { + AllRange_GetStarWolfHits(this); } } } - if (actor->itemDrop) { - if (D_enmy_800CFE5C[actor->itemDrop] < 0.0f) { - otherActor = gActors; + + if (this->itemDrop) { + if (D_enmy_800CFE5C[this->itemDrop] < 0.0f) { + otherActor = &gActors[0]; for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->index != actor->index) && - (otherActor->iwork[15] == actor->iwork[15])) { + if ((otherActor->obj.status != OBJ_FREE) && (otherActor->index != this->index) && + (otherActor->iwork[15] == this->iwork[15])) { return; } } - func_enmy_800660F0(actor); + func_enmy_800660F0(this); AUDIO_PLAY_SFX(NA_SE_ITEM_APPEAR, gDefaultSfxSource, 4); - } else if (actor->itemDrop == DROP_TEAM_MESG) { + } else if (this->itemDrop == DROP_TEAM_MESG) { if (gTeamShields[TEAM_ID_PEPPY] > 0) { Radio_PlayMessage(gMsg_ID_20261, RCID_PEPPY); } else if (gTeamShields[TEAM_ID_SLIPPY] > 0) { @@ -1701,196 +1740,211 @@ void Actor_Despawn(Actor* actor) { } else if (gTeamShields[TEAM_ID_FALCO] > 0) { Radio_PlayMessage(gMsg_ID_20262, RCID_FALCO); } - } else if (Rand_ZeroOne() <= D_enmy_800CFE5C[actor->itemDrop]) { - func_enmy_800660F0(actor); + } else if (Rand_ZeroOne() <= D_enmy_800CFE5C[this->itemDrop]) { + func_enmy_800660F0(this); } } } } -void func_enmy_8006654C(Actor* actor) { - actor->gravity = 0.4f; - if (actor->obj.pos.y <= gGroundHeight + 130.0f) { - actor->obj.pos.y = gGroundHeight + 130.0f; - actor->vel.y = 0.0f; +void Actor192_Update(Actor192* this) { + this->gravity = 0.4f; + + if (this->obj.pos.y <= gGroundHeight + 130.0f) { + this->obj.pos.y = gGroundHeight + 130.0f; + this->vel.y = 0.0f; } - actor->vel.x = SIN_DEG(actor->obj.rot.y) * actor->fwork[0]; - actor->vel.z = COS_DEG(actor->obj.rot.y) * actor->fwork[0]; - switch (actor->state) { + + this->vel.x = SIN_DEG(this->obj.rot.y) * this->fwork[0]; + this->vel.z = COS_DEG(this->obj.rot.y) * this->fwork[0]; + + switch (this->state) { case 0: - if (actor->fwork[0] < 20.0f) { - actor->fwork[0] += 0.5f; + if (this->fwork[0] < 20.0f) { + this->fwork[0] += 0.5f; } - actor->animFrame++; - if (Animation_GetFrameCount(&D_CO_6029528) < actor->animFrame) { - actor->animFrame = 0; + + this->animFrame++; + if (Animation_GetFrameCount(&D_CO_6029528) < this->animFrame) { + this->animFrame = 0; } - if ((actor->obj.rot.z < 15.0f) && (actor->animFrame < 20)) { - actor->obj.rot.z += 1.0f; + + if ((this->obj.rot.z < 15.0f) && (this->animFrame < 20)) { + this->obj.rot.z += 1.0f; } - if ((actor->obj.rot.z > -15.0f) && (actor->animFrame > 20)) { - actor->obj.rot.z -= 1.0f; + if ((this->obj.rot.z > -15.0f) && (this->animFrame > 20)) { + this->obj.rot.z -= 1.0f; } - if ((actor->animFrame == 20) || (actor->animFrame == 40)) { - actor->state++; - actor->timer_0BC = 20; + + if ((this->animFrame == 20) || (this->animFrame == 40)) { + this->state++; + this->timer_0BC = 20; } break; + case 1: - if (actor->obj.rot.z > 0.0f) { - actor->obj.rot.z -= 0.5f; + if (this->obj.rot.z > 0.0f) { + this->obj.rot.z -= 0.5f; } - if (actor->obj.rot.z < 0.0f) { - actor->obj.rot.z += 0.5f; + if (this->obj.rot.z < 0.0f) { + this->obj.rot.z += 0.5f; } - if (actor->fwork[0] > 0.0f) { - actor->fwork[0] -= 0.3f; + + if (this->fwork[0] > 0.0f) { + this->fwork[0] -= 0.3f; } - if (actor->timer_0BC == 0) { - actor->state = 0; + + if (this->timer_0BC == 0) { + this->state = 0; } break; } - actor->scale = 0.8f; - if (actor->dmgType != DMG_NONE) { - actor->obj.status = OBJ_DYING; - actor->vel.y = RAND_FLOAT(5.0f) + 6.0f; - if (actor->dmgType == DMG_EXPLOSION) { - actor->vel.y = -2.0f; + + this->scale = 0.8f; + + if (this->dmgType != DMG_NONE) { + this->obj.status = OBJ_DYING; + this->vel.y = RAND_FLOAT(5.0f) + 6.0f; + if (this->dmgType == DMG_EXPLOSION) { + this->vel.y = -2.0f; } - actor->vel.z = -15.0f; - actor->gravity = 0.5f; - func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 13.0f); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, actor->sfxSource, 4); + this->vel.z = -15.0f; + this->gravity = 0.5f; + func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 13.0f); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_S, this->sfxSource, 4); } } -void func_enmy_8006684C(Actor* actor) { +void func_enmy_8006684C(Actor192* this) { s32 pad; - if (actor->timer_0BE != 0) { - actor->vel.z = 0.0f; - actor->vel.x = 0.0f; - actor->vel.y = 0.0f; - if (actor->timer_0BE == 1) { - Object_Kill(&actor->obj, actor->sfxSource); - actor->itemDrop = DROP_SILVER_RING; - Actor_Despawn(actor); - AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, actor->sfxSource, 4); - BonusText_Display(actor->obj.pos.x, actor->obj.pos.y + 250.0f, actor->obj.pos.z, 3); + if (this->timer_0BE != 0) { + this->vel.z = 0.0f; + this->vel.x = 0.0f; + this->vel.y = 0.0f; + if (this->timer_0BE == 1) { + Object_Kill(&this->obj, this->sfxSource); + this->itemDrop = DROP_SILVER_RING; + Actor_Despawn(this); + AUDIO_PLAY_SFX(NA_SE_EN_EXPLOSION_M, this->sfxSource, 4); + BonusText_Display(this->obj.pos.x, this->obj.pos.y + 250.0f, this->obj.pos.z, 3); gHitCount += 3; D_ctx_80177850 = 15; } } else { - actor->obj.rot.x += 11.0f; - actor->obj.rot.y += 7.0f; - if (actor->vel.y < -3.0f) { - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 7.0f, - 5); - actor->timer_0BE = 3; + this->obj.rot.x += 11.0f; + this->obj.rot.y += 7.0f; + if (this->vel.y < -3.0f) { + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 30.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 7.0f, 5); + this->timer_0BE = 3; } } } -void func_enmy_800669A0(Actor* actor) { - if (actor->timer_0BC != 0) { - if (actor->timer_0BC == 1) { - Object_Kill(&actor->obj, actor->sfxSource); +void Actor193_Update(Actor193* this) { + if (this->timer_0BC != 0) { + if (this->timer_0BC == 1) { + Object_Kill(&this->obj, this->sfxSource); } } else { - actor->obj.rot.y += 5.0f; - if (actor->dmgType != DMG_NONE) { - func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 8.0f); - func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 130.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, - 5); - actor->timer_0BC = 4; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_OB_EXPLOSION_S); + this->obj.rot.y += 5.0f; + if (this->dmgType != DMG_NONE) { + func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y + 130.0f, this->obj.pos.z, 8.0f); + func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 130.0f, this->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); + this->timer_0BC = 4; + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); } } } -void func_enmy_80066A80(Actor* actor) { +void Actor180_Update(Actor180* this) { } -void func_enmy_80066A8C(Scenery* scenery) { - Vec3f sp64; - Vec3f sp58; +void func_enmy_80066A8C(CoBuilding9* this) { + Vec3f src; + Vec3f dest; f32 yf; - sp64.z = 0.0f; - sp64.x = -120.0f; - if (scenery->obj.rot.y > 90.0f) { - sp64.x = 120.0f; + src.z = 0.0f; + src.x = -120.0f; + + if (this->obj.rot.y > 90.0f) { + src.x = 120.0f; } + for (yf = 0.0f; yf < 680.0f; yf += 100.0f) { - Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); - sp64.y = yf; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - func_effect_8007D0E0(scenery->obj.pos.x + sp58.x, scenery->obj.pos.y + sp58.y, scenery->obj.pos.z + sp58.z, - 4.0f); + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); + src.y = yf; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_8007D0E0(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 4.0f); } } -void func_enmy_80066C00(Scenery* scenery) { - Vec3f sp64; - Vec3f sp58; +void func_enmy_80066C00(CoBuilding9* this) { + Vec3f src; + Vec3f dest; f32 zf; - sp64.y = 30.0f; - sp64.x = -100.0f; - if (scenery->obj.rot.y > 90.0f) { - sp64.x = 100.0f; + src.y = 30.0f; + src.x = -100.0f; + + if (this->obj.rot.y > 90.0f) { + src.x = 100.0f; } - Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + + Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); for (zf = -180.0f; zf <= 0.0f; zf += 30.0f) { - sp64.z = zf; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - func_effect_8007D0E0(scenery->obj.pos.x + sp58.x, scenery->obj.pos.y + sp58.y, scenery->obj.pos.z + sp58.z, + src.z = zf; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_8007D0E0(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, RAND_FLOAT(1.0f) + 2.0f); } } -void func_enmy_80066D5C(Scenery* scenery) { - switch (scenery->state) { +void CoBuilding9_Update(CoBuilding9* this) { + switch (this->state) { + case 0: + break; + case 1: - func_enmy_80066C00(scenery); - scenery->state++; - AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_L, scenery->sfxSource, 4); + func_enmy_80066C00(this); + this->state++; + AUDIO_PLAY_SFX(NA_SE_EN_DAMAGE_L, this->sfxSource, 4); break; + case 2: - scenery->vel.x += 0.05f; - scenery->obj.rot.x += scenery->vel.x; - if (scenery->obj.rot.x >= 90.0f) { - scenery->obj.rot.x = 90.0f; - scenery->unk_44 = 40; - func_enmy_80066A8C(scenery); - scenery->state = 0; + this->vel.x += 0.05f; + this->obj.rot.x += this->vel.x; + if (this->obj.rot.x >= 90.0f) { + this->obj.rot.x = 90.0f; + this->unk_44 = 40; + func_enmy_80066A8C(this); + this->state = 0; gCameraShake = 25; - AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, scenery->sfxSource, 4); + AUDIO_PLAY_SFX(NA_SE_EN_METAL_BOUND_M, this->sfxSource, 4); } break; - case 0: - break; } } -void func_enmy_80066E80(Scenery* scenery) { +void func_enmy_80066E80(Scenery* this) { } void Sprite167_Update(Sprite167* this) { this->obj.rot.y += 0.2f; } -void func_enmy_80066EA8(Scenery* scenery) { - scenery->obj.rot.y = 0.0f; - if (gPlayer[0].cam.eye.x < scenery->obj.pos.x) { - scenery->obj.rot.y = 271.0f; +// World-aligned billboarding +void SceneryRotateTowardsCamera(Scenery* this) { + this->obj.rot.y = 0.0f; + if (gPlayer[0].cam.eye.x < this->obj.pos.x) { + this->obj.rot.y = 271.0f; } } -void func_enmy_80066EE4(Sprite* sprite) { +void func_enmy_80066EE4(Sprite* this) { } void Item_CheckBounds(Item* this) { @@ -1899,6 +1953,7 @@ void Item_CheckBounds(Item* this) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_STANDBY)) { Object_Kill(&this->obj, this->sfxSource); } + if ((gLevelMode == LEVELMODE_ON_RAILS) && (gLastPathChange == 0)) { var_fa1 = 900.0f; if (gPlayer[0].form != FORM_ARWING) { @@ -1911,9 +1966,11 @@ void Item_CheckBounds(Item* this) { Math_SmoothStepToF(&this->obj.pos.x, gPlayer[0].xPath - var_fa1, 0.1f, 10.0f, 0.01f); } } + if (this->obj.pos.y > 650.0f) { Math_SmoothStepToF(&this->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f); } + if (gLevelType == LEVELTYPE_PLANET) { if (this->obj.pos.y < gGroundHeight + 70.0f) { Math_SmoothStepToF(&this->obj.pos.y, gGroundHeight + 70.0f, 0.1f, 5.0f, 0.01f); @@ -1924,6 +1981,7 @@ void Item_CheckBounds(Item* this) { } else if (this->obj.pos.y < -500.0f) { Math_SmoothStepToF(&this->obj.pos.y, -500.0f, 0.1f, 5.0f, 0.01f); } + if (gVersusMode && (this->index == 0) && (gItems[1].obj.status == OBJ_ACTIVE)) { if (fabsf(this->obj.pos.x - gItems[1].obj.pos.x) < 200.0f) { if (fabsf(this->obj.pos.z - gItems[1].obj.pos.z) < 200.0f) { @@ -1938,10 +1996,11 @@ void Item_CheckBounds(Item* this) { void Item_SpinPickup(Item* this) { s32 sparkleMask; - Vec3f sp40; - Vec3f sp34; + Vec3f src; + Vec3f dest; Math_SmoothStepToF(&this->unk_50, 10.0f, 1.0f, 2.0f, 0.0f); + if (this->unk_50 > 30.0f) { sparkleMask = 1 - 1; } else if (this->unk_50 > 20.0f) { @@ -1949,34 +2008,36 @@ void Item_SpinPickup(Item* this) { } else { sparkleMask = 8 - 1; } - if (!(sparkleMask & gGameFrameCount)) { + + if ((sparkleMask & gGameFrameCount) == 0) { Matrix_RotateY(gCalcMatrix, gGameFrameCount * 23.0f * M_DTOR, MTXF_NEW); - sp40.x = 50.0f; - sp40.y = RAND_FLOAT_CENTERED(120.0f); - sp40.z = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); - func_effect_80078E50(this->obj.pos.x + sp34.x, this->obj.pos.y + sp34.y, this->obj.pos.z + sp34.z, 3.0f); + src.x = 50.0f; + src.y = RAND_FLOAT_CENTERED(120.0f); + src.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_80078E50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 3.0f); } this->obj.rot.y += this->unk_50; this->obj.rot.y = Math_ModF(this->obj.rot.y, 360.0f); } -void Actor_SetupDebris70(Actor* actor, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 xVel, f32 yVel, f32 zVel) { - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_DEBRIS; - actor->state = 70; - actor->obj.pos.x = xPos; - actor->obj.pos.y = yPos; - actor->obj.pos.z = zPos; - actor->obj.rot.x = xRot; - actor->obj.rot.y = yRot; - actor->vel.x = xVel; - actor->vel.y = yVel; - actor->vel.z = zVel; - actor->timer_0BC = RAND_INT(15.0f) + 25.0f; - actor->gravity = 0.5f; - Object_SetInfo(&actor->info, actor->obj.id); +void Actor_SetupDebris70(ActorDebris* this, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 xVel, f32 yVel, + f32 zVel) { + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_DEBRIS; + this->state = 70; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->obj.rot.x = xRot; + this->obj.rot.y = yRot; + this->vel.x = xVel; + this->vel.y = yVel; + this->vel.z = zVel; + this->timer_0BC = RAND_INT(15.0f) + 25.0f; + this->gravity = 0.5f; + Object_SetInfo(&this->info, this->obj.id); } void Actor_SpawnDebris70(f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 arg5, f32 arg6, f32 arg7) { @@ -1995,6 +2056,7 @@ void ActorSupplies_Update(ActorSupplies* this) { s32 i; this->obj.rot.y += 1.0f; + if (gLevelMode == LEVELMODE_ALL_RANGE) { if (gCurrentLevel == LEVEL_SECTOR_Z) { Math_SmoothStepToF(&this->obj.pos.x, -2000.0f, 0.05f, 60.0f, 0.01f); @@ -2004,12 +2066,14 @@ void ActorSupplies_Update(ActorSupplies* this) { Math_SmoothStepToF(&this->obj.pos.y, 300.0f, 0.05f, 50.0f, 0.01f); } } + if (this->dmgType != DMG_NONE) { this->dmgType = DMG_NONE; this->health -= this->damage; if (this->health <= 0) { - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 5.0f); + if (((player[0].wings.rightState <= WINGSTATE_BROKEN) || (player[0].wings.leftState <= WINGSTATE_BROKEN)) && (player[0].form != FORM_LANDMASTER)) { this->itemDrop = DROP_WING_REPAIR; @@ -2020,7 +2084,9 @@ void ActorSupplies_Update(ActorSupplies* this) { } else { this->itemDrop = DROP_BOMB; } + Actor_Despawn(this); + for (i = 0; i < 6; i++) { Actor_SpawnDebris70(D_enmy_800CFEC4[i].x + this->obj.pos.x, D_enmy_800CFEC4[i].y + this->obj.pos.y, D_enmy_800CFEC4[i].z + this->obj.pos.z, D_enmy_800CFF0C[i].y + this->obj.rot.y, @@ -2039,10 +2105,11 @@ void ActorSupplies_Update(ActorSupplies* this) { gRadarMarks[63].yRot = 0.0f; } -void ActorSupplies_Draw(Actor* actor) { +void ActorSupplies_Draw(Actor* this) { s32 i; Lights_SetOneLight(&gMasterDisp, -60, -60, 60, 150, 150, 150, 20, 20, 20); + for (i = 0; i < 6; i++) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_enmy_800CFEC4[i].x, D_enmy_800CFEC4[i].y, D_enmy_800CFEC4[i].z, MTXF_APPLY); @@ -2052,12 +2119,14 @@ void ActorSupplies_Draw(Actor* actor) { gSPDisplayList(gMasterDisp++, D_10177C0); Matrix_Pop(&gGfxMatrix); } + Lights_SetOneLight(&gMasterDisp, gLight1x, gLight1y, gLight1z, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); } void func_enmy_80067A40(void) { AUDIO_PLAY_SFX(NA_SE_WING_REPAIR, gPlayer[0].sfxSource, 0); + if (gPlayer[0].wings.rightState <= WINGSTATE_BROKEN) { gRightWingFlashTimer[0] = 1050; gPlayer[0].wings.rightState = WINGSTATE_INTACT; @@ -2066,6 +2135,7 @@ void func_enmy_80067A40(void) { gLeftWingFlashTimer[0] = 1050; gPlayer[0].wings.leftState = WINGSTATE_INTACT; } + if (gExpertMode) { gRightWingHealth[0] = gLeftWingHealth[0] = 10; } else { @@ -2076,6 +2146,7 @@ void func_enmy_80067A40(void) { void Item1up_Update(Item1UP* this) { Item_CheckBounds(this); Item_SpinPickup(this); + if (this->collected) { Object_Kill(&this->obj, this->sfxSource); Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_ONE_UP, this->playerNum); @@ -2083,6 +2154,7 @@ void Item1up_Update(Item1UP* this) { gLifeCount[this->playerNum]++; } } + if (this->timer_48 == 1) { Object_Kill(&this->obj, this->sfxSource); } @@ -2091,6 +2163,7 @@ void Item1up_Update(Item1UP* this) { void ItemPickup_Update(Item* this) { Item_CheckBounds(this); Item_SpinPickup(this); + if (this->state == 0) { switch (this->obj.id) { case OBJ_ITEM_BOMB: @@ -2105,23 +2178,29 @@ void ItemPickup_Update(Item* this) { Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_BOMB_GAUGE_UP, this->playerNum); } break; + case OBJ_ITEM_LASERS: this->width = 18.0f; + if (this->collected) { this->timer_4A = 50; this->state = 1; this->timer_48 = 20; this->unk_50 = 60.0f; + gLaserStrength[this->playerNum]++; if (gLaserStrength[this->playerNum] > LASERS_HYPER) { gLaserStrength[this->playerNum] = LASERS_HYPER; } + Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_TWIN_LASER_GET, this->playerNum); + if (gExpertMode) { gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 10; } else { gRightWingHealth[this->playerNum] = gLeftWingHealth[this->playerNum] = 60; } + gRightWingFlashTimer[this->playerNum] = 1030; gLeftWingFlashTimer[this->playerNum] = 1030; } @@ -2129,13 +2208,17 @@ void ItemPickup_Update(Item* this) { } } else { Math_SmoothStepToF(&this->width, 2.5f, 1.0f, 0.5f, 0.0f); + this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f; + if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { this->obj.pos.y += ((gPlayer[this->playerNum].pos.y + 50.0f) - this->obj.pos.y) * 0.5f; } else { this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f; } + this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.5f; + if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); } @@ -2155,14 +2238,15 @@ void ItemLasers_Update(ItemLasers* this) { } void ItemSupplyRing_Update(Item* this) { - Vec3f sp4C; - Vec3f sp40; + Vec3f src; + Vec3f dest; switch (this->state) { case 0: Math_SmoothStepToF(&this->width, 0.4f, 1.0f, 0.05f, 0.0f); Item_CheckBounds(this); Item_SpinPickup(this); + if (this->collected) { this->state = 1; this->timer_48 = 50; @@ -2190,41 +2274,49 @@ void ItemSupplyRing_Update(Item* this) { Object_PlayerSfx(gPlayer[this->playerNum].sfxSource, NA_SE_SHIELD_RING_M, this->playerNum); } } + if ((this->obj.id == OBJ_ITEM_GOLD_RING) && (this->timer_48 == 1)) { Object_Kill(&this->obj, this->sfxSource); } break; + case 1: if (this->timer_48 > 30) { Math_SmoothStepToF(&this->width, 1.0f, 1.0f, 0.06f, 0.0f); } else { Math_SmoothStepToF(&this->width, 0.0f, 1.0f, 0.06f, 0.0f); } + this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.5f; + if (gPlayer[this->playerNum].form == FORM_LANDMASTER) { this->obj.pos.y += (gPlayer[this->playerNum].pos.y + 50.0f - this->obj.pos.y) * 0.5f; } else { this->obj.pos.y += (gPlayer[this->playerNum].pos.y - this->obj.pos.y) * 0.5f; } + if (gPlayer[0].alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - 300.0f - this->obj.pos.z) * 0.3f; } else { this->obj.pos.z += (gPlayer[this->playerNum].trueZpos - this->obj.pos.z) * 0.5f; } + this->obj.rot.z += 22.0f; + Math_SmoothStepToAngle(&this->obj.rot.y, Math_RadToDeg(-gPlayer[this->playerNum].camYaw), 0.2f, 10.0f, 0.0f); if (this->timer_48 == 0) { Object_Kill(&this->obj, this->sfxSource); } + if (this->width > 0.3f) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_RotateZ(gCalcMatrix, gGameFrameCount * 37.0f * M_DTOR, MTXF_APPLY); - sp4C.x = 0.0f; - sp4C.y = this->width * 100.0f; - sp4C.z = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp4C, &sp40); - func_effect_80078E50(this->obj.pos.x + sp40.x, this->obj.pos.y + sp40.y, this->obj.pos.z + sp40.z, + src.x = 0.0f; + src.y = this->width * 100.0f; + src.z = 0.0f; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); + func_effect_80078E50(this->obj.pos.x + dest.x, this->obj.pos.y + dest.y, this->obj.pos.z + dest.z, 3.5f); } break; @@ -2242,10 +2334,12 @@ void ItemGoldRing_Update(ItemGoldRing* this) { void ItemWingRepair_Update(ItemWingRepair* this) { Item_CheckBounds(this); Item_SpinPickup(this); + if (this->collected) { func_enmy_80067A40(); Object_Kill(&this->obj, this->sfxSource); } + if (this->timer_48 == 1) { Object_Kill(&this->obj, this->sfxSource); } @@ -2253,6 +2347,7 @@ void ItemWingRepair_Update(ItemWingRepair* this) { void ItemMeteoWarp_Update(ItemMeteoWarp* this) { Item_CheckBounds(this); + if (this->state > 0) { if (this->state == 1) { this->obj.rot.z -= 10.0f; @@ -2264,23 +2359,29 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { this->width = 0.0f; } } + this->unk_44 -= 10; if (this->unk_44 < 0) { Object_Kill(&this->obj, this->sfxSource); } } else { this->width = 100.0f; + if (gRingPassCount < 0) { this->state = 2; this->unk_44 = 255; } else if (this->collected) { this->state = 1; this->unk_44 = 255; + gPlayer[this->playerNum].meteoWarpTimer = 100; + AUDIO_PLAY_SFX(gWarpRingSfx[gRingPassCount], gPlayer[0].sfxSource, 0); + if (gRingPassCount == 0) { gPlayer[0].boostSpeed = 0.0f; } + gRingPassCount++; if (gRingPassCount >= 7) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; @@ -2294,10 +2395,11 @@ void ItemMeteoWarp_Update(ItemMeteoWarp* this) { } void ItemCheckpoint_Update(ItemCheckpoint* this) { - s32 i; + TeamId i; Item_CheckBounds(this); this->unk_58 -= this->unk_44; + if (this->state > 0) { this->unk_44++; this->obj.pos.x += (gPlayer[this->playerNum].pos.x - this->obj.pos.x) * 0.3f; @@ -2351,6 +2453,7 @@ void ItemRingCheck_Update(Item* this) { void ItemPathChange_Update(Item* this) { gLastPathChange = this->obj.id; + if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) { Object_Kill(&this->obj, this->sfxSource); } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelPhase == 1)) { @@ -2379,10 +2482,13 @@ void ItemPathChange_Update(Item* this) { break; } } + if (this->collected) { Object_Kill(&this->obj, this->sfxSource); + gPlayer[0].pathStep = 0.0f; gPlayer[0].pathChangeTimer = this->width * 0.05f; + switch (this->obj.id) { case OBJ_ITEM_PATH_SPLIT_X: if (this->obj.pos.x < gPlayer[0].pos.x) { @@ -2393,14 +2499,17 @@ void ItemPathChange_Update(Item* this) { gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width; } break; + case OBJ_ITEM_PATH_TURN_LEFT: gPlayer[0].pathChangeYaw = 30.0f; gPlayer[0].xPathTarget = gPlayer[0].xPath - this->width; break; + case OBJ_ITEM_PATH_TURN_RIGHT: gPlayer[0].pathChangeYaw = -30.0f; gPlayer[0].xPathTarget = gPlayer[0].xPath + this->width; break; + case OBJ_ITEM_PATH_SPLIT_Y: if (this->obj.pos.y < gPlayer[0].pos.y) { gPlayer[0].pathChangePitch = 30.0f; @@ -2410,10 +2519,12 @@ void ItemPathChange_Update(Item* this) { gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width; } break; + case OBJ_ITEM_PATH_TURN_UP: gPlayer[0].pathChangePitch = 30.0f; gPlayer[0].yPathTarget = gPlayer[0].yPath + this->width; break; + case OBJ_ITEM_PATH_TURN_DOWN: gPlayer[0].pathChangePitch = -30.0f; gPlayer[0].yPathTarget = gPlayer[0].yPath - this->width; @@ -2430,7 +2541,7 @@ void Sprite_UpdateDoodad(Sprite* this) { M_PI; if (this->destroy) { this->obj.status = OBJ_FREE; - func_effect_8007A6F0(&this->obj.pos, NA_SE_OB_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_OB_EXPLOSION_S); switch (this->obj.id) { case OBJ_SPRITE_CO_POLE: func_effect_8007D074(this->obj.pos.x, this->obj.pos.y + 160.0f, this->obj.pos.z, 4.0f); @@ -2448,6 +2559,7 @@ void Object_Dying(s32 index, ObjectId objId) { case OBJ_ACTOR_EVENT: ActorEvent_Dying(&gActors[index]); break; + case OBJ_ACTOR_ALLRANGE: if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { Andross_801888F4(&gActors[index]); @@ -2455,81 +2567,96 @@ void Object_Dying(s32 index, ObjectId objId) { func_enmy2_800763A4(&gActors[index]); } break; + case OBJ_ACTOR_202: func_enmy2_800763A4(&gActors[index]); break; + case OBJ_ACTOR_194: Actor194_Dying(&gActors[index]); break; + case OBJ_ACTOR_186: Meteo_80187B08(&gActors[index]); break; + case OBJ_ACTOR_181: Object_Kill(&gActors[index].obj, gActors[index].sfxSource); func_effect_8007D2C8(gActors[index].obj.pos.x, gActors[index].obj.pos.y, gActors[index].obj.pos.z, 20.0f); break; + case OBJ_ACTOR_182: Object_Kill(&gActors[index].obj, gActors[index].sfxSource); func_effect_8007D2C8(gActors[index].obj.pos.x, gActors[index].obj.pos.y, gActors[index].obj.pos.z, 10.0f); Actor_Despawn(&gActors[index]); break; + case OBJ_ACTOR_192: func_enmy_8006684C(&gActors[index]); break; + case OBJ_BOSS_TI: Titania_801990DC(&gBosses[index]); break; + case OBJ_ACTOR_232: Titania_8018B720(&gActors[index]); break; + case OBJ_BOSS_VE1: Venom1_80198594(&gBosses[index]); break; } } -void Actor_Move(Actor* actor) { +void Actor_Move(Actor* this) { f32 var_fv0; - actor->obj.pos.x += actor->vel.x; - actor->obj.pos.z += actor->vel.z; - actor->obj.pos.y += actor->vel.y; - actor->vel.y -= actor->gravity; + this->obj.pos.x += this->vel.x; + this->obj.pos.z += this->vel.z; + this->obj.pos.y += this->vel.y; + this->vel.y -= this->gravity; - if (!gCullObjects || (actor->obj.id == OBJ_ACTOR_TEAM_BOSS) || - ((gCurrentLevel == LEVEL_MACBETH) && (actor->obj.id != OBJ_ACTOR_EVENT))) { + if (!gCullObjects || (this->obj.id == OBJ_ACTOR_TEAM_BOSS) || + ((gCurrentLevel == LEVEL_MACBETH) && (this->obj.id != OBJ_ACTOR_EVENT))) { return; } - var_fv0 = 4000.0f; - if ((actor->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || - ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_56))) { + var_fv0 = 4000.0f; + if ((this->obj.id == OBJ_ACTOR_236) || (gCurrentLevel == LEVEL_MACBETH) || + ((this->obj.id == OBJ_ACTOR_EVENT) && (this->eventType == EVID_56))) { var_fv0 = 8000.0f; } else if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ENTER_WARP_ZONE) { var_fv0 = 100000.0f; } - if (((gPlayer[0].cam.eye.z + actor->info.cullDistance) < (actor->obj.pos.z + gPathProgress)) || - ((actor->obj.pos.z + gPathProgress) < -15000.0f) || (actor->obj.pos.y < (gPlayer[0].yPath - var_fv0)) || - ((gPlayer[0].yPath + var_fv0) < actor->obj.pos.y) || ((gPlayer[0].xPath + var_fv0) < actor->obj.pos.x) || - (actor->obj.pos.x < (gPlayer[0].xPath - var_fv0))) { - Object_Kill(&actor->obj, actor->sfxSource); - switch (actor->obj.id) { + + if (((gPlayer[0].cam.eye.z + this->info.cullDistance) < (this->obj.pos.z + gPathProgress)) || + ((this->obj.pos.z + gPathProgress) < -15000.0f) || (this->obj.pos.y < (gPlayer[0].yPath - var_fv0)) || + ((gPlayer[0].yPath + var_fv0) < this->obj.pos.y) || ((gPlayer[0].xPath + var_fv0) < this->obj.pos.x) || + (this->obj.pos.x < (gPlayer[0].xPath - var_fv0))) { + Object_Kill(&this->obj, this->sfxSource); + + switch (this->obj.id) { case OBJ_ACTOR_236: gZOSnakeWaypointCount = 0; break; + case OBJ_ACTOR_229: - Titania_8018E3B0(actor); + Titania_8018E3B0(this); break; + case OBJ_ACTOR_194: - gActor194Status[actor->unk_046] = 0; + gActor194Status[this->unk_046] = 0; break; + case OBJ_ACTOR_EVENT: - if ((actor->eventType >= EVID_200) && (actor->eventType < EVID_300)) { - gActor194Status[actor->unk_046] = 0; - } else if ((actor->eventType == EVID_SX_WARP_GATE) && (actor->unk_046 != 2)) { + if ((this->eventType >= EVID_200) && (this->eventType < EVID_300)) { + gActor194Status[this->unk_046] = 0; + } else if ((this->eventType == EVID_SX_WARP_GATE) && (this->unk_046 != 2)) { gRingPassCount = -1; } break; + case OBJ_ACTOR_252: gMissedZoSearchlight = true; break; @@ -2537,28 +2664,29 @@ void Actor_Move(Actor* actor) { } } -void Boss_Move(Boss* boss) { - boss->obj.pos.x += boss->vel.x; - boss->obj.pos.y += boss->vel.y; - boss->obj.pos.z += boss->vel.z; - boss->vel.y -= boss->gravity; - if (gCullObjects && ((boss->obj.pos.z + gPathProgress) > (boss->info.cullDistance - gPlayer[0].cam.eye.z))) { - if (gPlayer[0].cam.eye.z) {} // fake - Object_Kill(&boss->obj, boss->sfxSource); +void Boss_Move(Boss* this) { + this->obj.pos.x += this->vel.x; + this->obj.pos.y += this->vel.y; + this->obj.pos.z += this->vel.z; + this->vel.y -= this->gravity; + + if (gCullObjects && ((this->obj.pos.z + gPathProgress) > (this->info.cullDistance - gPlayer[0].cam.eye.z))) { + if (gPlayer[0].cam.eye.z) {} //! FAKE + Object_Kill(&this->obj, this->sfxSource); } } -void Scenery_Move(Scenery* scenery) { +void Scenery_Move(Scenery* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - scenery->obj.pos.z += scenery->effectVel.z; - if (scenery->info.cullDistance < scenery->obj.pos.z) { - Object_Kill(&scenery->obj, scenery->sfxSource); + this->obj.pos.z += this->effectVel.z; + if (this->info.cullDistance < this->obj.pos.z) { + Object_Kill(&this->obj, this->sfxSource); } } else if ((gLevelMode == LEVELMODE_ON_RAILS) && (gBossActive != 2)) { - f32 temp_fv0 = fabsf(scenery->obj.pos.x - gPlayer[0].cam.eye.x); + f32 temp_fv0 = fabsf(this->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; - if ((scenery->obj.id == OBJ_SCENERY_6) || (scenery->obj.id == OBJ_SCENERY_7)) { + if ((this->obj.id == OBJ_SCENERY_CO_HIGHWAY_1) || (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_2)) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f : (temp_fv0 - var_fa0) * 1.7f; @@ -2566,51 +2694,54 @@ void Scenery_Move(Scenery* scenery) { temp_fv0 = 0.0f; } temp_fv0 -= gPlayer[0].cam.eye.z; - if ((scenery->info.cullDistance - temp_fv0) < (scenery->obj.pos.z + gPathProgress)) { - Object_Kill(&scenery->obj, scenery->sfxSource); + if ((this->info.cullDistance - temp_fv0) < (this->obj.pos.z + gPathProgress)) { + Object_Kill(&this->obj, this->sfxSource); } } } -void Sprite_Move(Sprite* sprite) { +void Sprite_Move(Sprite* this) { if (gCullObjects) { - f32 temp_fv0 = fabsf(sprite->obj.pos.x - gPlayer[0].cam.eye.x); + f32 temp_fv0 = fabsf(this->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; - if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) && - ((sprite->sceneryId == OBJ_SCENERY_6) || (sprite->sceneryId == OBJ_SCENERY_7))) || - (sprite->obj.id == OBJ_SCENERY_8)) { + if (((this->obj.id == OBJ_SPRITE_FOG_SHADOW) && + ((this->sceneryId == OBJ_SCENERY_CO_HIGHWAY_1) || (this->sceneryId == OBJ_SCENERY_CO_HIGHWAY_2))) || + (this->obj.id == OBJ_SCENERY_CO_HIGHWAY_3)) { var_fa0 = 1000.0f; } + temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f * 1.7f : (temp_fv0 - var_fa0) * 1.7f; temp_fv0 -= gPlayer[0].cam.eye.z; - if ((sprite->info.cullDistance - temp_fv0) < (sprite->obj.pos.z + gPathProgress)) { - sprite->obj.status = OBJ_FREE; + + if ((this->info.cullDistance - temp_fv0) < (this->obj.pos.z + gPathProgress)) { + this->obj.status = OBJ_FREE; } } } -void Effect_Move(Effect* effect) { - effect->obj.pos.x += effect->vel.x; - effect->obj.pos.y += effect->vel.y; - effect->obj.pos.z += effect->vel.z; +void Effect_Move(Effect* this) { + this->obj.pos.x += this->vel.x; + this->obj.pos.y += this->vel.y; + this->obj.pos.z += this->vel.z; + if (gCullObjects) { - if ((gPlayer[0].cam.eye.z + effect->info.cullDistance) < (effect->obj.pos.z + gPathProgress)) { - Object_Kill(&effect->obj, effect->sfxSource); - } else if ((fabsf(effect->obj.pos.y - gPlayer[0].cam.eye.y) > 25000.0f) || - (fabsf(effect->obj.pos.x - gPlayer[0].cam.eye.x) > 25000.0f)) { - Object_Kill(&effect->obj, effect->sfxSource); + if ((gPlayer[0].cam.eye.z + this->info.cullDistance) < (this->obj.pos.z + gPathProgress)) { + Object_Kill(&this->obj, this->sfxSource); + } else if ((fabsf(this->obj.pos.y - gPlayer[0].cam.eye.y) > 25000.0f) || + (fabsf(this->obj.pos.x - gPlayer[0].cam.eye.x) > 25000.0f)) { + Object_Kill(&this->obj, this->sfxSource); } } } -void Item_Move(Item* item) { +void Item_Move(Item* this) { if (gCullObjects) { f32 temp = (0.0f - gPlayer[0].cam.eye.z); - if ((item->info.cullDistance - temp) < (item->obj.pos.z + gPathProgress)) { - Object_Kill(&item->obj, item->sfxSource); - if ((item->obj.id == OBJ_ITEM_METEO_WARP) && (item->state == 0)) { + if ((this->info.cullDistance - temp) < (this->obj.pos.z + gPathProgress)) { + Object_Kill(&this->obj, this->sfxSource); + if ((this->obj.id == OBJ_ITEM_METEO_WARP) && (this->state == 0)) { gRingPassCount = -1; } } @@ -2635,6 +2766,7 @@ void Actor_Update(Actor* this) { if (this->timer_0C6 != 0) { this->timer_0C6--; } + if (gVersusMode) { for (i = 0; i < gCamCount; i++) { if (this->lockOnTimers[i] != 0) { @@ -2650,9 +2782,11 @@ void Actor_Update(Actor* this) { } gChargeTimers[0] = 0; } + if (this->timer_0C4 != 0) { this->timer_0C4--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; @@ -2661,12 +2795,14 @@ void Actor_Update(Actor* this) { Actor_Move(this); } break; + case OBJ_ACTIVE: Actor_Move(this); if ((this->obj.status != OBJ_FREE) && (this->info.action != NULL)) { this->info.action(&this->obj); } break; + case OBJ_DYING: Actor_Move(this); if (this->obj.status != OBJ_FREE) { @@ -2698,18 +2834,21 @@ void Boss_Update(Boss* this) { if (this->timer_05C != 0) { this->timer_05C--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); Boss_Move(this); break; + case OBJ_ACTIVE: Boss_Move(this); if ((this->obj.status != OBJ_FREE) && (this->info.action != NULL)) { this->info.action(&this->obj); } break; + case OBJ_DYING: Boss_Move(this); if (this->obj.status != OBJ_FREE) { @@ -2723,12 +2862,14 @@ void Scenery_Update(Scenery* this) { if (this->timer_4C != 0) { this->timer_4C--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); Scenery_Move(this); break; + case OBJ_ACTIVE: Scenery_Move(this); if (this->info.action != NULL) { @@ -2745,12 +2886,14 @@ void Sprite_Update(Sprite* this) { Object_Init(this->index, this->obj.id); Sprite_Move(this); break; + case OBJ_ACTIVE: Sprite_Move(this); if (this->info.action != NULL) { this->info.action(&this->obj); } break; + case OBJ_DYING: Sprite_Move(this); Object_Dying(this->index, this->obj.id); @@ -2765,12 +2908,14 @@ void Item_Update(Item* this) { if (this->timer_4A != 0) { this->timer_4A--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); Item_Move(this); break; + case OBJ_ACTIVE: Item_Move(this); if (this->info.action != NULL) { @@ -2784,6 +2929,7 @@ void Effect_Update(Effect* this) { if (this->timer_50 != 0) { this->timer_50--; } + switch (this->obj.status) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; @@ -2808,11 +2954,14 @@ void TexturedLine_Update(TexturedLine* this) { if (this->timer != 0) { this->timer--; } + dx = this->posAA.x - this->posBB.x; dy = this->posAA.y - this->posBB.y; dz = this->posAA.z - this->posBB.z; + this->yRot = Math_Atan2F(dx, dz); this->xRot = -Math_Atan2F(dy, sqrtf(SQ(dx) + SQ(dz))); + if (this->mode != 4) { this->zScale = sqrtf(SQ(dx) + SQ(dy) + SQ(dz)); } @@ -2822,13 +2971,17 @@ void TexturedLine_Update(TexturedLine* this) { (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (gPlayer[0].hitTimer == 0)) { Matrix_RotateX(gCalcMatrix, -this->xRot, MTXF_NEW); Matrix_RotateY(gCalcMatrix, -this->yRot, MTXF_APPLY); + sp44.x = gPlayer[gPlayerNum].pos.x - this->posAA.x; sp44.y = gPlayer[gPlayerNum].pos.y - this->posAA.y; sp44.z = gPlayer[gPlayerNum].trueZpos - this->posAA.z; + Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); + sp38.x += this->posAA.x; sp38.y += this->posAA.y; sp38.z += this->posAA.z; + if ((fabsf(sp38.x - this->posAA.x) < 30.0f) && (fabsf(sp38.y - this->posAA.y) < 30.0f) && (sp38.z < this->posAA.z) && ((this->posAA.z - this->zScale) < sp38.z)) { if (gCurrentLevel == LEVEL_AQUAS) { @@ -2841,9 +2994,11 @@ void TexturedLine_Update(TexturedLine* this) { } } } + if (((this->posAA.z + gPathProgress) > 1000.0f) && (gLevelMode != LEVELMODE_ALL_RANGE)) { this->mode = 0; } + if (((this->mode == 3) || (this->mode == 50)) && (this->timer == 0)) { this->mode = 0; } @@ -2900,37 +3055,44 @@ void Object_Update(void) { } } } - for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + + for (i = 0, sprite = &gSprites[0]; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status != OBJ_FREE) { sprite->index = i; Sprite_Update(sprite); } } - for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { + + for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status != OBJ_FREE) { boss->index = i; Boss_Update(boss); } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status != OBJ_FREE) { actor->index = i; Actor_Update(actor); } } - for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { + + for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status != OBJ_FREE) { item->index = i; Item_Update(item); } } - for (i = 0, effect = gEffects; i < ARRAY_COUNT(gEffects); i++, effect++) { + + for (i = 0, effect = &gEffects[0]; i < ARRAY_COUNT(gEffects); i++, effect++) { if (effect->obj.status != OBJ_FREE) { effect->index = i; Effect_Update(effect); } } + TexturedLine_UpdateAll(); + for (i = 0; i < ARRAY_COUNT(D_enmy_Timer_80161670); i++) { if (D_enmy_Timer_80161670[i] != 0) { D_enmy_Timer_80161670[i]--; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 2ad954ad..f647430c 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -32,30 +32,30 @@ void ActorEvent_SetMessage(u16* msg, s32 character) { } } -void func_enmy2_8006A800(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { - Effect_Initialize(effect); +void func_enmy2_8006A800(Effect361* this, f32 xPos, f32 yPos, f32 zPos, f32 scale2) { + Effect_Initialize(this); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_361; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - effect->unk_48 = 3; + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_361; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + this->unk_48 = 3; if (Rand_ZeroOne() < 0.5f) { - effect->unk_48 = -effect->unk_48; + this->unk_48 = -this->unk_48; } - effect->unk_4A = 100; - effect->scale2 = scale2 * 0.25f; - effect->scale1 = 0.3f; + this->unk_4A = 100; + this->scale2 = scale2 * 0.25f; + this->scale1 = 0.3f; if (scale2 < 10.0f) { - effect->scale1 = 0.1f; + this->scale1 = 0.1f; } - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_enmy2_8006A900(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { @@ -75,21 +75,21 @@ void Actor237_Update(Actor237* this) { void Actor237_Draw(Actor237* this) { } -void Obj54_8006A984(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_365; - - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; - - effect->unk_44 = 40; - effect->scale2 = 5.0f; - effect->scale1 = RAND_FLOAT_CENTERED(2.0f); - effect->vel.y = 10.0f; - effect->obj.rot.z = RAND_FLOAT(360.0f); - Object_SetInfo(&effect->info, effect->obj.id); +void Obj54_8006A984(Effect* this, f32 xPos, f32 yPos, f32 zPos) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_365; + + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; + + this->unk_44 = 40; + this->scale2 = 5.0f; + this->scale1 = RAND_FLOAT_CENTERED(2.0f); + this->vel.y = 10.0f; + this->obj.rot.z = RAND_FLOAT(360.0f); + Object_SetInfo(&this->info, this->obj.id); } void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) { @@ -103,7 +103,7 @@ void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) { } } -void Scenery54_Update(Scenery_54* this) { +void CoWaterfall_Update(CoWaterfall* this) { Vec3f sp24; Vec3f sp18; @@ -131,7 +131,7 @@ void Actor201_Update(Actor201* this) { f32 sp2C; if (Actor201_8006ABA4(this) && (this->timer_0BC == 0)) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); this->timer_0BC = 20; } sp2C = this->obj.pos.z + gPathProgress; @@ -157,9 +157,9 @@ void Actor202_Update(Actor202* this) { this->iwork[1] = true; } - if (((gGameFrameCount % 32) == 0)) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, - gEnemyShotSpeed); + if ((gGameFrameCount % 32) == 0) { + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, + gEnemyShotSpeed); } switch (this->state) { @@ -216,7 +216,7 @@ void Actor202_Update(Actor202* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y + 180.0f, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, 8.0f, 30); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); gHitCount += this->info.bonus; D_ctx_80177850 = 15; } else { @@ -341,7 +341,7 @@ void Actor194_Draw(Actor194* this) { } } -void Scenery42_Update(Scenery_42* this) { +void CoIBeam_Update(CoIBeam* this) { this->obj.pos.x += this->vel.x; this->obj.pos.y += this->vel.y; this->obj.pos.z += this->vel.z; @@ -367,20 +367,20 @@ void Scenery42_Update(Scenery_42* this) { } } -void func_enmy2_8006BA64(Effect* effect, f32 xPos, f32 yPos, f32 zPos) { - Effect_Initialize(effect); - effect->obj.status = OBJ_INIT; - effect->obj.id = OBJ_EFFECT_375; +void func_enmy2_8006BA64(Effect375* this, f32 xPos, f32 yPos, f32 zPos) { + Effect_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_EFFECT_375; - effect->obj.pos.x = xPos; - effect->obj.pos.y = yPos; - effect->obj.pos.z = zPos; + this->obj.pos.x = xPos; + this->obj.pos.y = yPos; + this->obj.pos.z = zPos; - effect->scale2 = 0.0f; - effect->scale1 = 0.12f; - effect->obj.rot.y = RAND_FLOAT(360.0f); - effect->unk_60.y = RAND_FLOAT_CENTERED(3.0f); - Object_SetInfo(&effect->info, effect->obj.id); + this->scale2 = 0.0f; + this->scale1 = 0.12f; + this->obj.rot.y = RAND_FLOAT(360.0f); + this->unk_60.y = RAND_FLOAT_CENTERED(3.0f); + Object_SetInfo(&this->info, this->obj.id); } void func_enmy2_8006BB1C(f32 xPos, f32 yPos, f32 zPos) { @@ -445,12 +445,14 @@ void Actor196_Update(Actor196* this) { case 3: if (this->timer_0BC == 1) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); } + if (this->vel.y < 12.0f) { Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f); } + if (this->obj.pos.y < (gGroundHeight + 10.0f)) { this->obj.pos.y = gGroundHeight; this->state = 4; @@ -664,7 +666,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -675,7 +677,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -696,7 +698,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -707,7 +709,7 @@ void ActorDebris_Update(ActorDebris* this) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } break; @@ -779,7 +781,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } else if (((this->state >= 41) && (this->state < 45)) || (this->state == 59)) { if (((this->timer_0BC == 0) || @@ -787,7 +789,7 @@ void ActorDebris_Update(ActorDebris* this) { (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f * this->scale); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } if (Play_CheckDynaFloorCollision(&sp44, &sp40, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z)) { func_effect_8007B228(this->obj.pos.x, sp44, this->obj.pos.z, 2.0f); @@ -804,7 +806,7 @@ void ActorDebris_Update(ActorDebris* this) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 1.5f, 4); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); } } else { if ((this->state == 3) && ((this->timer_0BC % 8) == 0)) { @@ -1008,7 +1010,7 @@ static EventActorInfo sEventActorInfo[108] = { /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 1.0f, 1 }, /* 69 */ { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 70 */ { D_SY_601AD70, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, EISFX_EN_ENGINE_01, 0, 0.0f, 1 }, - /* 71 */ { D_arwing_3007650, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_OB_WING, 0, 0.0f, 1 }, + /* 71 */ { aArwingItemLasersDL, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, EISFX_OB_WING, 0, 0.0f, 1 }, /* 72 */ { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 73 */ { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, /* 74 */ { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, EISFX_NONE, 0, 0.0f, 1 }, @@ -1761,7 +1763,7 @@ void ActorEvent_SetupEffect347(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 effect->scale1 = scale1; effect->unk_44 = 100; Object_SetInfo(&effect->info, effect->obj.id); - func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); } void ActorEvent_SpawnEffect347(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1790,7 +1792,7 @@ void ActorEvent_SetupEffect394(Effect* effect, f32 xPos, f32 yPos, f32 zPos, f32 effect->unk_7A = 18; Object_SetInfo(&effect->info, effect->obj.id); effect->info.damage = 40; - func_effect_8007A6F0(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&effect->obj.pos, NA_SE_EN_EXPLOSION_M); } void ActorEvent_SpawnEffect394(f32 xPos, f32 yPos, f32 zPos, f32 scale1) { @@ -1819,9 +1821,9 @@ void ActorEvent_8006F254(ActorEvent* this) { sp54.z = gEnemyShotSpeed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + sp48.x, this->obj.pos.y + sp48.y, this->obj.pos.z + sp48.z, - this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, - this->vwork[29].z + this->rot_0F4.z, sp48.x, sp48.y, sp48.z, 1.0f); + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + sp48.x, this->obj.pos.y + sp48.y, + this->obj.pos.z + sp48.z, this->obj.rot.x, this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, + this->vwork[29].y, this->vwork[29].z + this->rot_0F4.z, sp48.x, sp48.y, sp48.z, 1.0f); } void ActorEvent_ProcessActions(ActorEvent* this) { @@ -1844,8 +1846,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) { case EVACT_2: // shoot at player if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); } this->unk_048 = EVACT_NONE; break; @@ -1895,15 +1897,15 @@ void ActorEvent_ProcessActions(ActorEvent* this) { case EVACT_6: if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { - func_effect_8007F11C(OBJ_EFFECT_355, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_355, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); } this->unk_048 = EVACT_NONE; break; case EVACT_7: if (this->obj.pos.z < (gPlayer[0].trueZpos - 600.0f)) { - func_effect_8007F11C(OBJ_EFFECT_356, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 60.0f); + Effect_EnemyLaser(OBJ_EFFECT_356, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 60.0f); } this->unk_048 = EVACT_NONE; break; @@ -1913,8 +1915,8 @@ void ActorEvent_ProcessActions(ActorEvent* this) { sp6C.y = gPlayer[0].pos.y; gPlayer[0].pos.x += RAND_FLOAT_CENTERED(300.0f); gPlayer[0].pos.y += RAND_FLOAT_CENTERED(300.0f); - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, - gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + gEnemyShotSpeed); gPlayer[0].pos.x = sp6C.x; gPlayer[0].pos.y = sp6C.y; this->unk_048 = EVACT_NONE; @@ -1943,7 +1945,7 @@ void ActorEvent_ProcessActions(ActorEvent* this) { this->vel.z, this->scale * 3.0f, 15); Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_M); break; case EVACT_DESPAWN: @@ -1967,16 +1969,16 @@ void ActorEvent_ProcessActions(ActorEvent* this) { break; case EVACT_16: - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x + 190.0f, this->obj.pos.y + 90.0f, - this->obj.pos.z + 220.0f, gEnemyShotSpeed); - func_effect_8007F11C(OBJ_EFFECT_353, this->obj.pos.x - 190.0f, this->obj.pos.y + 90.0f, - this->obj.pos.z + 220.0f, gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + 190.0f, this->obj.pos.y + 90.0f, + this->obj.pos.z + 220.0f, gEnemyShotSpeed); + Effect_EnemyLaser(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x - 190.0f, this->obj.pos.y + 90.0f, + this->obj.pos.z + 220.0f, gEnemyShotSpeed); this->unk_048 = EVACT_NONE; break; case EVACT_17: if (this->obj.pos.z < (gPlayer[0].cam.eye.z - 600.0f)) { - func_effect_8007F20C(OBJ_EFFECT_353, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, + func_effect_8007F20C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, gEnemyShotSpeed); } this->unk_048 = EVACT_NONE; @@ -2047,7 +2049,7 @@ void ActorEvent_8006FEEC(ActorEvent* this) { this->itemDrop = DROP_NONE; Actor_Despawn(this); Object_Kill(&this->obj, this->sfxSource); - func_effect_8007A6F0(&this->obj.pos, NA_SE_EN_BIRD_DOWN); + Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_BIRD_DOWN); func_effect_8007D2C8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 4.0f); } else { AUDIO_PLAY_SFX(NA_SE_EN_BIRD_DAMAGE, this->sfxSource, 4); @@ -3161,7 +3163,7 @@ void ActorEvent_Update(ActorEvent* this) { var_fv0 = 0.0f; } - func_effect_8007F04C(OBJ_EFFECT_353, this->obj.pos.x + spAC.x + spA0.x, + func_effect_8007F04C(OBJ_EFFECT_ENEMY_LASER_1, this->obj.pos.x + spAC.x + spA0.x, this->obj.pos.y + spAC.y + spA0.y + var_fv0, this->obj.pos.z + spAC.z + spA0.z, this->fwork[15], this->obj.rot.y, this->obj.rot.z, this->vwork[29].x, this->vwork[29].y, this->vwork[29].z + this->rot_0F4.z, spAC.x, spAC.y, spAC.z, @@ -3653,7 +3655,7 @@ void ActorEvent_Update(ActorEvent* this) { effect->unk_60.z = -effect->unk_60.z; } - if (gGameFrameCount & 2) { + if ((gGameFrameCount & 2) != 0) { effect->vel.y = -effect->vel.y; } } @@ -3905,6 +3907,7 @@ void ActorEvent_Draw(ActorEvent* this) { gSPDisplayList(gMasterDisp++, sEventActorInfo[this->eventType].dList); gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); break; + default: if ((this->eventType < EVID_200) && (sEventActorInfo[this->eventType].dList != NULL)) { gSPDisplayList(gMasterDisp++, sEventActorInfo[this->eventType].dList); @@ -4101,7 +4104,7 @@ void ActorEvent_Draw(ActorEvent* this) { case EVID_79: temp_s0 = this->state; this->state = 2; // actor 235 state - Zoness_80190430(this); + Zoness_Actor235_Draw(this); this->state = temp_s0; break; @@ -4261,7 +4264,7 @@ void func_enmy2_800763A4(Actor* actor) { actor->scale * 3.0f, 5); func_effect_8007B228(actor->obj.pos.x, sp58, actor->obj.pos.z, 2.0f); actor->timer_0BE = 2; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); return; } @@ -4272,7 +4275,7 @@ void func_enmy2_800763A4(Actor* actor) { actor->obj.pos.z - actor->vel.z, 0.0f, 0.0f, 0.0f, actor->scale * 4.0f, 20); func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); actor->timer_0BE = 2; - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); return; } } else { @@ -4304,9 +4307,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->obj.pos.z - actor->vel.z, actor->scale * 3.0f); if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } if ((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->eventType == EVID_SLIPPY_METEO)) { @@ -4372,9 +4375,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->timer_0BE = 2; if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } } } @@ -4410,9 +4413,9 @@ void func_enmy2_800763A4(Actor* actor) { actor->timer_0BE = 2; if ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->aiType < AI360_KATT)) { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_M); } else { - func_effect_8007A6F0(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); + Effect_SpawnTimedSfxAtPos(&actor->obj.pos, NA_SE_EN_EXPLOSION_S); } } } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index a695fa6c..d4006f58 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -95,7 +95,7 @@ void Game_SetGameState(void) { gLevelPhase = gNextLevelPhase; gNextLevelPhase = 0; if ((gLevelPhase != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { - D_ctx_8017782C = 0; + D_ctx_8017782C = false; } break; case GSTATE_MAP: diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index b6c2cde7..f59c8ecb 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1322,7 +1322,7 @@ void HUD_DrawStatusScreens(void) { s32 func_hud_800886B8(void) { s32 var_v1 = 0; - f32 var_fv1 = gInputPress->stick_y; // related to the vertical height of the arwing + f32 var_fv1 = gInputPress->stick_y; if ((var_fv1 != 0.0f) && (D_80161810[4] != 0)) { return 0; @@ -2159,27 +2159,28 @@ s32 func_hud_8008A4DC(void) { return 0; } -s32 func_hud_8008AC54(s32 arg0) { +// Why is this function here in fox_hud? Weird. +s32 Hud_MissileSeekModeCheck(s32 missileSeekMode) { Actor* actor; s32 i; s32 ret = 0; - for (i = 0, actor = gActors; i < 60; i++, actor++) { - switch (arg0) { - case 0: - if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_ACTOR_190)) { + for (i = 0, actor = &gActors[0]; i < 60; i++, actor++) { + switch (missileSeekMode) { + case 0: // follows teammates + if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_MISSILE_SEEK_TEAM)) { ret++; } break; - case 1: - if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_ACTOR_191)) { + case 1: // follows player + if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_MISSILE_SEEK_PLAYER)) { ret++; } break; - case 2: - if (((actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_191)) && + case 2: // follows either + if (((actor->obj.id == OBJ_MISSILE_SEEK_TEAM) || (actor->obj.id == OBJ_MISSILE_SEEK_PLAYER)) && (actor->obj.status == OBJ_ACTIVE)) { ret++; } @@ -3526,7 +3527,7 @@ void func_hud_8008F96C(void) { } if (gCurrentLevel == LEVEL_TRAINING) { - Training_801988E0(); + Training_RingPassCount_Draw(); } } @@ -4186,7 +4187,7 @@ bool func_hud_800915FC(Actor* actor) { y = 720.0f; } - if (boss->obj.id == OBJ_BOSS_293) { + if (boss->obj.id == OBJ_BOSS_CO_CARRIER) { y = 280.0f; } @@ -5306,7 +5307,7 @@ f32 D_800D24C0[] = { 128.0f, 128.0f, 255.0f, 128.0f }; s32 D_800D24C8[] = { 0, 900 }; f32 D_800D24CC = 0.02f; -void func_hud_80094954(Effect* effect) { +void Hud_Effect363_Update(Effect* effect) { Player* player = &gPlayer[0]; if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->csState < 2)) { @@ -5363,7 +5364,7 @@ void func_hud_80094954(Effect* effect) { } } -void func_hud_80094BBC(Effect* effect) { +void Hud_Effect363_Draw(Effect* effect) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].csState < 2)) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); diff --git a/src/engine/fox_pause.c b/src/engine/fox_pause.c index ee7de964..0345e1c9 100644 --- a/src/engine/fox_pause.c +++ b/src/engine/fox_pause.c @@ -26,12 +26,14 @@ void func_pause_800A3E00(void) { D_ctx_80177868 = 1; } break; + case 1: D_ctx_80177868 = 2; gDrawMode = DRAW_UNK_7; gCsCamEyeX = gCsCamEyeY = gCsCamEyeZ = gCsCamAtX = gCsCamAtY = 0.0f; gCsCamAtZ = -10.0f; break; + case 2: if ((gControllerPress[0].button & START_BUTTON) || (gControllerPress[1].button & START_BUTTON)) { Audio_PlayPauseSfx(0); @@ -41,6 +43,7 @@ void func_pause_800A3E00(void) { gNextGameStateTimer = 0; } break; + case 3: if (gNextGameStateTimer == 0) { gPlayState = PLAY_UPDATE; diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index bbbff3fa..6651bf43 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -342,7 +342,7 @@ void Play_Setup360_CO(void) { s32 i; s32 j; - gLevelObjects = SEGMENTED_TO_VIRTUAL(D_CO_603B074); + gLevelObjects = SEGMENTED_TO_VIRTUAL(aCoAllRangeLevelObjects); for (j = 0, scenery360 = gScenery360; j < 200; j++) { if (gLevelObjects[j].id <= OBJ_INVALID) { @@ -357,7 +357,7 @@ void Play_Setup360_CO(void) { scenery360->obj.pos.y = gLevelObjects[j].yPos; scenery360->obj.rot.y = gLevelObjects[j].rot.y; Object_SetInfo(&scenery360->info, scenery360->obj.id); - if (scenery360->obj.id == OBJ_SCENERY_1) { + if (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) { scenery360->info.dList = D_CO_6020760; } scenery360++; @@ -385,7 +385,7 @@ void Play_Setup360_CO(void) { gBosses[i].obj.pos.x = 0.0f; gBosses[i].obj.pos.y = 0.0f; gBosses[i].obj.pos.z = 0.0f; - gBosses[i].obj.id = OBJ_BOSS_292; + gBosses[i].obj.id = OBJ_BOSS_CO_GRANGA; Object_SetInfo(&gBosses[i].info, gBosses[i].obj.id); } @@ -461,10 +461,12 @@ void Play_Setup(void) { gAllRangeCheckpoint = gSavedObjectLoadIndex = 0; gSavedPathProgress = 0.0f; gSavedHitCount = gCsFrameCount = gLevelStartStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; - D_ctx_8017782C = 1; + D_ctx_8017782C = true; + if (((gCurrentLevel == LEVEL_VENOM_2) && (gNextLevelPhase == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { return; } + for (i = 1; i < 4; i++) { if (gSavedTeamShields[i] < 0) { if (gSavedTeamShields[i] == -1) { @@ -1212,8 +1214,8 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_ACTOR_180: colId = COL1_0; break; - case OBJ_SCENERY_4: - case OBJ_SCENERY_5: + case OBJ_SCENERY_CO_BUMP_4: + case OBJ_SCENERY_CO_BUMP_5: colId = COL2_1; useCol2 = true; break; @@ -1235,7 +1237,7 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case ACTOR_EVENT_ID: colId = COL1_3; break; - case OBJ_BOSS_SZ: + case OBJ_BOSS_SZ_GREAT_FOX: colId = COL1_8; break; case OBJ_SCENERY_ME_TUNNEL: @@ -1257,11 +1259,11 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a colId = COL2_7; useCol2 = true; break; - case OBJ_SCENERY_2: + case OBJ_SCENERY_CO_BUMP_2: colId = COL2_2; useCol2 = true; break; - case OBJ_SCENERY_3: + case OBJ_SCENERY_CO_BUMP_3: case OBJ_SCENERY_69: colId = COL2_3; useCol2 = true; @@ -1331,10 +1333,10 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_SCENERY_146: case OBJ_SCENERY_147: case OBJ_SCENERY_148: - case OBJ_SCENERY_40: - case OBJ_SCENERY_41: - case OBJ_SCENERY_42: - case OBJ_SCENERY_43: + case OBJ_SCENERY_CO_BUILDING_9: + case OBJ_SCENERY_CO_BUILDING_10: + case OBJ_SCENERY_IBEAM: + case OBJ_SCENERY_ZO_ROCK_1: case OBJ_SCENERY_44: case OBJ_SCENERY_45: case OBJ_SCENERY_46: @@ -1344,9 +1346,9 @@ bool Play_CheckPolyCollision(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 a case OBJ_SCENERY_51: case OBJ_SCENERY_52: case OBJ_SCENERY_53: - case OBJ_SCENERY_54: - case OBJ_SCENERY_55: - case OBJ_SCENERY_56: + case OBJ_SCENERY_CO_WATERFALL: + case OBJ_SCENERY_CO_ROCKWALL: + case OBJ_SCENERY_CO_DOORS: case OBJ_SCENERY_57: case OBJ_SCENERY_58: case OBJ_SCENERY_59: @@ -1645,8 +1647,8 @@ void Player_CollisionCheck(Player* player) { if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_148) || - (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { temp_v0 = Player_CheckPolyCollision(player, scenery360->obj.id, scenery360->obj.pos.x, scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, scenery360->obj.rot.y, @@ -1666,7 +1668,7 @@ void Player_CollisionCheck(Player* player) { scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); if ((temp_v0 != 0) && (temp_v0 < 0)) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&scenery360->obj.pos, NA_SE_PASS); + Effect_SpawnTimedSfxAtPos(&scenery360->obj.pos, NA_SE_PASS); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1682,7 +1684,7 @@ void Player_CollisionCheck(Player* player) { if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&scenery360->obj.pos, NA_SE_PASS); + Effect_SpawnTimedSfxAtPos(&scenery360->obj.pos, NA_SE_PASS); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1749,11 +1751,11 @@ void Player_CollisionCheck(Player* player) { (scenery->obj.id != OBJ_SCENERY_71) && (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && (scenery->obj.id != OBJ_SCENERY_69) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { - if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || - (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_47) || + if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_1) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5) || (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_117) || (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || - (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3)) { + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3)) { spC8.x = scenery->obj.pos.x - player->pos.x; spC8.z = scenery->obj.pos.z - player->trueZpos; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < 1100.0f) { @@ -1766,7 +1768,7 @@ void Player_CollisionCheck(Player* player) { } } else { padB0 = scenery->obj.rot.y; - if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { + if (scenery->info.action == (ObjectFunc) SceneryRotateTowardsCamera) { padB0 = 0.0f; } temp_v0 = Player_CheckHitboxCollision( @@ -1788,7 +1790,7 @@ void Player_CollisionCheck(Player* player) { if (player->whooshTimer >= 4) { player->whooshTimer = 4; } - } else if (scenery->obj.id == OBJ_SCENERY_54) { + } else if (scenery->obj.id == OBJ_SCENERY_CO_WATERFALL) { if (player->whooshTimer == 0) { AUDIO_PLAY_SFX(NA_SE_IN_SPLASH_L, scenery->sfxSource, 0); } @@ -1798,7 +1800,8 @@ void Player_CollisionCheck(Player* player) { } } else { Player_ApplyDamage(player, temp_v0, scenery->info.damage); - if ((scenery->obj.id == OBJ_SCENERY_48) || (scenery->obj.id == OBJ_SCENERY_55) || + if ((scenery->obj.id == OBJ_SCENERY_48) || + (scenery->obj.id == OBJ_SCENERY_CO_ROCKWALL) || (scenery->obj.id == OBJ_SCENERY_49)) { Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); spC8.x = -(player->baseSpeed + player->boostSpeed) * 0.7f; @@ -1841,8 +1844,8 @@ void Player_CollisionCheck(Player* player) { } for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { - if ((boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_FO) || (boss->obj.id == OBJ_BOSS_SZ) || - (boss->obj.id == OBJ_BOSS_309)) { + if ((boss->obj.id == OBJ_BOSS_VE2) || (boss->obj.id == OBJ_BOSS_FO) || + (boss->obj.id == OBJ_BOSS_SZ_GREAT_FOX) || (boss->obj.id == OBJ_BOSS_309)) { temp_v0 = Player_CheckPolyCollision(player, boss->obj.id, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->obj.rot.x, boss->obj.rot.y, boss->obj.rot.z); @@ -1898,7 +1901,7 @@ void Player_CollisionCheck(Player* player) { break; } Player_ApplyDamage(player, temp_v0, boss->info.damage); - if ((boss->obj.id == OBJ_BOSS_303) && ((boss->state == 2) || (boss->state == 3)) && + if ((boss->obj.id == OBJ_BOSS_SX_SPYBORG) && ((boss->state == 2) || (boss->state == 3)) && (sp98 >= 9)) { player->knockback.y = -100.0f; } @@ -1996,7 +1999,7 @@ void Player_CollisionCheck(Player* player) { } } else { actor->dmgType = DMG_COLLISION; - if (actor->obj.id == OBJ_ACTOR_190) { + if (actor->obj.id == OBJ_MISSILE_SEEK_TEAM) { actor->dmgType = -1; } if (actor->info.damage) { @@ -2212,8 +2215,8 @@ void Player_FloorCheck(Player* player) { for (sp144 = 0, scenery360 = gScenery360; sp144 < 200; sp144++, scenery360++) { if ((scenery360->obj.status == OBJ_ACTIVE) && ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || - (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || - (scenery360->obj.id == OBJ_SCENERY_3)) && + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_1) || + (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3)) && (fabsf(scenery360->obj.pos.x - player->pos.x) < 2500.0f) && (fabsf(scenery360->obj.pos.z - player->trueZpos) < 2500.0f)) { tempx = scenery360->obj.pos.x; @@ -2246,7 +2249,7 @@ void Player_FloorCheck(Player* player) { } } else { colId = COL2_0; - if (scenery360->obj.id == OBJ_SCENERY_3) { + if (scenery360->obj.id == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2263,14 +2266,14 @@ void Player_FloorCheck(Player* player) { (sp144 < 50) && (gLevelMode == LEVELMODE_ON_RAILS) && (gCurrentLevel != LEVEL_VENOM_1); sp144++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && ((player->trueZpos - 3000.0f) < scenery->obj.pos.z) && - (scenery->obj.id != OBJ_SCENERY_0) && (scenery->obj.id != OBJ_SCENERY_8)) { + (scenery->obj.id != OBJ_SCENERY_CO_STONE_ARCH) && (scenery->obj.id != OBJ_SCENERY_CO_HIGHWAY_3)) { tempx = scenery->obj.pos.x; tempy = scenery->obj.pos.y; tempz = scenery->obj.pos.z; sp120 = scenery->obj.rot.y; - if ((scenery->obj.id == OBJ_SCENERY_3) || (scenery->obj.id == OBJ_SCENERY_2) || - (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_4) || - (scenery->obj.id == OBJ_SCENERY_5)) { + if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_3) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) || + (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5)) { Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { spEC.x = player->pos.x - tempx; @@ -2292,11 +2295,12 @@ void Player_FloorCheck(Player* player) { if (scenery->obj.id == OBJ_SCENERY_47) { colId = COL2_7; } - if (scenery->obj.id == OBJ_SCENERY_2) { + if (scenery->obj.id == OBJ_SCENERY_CO_BUMP_2) { colId = COL2_2; - } else if (scenery->obj.id == OBJ_SCENERY_3) { + } else if (scenery->obj.id == OBJ_SCENERY_CO_BUMP_3) { colId = COL2_3; - } else if ((scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5)) { + } else if ((scenery->obj.id == OBJ_SCENERY_CO_BUMP_4) || + (scenery->obj.id == OBJ_SCENERY_CO_BUMP_5)) { colId = COL2_1; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2312,7 +2316,7 @@ void Player_FloorCheck(Player* player) { hitboxData = scenery->info.hitbox; count = *hitboxData; if (count != 0) { - if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { + if (scenery->info.action == (ObjectFunc) SceneryRotateTowardsCamera) { sp120 = 0.0f; } hitboxData++; @@ -2543,7 +2547,7 @@ void Player_InitVersus(void) { Player_Initialize(&gPlayer[i]); Player_Setup(&gPlayer[i]); Player_Update360(&gPlayer[i]); - Camera_Update360(&gPlayer[i], 1); + Camera_Update360(&gPlayer[i], true); } Play_ClearObjectData(); } @@ -2665,12 +2669,12 @@ void Play_Init(void) { switch (gCurrentLevel) { case LEVEL_SECTOR_Z: if (!D_ctx_8017782C) { - SectorZ_8019EA68(); + SectorZ_LoadLevelObjects(); ActorAllRange_SpawnTeam(); } break; case LEVEL_FORTUNA: - Fortuna_8018BA2C(); + Fortuna_LoadLevelObjects(); ActorAllRange_SpawnTeam(); break; case LEVEL_KATINA: @@ -2686,7 +2690,7 @@ void Play_Init(void) { } break; case LEVEL_VENOM_2: - Venom2_80196968(); + Venom2_LoadLevelObjects(); if (gLevelPhase == 0) { ActorAllRange_SpawnTeam(); } @@ -4274,7 +4278,7 @@ void Player_Setup(Player* playerx) { } break; } - Camera_Update360(player, 1); + Camera_Update360(player, true); } player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->wingPosition = gLevelType; @@ -4291,7 +4295,7 @@ void Player_Setup(Player* playerx) { player->yRot_114 = 188.0f; player->hideShadow = true; } - Camera_UpdateArwing360(player, 1); + Camera_UpdateArwing360(player, true); } else { player->unk_014 = 1.0f; player->unk_018 = 1.0f; @@ -4302,7 +4306,7 @@ void Player_Setup(Player* playerx) { D_ctx_80177A10[j] = 0; D_ctx_80177A48[j] = 0.0f; } - D_ctx_8017782C = 0; + D_ctx_8017782C = false; gAllRangeCheckpoint = 0; switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -5497,7 +5501,7 @@ void Player_Update(Player* player) { Player_Initialize(player); Player_Setup(player); Player_Update360(player); - Camera_Update360(player, 1); + Camera_Update360(player, true); Player_PlaySfx(player->sfxSource, NA_SE_ARWING_BOOST, player->num); player->unk_190 = player->unk_194 = 5.0f; } else if (player->attacker >= 0) { @@ -5787,7 +5791,7 @@ void Camera_FollowPlayer(Player* player, s32 playerNum, bool arg2) { Math_SmoothStepToF(&player->camRoll, 0.0f, 0.05f, 5.0f, 0.00001f); } -void Camera_UpdateArwing360(Player* player, s32 arg1) { +void Camera_UpdateArwing360(Player* player, bool arg1) { Vec3f sp74; Vec3f sp68; f32 temp1; @@ -5855,7 +5859,7 @@ void Camera_UpdateArwing360(Player* player, s32 arg1) { Math_SmoothStepToF(&player->cam.at.z, atZ, player->unk_01C, 30000.0f, 0); Math_SmoothStepToF(&player->unk_018, 0.2f, 0.1f, 0.005f, 0); Math_SmoothStepToF(&player->unk_01C, 1.0f, 0.1f, 0.005f, 0); - if (arg1 != 0) { + if (arg1) { player->cam.eye.x = eyeX; player->cam.eye.y = eyeY; player->cam.eye.z = eyeZ; @@ -5999,7 +6003,7 @@ void Camera_SetStarfieldPos(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 } } -void Camera_Update360(Player* player, s32 arg1) { +void Camera_Update360(Player* player, bool arg1) { switch (player->form) { case FORM_ON_FOOT: Camera_UpdateOnFoot360(player, arg1); @@ -6031,7 +6035,7 @@ void Camera_Update(Player* player) { } break; case LEVELMODE_ALL_RANGE: - Camera_Update360(player, 0); + Camera_Update360(player, false); break; case LEVELMODE_UNK_2: Turret_UpdateCamera(player); @@ -6040,7 +6044,7 @@ void Camera_Update(Player* player) { break; case PLAYERSTATE_1C8_U_TURN: player->camRoll -= player->camRoll * 0.1f; - Camera_Update360(player, 0); + Camera_Update360(player, false); break; case PLAYERSTATE_1C8_DOWN: if ((gLevelMode == LEVELMODE_ON_RAILS) && (player->form == FORM_ARWING)) { @@ -6158,7 +6162,7 @@ void Play_UpdateLevel(void) { switch (gCurrentLevel) { case LEVEL_TRAINING: if (gLevelMode == LEVELMODE_ALL_RANGE) { - Training_8019949C(); + Training_SpawnEnemies(); } break; case LEVEL_VERSUS: @@ -6183,7 +6187,7 @@ void Play_UpdateLevel(void) { gPlayer[0].csState = 0; gPlayer[0].draw = true; gPlayer[0].pos.z = 15000.0f; - Camera_Update360(gPlayer, 1); + Camera_Update360(gPlayer, true); gFillScreenAlpha = 255; gFillScreenAlphaStep = 255; gFillScreenAlphaTarget = 255; @@ -6436,7 +6440,7 @@ void Play_Main(void) { gPlayer[0].zPath = gPlayer[0].zPathVel = gPathVelZ = gPathProgress = 0.0f; } if (gPlayState != PLAY_PAUSE) { - (void) "play_time = %d\n"; + PRINTF("play_time = %d\n"); gGameFrameCount++; } switch (gPlayState) { @@ -6475,7 +6479,7 @@ void Play_Main(void) { gCamCount = 1; gBgColor = 0; gCsFrameCount = gLevelClearScreenTimer = gLevelStartStatusScreenTimer = gRadioState = 0; - D_ctx_8017782C = 0; + D_ctx_8017782C = false; } if (gVersusMode) { Versus_Main(); diff --git a/src/engine/fox_reset.c b/src/engine/fox_reset.c index f61236b1..e191109c 100644 --- a/src/engine/fox_reset.c +++ b/src/engine/fox_reset.c @@ -33,11 +33,13 @@ void Graphics_NMIWipe(void) { if (sWipeBarLength == 0) { AudioThread_PreNMIReset(); } + sWipeBarLength += SCREEN_WIDTH / 7; if (sWipeBarLength >= SCREEN_WIDTH * 85 / 8 / 7) { // Why 85 / 8 == 3400 / 320 == 10.625? Has to do with NMI timing? osViBlack(true); gStopTasks = true; } + for (i = 0; i < MAXCONTROLLERS; i++) { gControllerRumbleEnabled[i] = 0; gControllerRumbleFlags[i] = 0; diff --git a/src/engine/fox_save.c b/src/engine/fox_save.c index c6a88897..f477a78f 100644 --- a/src/engine/fox_save.c +++ b/src/engine/fox_save.c @@ -65,7 +65,7 @@ s32 Save_Read(void) { gSaveFile = gSaveIOBuffer; if (gSaveFile.save.checksum == Save_Checksum(&gSaveFile.save)) { - (void) "EEPROM ROM[0] 正常\n"; + PRINTF("EEPROM ROM[0] 正常\n"); return 0; } #ifdef AVOID_UB @@ -78,9 +78,10 @@ s32 Save_Read(void) { gSaveFile.save.checksum = gSaveFile.backup.checksum; if (gSaveFile.save.checksum == Save_Checksum(&gSaveFile.save)) { - (void) "EEPROM ROM[1] 正常\n"; + PRINTF("EEPROM ROM[1] 正常\n"); return 0; + } else { + PRINTF("EEPROM ROM[0] & ROM[1] 異常\n"); + return -1; } - (void) "EEPROM ROM[0] & ROM[1] 異常\n"; - return -1; } diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 53f247fa..8b604450 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -537,7 +537,7 @@ void func_tank_80045130(Player* player) { } void func_tank_80045348(Player* player) { - f32 sp44 = 15.0f; + f32 baseSpeedTarget = 15.0f; f32 sp40 = 0; f32 sp3C = 0.1f; f32 sp38 = 3.5f; @@ -555,7 +555,7 @@ void func_tank_80045348(Player* player) { } else { player->unk_190 = 2.0f; } - sp44 = 25.0f; + baseSpeedTarget = 25.0f; sp40 = -200.0f; sp3C = 0.2f; sp38 = 6.0f; @@ -571,7 +571,7 @@ void func_tank_80045348(Player* player) { } if ((gBrakeButton[player->num] & gInputHold->button) && !player->boostCooldown && !sp2E) { D_800C9F14++; - sp44 = 5.0f; + baseSpeedTarget = 5.0f; sp40 = 100.0f; sp3C = 0.2f; D_800C9F28 += 1.0f; @@ -579,7 +579,7 @@ void func_tank_80045348(Player* player) { } else { D_800C9F28 = 0.0f; } - Math_SmoothStepToF(&player->baseSpeed, sp44, sp3C, sp38, 0.001f); + Math_SmoothStepToF(&player->baseSpeed, baseSpeedTarget, sp3C, sp38, 0.001f); Math_SmoothStepToF(&player->camDist, sp40, sp3C, sp38, 0.001f); } else if (player->unk_19C == -1) { Math_SmoothStepToF(&player->baseSpeed, player->unk_000, 0.1f, 2.0f, 0.01f); @@ -1351,7 +1351,7 @@ void func_tank_800481F4(Player* player) { (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && (scenery->obj.id != OBJ_SCENERY_69) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z)) { var_fv1 = scenery->obj.rot.y; - if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { + if (scenery->info.action == (ObjectFunc) SceneryRotateTowardsCamera) { var_fv1 = 0.0f; } temp_v0 = Player_CheckHitboxCollision(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, @@ -1463,7 +1463,7 @@ void func_tank_800481F4(Player* player) { actor->obj.rot.y, actor->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { actor->dmgType = DMG_COLLISION; - if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_ACTOR_190)) { + if ((actor->obj.id == OBJ_ACTOR_225) || (actor->obj.id == OBJ_MISSILE_SEEK_TEAM)) { actor->dmgType = -1; } if (actor->info.damage) { diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 015853d1..28633126 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -1953,7 +1953,7 @@ void func_versus_800C26C8(void) { actor->obj.pos.x = dest.x; actor->obj.pos.y = dest.y; actor->obj.pos.z = dest.z; - actor->aiType = i + AI360_10; + actor->aiType = i + AI360_ENEMY; actor->health = 24; actor->timer_0C2 = 30; |
