From a2c8eabbc5fc631a9f93a597205518feac0c40df Mon Sep 17 00:00:00 2001 From: Tom Overton Date: Sun, 2 Oct 2022 13:47:27 -0700 Subject: [PATCH] Document everything in ovl_Boss_Ganon2.xml (#1377) * Document everything in ovl_Boss_Ganon2.xml * Add translation I forgot to do * Remove leading zeroes --- assets/xml/overlays/ovl_Boss_Ganon2.xml | 92 +++++-------------- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 35 +++---- 2 files changed, 40 insertions(+), 87 deletions(-) diff --git a/assets/xml/overlays/ovl_Boss_Ganon2.xml b/assets/xml/overlays/ovl_Boss_Ganon2.xml index 66fd5bbf6f..3d5bfdfba0 100644 --- a/assets/xml/overlays/ovl_Boss_Ganon2.xml +++ b/assets/xml/overlays/ovl_Boss_Ganon2.xml @@ -1,77 +1,29 @@ - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 51ec679480..eab578f87d 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -2374,7 +2374,7 @@ void func_809034E4(Vec3f* arg0, Vec3f* arg1) { } } - vtx = SEGMENTED_TO_VIRTUAL(ovl_Boss_Ganon2_Vtx_00BA20); + vtx = SEGMENTED_TO_VIRTUAL(gGanonSwordTrailVtx); for (i = 0; i < 11; i++) { if ((temp_s4 - i) > 0) { vtx[D_80907084[i]].n.ob[0] = sp18C[temp_s4 - i - 1].x; @@ -2406,7 +2406,7 @@ void func_80903F38(BossGanon2* this, PlayState* play) { Matrix_Translate(0.0f, 0.0f, 0.0f, MTXMODE_NEW); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5117), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, ovl_Boss_Ganon2_DL_00BB80); + gSPDisplayList(POLY_XLU_DISP++, gGanonSwordTrailDL); } CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5122); @@ -2429,7 +2429,7 @@ void func_80904108(BossGanon2* this, PlayState* play) { Matrix_Scale(0.098000005f, 0.1f, 0.098000005f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5183), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(ovl_Boss_Ganon2_DL_00E1C0)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanonFireRingDL)); Matrix_Pop(); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5186); @@ -2479,7 +2479,7 @@ void func_80904340(BossGanon2* this, PlayState* play) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5250), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(ovl_Boss_Ganon2_DL_00D798)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanonLightningDL)); } } @@ -2503,7 +2503,7 @@ void func_8090464C(BossGanon2* this, PlayState* play) { Matrix_Scale(0.6f, 0.6f, 1.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5290), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(ovl_Boss_Ganon2_DL_00CCD8)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanonTriforceDL)); Matrix_Pop(); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5293); @@ -2624,7 +2624,7 @@ void func_80904D88(BossGanon2* this, PlayState* play) { gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(POLY_XLU_DISP++, 100, 255, 255, 0); } - gSPDisplayList(POLY_XLU_DISP++, ovl_Boss_Ganon2_DL_00B308); + gSPDisplayList(POLY_XLU_DISP++, gGanonLightOrbMaterialDL); for (i = 0; i < 15; i++) { Matrix_Translate(this->unk_234[i].x, this->unk_234[i].y, this->unk_234[i].z, MTXMODE_NEW); @@ -2633,7 +2633,7 @@ void func_80904D88(BossGanon2* this, PlayState* play) { Matrix_RotateZ(Rand_CenteredFloat(M_PI), MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5618), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, ovl_Boss_Ganon2_DL_00B378); + gSPDisplayList(POLY_XLU_DISP++, gGanonLightOrbModelDL); } } @@ -2649,7 +2649,7 @@ void func_80904FC8(BossGanon2* this, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 200); gDPSetEnvColor(POLY_XLU_DISP++, 255, 200, 0, 0); - gSPDisplayList(POLY_XLU_DISP++, ovl_Boss_Ganon2_DL_00B308); + gSPDisplayList(POLY_XLU_DISP++, gGanonLightOrbMaterialDL); Matrix_Translate(sZelda->actor.world.pos.x, sZelda->actor.world.pos.y + 80.0f, sZelda->actor.world.pos.z, MTXMODE_NEW); Matrix_ReplaceRotation(&play->billboardMtxF); @@ -2657,11 +2657,11 @@ void func_80904FC8(BossGanon2* this, PlayState* play) { Matrix_RotateZ(this->unk_388, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5661), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(ovl_Boss_Ganon2_DL_00B378)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanonLightOrbModelDL)); Matrix_RotateZ(this->unk_388 * -2.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5664), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(ovl_Boss_Ganon2_DL_00B378)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanonLightOrbModelDL)); } CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5667); @@ -2680,7 +2680,7 @@ void func_8090523C(BossGanon2* this, PlayState* play) { Gfx_SetupDL_25Xlu(play->state.gfxCtx); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s16)this->unk_38C); gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 255, 0); - gSPDisplayList(POLY_XLU_DISP++, ovl_Boss_Ganon2_DL_00B308); + gSPDisplayList(POLY_XLU_DISP++, gGanonLightOrbMaterialDL); for (i = 0; i < 11; i++) { Matrix_Mult(&player->mf_9E0, MTXMODE_NEW); @@ -2697,7 +2697,7 @@ void func_8090523C(BossGanon2* this, PlayState* play) { Matrix_RotateZ(Rand_ZeroFloat(2.0f * M_PI), MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5721), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(ovl_Boss_Ganon2_DL_00B378)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanonLightOrbModelDL)); } } @@ -2744,7 +2744,7 @@ void func_80905674(BossGanon2* this, PlayState* play) { Matrix_RotateX(M_PI / 2.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 5814), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(ovl_Boss_Ganon2_DL_00EC40)); + gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gGanonZeldaMagicDL)); Matrix_Pop(); CLOSE_DISPS(play->state.gfxCtx, "../z_boss_ganon2.c", 5817); @@ -2922,7 +2922,8 @@ void BossGanon2_DrawEffects(PlayState* play) { G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_TexScroll(play->state.gfxCtx, 0, 0 - (play->gameplayFrames & 0x7F), 32, 32)); - gSPDisplayList(POLY_OPA_DISP++, ovl_Boss_Ganon2_DL_0103A8); + gSPDisplayList(POLY_OPA_DISP++, gGanonMasterSwordDL); + if ((play->envCtx.lightSetting == 1) || (play->envCtx.lightSetting == 2)) { alpha = (s16)(play->envCtx.lightBlend * 150.0f) + 50; angle = M_PI / 5.0f; @@ -2937,7 +2938,7 @@ void BossGanon2_DrawEffects(PlayState* play) { Matrix_Scale(1.0f, 0.0f, 1.0f, MTXMODE_APPLY); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 6155), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_XLU_DISP++, ovl_Boss_Ganon2_DL_00F188); + gSPDisplayList(POLY_XLU_DISP++, gGanonMasterSwordShadowDL); } } @@ -3076,10 +3077,10 @@ void BossGanon2_DrawShadowTexture(void* shadowTexture, BossGanon2* this, PlaySta Matrix_Scale(1.65f, 1.0f, 1.65f, MTXMODE_APPLY); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, "../z_boss_ganon2.c", 6457), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - gSPDisplayList(POLY_OPA_DISP++, ovl_Boss_Ganon2_DL_00B3D0); + gSPDisplayList(POLY_OPA_DISP++, gGanonShadowMaterialDL); gDPLoadTextureBlock(POLY_OPA_DISP++, shadowTexture, G_IM_FMT_I, G_IM_SIZ_8b, 64, 64, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, 6, 6, G_TX_NOLOD, G_TX_NOLOD); - gSPDisplayList(POLY_OPA_DISP++, ovl_Boss_Ganon2_DL_00B3F0); + gSPDisplayList(POLY_OPA_DISP++, gGanonShadowModelDL); CLOSE_DISPS(gfxCtx, "../z_boss_ganon2.c", 6479); }