diff --git a/.vscode/settings.json b/.vscode/settings.json index da500595..b45d5b77 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -150,7 +150,8 @@ "string": "c", "prevent_bss_reordering3.h": "c", "ast_a_ti.h": "c", - "fox_co.h": "c" + "fox_co.h": "c", + "ast_map.h": "c" }, "C_Cpp_Runner.msvcBatchPath": "" } \ No newline at end of file diff --git a/assets/yaml/jp/rev0/ast_allies.yaml b/assets/yaml/jp/rev0/ast_allies.yaml index 9ccff794..52856323 100644 --- a/assets/yaml/jp/rev0/ast_allies.yaml +++ b/assets/yaml/jp/rev0/ast_allies.yaml @@ -53,11 +53,11 @@ D_D007A70: D_D008990: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD008990, symbol: D_D008990 } -D_D0098B0: - { type: GFX, offset: 0xD0098B0, symbol: D_D0098B0 } +aKattRadarMarkDL: + { type: GFX, offset: 0xD0098B0, symbol: aKattRadarMarkDL } -D_D009938: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: D_D009938 } +aKattRadarMarkTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: aKattRadarMarkTex } aKattShipDL: { type: GFX, offset: 0xD009A40, symbol: aKattShipDL } diff --git a/assets/yaml/jp/rev0/ast_andross.yaml b/assets/yaml/jp/rev0/ast_andross.yaml index ea967a85..ece202c0 100644 --- a/assets/yaml/jp/rev0/ast_andross.yaml +++ b/assets/yaml/jp/rev0/ast_andross.yaml @@ -16,8 +16,8 @@ D_ANDROSS_C000000: {type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0xC000000, symbol: D_ANDROSS_C000000} -D_ANDROSS_C000A80: - {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: D_ANDROSS_C000A80} +aAndTitleCardTex: + {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: aAndTitleCardTex} D_ANDROSS_C001880: {type: GFX, offset: 0xC001880, symbol: D_ANDROSS_C001880} diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index ac9b2f32..30c547e8 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_AQ_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: D_AQ_6000000 } +aAqTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: aAqTitleCardTex } aAqSquidAnim: { type: SF64:ANIM, offset: 0x6000AE4, symbol: aAqSquidAnim } diff --git a/assets/yaml/jp/rev0/ast_area_6.yaml b/assets/yaml/jp/rev0/ast_area_6.yaml index 9b35795e..27e857a8 100644 --- a/assets/yaml/jp/rev0/ast_area_6.yaml +++ b/assets/yaml/jp/rev0/ast_area_6.yaml @@ -12,8 +12,8 @@ - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_A6_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: D_A6_6000000 } +aA6TitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: aA6TitleCardTex } D_A6_6000B60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06000B60, symbol: D_A6_6000B60 } diff --git a/assets/yaml/jp/rev0/ast_arwing.yaml b/assets/yaml/jp/rev0/ast_arwing.yaml index 7354410b..69cec0e5 100644 --- a/assets/yaml/jp/rev0/ast_arwing.yaml +++ b/assets/yaml/jp/rev0/ast_arwing.yaml @@ -8,17 +8,17 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_arwing_3000000: - { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_arwing_3000000 } +aArwingLifeIconTex: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: aArwingLifeIconTex } -D_arwing_3000080: - { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_arwing_3000080 } +aArwingLifeIconTLUT: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: aArwingLifeIconTLUT } -D_arwing_3000090: - { type: GFX, offset: 0x3000090, symbol: D_arwing_3000090 } +aAwFoxHeadDL: + { type: GFX, offset: 0x3000090, symbol: aAwFoxHeadDL } -D_arwing_3001C90: - { type: GFX, offset: 0x3001C90, symbol: D_arwing_3001C90 } +aAwJamesHeadDL: + { type: GFX, offset: 0x3001C90, symbol: aAwJamesHeadDL } D_arwing_3003960: { type: TEXTURE, format: RGBA16, offset: 0x3003960, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003960 } @@ -41,11 +41,11 @@ D_arwing_3003BE0: D_arwing_3003C60: { type: TEXTURE, format: RGBA16, offset: 0x3003C60, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003C60 } -D_arwing_3003CE0: - { type: GFX, offset: 0x3003CE0, symbol: D_arwing_3003CE0 } +aAwPeppyHeadDL: + { type: GFX, offset: 0x3003CE0, symbol: aAwPeppyHeadDL } -D_arwing_3005AB0: - { type: GFX, offset: 0x3005AB0, symbol: D_arwing_3005AB0 } +aAwSlippyHeadDL: + { type: GFX, offset: 0x3005AB0, symbol: aAwSlippyHeadDL } D_arwing_30074D0: { type: TEXTURE, format: RGBA16, offset: 0x30074D0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30074D0 } @@ -68,8 +68,8 @@ D_arwing_3008960: D_arwing_3009960: { type: TEXTURE, format: RGBA16, offset: 0x3009960, width: 16, height: 16, ctype: u16, symbol: D_arwing_3009960 } -D_arwing_3009B60: - { type: GFX, offset: 0x3009B60, symbol: D_arwing_3009B60 } +aAwBodyDL: + { type: GFX, offset: 0x3009B60, symbol: aAwBodyDL } D_arwing_300AC48: { type: TEXTURE, format: RGBA16, offset: 0x300AC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300AC48 } @@ -104,8 +104,8 @@ D_arwing_300F448: D_arwing_3010448: { type: TEXTURE, format: RGBA16, offset: 0x3010448, width: 64, height: 32, ctype: u16, symbol: D_arwing_3010448 } -D_arwing_3011720: - { type: GFX, offset: 0x3011720, symbol: D_arwing_3011720 } +aAwLaserGun1DL: + { type: GFX, offset: 0x3011720, symbol: aAwLaserGun1DL } D_arwing_30119F0: { type: TEXTURE, format: RGBA16, offset: 0x30119F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30119F0 } @@ -116,8 +116,8 @@ D_arwing_30121F0: D_arwing_30129F0: { type: TEXTURE, format: RGBA16, offset: 0x30129F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30129F0 } -D_arwing_30131F0: - { type: GFX, offset: 0x30131F0, symbol: D_arwing_30131F0 } +aAwCockpitViewDL: + { type: GFX, offset: 0x30131F0, symbol: aAwCockpitViewDL } D_arwing_30137E8: { type: TEXTURE, format: RGBA16, offset: 0x30137E8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30137E8 } @@ -128,17 +128,17 @@ D_arwing_3013FE8: D_arwing_30147E8: { type: TEXTURE, format: RGBA16, offset: 0x30147E8, width: 16, height: 32, ctype: u16, symbol: D_arwing_30147E8 } -D_arwing_3014BF0: - { type: GFX, offset: 0x3014BF0, symbol: D_arwing_3014BF0 } +aAwRightWingBrokenDL: + { type: GFX, offset: 0x3014BF0, symbol: aAwRightWingBrokenDL } D_arwing_3014F20: { type: TEXTURE, format: RGBA16, offset: 0x3014F20, width: 16, height: 16, ctype: u16, symbol: D_arwing_3014F20 } -D_arwing_3015120: - { type: GFX, offset: 0x3015120, symbol: D_arwing_3015120 } +aAwLeftWingBrokenDL: + { type: GFX, offset: 0x3015120, symbol: aAwLeftWingBrokenDL } -D_arwing_30155E0: - { type: GFX, offset: 0x30155E0, symbol: D_arwing_30155E0} +aAwFlap1DL: + { type: GFX, offset: 0x30155E0, symbol: aAwFlap1DL} D_arwing_3015AF4: { type: SF64:ANIM, offset: 0x3015AF4, symbol: D_arwing_3015AF4 } @@ -149,8 +149,8 @@ D_arwing_3015C28: D_arwing_3015D68: { type: SF64:ANIM, offset: 0x3015D68, symbol: D_arwing_3015D68 } -D_arwing_3015D80: - { type: GFX, offset: 0x3015D80, symbol: D_arwing_3015D80 } +aAwRightWingDL: + { type: GFX, offset: 0x3015D80, symbol: aAwRightWingDL } D_arwing_30163C4: { type: SF64:ANIM, offset: 0x30163C4, symbol: D_arwing_30163C4 } @@ -158,8 +158,8 @@ D_arwing_30163C4: D_arwing_3016610: { type: SF64:SKELETON, offset: 0x3016610, symbol: D_arwing_3016610 } -D_arwing_3016660: - { type: GFX, offset: 0x3016660, symbol: D_arwing_3016660} +aAwLeftWingDL: + { type: GFX, offset: 0x3016660, symbol: aAwLeftWingDL} D_arwing_3016B30: { type: GFX, offset: 0x3016B30, symbol: D_arwing_3016B30 } @@ -167,8 +167,8 @@ D_arwing_3016B30: D_arwing_3016BB8: { type: TEXTURE, format: IA8, offset: 0x3016BB8, width: 16, height: 16, ctype: u8, symbol: D_arwing_3016BB8 } -D_arwing_3016CC0: - { type: GFX, offset: 0x3016CC0, symbol: D_arwing_3016CC0 } +aAwFalcoHeadDL: + { type: GFX, offset: 0x3016CC0, symbol: aAwFalcoHeadDL } D_arwing_30182C8: { type: TEXTURE, format: RGBA16, offset: 0x30182C8, width: 8, height: 8, ctype: u16, symbol: D_arwing_30182C8 } diff --git a/assets/yaml/jp/rev0/ast_blue_marine.yaml b/assets/yaml/jp/rev0/ast_blue_marine.yaml index 4d0809de..6233790f 100644 --- a/assets/yaml/jp/rev0/ast_blue_marine.yaml +++ b/assets/yaml/jp/rev0/ast_blue_marine.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_blue_marine_3000000: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_blue_marine_3000000, tlut: 0x3000080 } +aBlueMarineLifeIconTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: aBlueMarineLifeIconTex, tlut: 0x3000080 } -D_blue_marine_3000080: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: D_blue_marine_3000080 } +aBlueMarineLifeIconTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: aBlueMarineLifeIconTLUT } D_blue_marine_3000090: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 9, offset: 0x3000090, symbol: D_blue_marine_3000090, tlut: 0x3000120 } diff --git a/assets/yaml/jp/rev0/ast_bolse.yaml b/assets/yaml/jp/rev0/ast_bolse.yaml index a1c3c57b..95a6e02c 100644 --- a/assets/yaml/jp/rev0/ast_bolse.yaml +++ b/assets/yaml/jp/rev0/ast_bolse.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' # Bolse Defense Outpost -D_BO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: D_BO_6000000 } +aBoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: aBoTitleCardTex } D_BO_6000C80: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6000C80, symbol: D_BO_6000C80 } diff --git a/assets/yaml/jp/rev0/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml index 7d8d20ff..d7f7b08c 100644 --- a/assets/yaml/jp/rev0/ast_common.yaml +++ b/assets/yaml/jp/rev0/ast_common.yaml @@ -17,8 +17,8 @@ D_1000280: D_1000640: { type: TEXTURE, format: IA8, width: 96, height: 22, ctype: u8, offset: 0x1000640, symbol: D_1000640 } -D_1000E80: - { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: D_1000E80 } +aBoostGaugeFrameTex: + { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: aBoostGaugeFrameTex } D_1001030: { type: TEXTURE, format: IA8, width: 8, height: 8, ctype: u8, offset: 0x1001030, symbol: D_1001030 } @@ -41,8 +41,8 @@ D_1002040: D_1002220: { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002220, symbol: D_1002220 } -D_1002280: - { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: D_1002280 } +aShieldGaugeFrameEdgeTex: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: aShieldGaugeFrameEdgeTex } D_10022E0: { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10022E0, symbol: D_10022E0 } @@ -53,8 +53,8 @@ D_1002340: D_10024D0: { type: TEXTURE, format: IA8, width: 96, height: 32, ctype: u8, offset: 0x10024D0, symbol: D_10024D0 } -D_10030D0: - { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: D_10030D0 } +aShieldGaugeFrameTex: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: aShieldGaugeFrameTex } D_1003130: { type: GFX, offset: 0x1003130, symbol: D_1003130 } @@ -65,14 +65,14 @@ D_1003208: D_1003288: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1003288, ctype: u16, symbol: D_1003288 } -D_10032A0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: D_10032A0 } +aFalcoPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: aFalcoPortraitTex } D_10041C0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10041C0, symbol: D_10041C0 } -D_10050E0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: D_10050E0 } +aFoxPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: aFoxPortraitTex } D_1006000: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1006000, symbol: D_1006000 } @@ -92,14 +92,14 @@ D_1009C80: D_100ABA0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100ABA0, symbol: D_100ABA0 } -D_100BAC0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: D_100BAC0 } +aPeppyPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: aPeppyPortraitTex } D_100C9E0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100C9E0, symbol: D_100C9E0 } -D_100D900: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: D_100D900 } +aSlippyPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: aSlippyPortraitTex } D_100E820: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100E820, symbol: D_100E820 } @@ -215,17 +215,17 @@ D_1011200: D_1011270: { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x1011270, symbol: D_1011270 } -D_1011280: - { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: D_1011280 } +aRadarFrameTex: + { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: aRadarFrameTex } -D_10116A0: - { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: D_10116A0 } +aRadarFrameTLUT: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: aRadarFrameTLUT } -D_10116B0: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: D_10116B0 } +aVsBombIconTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: aVsBombIconTex } -D_1011730: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: D_1011730 } +aVsBombIconTLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: aVsBombIconTLUT } D_1011750: { type: TEXTURE, format: CI4, width: 80, height: 13, ctype: u8, offset: 0x1011750, tlut: 0x1011958, symbol: D_1011750 } @@ -245,29 +245,29 @@ D_1011A40: D_1011AB0: { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011AB0, symbol: D_1011AB0 } -D_1011AC0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: D_1011AC0 } +aIncomingMsgButtonTex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: aIncomingMsgButtonTex } -D_1011B90: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: D_1011B90 } +aIncomingMsgButtonTLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: aIncomingMsgButtonTLUT } -D_1011BB0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: D_1011BB0 } +aIncomingMsgSignal1Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: aIncomingMsgSignal1Tex } -D_1011C80: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: D_1011C80 } +aIncomingMsgSignal1TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: aIncomingMsgSignal1TLUT } -D_1011CA0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: D_1011CA0 } +aIncomingMsgSignal2Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: aIncomingMsgSignal2Tex } -D_1011D70: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: D_1011D70 } +aIncomingMsgSignal2TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: aIncomingMsgSignal2TLUT } -D_1011D90: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: D_1011D90 } +aIncomingMsgSignal3Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: aIncomingMsgSignal3Tex } -D_1011E60: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: D_1011E60 } +aIncomingMsgSignal3TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: aIncomingMsgSignal3TLUT } D_1011E80: { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1011E80, tlut: 0x1011EC0, symbol: D_1011E80 } @@ -275,11 +275,11 @@ D_1011E80: D_1011EC0: { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011EC0, symbol: D_1011EC0 } -D_1011ED0: - { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: D_1011ED0 } +aXTex: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: aXTex } -D_1011F08: - { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: D_1011F08 } +aXTLUT: + { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: aXTLUT } D_1011F20: { type: GFX, offset: 0x1011F20, symbol: D_1011F20 } @@ -290,11 +290,11 @@ D_1012000: D_1012100: { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1012100, ctype: u16, symbol: D_1012100 } -D_1012110: - { type: GFX, offset: 0x1012110, symbol: D_1012110 } +aGoldRingEmptySlotDL: + { type: GFX, offset: 0x1012110, symbol: aGoldRingEmptySlotDL } -D_1012190: - { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: D_1012190 } +aGoldRingEmptySlotTex: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: aGoldRingEmptySlotTex } D_1012290: { type: TEXTURE, format: CI8, width: 48, height: 22, ctype: u8, offset: 0x1012290, tlut: 0x10126B0, symbol: D_1012290 } @@ -314,17 +314,17 @@ D_1013780: D_10151F0: { type: TEXTURE, format: TLUT, colors: 146, ctype: u16, offset: 0x10151F0, symbol: D_10151F0 } -D_10127D0: - { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: D_10127D0 } +aBoostGaugeCoolTex: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: aBoostGaugeCoolTex } -D_1012898: - { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: D_1012898 } +aBoostGaugeCoolTLUT: + { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: aBoostGaugeCoolTLUT } -D_10128C0: - { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: D_10128C0 } +aBoostGaugeOverheatTex: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: aBoostGaugeOverheatTex } -D_1012988: - { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: D_1012988 } +aBoostGaugeOverheatTLUT: + { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: aBoostGaugeOverheatTLUT } D_10129C0: { type: TEXTURE, format: CI8, width: 16, height: 109, ctype: u8, offset: 0x10129C0, tlut: 0x1013090, symbol: D_10129C0 } @@ -332,17 +332,17 @@ D_10129C0: D_1013090: { type: TEXTURE, format: TLUT, colors: 112, ctype: u16, offset: 0x1013090, symbol: D_1013090 } -D_1013170: - { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: D_1013170 } +aMsgWindowBgTex: + { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: aMsgWindowBgTex } -D_1013570: - { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: D_1013570 } +aMsgWindowBgTLUT: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: aMsgWindowBgTLUT } -D_1013580: - { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: D_1013580 } +aShieldGaugeTex: + { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: aShieldGaugeTex } -D_1013700: - { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: D_1013700 } +aShieldGaugeTLUT: + { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: aShieldGaugeTLUT } D_1015320: { type: GFX, offset: 0x1015320, symbol: D_1015320 } @@ -353,11 +353,11 @@ D_10153F8: D_10154F8: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10154F8, ctype: u16, symbol: D_10154F8 } -D_1015510: - { type: GFX, offset: 0x1015510, symbol: D_1015510 } +aRadarMarkArwingDL: + { type: GFX, offset: 0x1015510, symbol: aRadarMarkArwingDL } -D_1015598: - { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: D_1015598 } +aRadarMarkArwingTex: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: aRadarMarkArwingTex } D_10156A0: { type: GFX, offset: 0x10156A0, symbol: D_10156A0 } @@ -563,8 +563,8 @@ D_101AED0: D_101AF98: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x101AF98, symbol: D_101AF98 } -D_101B1A0: - { type: GFX, offset: 0x101B1A0, symbol: D_101B1A0 } +aGoldRingFrame12DL: + { type: GFX, offset: 0x101B1A0, symbol: aGoldRingFrame12DL } D_101B268: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B268, tlut: 0x101B2E8, symbol: D_101B268 } @@ -572,8 +572,8 @@ D_101B268: D_101B2E8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B2E8, ctype: u16, symbol: D_101B2E8 } -D_101B310: - { type: GFX, offset: 0x101B310, symbol: D_101B310 } +aGoldRingFrame11DL: + { type: GFX, offset: 0x101B310, symbol: aGoldRingFrame11DL } D_101B3D8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B3D8, tlut: 0x101B458, symbol: D_101B3D8 } @@ -581,8 +581,8 @@ D_101B3D8: D_101B458: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B458, ctype: u16, symbol: D_101B458 } -D_101B480: - { type: GFX, offset: 0x101B480, symbol: D_101B480 } +aGoldRingFrame10DL: + { type: GFX, offset: 0x101B480, symbol: aGoldRingFrame10DL } D_101B548: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B548, tlut: 0x101B5C8, symbol: D_101B548 } @@ -590,8 +590,8 @@ D_101B548: D_101B5C8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B5C8, ctype: u16, symbol: D_101B5C8 } -D_101B5F0: - { type: GFX, offset: 0x101B5F0, symbol: D_101B5F0 } +aGoldRingFrame9DL: + { type: GFX, offset: 0x101B5F0, symbol: aGoldRingFrame9DL } D_101B6B8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B6B8, tlut: 0x101B738, symbol: D_101B6B8 } @@ -599,8 +599,8 @@ D_101B6B8: D_101B738: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B738, ctype: u16, symbol: D_101B738 } -D_101B760: - { type: GFX, offset: 0x101B760, symbol: D_101B760 } +aGoldRingFrame8DL: + { type: GFX, offset: 0x101B760, symbol: aGoldRingFrame8DL } D_101B828: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B828, tlut: 0x101B8A8, symbol: D_101B828 } @@ -608,8 +608,8 @@ D_101B828: D_101B8A8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B8A8, ctype: u16, symbol: D_101B8A8 } -D_101B8D0: - { type: GFX, offset: 0x101B8D0, symbol: D_101B8D0 } +aGoldRingFrame7DL: + { type: GFX, offset: 0x101B8D0, symbol: aGoldRingFrame7DL } D_101B998: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B998, tlut: 0x101BA18, symbol: D_101B998 } @@ -617,8 +617,8 @@ D_101B998: D_101BA18: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BA18, ctype: u16, symbol: D_101BA18 } -D_101BA40: - { type: GFX, offset: 0x101BA40, symbol: D_101BA40 } +aGoldRingFrame6DL: + { type: GFX, offset: 0x101BA40, symbol: aGoldRingFrame6DL } D_101BB08: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BB08, tlut: 0x101BB88, symbol: D_101BB08 } @@ -626,8 +626,8 @@ D_101BB08: D_101BB88: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BB88, ctype: u16, symbol: D_101BB88 } -D_101BBB0: - { type: GFX, offset: 0x101BBB0, symbol: D_101BBB0 } +aGoldRingFrame5DL: + { type: GFX, offset: 0x101BBB0, symbol: aGoldRingFrame5DL } D_101BC78: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BC78, tlut: 0x101BCF8, symbol: D_101BC78 } @@ -635,8 +635,8 @@ D_101BC78: D_101BCF8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BCF8, ctype: u16, symbol: D_101BCF8 } -D_101BD20: - { type: GFX, offset: 0x101BD20, symbol: D_101BD20 } +aGoldRingFrame4DL: + { type: GFX, offset: 0x101BD20, symbol: aGoldRingFrame4DL } D_101BDE8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BDE8, tlut: 0x101BE68, symbol: D_101BDE8 } @@ -644,8 +644,8 @@ D_101BDE8: D_101BE68: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BE68, ctype: u16, symbol: D_101BE68 } -D_101BE90: - { type: GFX, offset: 0x101BE90, symbol: D_101BE90 } +aGoldRingFrame3DL: + { type: GFX, offset: 0x101BE90, symbol: aGoldRingFrame3DL } D_101BF58: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BF58, tlut: 0x101BFD8, symbol: D_101BF58 } @@ -653,8 +653,8 @@ D_101BF58: D_101BFD8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BFD8, ctype: u16, symbol: D_101BFD8 } -D_101C000: - { type: GFX, offset: 0x101C000, symbol: D_101C000 } +aGoldRingFrame2DL: + { type: GFX, offset: 0x101C000, symbol: aGoldRingFrame2DL } D_101C0C8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C0C8, tlut: 0x101C148, symbol: D_101C0C8 } @@ -662,8 +662,8 @@ D_101C0C8: D_101C148: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C148, ctype: u16, symbol: D_101C148 } -D_101C170: - { type: GFX, offset: 0x101C170, symbol: D_101C170 } +aGoldRingFrame1DL: + { type: GFX, offset: 0x101C170, symbol: aGoldRingFrame1DL } D_101C238: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C238, tlut: 0x101C2B8, symbol: D_101C238 } @@ -671,11 +671,11 @@ D_101C238: D_101C2B8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C2B8, ctype: u16, symbol: D_101C2B8 } -D_101C2E0: - { type: GFX, offset: 0x101C2E0, symbol: D_101C2E0 } +aStarDL: + { type: GFX, offset: 0x101C2E0, symbol: aStarDL } -D_101C368: - { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: D_101C368 } +aStarTex: + { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: aStarTex } D_101C770: { type: GFX, offset: 0x101C770, symbol: D_101C770 } @@ -833,8 +833,8 @@ aSlippyMarkTex: aSlippyMarkTLUT: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: aSlippyMarkTLUT } -D_1024830: - { type: GFX, offset: 0x1024830, symbol: D_1024830 } +aRadarMarkBossDL: + { type: GFX, offset: 0x1024830, symbol: aRadarMarkBossDL } D_10248F8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10248F8, tlut: 0x1024978, symbol: D_10248F8 } @@ -842,8 +842,8 @@ D_10248F8: D_1024978: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024978, ctype: u16, symbol: D_1024978 } -D_1024990: - { type: GFX, offset: 0x1024990, symbol: D_1024990 } +aArrowDL: + { type: GFX, offset: 0x1024990, symbol: aArrowDL } D_1024A58: { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1024A58, tlut: 0x1024A98, symbol: D_1024A58 } @@ -851,8 +851,8 @@ D_1024A58: D_1024A98: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x1024A98, ctype: u16, symbol: D_1024A98 } -D_1024AC0: - { type: GFX, offset: 0x1024AC0, symbol: D_1024AC0 } +aOrbDL: + { type: GFX, offset: 0x1024AC0, symbol: aOrbDL } D_1024B58: { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1024B58, symbol: D_1024B58 } @@ -920,8 +920,8 @@ D_102A010: D_102A098: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102A098, symbol: D_102A098 } -D_102A8A0: - { type: GFX, offset: 0x102A8A0, symbol: D_102A8A0 } +aRadarMarkKaSaucererDL: + { type: GFX, offset: 0x102A8A0, symbol: aRadarMarkKaSaucererDL } D_102A928: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x102A928, symbol: D_102A928 } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index b53b86c7..0916880d 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -15,8 +15,8 @@ # Corneria # Former Army Base -D_CO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: D_CO_6000000 } +aCoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: aCoTitleCardTex } aCoWaterfallDL: { type: GFX, offset: 0x6000E00, symbol: aCoWaterfallDL } diff --git a/assets/yaml/jp/rev0/ast_font_3d.yaml b/assets/yaml/jp/rev0/ast_font_3d.yaml index 56c601e3..b2a5ff4c 100644 --- a/assets/yaml/jp/rev0/ast_font_3d.yaml +++ b/assets/yaml/jp/rev0/ast_font_3d.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_FONT3D_9000000: - { type: GFX, offset: 0x9000000, symbol: D_FONT3D_9000000 } +aFont3D_DOT: + { type: GFX, offset: 0x9000000, symbol: aFont3D_DOT } -D_FONT3D_90001F0: - { type: GFX, offset: 0x90001F0, symbol: D_FONT3D_90001F0 } +aFont3D_1: + { type: GFX, offset: 0x90001F0, symbol: aFont3D_1 } D_FONT3D_9000528: { type: TEXTURE, ctype: u8, format: CI4, width: 8, height: 8, offset: 0x09000528, symbol: D_FONT3D_9000528, tlut: 0x09000548 } @@ -20,109 +20,109 @@ D_FONT3D_9000528: D_FONT3D_9000548: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x09000548, symbol: D_FONT3D_9000548 } -D_FONT3D_9000570: - { type: GFX, offset: 0x9000570, symbol: D_FONT3D_9000570 } +aFont3D_O: + { type: GFX, offset: 0x9000570, symbol: aFont3D_O } -D_FONT3D_9000980: - { type: GFX, offset: 0x9000980, symbol: D_FONT3D_9000980 } +aFont3D_D: + { type: GFX, offset: 0x9000980, symbol: aFont3D_D } -D_FONT3D_9001120: - { type: GFX, offset: 0x9001120, symbol: D_FONT3D_9001120 } +aFont3D_J: + { type: GFX, offset: 0x9001120, symbol: aFont3D_J } -D_FONT3D_90014E0: - { type: GFX, offset: 0x90014E0, symbol: D_FONT3D_90014E0 } +aFont3D_P: + { type: GFX, offset: 0x90014E0, symbol: aFont3D_P } -D_FONT3D_9001A10: - { type: GFX, offset: 0x9001A10, symbol: D_FONT3D_9001A10 } +aFont3D_Z: + { type: GFX, offset: 0x9001A10, symbol: aFont3D_Z } -D_FONT3D_9001E90: - { type: GFX, offset: 0x9001E90, symbol: D_FONT3D_9001E90 } +aFont3D_Y: + { type: GFX, offset: 0x9001E90, symbol: aFont3D_Y } -D_FONT3D_90022A0: - { type: GFX, offset: 0x90022A0, symbol: D_FONT3D_90022A0 } +aFont3D_X: + { type: GFX, offset: 0x90022A0, symbol: aFont3D_X } -D_FONT3D_9002890: - { type: GFX, offset: 0x9002890, symbol: D_FONT3D_9002890 } +aFont3D_W: + { type: GFX, offset: 0x9002890, symbol: aFont3D_W } -D_FONT3D_9002EA0: - { type: GFX, offset: 0x9002EA0, symbol: D_FONT3D_9002EA0 } +aFont3D_V: + { type: GFX, offset: 0x9002EA0, symbol: aFont3D_V } -D_FONT3D_9003230: - { type: GFX, offset: 0x9003230, symbol: D_FONT3D_9003230 } +aFont3D_U: + { type: GFX, offset: 0x9003230, symbol: aFont3D_U } -D_FONT3D_9003620: - { type: GFX, offset: 0x9003620, symbol: D_FONT3D_9003620 } +aFont3D_T: + { type: GFX, offset: 0x9003620, symbol: aFont3D_T } -D_FONT3D_9003A30: - { type: GFX, offset: 0x9003A30, symbol: D_FONT3D_9003A30 } +aFont3D_S: + { type: GFX, offset: 0x9003A30, symbol: aFont3D_S } -D_FONT3D_9004230: - { type: GFX, offset: 0x9004230, symbol: D_FONT3D_9004230 } +aFont3D_R: + { type: GFX, offset: 0x9004230, symbol: aFont3D_R } -D_FONT3D_9004920: - { type: GFX, offset: 0x9004920, symbol: D_FONT3D_9004920 } +aFont3D_Q: + { type: GFX, offset: 0x9004920, symbol: aFont3D_Q } -D_FONT3D_9004E10: - { type: GFX, offset: 0x9004E10, symbol: D_FONT3D_9004E10 } +aFont3D_N: + { type: GFX, offset: 0x9004E10, symbol: aFont3D_N } -D_FONT3D_9005380: - { type: GFX, offset: 0x9005380, symbol: D_FONT3D_9005380 } +aFont3D_M: + { type: GFX, offset: 0x9005380, symbol: aFont3D_M } -D_FONT3D_9005980: - { type: GFX, offset: 0x9005980, symbol: D_FONT3D_9005980 } +aFont3D_L: + { type: GFX, offset: 0x9005980, symbol: aFont3D_L } -D_FONT3D_9005CA0: - { type: GFX, offset: 0x9005CA0, symbol: D_FONT3D_9005CA0 } +aFont3D_K: + { type: GFX, offset: 0x9005CA0, symbol: aFont3D_K } -D_FONT3D_90062D0: - { type: GFX, offset: 0x90062D0, symbol: D_FONT3D_90062D0 } +aFont3D_I: + { type: GFX, offset: 0x90062D0, symbol: aFont3D_I } -D_FONT3D_9006500: - { type: GFX, offset: 0x9006500, symbol: D_FONT3D_9006500 } +aFont3D_H: + { type: GFX, offset: 0x9006500, symbol: aFont3D_H } -D_FONT3D_9006AE0: - { type: GFX, offset: 0x9006AE0, symbol: D_FONT3D_9006AE0 } +aFont3D_G: + { type: GFX, offset: 0x9006AE0, symbol: aFont3D_G } -D_FONT3D_90070C0: - { type: GFX, offset: 0x90070C0, symbol: D_FONT3D_90070C0 } +aFont3D_F: + { type: GFX, offset: 0x90070C0, symbol: aFont3D_F } -D_FONT3D_90075A0: - { type: GFX, offset: 0x90075A0, symbol: D_FONT3D_90075A0 } +aFont3D_E: + { type: GFX, offset: 0x90075A0, symbol: aFont3D_E } -D_FONT3D_9007BB0: - { type: GFX, offset: 0x9007BB0, symbol: D_FONT3D_9007BB0 } +aFont3D_C: + { type: GFX, offset: 0x9007BB0, symbol: aFont3D_C } -D_FONT3D_9007FD0: - { type: GFX, offset: 0x9007FD0, symbol: D_FONT3D_9007FD0 } +aFont3D_B: + { type: GFX, offset: 0x9007FD0, symbol: aFont3D_B } -D_FONT3D_90086F0: - { type: GFX, offset: 0x90086F0, symbol: D_FONT3D_90086F0 } +aFont3D_A: + { type: GFX, offset: 0x90086F0, symbol: aFont3D_A } -D_FONT3D_9008C60: - { type: GFX, offset: 0x9008C60, symbol: D_FONT3D_9008C60 } +aFont3D_9: + { type: GFX, offset: 0x9008C60, symbol: aFont3D_9 } -D_FONT3D_9009280: - { type: GFX, offset: 0x9009280, symbol: D_FONT3D_9009280 } +aFont3D_8: + { type: GFX, offset: 0x9009280, symbol: aFont3D_8 } -D_FONT3D_9009990: - { type: GFX, offset: 0x9009990, symbol: D_FONT3D_9009990 } +aFont3D_7: + { type: GFX, offset: 0x9009990, symbol: aFont3D_7 } -D_FONT3D_9009CB0: - { type: GFX, offset: 0x9009CB0, symbol: D_FONT3D_9009CB0 } +aFont3D_6: + { type: GFX, offset: 0x9009CB0, symbol: aFont3D_6 } -D_FONT3D_900A290: - { type: GFX, offset: 0x900A290, symbol: D_FONT3D_900A290 } +aFont3D_5: + { type: GFX, offset: 0x900A290, symbol: aFont3D_5 } -D_FONT3D_900A870: - { type: GFX, offset: 0x900A870, symbol: D_FONT3D_900A870 } +aFont3D_4: + { type: GFX, offset: 0x900A870, symbol: aFont3D_4 } -D_FONT3D_900AF60: - { type: GFX, offset: 0x900AF60, symbol: D_FONT3D_900AF60 } +aFont3D_3: + { type: GFX, offset: 0x900AF60, symbol: aFont3D_3 } -D_FONT3D_900B580: - { type: GFX, offset: 0x900B580, symbol: D_FONT3D_900B580 } +aFont3D_2: + { type: GFX, offset: 0x900B580, symbol: aFont3D_2 } -D_FONT3D_900BB90: - { type: GFX, offset: 0x900BB90, symbol: D_FONT3D_900BB90 } +aFont3D_0: + { type: GFX, offset: 0x900BB90, symbol: aFont3D_0 } # size = 0xC1D0 diff --git a/assets/yaml/jp/rev0/ast_fortuna.yaml b/assets/yaml/jp/rev0/ast_fortuna.yaml index 23b03d8a..06b71044 100644 --- a/assets/yaml/jp/rev0/ast_fortuna.yaml +++ b/assets/yaml/jp/rev0/ast_fortuna.yaml @@ -14,8 +14,8 @@ # Fortuna # Former Defense Post -D_FO_6000000: - { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_FO_6000000 } +aFoTitleCardTex: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: aFoTitleCardTex } D_FO_6001260: { type: TEXTURE, format: IA8, width: 16, height: 16, offset: 0x6001260, ctype: u8, symbol: D_FO_6001260 } diff --git a/assets/yaml/jp/rev0/ast_katina.yaml b/assets/yaml/jp/rev0/ast_katina.yaml index 293c4a92..485e8816 100644 --- a/assets/yaml/jp/rev0/ast_katina.yaml +++ b/assets/yaml/jp/rev0/ast_katina.yaml @@ -14,8 +14,8 @@ # Katina # Frontline Base -D_KA_6000000: - { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_KA_6000000 } +aKaTitleCardTex: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: aKaTitleCardTex } D_KA_6001260: { type: TEXTURE, format: IA8, width: 8, height: 8, offset: 0x6001260, ctype: u8, symbol: D_KA_6001260 } diff --git a/assets/yaml/jp/rev0/ast_landmaster.yaml b/assets/yaml/jp/rev0/ast_landmaster.yaml index 42b43cf1..082bac8b 100644 --- a/assets/yaml/jp/rev0/ast_landmaster.yaml +++ b/assets/yaml/jp/rev0/ast_landmaster.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_landmaster_3000000: - { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_landmaster_3000000 } +aLandmasterLifeIconTex: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: aLandmasterLifeIconTex } -D_landmaster_3000080: - { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_landmaster_3000080 } +aLandmasterLifeIconTLUT: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: aLandmasterLifeIconTLUT } aLandmasterModelDL: { type: GFX, offset: 0x3000090, symbol: aLandmasterModelDL } diff --git a/assets/yaml/jp/rev0/ast_macbeth.yaml b/assets/yaml/jp/rev0/ast_macbeth.yaml index f455462c..7f559a58 100644 --- a/assets/yaml/jp/rev0/ast_macbeth.yaml +++ b/assets/yaml/jp/rev0/ast_macbeth.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_MA_6000000: - {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: D_MA_6000000} +aMaTitleCardTex: + {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: aMaTitleCardTex} D_MA_6001180: {type: GFX, offset: 0x6001180, symbol: D_MA_6001180} diff --git a/assets/yaml/jp/rev0/ast_map.yaml b/assets/yaml/jp/rev0/ast_map.yaml index 070fee15..c470e617 100644 --- a/assets/yaml/jp/rev0/ast_map.yaml +++ b/assets/yaml/jp/rev0/ast_map.yaml @@ -9,20 +9,20 @@ - '#include "sf64object.h"' # Restart Game (Game Over) -D_MAP_6000000: - { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000000 } +aMapRetryCourseGameOverTex: + { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: aMapRetryCourseGameOverTex } # Proceed to Next Course -D_MAP_6000840: - { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000840 } +aMapProceedNextCourseTex: + { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: aMapProceedNextCourseTex } # Retry Course (Lose 1 Arwing) -D_MAP_6001080: - { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: D_MAP_6001080 } +aMapRetryCourseLose1UPTex: + { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: aMapRetryCourseLose1UPTex } # Change Course -D_MAP_60018C0: - { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: D_MAP_60018C0 } +aMapChangeCourseTex: + { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: aMapChangeCourseTex } # Aquas Ocean D_MAP_6001C80: @@ -141,62 +141,62 @@ D_MAP_6016760: # Zones # Toxic Waste Area -D_MAP_6017640: +D_MAP_6017640: { type: TEXTURE, format: IA8, offset: 0x6017640, width: 112, height: 28, ctype: u8, symbol: D_MAP_6017640 } # Invasion Aftermath -D_MAP_6018280: +D_MAP_6018280: { type: TEXTURE, format: IA8, offset: 0x6018280, width: 184, height: 19, ctype: u8, symbol: D_MAP_6018280 } -D_MAP_6019030: - { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: D_MAP_6019030 } +aMapPrologueTextFadeTex: + { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: aMapPrologueTextFadeTex } # Clouds ? -D_MAP_60190B0: - { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60190B0 } +aMapVenomCloudTex: + { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: aMapVenomCloudTex } -D_MAP_601B4B0: - { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: D_MAP_601B4B0 } +aMapOptionBgTex: + { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: aMapOptionBgTex } # Some text in japanese -D_MAP_601B8B0: +D_MAP_601B8B0: { type: TEXTURE, format: IA8, offset: 0x601B8B0, width: 80, height: 26, ctype: u8, symbol: D_MAP_1B8B0 } -D_MAP_601C0D0: - { type: GFX, offset: 0x601C0D0, symbol: D_MAP_601C0D0 } +aMapSectorXDL: + { type: GFX, offset: 0x601C0D0, symbol: aMapSectorXDL } D_MAP_601C160: { type: TEXTURE, format: RGBA16, offset: 0x0601C160, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C160 } -D_MAP_601C960: - { type: GFX, offset: 0x601C960, symbol: D_MAP_601C960 } +aMapSectorYDL: + { type: GFX, offset: 0x601C960, symbol: aMapSectorYDL } D_MAP_601C9F0: { type: TEXTURE, format: RGBA16, offset: 0x0601C9F0, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C9F0 } -D_MAP_601D1F0: - { type: GFX, offset: 0x601D1F0, symbol: D_MAP_601D1F0 } +aMapMedalDL: + { type: GFX, offset: 0x601D1F0, symbol: aMapMedalDL } -D_MAP_601D2F0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: D_MAP_601D2F0, tlut: 0x0601DAF0 } +aMapMedalTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: aMapMedalTex, tlut: 0x0601DAF0 } D_MAP_601DAF0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x0601DAF0, symbol: D_MAP_601DAF0 } -D_MAP_601DC10: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: D_MAP_601DC10, tlut: 0x0601DC90 } +aMapArwingIconTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: aMapArwingIconTex, tlut: 0x0601DC90 } -D_MAP_601DC90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: D_MAP_601DC90 } +aMapArwingIconTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: aMapArwingIconTLUT } -D_MAP_601DCA0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: D_MAP_601DCA0, tlut: 0x0601DCD8 } +aMapXTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: aMapXTex, tlut: 0x0601DCD8 } -D_MAP_601DCD8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: D_MAP_601DCD8 } +aMapXTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: aMapXTLUT } -D_MAP_601DCF0: - { type: GFX, offset: 0x601DCF0, symbol: D_MAP_601DCF0 } +aMapCursorDL: + { type: GFX, offset: 0x601DCF0, symbol: aMapCursorDL } D_MAP_601DDE8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DDE8, symbol: D_MAP_601DDE8, tlut: 0x0601DE68 } @@ -204,8 +204,8 @@ D_MAP_601DDE8: D_MAP_601DE68: { type: TEXTURE, ctype: u16, format: TLUT, colors: 12, offset: 0x0601DE68, symbol: D_MAP_601DE68 } -D_MAP_601DE80: - { type: GFX, offset: 0x601DE80, symbol: D_MAP_601DE80 } +aMapArea6DL: + { type: GFX, offset: 0x601DE80, symbol: aMapArea6DL } D_MAP_601F2B0: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0601F2B0, symbol: D_MAP_601F2B0, tlut: 0x0601F4B0 } @@ -219,8 +219,8 @@ D_MAP_601E8F8: D_MAP_601E978: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601E978, symbol: D_MAP_601E978 } -D_MAP_601E9A0: - { type: GFX, offset: 0x601E9A0, symbol: D_MAP_601E9A0 } +aMapArea6ShipDL: + { type: GFX, offset: 0x601E9A0, symbol: aMapArea6ShipDL } D_MAP_601F4D0: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601F4D0, symbol: D_MAP_601F4D0, tlut: 0x0601F550 } @@ -240,110 +240,110 @@ D_MAP_601F610: D_MAP_601F690: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601F690, symbol: D_MAP_601F690 } -D_MAP_601F6B0: - { type: GFX, offset: 0x601F6B0, symbol: D_MAP_601F6B0 } +aMapSectorZDL: + { type: GFX, offset: 0x601F6B0, symbol: aMapSectorZDL } D_MAP_601F740: { type: TEXTURE, format: RGBA16, offset: 0x0601F740, width: 32, height: 32, ctype: u16, symbol: D_MAP_601F740 } # Looks like Aquas -D_MAP_601FF40: - { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: D_MAP_601FF40, tlut: 0x06022340 } +aMapAquasTex: + { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: aMapAquasTex, tlut: 0x06022340 } -D_MAP_6022340: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 75, offset: 0x06022340, symbol: D_MAP_6022340 } +gMapAquasTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x06022340, symbol: gMapAquasTLUT } # Looks like Venom -D_MAP_60223E0: - { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60223E0, tlut: 0x060247E0 } +aMapVenomTex: + { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: aMapVenomTex, tlut: 0x060247E0 } -D_MAP_60247E0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x060247E0, symbol: D_MAP_60247E0 } +gMapVenomTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x060247E0, symbol: gMapVenomTLUT } # Looks like Corneria -D_MAP_6024890: - { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: D_MAP_6024890, tlut: 0x06026C90 } +aMapCorneriaTex: + { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: aMapCorneriaTex, tlut: 0x06026C90 } -D_MAP_6026C90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 108, offset: 0x06026C90, symbol: D_MAP_6026C90 } +gMapCorneriaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 112, offset: 0x06026C90, symbol: gMapCorneriaTLUT } # Looks like Zones -D_MAP_6026D70: - { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: D_MAP_6026D70, tlut: 0x06029170 } +aMapFortunaTex: + { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: aMapFortunaTex, tlut: 0x06029170 } -D_MAP_6029170: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x06029170, symbol: D_MAP_6029170 } +gMapFortunaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x06029170, symbol: gMapFortunaTLUT } # Looks like Solar -D_MAP_6029220: - { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: D_MAP_6029220, tlut: 0x0602B620 } +aMapKatinaTex: + { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: aMapKatinaTex, tlut: 0x0602B620 } -D_MAP_602B620: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x0602B620, symbol: D_MAP_602B620 } +gMapKatinaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x0602B620, symbol: gMapKatinaTLUT } # Looks like Macbeth -D_MAP_602B6D0: - { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602B6D0, tlut: 0x0602DAD0 } +aMapMacbethTex: + { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: aMapMacbethTex, tlut: 0x0602DAD0 } -D_MAP_602DAD0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 68, offset: 0x0602DAD0, symbol: D_MAP_602DAD0 } +gMapMacbethTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 72, offset: 0x0602DAD0, symbol: gMapMacbethTLUT } # Looks like Sector Z -D_MAP_602DB60: - { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: D_MAP_602DB60, tlut: 0x0602FF60 } +aMapTitaniaTex: + { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: aMapTitaniaTex, tlut: 0x0602FF60 } -D_MAP_602FF60: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: D_MAP_602FF60 } +gMapTitaniaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: gMapTitaniaTLUT } -D_MAP_602FFD0: - { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602FFD0, tlut: 0x060323D0 } +aMapZonessTex: + { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: aMapZonessTex, tlut: 0x060323D0 } -D_MAP_60323D0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 52, offset: 0x060323D0, symbol: D_MAP_60323D0 } +gMapZonessTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x060323D0, symbol: gMapZonessTLUT } # Portrait of Falco -D_MAP_6032440: - { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032440 } +aMapRadioCharFalcoTex: + { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharFalcoTex } # Portrait of Peppy -D_MAP_6032A60: - { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032A60 } +aMapRadioCharPeppyTex: + { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharPeppyTex } # Picture of Peppy, James and Pigma used in the narrated intro. -D_MAP_6033080: - { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: D_MAP_6033080 } +aMapPrologue3Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: aMapPrologue3Tex } # Picture of Andross, General Pepper and Venom in the background, used in the narrated intro. -D_MAP_6035780: - { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: D_MAP_6035780 } +aMapPrologue2Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: aMapPrologue2Tex } # Picture of Andross, hands open, Corneria in the middle, used in the narrated intro. -D_MAP_6037E80: - { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6037E80 } +aMapPrologue6Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue6Tex } # Picture of an Arwing dodging attacks from enemies, used in the narrated intro. -D_MAP_603A580: - { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: D_MAP_603A580 } +aMapPrologue4Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: aMapPrologue4Tex } # Picture of Slippy, Peppy, Fox and Falco, used in the narrated intro. -D_MAP_603CC80: - { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: D_MAP_603CC80 } +aMapPrologue7Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue7Tex } # Picture of Peppy returning from Vemon, used in the narrated intro. -D_MAP_603F380: - { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: D_MAP_603F380 } +aMapPrologue5Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: aMapPrologue5Tex } # Picture of Corneria, used in the narrated intro. -D_MAP_6041A80: - { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6041A80 } +aMapPrologue1Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue1Tex } # Portrait of Slippy -D_MAP_6044180: - { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: D_MAP_6044180 } +aMapRadioCharSlippyTex: + { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharSlippyTex } # White Square ? -D_MAP_60447A0: - { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: D_MAP_60447A0 } +aMapWhiteSquareTex: + { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: aMapWhiteSquareTex } # Picture of Fox receiving orders from General Pepper, used in the map (briefing) D_MAP_6044820: @@ -354,26 +354,29 @@ D_MAP_6046CD0: { type: TEXTURE, format: RGBA16, offset: 0x06046CD0, width: 32, height: 34, ctype: u16, symbol: D_MAP_6046CD0 } # Black Square with borders. -D_MAP_6047550: - { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: D_MAP_6047550 } +aMapPathBoxTex: + { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: aMapPathBoxTex } -D_MAP_60479D0: - { type: GFX, offset: 0x60479D0, symbol: D_MAP_60479D0 } +aMapPlanetExplosionDL: + { type: GFX, offset: 0x60479D0, symbol: aMapPlanetExplosionDL } D_MAP_6047A68: { type: TEXTURE, format: IA8, offset: 0x06047A68, width: 32, height: 32, ctype: u8, symbol: D_MAP_6047A68 } -D_MAP_6047E70: - { type: GFX, offset: 0x6047E70, symbol: D_MAP_6047E70 } +aMapVenomCloudDL: + { type: GFX, offset: 0x6047E70, symbol: aMapVenomCloudDL } -D_MAP_6047F80: - { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6047F80 } +aMapVenomCloud1Tex: + { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: aMapVenomCloud1Tex } + +aMapVenomCloud2Tex: + { type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: aMapVenomCloud2Tex } D_MAP_6048F80: { type: TEXTURE, format: IA8, offset: 0x06048F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6048F80 } - -D_MAP_6049F80: - { type: GFX, offset: 0x6049F80, symbol: D_MAP_6049F80 } + +aMapExplosion4DL: + { type: GFX, offset: 0x6049F80, symbol: aMapExplosion4DL } D_MAP_604A048: { type: TEXTURE, format: CI8, offset: 0x0604A048, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A048, tlut: 0x0602FF60 } @@ -381,8 +384,8 @@ D_MAP_604A048: D_MAP_604A148: { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x0604A148, symbol: D_MAP_604A148 } -D_MAP_604A190: - { type: GFX, offset: 0x604A190, symbol: D_MAP_604A190 } +aMapExplosion3DL: + { type: GFX, offset: 0x604A190, symbol: aMapExplosion3DL } D_MAP_604A258: { type: TEXTURE, format: CI8, offset: 0x0604A258, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A258, tlut: 0x0604A358 } @@ -390,8 +393,8 @@ D_MAP_604A258: D_MAP_604A358: { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x0604A358, symbol: D_MAP_604A358 } -D_MAP_604A400: - { type: GFX, offset: 0x604A400, symbol: D_MAP_604A400 } +aMapExplosion2DL: + { type: GFX, offset: 0x604A400, symbol: aMapExplosion2DL } D_MAP_604A4C8: { type: TEXTURE, format: CI8, offset: 0x0604A4C8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A4C8, tlut: 0x0604A5C8 } @@ -399,8 +402,8 @@ D_MAP_604A4C8: D_MAP_604A5C8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 160, offset: 0x0604A5C8, symbol: D_MAP_604A5C8 } -D_MAP_604A710: - { type: GFX, offset: 0x604A710, symbol: D_MAP_604A710 } +aMapExplosion1DL: + { type: GFX, offset: 0x604A710, symbol: aMapExplosion1DL } D_MAP_604A7D8: { type: TEXTURE, format: CI8, offset: 0x0604A7D8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A7D8, tlut: 0x0604A8D8 } @@ -418,7 +421,7 @@ ast_map_seg6_vtx_4AD50: D_MAP_604B510: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604B510, symbol: D_MAP_604B510, tlut: 0x0604B590 } -D_MAP_604B590: +D_MAP_604B590: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604B590, symbol: D_MAP_604B590 } D_MAP_604B5B0: @@ -431,48 +434,48 @@ D_MAP_604B650: { type: TEXTURE, format: RGBA16, offset: 0x0604B650, width: 8, height: 16, ctype: u16, symbol: D_MAP_604B650 } # Model of Bolse -D_MAP_604B750: - { type: GFX, offset: 0x604B750, symbol: D_MAP_604B750 } +aMapBolseDL: + { type: GFX, offset: 0x604B750, symbol: aMapBolseDL } D_MAP_604BC48: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BC48, symbol: D_MAP_604BC48, tlut: 0x0604BC48 } -D_MAP_604BE48: +D_MAP_604BE48: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604BE48, symbol: D_MAP_604BE48 } D_MAP_604BE68: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BE68, symbol: D_MAP_604BE68, tlut: 0x0604C068 } -D_MAP_604C068: +D_MAP_604C068: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C068, symbol: D_MAP_604C068 } D_MAP_604C088: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604C088, symbol: D_MAP_604C088, tlut: 0x0604C288 } -D_MAP_604C288: +D_MAP_604C288: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C288, symbol: D_MAP_604C288 } D_MAP_604C2A8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0604C2A8, symbol: D_MAP_604C2A8, tlut: 0x0604C328 } -D_MAP_604C328: +D_MAP_604C328: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C328, symbol: D_MAP_604C328 } # Television outcoming light Model, used during briefing. -D_MAP_604C350: - { type: GFX, offset: 0x604C350, symbol: D_MAP_604C350 } +aMapTvScreenGlowDL: + { type: GFX, offset: 0x604C350, symbol: aMapTvScreenGlowDL } -D_MAP_604C4C0: - { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: D_MAP_604C4C0 } +aMapTvScreenGlowTex: + { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: aMapTvScreenGlowTex } -D_MAP_604C540: - { type: GFX, offset: 0x604C540, symbol: D_MAP_604C540 } +aMapTitaniaRings1DL: + { type: GFX, offset: 0x604C540, symbol: aMapTitaniaRings1DL } D_MAP_604C5D8: { type: TEXTURE, format: IA8, offset: 0x0604C5D8, width: 32, height: 64, ctype: u8, symbol: D_MAP_604C5D8 } -D_MAP_604CDE0: - { type: GFX, offset: 0x604CDE0, symbol: D_MAP_604CDE0 } +aMapTitaniaRings2DL: + { type: GFX, offset: 0x604CDE0, symbol: aMapTitaniaRings2DL } D_MAP_604CE78: { type: TEXTURE, format: IA8, offset: 0x0604CE78, width: 32, height: 64, ctype: u8, symbol: D_MAP_604CE78 } @@ -484,8 +487,8 @@ D_MAP_604D708: { type: TEXTURE, format: IA8, offset: 0x0604D708, width: 32, height: 32, ctype: u8, symbol: D_MAP_604D708 } # Solar Rays -D_MAP_604DB10: - { type: GFX, offset: 0x604DB10, symbol: D_MAP_604DB10 } +aMapSolarDL: + { type: GFX, offset: 0x604DB10, symbol: aMapSolarDL } D_MAP_604DD20: { type: TEXTURE, format: IA8, offset: 0x0604DD20, width: 128, height: 32, ctype: u8, symbol: D_MAP_604DD20 } @@ -499,8 +502,8 @@ D_MAP_604FD20: D_MAP_6050D20: { type: TEXTURE, format: IA8, offset: 0x06050D20, width: 128, height: 32, ctype: u8, symbol: D_MAP_6050D20 } -D_MAP_6051D20: - { type: GFX, offset: 0x6051D20, symbol: D_MAP_6051D20 } +aMapGralPepperFace2DL: + { type: GFX, offset: 0x6051D20, symbol: aMapGralPepperFace2DL } D_MAP_6051F20: { type: TEXTURE, format: RGBA16, offset: 0x06051F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6051F20 } @@ -514,8 +517,8 @@ D_MAP_6053F20: D_MAP_6054F20: { type: TEXTURE, format: RGBA16, offset: 0x06054F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6054F20 } -D_MAP_6055F20: - { type: GFX, offset: 0x6055F20, symbol: D_MAP_6055F20 } +aMapGralPepperFace1DL: + { type: GFX, offset: 0x6055F20, symbol: aMapGralPepperFace1DL } D_MAP_6056120: { type: TEXTURE, format: RGBA16, offset: 0x06056120, width: 64, height: 32, ctype: u16, symbol: D_MAP_6056120 } @@ -565,8 +568,8 @@ D_MAP_605F610: D_MAP_605FE10: { type: TEXTURE, format: IA8, offset: 0x0605FE10, width: 64, height: 32, ctype: u8, symbol: D_MAP_605FE10 } -D_MAP_6060610: - { type: GFX, offset: 0x6060610, symbol: D_MAP_6060610 } +aMapMeteorDL: + { type: GFX, offset: 0x6060610, symbol: aMapMeteorDL } D_MAP_6060698: { type: TEXTURE, format: RGBA16, offset: 0x06060698, width: 32, height: 32, ctype: u16, symbol: D_MAP_6060698 } diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index d06d59ca..c214e7f7 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -14,8 +14,8 @@ - '#include "sf64mesg.h"' # Meteo # Asteroid Field -D_ME_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: D_ME_6000000 } +aMeTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: aMeTitleCardTex } D_ME_6000A80: { type: GFX, offset: 0x6000A80, symbol: D_ME_6000A80 } diff --git a/assets/yaml/jp/rev0/ast_option.yaml b/assets/yaml/jp/rev0/ast_option.yaml index cb92e731..4b258326 100644 --- a/assets/yaml/jp/rev0/ast_option.yaml +++ b/assets/yaml/jp/rev0/ast_option.yaml @@ -30,82 +30,82 @@ D_OPT_80038C0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80038C0, symbol: D_OPT_80038C0 } # nd -D_OPT_80038E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: D_OPT_80038E0, tlut: 0x8003930 } +aNdTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: aNdTex, tlut: 0x8003930 } -D_OPT_8003930: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: D_OPT_8003930 } +aNdTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: aNdTLUT } # rd -D_OPT_8003950: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: D_OPT_8003950, tlut: 0x80039A8 } +aRdTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: aRdTex, tlut: 0x80039A8 } -D_OPT_80039A8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: D_OPT_80039A8 } +aRdTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: aRdTLUT } # -D_OPT_80039D0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: D_OPT_80039D0, tlut: 0x8003A50 } +aSpeakerCenterTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: aSpeakerCenterTex, tlut: 0x8003A50 } -D_OPT_8003A50: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: D_OPT_8003A50 } +aSpeakerCenterTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: aSpeakerCenterTLUT } # st -D_OPT_8003A70: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: D_OPT_8003A70, tlut: 0x8003AB8 } +aStTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: aStTex, tlut: 0x8003AB8 } -D_OPT_8003AB8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: D_OPT_8003AB8 } +aStTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: aStTLUT } # th -D_OPT_8003AE0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: D_OPT_8003AE0, tlut: 0x8003B28 } +aThTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: aThTex, tlut: 0x8003B28 } -D_OPT_8003B28: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: D_OPT_8003B28 } +aThTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: aThTLUT } # Option Title Cards # Main Game -D_OPT_8003B50: - { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: D_OPT_8003B50 } +aMainGameCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: aMainGameCardTex } # Training -D_OPT_8003EB0: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: D_OPT_8003EB0 } +aTrainingCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: aTrainingCardTex } # Vs. -D_OPT_8004270: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: D_OPT_8004270 } +aVsCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: aVsCardTex } # Ranking -D_OPT_80043B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: D_OPT_80043B0 } +aRankingCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: aRankingCardTex } # Sound -D_OPT_80046B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: D_OPT_80046B0 } +aSoundCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: aSoundCardTex } # Data -D_OPT_8004930: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: D_OPT_8004930 } +aDataCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: aDataCardTex } -D_OPT_8004C50: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: D_OPT_8004C50 } +aExpertCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: aExpertCardTex } # Option VS Cards # Point Match -D_OPT_8005010: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: D_OPT_8005010 } +aVsPointMatchCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: aVsPointMatchCardTex } # Battle Royal -D_OPT_80054F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: D_OPT_80054F0 } +aVsBattleRoyalCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: aVsBattleRoyalCardTex } # Time Trial -D_OPT_8005910: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: D_OPT_8005910 } +aVsTimeTrialCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: aVsTimeTrialCardTex } # Sound Options @@ -130,8 +130,8 @@ D_OPT_8006D10: { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x8006D10, symbol: D_OPT_8006D10 } # B to cancel -D_OPT_8006E50: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: D_OPT_8006E50 } +aBtoCancelTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: aBtoCancelTex } # Headphone D_OPT_8007210: @@ -146,8 +146,8 @@ D_OPT_80079F0: { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 14, offset: 0x80079F0, symbol: D_OPT_80079F0 } # A to confirm -D_OPT_80080F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: D_OPT_80080F0 } +aAtoConfirmTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: aAtoConfirmTex } # Clear Saved Data D_OPT_80084B0: @@ -193,27 +193,27 @@ D_OPT_800D1F0: D_OPT_800E0F0: { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E0F0, symbol: D_OPT_800E0F0 } -D_OPT_800E130: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: D_OPT_800E130 } +aArrowTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: aArrowTex } # Mercenary Unit STARFOX Fox Mccloud D_OPT_800E170: { type: TEXTURE, ctype: u16, format: RGBA16, width: 188, height: 60, offset: 0x800E170, symbol: D_OPT_800E170 } # ScrollBar -D_OPT_8013990: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: D_OPT_8013990 } +aSliderFrameTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: aSliderFrameTex } # ScrollBar Indicator -D_OPT_80141B0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: D_OPT_80141B0 } +aSliderTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: aSliderTex } # Speaker -D_OPT_80143B0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: D_OPT_80143B0, tlut: 0x80147B0 } +aSpeakerTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: aSpeakerTex, tlut: 0x80147B0 } -D_OPT_80147B0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: D_OPT_80147B0 } +aSpeakerTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: aSpeakerTLUT } D_OPT_80147F0: { type: GFX, offset: 0x80147F0, symbol: D_OPT_80147F0 } @@ -242,8 +242,8 @@ D_OPT_8015550: D_OPT_80155E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x080155E8, symbol: D_OPT_80155E8 } -D_OPT_8015DF0: - { type: GFX, offset: 0x8015DF0, symbol: D_OPT_8015DF0 } +aLightningDL: + { type: GFX, offset: 0x8015DF0, symbol: aLightningDL } -D_OPT_8015E88: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: D_OPT_8015E88 } +aLightningTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: aLightningTex } diff --git a/assets/yaml/jp/rev0/ast_sector_x.yaml b/assets/yaml/jp/rev0/ast_sector_x.yaml index 88bf0b54..6d305b16 100644 --- a/assets/yaml/jp/rev0/ast_sector_x.yaml +++ b/assets/yaml/jp/rev0/ast_sector_x.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_SX_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SX_6000000 } +aSxTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSxTitleCardTex } aSxSpaceMineDL: { type: GFX, offset: 0x6000840, symbol: aSxSpaceMineDL } diff --git a/assets/yaml/jp/rev0/ast_sector_y.yaml b/assets/yaml/jp/rev0/ast_sector_y.yaml index 097b11cb..87240ab0 100644 --- a/assets/yaml/jp/rev0/ast_sector_y.yaml +++ b/assets/yaml/jp/rev0/ast_sector_y.yaml @@ -15,8 +15,8 @@ - '#include "sf64mesg.h"' # Sector Y: Combat Zone -D_SY_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SY_6000000 } +aSyTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSyTitleCardTex } # Saruzin flagship icon in radar D_SY_6000840: diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index 12c21624..bac95644 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -14,8 +14,8 @@ - '#include "sf64mesg.h"' # Sector Z: Combat Zone -D_SZ_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SZ_6000000 } +aSzTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSzTitleCardTex } # One of the so called "Boss titles", unused in the game. A version of the same thing # seems to have been implemented in the 3DS version. @@ -94,8 +94,8 @@ D_SZ_6004458: D_SZ_6004558: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x06004558, symbol: D_SZ_6004558 } -D_SZ_6004570: - { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } +aSzMissileRadarMarkDL: + { type: GFX, offset: 0x6004570, symbol: aSzMissileRadarMarkDL } aSzSpaceJunk4DL: { type: GFX, offset: 0x60045E0, symbol: aSzSpaceJunk4DL } diff --git a/assets/yaml/jp/rev0/ast_solar.yaml b/assets/yaml/jp/rev0/ast_solar.yaml index 88b2b591..6af8cf4e 100644 --- a/assets/yaml/jp/rev0/ast_solar.yaml +++ b/assets/yaml/jp/rev0/ast_solar.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_SO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: D_SO_6000000} +aSoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: aSoTitleCardTex} D_SO_60005B0: { type: GFX, offset: 0x60005B0, symbol: D_SO_60005B0} diff --git a/assets/yaml/jp/rev0/ast_text.yaml b/assets/yaml/jp/rev0/ast_text.yaml index 5177eab1..68af92c8 100644 --- a/assets/yaml/jp/rev0/ast_text.yaml +++ b/assets/yaml/jp/rev0/ast_text.yaml @@ -53,8 +53,8 @@ aTextMissionNo: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 19, offset: 0x5000500, symbol: aTextMissionNo } # Training -aTextTraining: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTextTraining } +aTrTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTrTitleCardTex } # Enemies Down aTextEnemiesDown: diff --git a/assets/yaml/jp/rev0/ast_titania.yaml b/assets/yaml/jp/rev0/ast_titania.yaml index b4bf560a..41849551 100644 --- a/assets/yaml/jp/rev0/ast_titania.yaml +++ b/assets/yaml/jp/rev0/ast_titania.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_TI_6000000: - {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: D_TI_6000000} +aTiTitleCardTex: + {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: aTiTitleCardTex} D_TI_6000A80: {type: GFX, offset: 0x6000A80, symbol: D_TI_6000A80} diff --git a/assets/yaml/jp/rev0/ast_title.yaml b/assets/yaml/jp/rev0/ast_title.yaml index 34b389fa..772a8c77 100644 --- a/assets/yaml/jp/rev0/ast_title.yaml +++ b/assets/yaml/jp/rev0/ast_title.yaml @@ -8,75 +8,75 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -starfox_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: gTitleStarfoxLogo } +aTitleStarfoxLogoTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: aTitleStarfoxLogoTex } -nintendo64_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: gTitleNintendo64Logo } +aTitleN64LogoTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: aTitleN64LogoTex } -radio_static: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } +gTitleRadioStatic: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } -sun_beam: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: gTitleSunBeam } +aTitleSunGlareTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: aTitleSunGlareTex } -nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: gTitleNintendoCopyright } +a1997NintendoTex: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: a1997NintendoTex } -press_start: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: gTitlePressStart } +aTitlePressStartTex: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: aTitlePressStartTex } -great_fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: gTitleGreatFoxCard } +aTitleGreatFoxCardTex: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: aTitleGreatFoxCardTex } -slippy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } +gTitleSlippyCard: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } -peppy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } +gTitlePeppyCard: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } -falco_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } +gTitleFalcoCard: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } -fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } +gTitleFoxCard: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } -arwing_card: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: gTitleArwingCard } +aTitleArwingCardTex: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: aTitleArwingCardTex } -no_controller: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: gTitleNoController } +aTitleNoControllerTex: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: aTitleNoControllerTex } -copyright_symbol: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: gTitleCopyrightSymbol } +aTitleCopyrightTex: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: aTitleCopyrightTex } -unused_nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } +gTitleUnusedNintendoCopyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } -starfox_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: gTextIntroStarfox } +aIntroStarfoxLogoTex: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: aIntroStarfoxLogoTex } -starfox_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: gTextIntroStarfoxPalette } +aIntroStarfoxLogoTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: aIntroStarfoxLogoTLUT } -in_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: gTextIntroIn } +aIntroInTex: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: aIntroInTex } -in_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: gTextIntroInPalette } +aIntroInTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: aIntroInTLUT } -D_TITLE_60148D0: { type: GFX, offset: 0x60148D0, symbol: D_TITLE_60148D0 } +a64LogoDL: { type: GFX, offset: 0x60148D0, symbol: a64LogoDL } -D_TITLE_6014DE8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: D_TITLE_6014DE8 } +a64Logo1Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: a64Logo1Tex } -D_TITLE_60155E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: D_TITLE_60155E8 } +a64Logo1TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: a64Logo1TLUT } -D_TITLE_6015718: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: D_TITLE_6015718 } +a64Logo2Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: a64Logo2Tex } -D_TITLE_6015EF8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: D_TITLE_6015EF8 } +a64Logo2TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: a64Logo2TLUT } -D_TITLE_6015F78: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: D_TITLE_6015F78 } +a64Logo3Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: a64Logo3Tex } -D_TITLE_6016778: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: D_TITLE_6016778 } +a64Logo3TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: a64Logo3TLUT } -D_TITLE_6016908: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: D_TITLE_6016908 } +a64Logo4Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: a64Logo4Tex } -D_TITLE_60170E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: D_TITLE_60170E8 } +a64Logo4TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: a64Logo4TLUT } -D_TITLE_6017208: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: D_TITLE_6017208 } +a64Logo5Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: a64Logo5Tex } -D_TITLE_6017A08: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: D_TITLE_6017A08 } +a64Logo5TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: a64Logo5TLUT } -D_TITLE_6017B18: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: D_TITLE_6017B18 } +a64Logo6Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: a64Logo6Tex } -D_TITLE_6018318: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: D_TITLE_6018318 } +a64Logo6TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: a64Logo6TLUT } -D_TITLE_60184A8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: D_TITLE_60184A8 } +a64Logo7Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: a64Logo7Tex } -D_TITLE_6018CA8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: D_TITLE_6018CA8 } +a64Logo7TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: a64Logo7TLUT } -D_TITLE_6018D40: { type: GFX, offset: 0x6018D40, symbol: D_TITLE_6018D40 } +aTitleGreatFoxDeckDL: { type: GFX, offset: 0x6018D40, symbol: aTitleGreatFoxDeckDL } D_TITLE_60195C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60195C0, symbol: D_TITLE_60195C0 } @@ -88,9 +88,9 @@ D_TITLE_601B5C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_601B7C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601B7C0, symbol: D_TITLE_601B7C0 } -D_TITLE_601BFC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: D_TITLE_601BFC0 } +aTitleCsPassageWayWallTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: aTitleCsPassageWayWallTex } -D_TITLE_601C7C0: { type: GFX, offset: 0x601C7C0, symbol: D_TITLE_601C7C0 } +aTitleGreatFoxDeckLauncherDL: { type: GFX, offset: 0x601C7C0, symbol: aTitleGreatFoxDeckLauncherDL } D_TITLE_601CCD0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601CCD0, symbol: D_TITLE_601CCD0 } @@ -98,9 +98,9 @@ D_TITLE_601CED0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: D_TITLE_601CF50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601CF50, symbol: D_TITLE_601CF50 } -D_TITLE_601D750: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: D_TITLE_601D750 } +aNoControllerBgTex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: aNoControllerBgTex } -D_TITLE_601DB50: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: D_TITLE_601DB50 } +aNoControllerBgTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: aNoControllerBgTLUT } D_TITLE_601E424: { type: SF64:ANIM, offset: 0x601E424, symbol: D_TITLE_601E424 } @@ -164,9 +164,9 @@ D_TITLE_6029BE4: { type: SF64:ANIM, offset: 0x6029BE4, symbol: D_TITLE_6029BE4 } D_TITLE_602A710: { type: SF64:ANIM, offset: 0x602A710, symbol: D_TITLE_602A710 } -D_TITLE_602A720: { type: GFX, offset: 0x602A720, symbol: D_TITLE_602A720 } +aTitleGreatFoxDeckPlatformDL: { type: GFX, offset: 0x602A720, symbol: aTitleGreatFoxDeckPlatformDL } -D_TITLE_602A8C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: D_TITLE_602A8C0 } +aTitleCsPassageWayCeilingTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: aTitleCsPassageWayCeilingTex } D_TITLE_602B8C0: { type: GFX, offset: 0x602B8C0, symbol: D_TITLE_602B8C0 } @@ -178,41 +178,41 @@ D_TITLE_602DD30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_602DF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DF30, symbol: D_TITLE_602DF30 } -D_TITLE_602E380: { type: GFX, offset: 0x602E380, symbol: D_TITLE_602E380 } +aTitleCsPassageWayDL: { type: GFX, offset: 0x602E380, symbol: aTitleCsPassageWayDL } -D_TITLE_602E550: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: D_TITLE_602E550 } +aTitleCsPassageWayFloorTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: aTitleCsPassageWayFloorTex } -D_TITLE_602F8E0: { type: SF64:ANIM, offset: 0x602F8E0, symbol: D_TITLE_602F8E0 } +aFoxRunningAnim: { type: SF64:ANIM, offset: 0x602F8E0, symbol: aFoxRunningAnim } -D_TITLE_602FBAC: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: D_TITLE_602FBAC} +aFoxSkel: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: aFoxSkel} -D_TITLE_60305C0: { type: SF64:ANIM, offset: 0x60305C0, symbol: D_TITLE_60305C0 } +aFalcoRunningAnim: { type: SF64:ANIM, offset: 0x60305C0, symbol: aFalcoRunningAnim } -D_TITLE_603088C: {type: SF64:SKELETON, offset: 0x603088C, symbol: D_TITLE_603088C} +aFalcoSkel: {type: SF64:SKELETON, offset: 0x603088C, symbol: aFalcoSkel} -D_TITLE_6031120: { type: SF64:ANIM, offset: 0x6031120, symbol: D_TITLE_6031120 } +aSlippyRunningAnim: { type: SF64:ANIM, offset: 0x6031120, symbol: aSlippyRunningAnim } -D_TITLE_60313AC: {type: SF64:SKELETON, offset: 0x60313AC, symbol: D_TITLE_60313AC} +aSlippySkel: {type: SF64:SKELETON, offset: 0x60313AC, symbol: aSlippySkel} -D_TITLE_6031DB8: { type: SF64:ANIM, offset: 0x6031DB8, symbol: D_TITLE_6031DB8 } +aPeppyRunningAnim: { type: SF64:ANIM, offset: 0x6031DB8, symbol: aPeppyRunningAnim } -D_TITLE_6032084: {type: SF64:SKELETON, offset: 0x6032084, symbol: D_TITLE_6032084} +aPeppySkel: {type: SF64:SKELETON, offset: 0x6032084, symbol: aPeppySkel} -D_TITLE_60320E0: { type: GFX, offset: 0x60320E0, symbol: D_TITLE_60320E0 } +aTitleArwingEngineGlowDL: { type: GFX, offset: 0x60320E0, symbol: aTitleArwingEngineGlowDL } -D_TITLE_6032178: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: D_TITLE_6032178} +aTitleArwingEngineGlowTex: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: aTitleArwingEngineGlowTex} -D_TITLE_6032580: { type: GFX, offset: 0x6032580, symbol: D_TITLE_6032580 } +aTitleArwingShadowDL: { type: GFX, offset: 0x6032580, symbol: aTitleArwingShadowDL } -D_TITLE_6032608: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: D_TITLE_6032608 } +aTitleArwingShadowTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: aTitleArwingShadowTex } -D_TITLE_60338DC: { type: SF64:ANIM, offset: 0x60338DC, symbol: D_TITLE_60338DC } +aFalcoAnim: { type: SF64:ANIM, offset: 0x60338DC, symbol: aFalcoAnim } -D_TITLE_6035024: { type: SF64:ANIM, offset: 0x6035024, symbol: D_TITLE_6035024 } +aFoxAnim: { type: SF64:ANIM, offset: 0x6035024, symbol: aFoxAnim } -D_TITLE_603531C: { type: SF64:ANIM, offset: 0x603531C, symbol: D_TITLE_603531C } +aPeppyAnim: { type: SF64:ANIM, offset: 0x603531C, symbol: aPeppyAnim } -D_TITLE_6036278: { type: SF64:ANIM, offset: 0x6036278, symbol: D_TITLE_6036278 } +aSlippyAnim: { type: SF64:ANIM, offset: 0x6036278, symbol: aSlippyAnim } D_TITLE_6036290: { type: GFX, offset: 0x6036290, symbol: D_TITLE_6036290 } @@ -222,7 +222,7 @@ D_TITLE_6036B30: { type: GFX, offset: 0x6036B30, symbol: D_TITLE_6036B30 } D_TITLE_6036BC8: { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x6036BC8, symbol: D_TITLE_6036BC8 } -D_TITLE_6037CF0: { type: GFX, offset: 0x6037CF0, symbol: D_TITLE_6037CF0 } +aPlanetCorneriaDL: { type: GFX, offset: 0x6037CF0, symbol: aPlanetCorneriaDL } D_TITLE_60380D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x60380D0, symbol: D_TITLE_60380D0} @@ -242,7 +242,7 @@ D_TITLE_603F0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: D_TITLE_60408C0: { type: GFX, offset: 0x60408C0, symbol: D_TITLE_60408C0 } -D_TITLE_6041070: { type: GFX, offset: 0x6041070, symbol: D_TITLE_6041070 } +aTeamShadowDL: { type: GFX, offset: 0x6041070, symbol: aTeamShadowDL } D_TITLE_60410F8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60410F8, symbol: D_TITLE_60410F8} diff --git a/assets/yaml/jp/rev0/ast_venom_1.yaml b/assets/yaml/jp/rev0/ast_venom_1.yaml index 1655355a..80b6e931 100644 --- a/assets/yaml/jp/rev0/ast_venom_1.yaml +++ b/assets/yaml/jp/rev0/ast_venom_1.yaml @@ -19,8 +19,8 @@ D_VE1_6000000: D_VE1_6000A80: { type: TEXTURE, format: IA8, width: 40, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE1_6000A80 } -D_VE1_6000D80: - { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: D_VE1_6000D80 } +aVe1TitleCardTex: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: aVe1TitleCardTex } D_VE1_6001B80: { type: TEXTURE, format: IA8, width: 128, height: 19, offset: 0x6001B80, ctype: u8, symbol: D_VE1_6001B80 } diff --git a/assets/yaml/jp/rev0/ast_venom_2.yaml b/assets/yaml/jp/rev0/ast_venom_2.yaml index 3146fc88..41871152 100644 --- a/assets/yaml/jp/rev0/ast_venom_2.yaml +++ b/assets/yaml/jp/rev0/ast_venom_2.yaml @@ -18,8 +18,8 @@ D_VE2_6000000: D_VE2_6000A80: { type: TEXTURE, format: IA8, width: 112, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE2_6000A80 } -D_VE2_60012D0: - { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: D_VE2_60012D0 } +aVe2TitleCardTex: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: aVe2TitleCardTex } D_VE2_60020D0: { type: TEXTURE, format: IA8, width: 104, height: 19, offset: 0x60020D0, ctype: u8, symbol: D_VE2_60020D0 } diff --git a/assets/yaml/jp/rev0/ast_versus.yaml b/assets/yaml/jp/rev0/ast_versus.yaml index 75b6f5e2..fc8a060e 100644 --- a/assets/yaml/jp/rev0/ast_versus.yaml +++ b/assets/yaml/jp/rev0/ast_versus.yaml @@ -72,14 +72,14 @@ D_versus_3000A10: D_versus_3000B00: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000B00, symbol: D_versus_3000B00 } -D_versus_3000B20: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: D_versus_3000B20 } +aVsBoostGaugeFrameTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: aVsBoostGaugeFrameTex } -D_versus_3000BC0: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: D_versus_3000BC0 } +aVsShieldGaugeFrameTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: aVsShieldGaugeFrameTex } -D_versus_30013E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: D_versus_30013E0 } +aVsStarTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: aVsStarTex } D_versus_3001420: { type: TEXTURE, ctype: u8, format: CI8, width: 256, height: 42, offset: 0x3001420, symbol: D_versus_3001420, tlut: 0x3003E20 } @@ -141,20 +141,20 @@ D_versus_300C660: D_versus_300D150: {type: TEXTURE, ctype: u16, format: TLUT, colors: 251, offset: 0x300D150, symbol: D_versus_300D150 } -D_versus_300D350: - { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: D_versus_300D350, tlut: 0x300D398 } -D_versus_300D398: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: D_versus_300D398 } +aVsBoostGaugeCoolTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: aVsBoostGaugeCoolTex, tlut: 0x300D398 } +aVsBoostGaugeCoolTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: aVsBoostGaugeCoolTLUT } -D_versus_300D3C0: - { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: D_versus_300D3C0, tlut: 0x300D408 } -D_versus_300D408: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: D_versus_300D408 } +aVsBoostGaugeOverheatTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: aVsBoostGaugeOverheatTex, tlut: 0x300D408 } +aVsBoostGaugeOverheatTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: aVsBoostGaugeOverheatTLUT } -D_versus_300D440: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: D_versus_300D440, tlut: 0x300D500 } -D_versus_300D500: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: D_versus_300D500 } +aVsShieldGaugeTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: aVsShieldGaugeTex, tlut: 0x300D500 } +aVsShieldGaugeTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: aVsShieldGaugeTLUT } D_versus_300D550: { type: GFX, offset: 0x300D550, symbol: D_versus_300D550} diff --git a/assets/yaml/jp/rev0/ast_vs_menu.yaml b/assets/yaml/jp/rev0/ast_vs_menu.yaml index a736b7c6..0fdc3d20 100644 --- a/assets/yaml/jp/rev0/ast_vs_menu.yaml +++ b/assets/yaml/jp/rev0/ast_vs_menu.yaml @@ -8,23 +8,23 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_VS_MENU_7000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: D_VS_MENU_7000000} +aVsPlayerNum1Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: aVsPlayerNum1Tex} -D_VS_MENU_70000D0: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: D_VS_MENU_70000D0} +aVsPlayerNum2Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: aVsPlayerNum2Tex} -D_VS_MENU_7000210: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: D_VS_MENU_7000210} +aVsPlayerNum3Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: aVsPlayerNum3Tex} -D_VS_MENU_7000350: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: D_VS_MENU_7000350} +aVsPlayerNum4Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: aVsPlayerNum4Tex} D_VS_MENU_7000490: { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 42, offset: 0x7000490, symbol: D_VS_MENU_7000490} -D_VS_MENU_7000F10: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: D_VS_MENU_7000F10} +aVsTextContTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: aVsTextContTex} D_VS_MENU_7001030: { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 9, offset: 0x7001030, symbol: D_VS_MENU_7001030} @@ -32,14 +32,14 @@ D_VS_MENU_7001030: D_VS_MENU_7001270: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 12, offset: 0x7001270, symbol: D_VS_MENU_7001270} -D_VS_MENU_70017B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: D_VS_MENU_70017B0} +aVsTextCorneriaTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: aVsTextCorneriaTex} -D_VS_MENU_70019E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: D_VS_MENU_70019E0} +aVsTextSectorZTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: aVsTextSectorZTex} -D_VS_MENU_7001C10: - { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: D_VS_MENU_7001C10} +aVsTextKatinaTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: aVsTextKatinaTex} D_VS_MENU_7001DF0: { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x7001DF0, symbol: D_VS_MENU_7001DF0} @@ -62,14 +62,14 @@ D_VS_MENU_7002BF0: D_VS_MENU_7002E50: { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x7002E50, symbol: D_VS_MENU_7002E50} -D_VS_MENU_70030B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: D_VS_MENU_70030B0} +aVsHandicapLvl1Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: aVsHandicapLvl1Tex} -D_VS_MENU_7003290: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: D_VS_MENU_7003290} +aVsHandicapLvl2Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: aVsHandicapLvl2Tex} -D_VS_MENU_7003470: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: D_VS_MENU_7003470} +aVsHandicapLvl3Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: aVsHandicapLvl3Tex} D_VS_MENU_7003650: { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003650, symbol: D_VS_MENU_7003650} @@ -116,29 +116,29 @@ D_VS_MENU_70044D0: D_VS_MENU_7004990: { type: TEXTURE, ctype: u16, format: TLUT, colors: 17, offset: 0x7004990, symbol: D_VS_MENU_7004990} -D_VS_MENU_70049C0: - { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: D_VS_MENU_70049C0, tlut: 0x7004B80} +aVsFoxNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: aVsFoxNameTex, tlut: 0x7004B80} -D_VS_MENU_7004B80: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: D_VS_MENU_7004B80} +aVsFoxNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: aVsFoxNameTLUT} -D_VS_MENU_7004BB0: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: D_VS_MENU_7004BB0, tlut: 0x7004D90} +aVsPeppyNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: aVsPeppyNameTex, tlut: 0x7004D90} -D_VS_MENU_7004D90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: D_VS_MENU_7004D90} +aVsPeppyNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: aVsPeppyNameTLUT} -D_VS_MENU_7004DC0: - { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: D_VS_MENU_7004DC0, tlut: 0x7004FF0} +aVsSlippyNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: aVsSlippyNameTex, tlut: 0x7004FF0} -D_VS_MENU_7004FF0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: D_VS_MENU_7004FF0} +aVsSlippyNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: aVsSlippyNameTLUT} -D_VS_MENU_7005020: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: D_VS_MENU_7005020, tlut: 0x70051A0} +aVsFalcoNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: aVsFalcoNameTex, tlut: 0x70051A0} -D_VS_MENU_70051A0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: D_VS_MENU_70051A0} +aVsFalcoNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: aVsFalcoNameTLUT} D_VS_MENU_70051D0: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x70051D0, symbol: D_VS_MENU_70051D0, tlut: 0x70055D0} @@ -146,56 +146,56 @@ D_VS_MENU_70051D0: D_VS_MENU_70055D0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 20, offset: 0x70055D0, symbol: D_VS_MENU_70055D0} -D_VS_MENU_7005600: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: D_VS_MENU_7005600, tlut: 0x7005D20} +aVsCorneriaTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: aVsCorneriaTex, tlut: 0x7005D20} -D_VS_MENU_7005D20: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: D_VS_MENU_7005D20} +aVsCorneriaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: aVsCorneriaTLUT} -D_VS_MENU_7005F10: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: D_VS_MENU_7005F10, tlut: 0x7006630} +aVsSectorZTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: aVsSectorZTex, tlut: 0x7006630} -D_VS_MENU_7006630: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: D_VS_MENU_7006630} +aVsSectorZTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: aVsSectorZTLUT} -D_VS_MENU_7006780: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: D_VS_MENU_7006780, tlut: 0x7006EA0} +aVsKatinaTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: aVsKatinaTex, tlut: 0x7006EA0} -D_VS_MENU_7006EA0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: D_VS_MENU_7006EA0} +aVsKatinaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: aVsKatinaTLUT} -D_VS_MENU_70070A0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: D_VS_MENU_70070A0} +aVsFalcoFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: aVsFalcoFaceTex} D_VS_MENU_7007FC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7007FC0, symbol: D_VS_MENU_7007FC0} -D_VS_MENU_7008EE0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: D_VS_MENU_7008EE0} +aVsFoxFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: aVsFoxFaceTex} D_VS_MENU_7009E00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7009E00, symbol: D_VS_MENU_7009E00} -D_VS_MENU_700AD20: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: D_VS_MENU_700AD20} +aVsPeppyFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: aVsPeppyFaceTex} D_VS_MENU_700BC40: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700BC40, symbol: D_VS_MENU_700BC40} -D_VS_MENU_700CB60: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: D_VS_MENU_700CB60} +aVsSlippyFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: aVsSlippyFaceTex} D_VS_MENU_700DA80: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700DA80, symbol: D_VS_MENU_700DA80} -D_VS_MENU_700E9A0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: D_VS_MENU_700E9A0} +aVsN64ConsoleTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: aVsN64ConsoleTex} -D_VS_MENU_70118E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: D_VS_MENU_70118E0, tlut: 0x70123F8} +aVsHandicapFrameTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: aVsHandicapFrameTex, tlut: 0x70123F8} -D_VS_MENU_70123F8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: D_VS_MENU_70123F8} +aVsHandicapFrameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: aVsHandicapFrameTLUT} D_VS_MENU_7012410: { type: GFX, offset: 0x7012410, symbol: D_VS_MENU_7012410} diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index 129ddaf9..2a2091eb 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -12,8 +12,8 @@ - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_ZO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: D_ZO_6000000} +aZoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: aZoTitleCardTex} D_ZO_6000C40: { type: GFX, offset: 0x6000C40, symbol: D_ZO_6000C40} diff --git a/assets/yaml/us/rev1/ast_allies.yaml b/assets/yaml/us/rev1/ast_allies.yaml index c22d8734..41639e69 100644 --- a/assets/yaml/us/rev1/ast_allies.yaml +++ b/assets/yaml/us/rev1/ast_allies.yaml @@ -53,11 +53,11 @@ D_D007A70: D_D008990: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0xD008990, symbol: D_D008990 } -D_D0098B0: - { type: GFX, offset: 0xD0098B0, symbol: D_D0098B0 } +aKattRadarMarkDL: + { type: GFX, offset: 0xD0098B0, symbol: aKattRadarMarkDL } -D_D009938: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: D_D009938 } +aKattRadarMarkTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x0D009938, symbol: aKattRadarMarkTex } aKattShipDL: { type: GFX, offset: 0xD009A40, symbol: aKattShipDL } diff --git a/assets/yaml/us/rev1/ast_andross.yaml b/assets/yaml/us/rev1/ast_andross.yaml index e6019ac5..04055bc3 100644 --- a/assets/yaml/us/rev1/ast_andross.yaml +++ b/assets/yaml/us/rev1/ast_andross.yaml @@ -16,8 +16,8 @@ D_ANDROSS_C000000: {type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0xC000000, symbol: D_ANDROSS_C000000} -D_ANDROSS_C000A80: - {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: D_ANDROSS_C000A80} +aAndTitleCardTex: + {type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0xC000A80, symbol: aAndTitleCardTex} D_ANDROSS_C001880: {type: GFX, offset: 0xC001880, symbol: D_ANDROSS_C001880} diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml index 32e9bdf2..1bcc5582 100644 --- a/assets/yaml/us/rev1/ast_aquas.yaml +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_AQ_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: D_AQ_6000000 } +aAqTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x6000000, symbol: aAqTitleCardTex } aAqSquidAnim: { type: SF64:ANIM, offset: 0x6000AE4, symbol: aAqSquidAnim } diff --git a/assets/yaml/us/rev1/ast_area_6.yaml b/assets/yaml/us/rev1/ast_area_6.yaml index 7ff0e0cf..c725b464 100644 --- a/assets/yaml/us/rev1/ast_area_6.yaml +++ b/assets/yaml/us/rev1/ast_area_6.yaml @@ -12,8 +12,8 @@ - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_A6_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: D_A6_6000000 } +aA6TitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 104, height: 28, offset: 0x6000000, symbol: aA6TitleCardTex } D_A6_6000B60: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x06000B60, symbol: D_A6_6000B60 } diff --git a/assets/yaml/us/rev1/ast_arwing.yaml b/assets/yaml/us/rev1/ast_arwing.yaml index 06cc46b3..a99ffc59 100644 --- a/assets/yaml/us/rev1/ast_arwing.yaml +++ b/assets/yaml/us/rev1/ast_arwing.yaml @@ -8,17 +8,17 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_arwing_3000000: - { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_arwing_3000000 } +aArwingLifeIconTex: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: aArwingLifeIconTex } -D_arwing_3000080: - { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_arwing_3000080 } +aArwingLifeIconTLUT: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: aArwingLifeIconTLUT } -D_arwing_3000090: - { type: GFX, offset: 0x3000090, symbol: D_arwing_3000090 } +aAwFoxHeadDL: + { type: GFX, offset: 0x3000090, symbol: aAwFoxHeadDL } -D_arwing_3001C90: - { type: GFX, offset: 0x3001C90, symbol: D_arwing_3001C90 } +aAwJamesHeadDL: + { type: GFX, offset: 0x3001C90, symbol: aAwJamesHeadDL } D_arwing_3003960: { type: TEXTURE, format: RGBA16, offset: 0x3003960, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003960 } @@ -41,11 +41,11 @@ D_arwing_3003BE0: D_arwing_3003C60: { type: TEXTURE, format: RGBA16, offset: 0x3003C60, width: 8, height: 8, ctype: u16, symbol: D_arwing_3003C60 } -D_arwing_3003CE0: - { type: GFX, offset: 0x3003CE0, symbol: D_arwing_3003CE0 } +aAwPeppyHeadDL: + { type: GFX, offset: 0x3003CE0, symbol: aAwPeppyHeadDL } -D_arwing_3005AB0: - { type: GFX, offset: 0x3005AB0, symbol: D_arwing_3005AB0 } +aAwSlippyHeadDL: + { type: GFX, offset: 0x3005AB0, symbol: aAwSlippyHeadDL } D_arwing_30074D0: { type: TEXTURE, format: RGBA16, offset: 0x30074D0, width: 8, height: 8, ctype: u16, symbol: D_arwing_30074D0 } @@ -68,8 +68,8 @@ D_arwing_3008960: D_arwing_3009960: { type: TEXTURE, format: RGBA16, offset: 0x3009960, width: 16, height: 16, ctype: u16, symbol: D_arwing_3009960 } -D_arwing_3009B60: - { type: GFX, offset: 0x3009B60, symbol: D_arwing_3009B60 } +aAwBodyDL: + { type: GFX, offset: 0x3009B60, symbol: aAwBodyDL } D_arwing_300AC48: { type: TEXTURE, format: RGBA16, offset: 0x300AC48, width: 32, height: 32, ctype: u16, symbol: D_arwing_300AC48 } @@ -104,8 +104,11 @@ D_arwing_300F448: D_arwing_3010448: { type: TEXTURE, format: RGBA16, offset: 0x3010448, width: 64, height: 32, ctype: u16, symbol: D_arwing_3010448 } -D_arwing_3011720: - { type: GFX, offset: 0x3011720, symbol: D_arwing_3011720 } +aAwLaserGun1DL: + { type: GFX, offset: 0x3011720, symbol: aAwLaserGun1DL } + +aAwLaserGun2L: + { type: GFX, offset: 0x3011450, symbol: aAwLaserGun2L } D_arwing_30119F0: { type: TEXTURE, format: RGBA16, offset: 0x30119F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30119F0 } @@ -116,8 +119,8 @@ D_arwing_30121F0: D_arwing_30129F0: { type: TEXTURE, format: RGBA16, offset: 0x30129F0, width: 32, height: 32, ctype: u16, symbol: D_arwing_30129F0 } -D_arwing_30131F0: - { type: GFX, offset: 0x30131F0, symbol: D_arwing_30131F0 } +aAwCockpitViewDL: + { type: GFX, offset: 0x30131F0, symbol: aAwCockpitViewDL } D_arwing_30137E8: { type: TEXTURE, format: RGBA16, offset: 0x30137E8, width: 32, height: 32, ctype: u16, symbol: D_arwing_30137E8 } @@ -128,17 +131,26 @@ D_arwing_3013FE8: D_arwing_30147E8: { type: TEXTURE, format: RGBA16, offset: 0x30147E8, width: 16, height: 32, ctype: u16, symbol: D_arwing_30147E8 } -D_arwing_3014BF0: - { type: GFX, offset: 0x3014BF0, symbol: D_arwing_3014BF0 } +aAwRightWingBrokenDL: + { type: GFX, offset: 0x3014BF0, symbol: aAwRightWingBrokenDL } D_arwing_3014F20: { type: TEXTURE, format: RGBA16, offset: 0x3014F20, width: 16, height: 16, ctype: u16, symbol: D_arwing_3014F20 } -D_arwing_3015120: - { type: GFX, offset: 0x3015120, symbol: D_arwing_3015120 } +aAwLeftWingBrokenDL: + { type: GFX, offset: 0x3015120, symbol: aAwLeftWingBrokenDL } -D_arwing_30155E0: - { type: GFX, offset: 0x30155E0, symbol: D_arwing_30155E0} +aAwFlap1DL: + { type: GFX, offset: 0x30155E0, symbol: aAwFlap1DL} + +aAwFlap2DL: + { type: GFX, offset: 0x30154A0, symbol: aAwFlap2DL} + +aAwFlap3DL: + { type: GFX, offset: 0x3015730, symbol: aAwFlap3DL} + +aAwFlap4DL: + { type: GFX, offset: 0x3015880, symbol: aAwFlap4DL} D_arwing_3015AF4: { type: SF64:ANIM, offset: 0x3015AF4, symbol: D_arwing_3015AF4 } @@ -149,8 +161,8 @@ D_arwing_3015C28: D_arwing_3015D68: { type: SF64:ANIM, offset: 0x3015D68, symbol: D_arwing_3015D68 } -D_arwing_3015D80: - { type: GFX, offset: 0x3015D80, symbol: D_arwing_3015D80 } +aAwRightWingDL: + { type: GFX, offset: 0x3015D80, symbol: aAwRightWingDL } D_arwing_30163C4: { type: SF64:ANIM, offset: 0x30163C4, symbol: D_arwing_30163C4 } @@ -158,8 +170,8 @@ D_arwing_30163C4: D_arwing_3016610: { type: SF64:SKELETON, offset: 0x3016610, symbol: D_arwing_3016610 } -D_arwing_3016660: - { type: GFX, offset: 0x3016660, symbol: D_arwing_3016660} +aAwLeftWingDL: + { type: GFX, offset: 0x3016660, symbol: aAwLeftWingDL} D_arwing_3016B30: { type: GFX, offset: 0x3016B30, symbol: D_arwing_3016B30 } @@ -167,8 +179,8 @@ D_arwing_3016B30: D_arwing_3016BB8: { type: TEXTURE, format: IA8, offset: 0x3016BB8, width: 16, height: 16, ctype: u8, symbol: D_arwing_3016BB8 } -D_arwing_3016CC0: - { type: GFX, offset: 0x3016CC0, symbol: D_arwing_3016CC0 } +aAwFalcoHeadDL: + { type: GFX, offset: 0x3016CC0, symbol: aAwFalcoHeadDL } D_arwing_30182C8: { type: TEXTURE, format: RGBA16, offset: 0x30182C8, width: 8, height: 8, ctype: u16, symbol: D_arwing_30182C8 } @@ -176,6 +188,7 @@ D_arwing_30182C8: D_arwing_3018348: { type: TEXTURE, format: RGBA16, offset: 0x3018348, width: 8, height: 8, ctype: u16, symbol: D_arwing_3018348 } +# Windshield used in corneria cutscenes D_arwing_30183D0: { type: GFX, offset: 0x30183D0, symbol: D_arwing_30183D0 } @@ -185,6 +198,7 @@ aWindshieldClouldReflextionTex: D_arwing_3018CD8: { type: TEXTURE, format: RGBA16, offset: 0x3018CD8, width: 64, height: 16, ctype: u16, symbol: D_arwing_3018CD8 } +# Windshield D_arwing_30194E0: { type: GFX, offset: 0x30194E0, symbol: D_arwing_30194E0 } diff --git a/assets/yaml/us/rev1/ast_blue_marine.yaml b/assets/yaml/us/rev1/ast_blue_marine.yaml index e682870e..ed1a6d10 100644 --- a/assets/yaml/us/rev1/ast_blue_marine.yaml +++ b/assets/yaml/us/rev1/ast_blue_marine.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_blue_marine_3000000: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_blue_marine_3000000, tlut: 0x3000080 } +aBlueMarineLifeIconTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: aBlueMarineLifeIconTex, tlut: 0x3000080 } -D_blue_marine_3000080: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: D_blue_marine_3000080 } +aBlueMarineLifeIconTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x3000080, symbol: aBlueMarineLifeIconTLUT } D_blue_marine_3000090: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 9, offset: 0x3000090, symbol: D_blue_marine_3000090, tlut: 0x3000120 } diff --git a/assets/yaml/us/rev1/ast_bolse.yaml b/assets/yaml/us/rev1/ast_bolse.yaml index 40808dd0..ba001b6d 100644 --- a/assets/yaml/us/rev1/ast_bolse.yaml +++ b/assets/yaml/us/rev1/ast_bolse.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' # Bolse Defense Outpost -D_BO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: D_BO_6000000 } +aBoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 19, offset: 0x6000000, symbol: aBoTitleCardTex } D_BO_6000C80: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6000C80, symbol: D_BO_6000C80 } diff --git a/assets/yaml/us/rev1/ast_common.yaml b/assets/yaml/us/rev1/ast_common.yaml index 3372ef0e..4ae37bd0 100644 --- a/assets/yaml/us/rev1/ast_common.yaml +++ b/assets/yaml/us/rev1/ast_common.yaml @@ -17,8 +17,8 @@ D_1000280: D_1000640: { type: TEXTURE, format: IA8, width: 96, height: 22, ctype: u8, offset: 0x1000640, symbol: D_1000640 } -D_1000E80: - { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: D_1000E80 } +aBoostGaugeFrameTex: + { type: TEXTURE, format: IA8, width: 48, height: 9, ctype: u8, offset: 0x1000E80, symbol: aBoostGaugeFrameTex } D_1001030: { type: TEXTURE, format: IA8, width: 8, height: 8, ctype: u8, offset: 0x1001030, symbol: D_1001030 } @@ -41,8 +41,8 @@ D_1002040: D_1002220: { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002220, symbol: D_1002220 } -D_1002280: - { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: D_1002280 } +aShieldGaugeFrameEdgeTex: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x1002280, symbol: aShieldGaugeFrameEdgeTex } D_10022E0: { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10022E0, symbol: D_10022E0 } @@ -53,8 +53,8 @@ D_1002340: D_10024D0: { type: TEXTURE, format: IA8, width: 96, height: 32, ctype: u8, offset: 0x10024D0, symbol: D_10024D0 } -D_10030D0: - { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: D_10030D0 } +aShieldGaugeFrameTex: + { type: TEXTURE, format: IA8, width: 8, height: 12, ctype: u8, offset: 0x10030D0, symbol: aShieldGaugeFrameTex } D_1003130: { type: GFX, offset: 0x1003130, symbol: D_1003130 } @@ -65,14 +65,14 @@ D_1003208: D_1003288: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1003288, ctype: u16, symbol: D_1003288 } -D_10032A0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: D_10032A0 } +aFalcoPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10032A0, symbol: aFalcoPortraitTex } D_10041C0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10041C0, symbol: D_10041C0 } -D_10050E0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: D_10050E0 } +aFoxPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x10050E0, symbol: aFoxPortraitTex } D_1006000: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x1006000, symbol: D_1006000 } @@ -92,14 +92,14 @@ D_1009C80: D_100ABA0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100ABA0, symbol: D_100ABA0 } -D_100BAC0: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: D_100BAC0 } +aPeppyPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100BAC0, symbol: aPeppyPortraitTex } D_100C9E0: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100C9E0, symbol: D_100C9E0 } -D_100D900: - { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: D_100D900 } +aSlippyPortraitTex: + { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100D900, symbol: aSlippyPortraitTex } D_100E820: { type: TEXTURE, format: RGBA16, width: 44, height: 44, ctype: u16, offset: 0x100E820, symbol: D_100E820 } @@ -215,17 +215,17 @@ D_1011200: D_1011270: { type: TEXTURE, format: TLUT, colors: 6, ctype: u16, offset: 0x1011270, symbol: D_1011270 } -D_1011280: - { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: D_1011280 } +aRadarFrameTex: + { type: TEXTURE, format: CI4, width: 48, height: 44, ctype: u8, offset: 0x1011280, tlut: 0x10116A0, symbol: aRadarFrameTex } -D_10116A0: - { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: D_10116A0 } +aRadarFrameTLUT: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x10116A0, symbol: aRadarFrameTLUT } -D_10116B0: - { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: D_10116B0 } +aVsBombIconTex: + { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10116B0, tlut: 0x1011730, symbol: aVsBombIconTex } -D_1011730: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: D_1011730 } +aVsBombIconTLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011730, symbol: aVsBombIconTLUT } D_1011750: { type: TEXTURE, format: CI4, width: 80, height: 13, ctype: u8, offset: 0x1011750, tlut: 0x1011958, symbol: D_1011750 } @@ -245,29 +245,29 @@ D_1011A40: D_1011AB0: { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011AB0, symbol: D_1011AB0 } -D_1011AC0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: D_1011AC0 } +aIncomingMsgButtonTex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011AC0, tlut: 0x1011B90, symbol: aIncomingMsgButtonTex } -D_1011B90: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: D_1011B90 } +aIncomingMsgButtonTLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011B90, symbol: aIncomingMsgButtonTLUT } -D_1011BB0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: D_1011BB0 } +aIncomingMsgSignal1Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011BB0, tlut: 0x1011C80, symbol: aIncomingMsgSignal1Tex } -D_1011C80: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: D_1011C80 } +aIncomingMsgSignal1TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011C80, symbol: aIncomingMsgSignal1TLUT } -D_1011CA0: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: D_1011CA0 } +aIncomingMsgSignal2Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011CA0, tlut: 0x1011D70, symbol: aIncomingMsgSignal2Tex } -D_1011D70: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: D_1011D70 } +aIncomingMsgSignal2TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011D70, symbol: aIncomingMsgSignal2TLUT } -D_1011D90: - { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: D_1011D90 } +aIncomingMsgSignal3Tex: + { type: TEXTURE, format: CI4, width: 16, height: 26, ctype: u8, offset: 0x1011D90, tlut: 0x1011E60, symbol: aIncomingMsgSignal3Tex } -D_1011E60: - { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: D_1011E60 } +aIncomingMsgSignal3TLUT: + { type: TEXTURE, format: TLUT, colors: 15, ctype: u16, offset: 0x1011E60, symbol: aIncomingMsgSignal3TLUT } D_1011E80: { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1011E80, tlut: 0x1011EC0, symbol: D_1011E80 } @@ -275,11 +275,11 @@ D_1011E80: D_1011EC0: { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1011EC0, symbol: D_1011EC0 } -D_1011ED0: - { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: D_1011ED0 } +aXTex: + { type: TEXTURE, format: CI4, width: 16, height: 7, ctype: u8, offset: 0x1011ED0, tlut: 0x1011F08, symbol: aXTex } -D_1011F08: - { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: D_1011F08 } +aXTLUT: + { type: TEXTURE, format: TLUT, colors: 12, ctype: u16, offset: 0x1011F08, symbol: aXTLUT } D_1011F20: { type: GFX, offset: 0x1011F20, symbol: D_1011F20 } @@ -290,11 +290,11 @@ D_1012000: D_1012100: { type: TEXTURE, format: TLUT, colors: 8, offset: 0x1012100, ctype: u16, symbol: D_1012100 } -D_1012110: - { type: GFX, offset: 0x1012110, symbol: D_1012110 } +aGoldRingEmptySlotDL: + { type: GFX, offset: 0x1012110, symbol: aGoldRingEmptySlotDL } -D_1012190: - { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: D_1012190 } +aGoldRingEmptySlotTex: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1012190, symbol: aGoldRingEmptySlotTex } D_1012290: { type: TEXTURE, format: CI8, width: 48, height: 22, ctype: u8, offset: 0x1012290, tlut: 0x10126B0, symbol: D_1012290 } @@ -314,17 +314,17 @@ D_1013780: D_10151F0: { type: TEXTURE, format: TLUT, colors: 146, ctype: u16, offset: 0x10151F0, symbol: D_10151F0 } -D_10127D0: - { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: D_10127D0 } +aBoostGaugeCoolTex: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10127D0, tlut: 0x1012898, symbol: aBoostGaugeCoolTex } -D_1012898: - { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: D_1012898 } +aBoostGaugeCoolTLUT: + { type: TEXTURE, format: TLUT, colors: 20, ctype: u16, offset: 0x1012898, symbol: aBoostGaugeCoolTLUT } -D_10128C0: - { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: D_10128C0 } +aBoostGaugeOverheatTex: + { type: TEXTURE, format: CI8, width: 40, height: 5, ctype: u8, offset: 0x10128C0, tlut: 0x1012988, symbol: aBoostGaugeOverheatTex } -D_1012988: - { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: D_1012988 } +aBoostGaugeOverheatTLUT: + { type: TEXTURE, format: TLUT, colors: 28, ctype: u16, offset: 0x1012988, symbol: aBoostGaugeOverheatTLUT } D_10129C0: { type: TEXTURE, format: CI8, width: 16, height: 109, ctype: u8, offset: 0x10129C0, tlut: 0x1013090, symbol: D_10129C0 } @@ -332,17 +332,17 @@ D_10129C0: D_1013090: { type: TEXTURE, format: TLUT, colors: 112, ctype: u16, offset: 0x1013090, symbol: D_1013090 } -D_1013170: - { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: D_1013170 } +aMsgWindowBgTex: + { type: TEXTURE, format: CI8, width: 32, height: 32, ctype: u8, offset: 0x1013170, tlut: 0x1013570, symbol: aMsgWindowBgTex } -D_1013570: - { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: D_1013570 } +aMsgWindowBgTLUT: + { type: TEXTURE, format: TLUT, colors: 8, ctype: u16, offset: 0x1013570, symbol: aMsgWindowBgTLUT } -D_1013580: - { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: D_1013580 } +aShieldGaugeTex: + { type: TEXTURE, format: CI8, width: 48, height: 8, ctype: u8, offset: 0x1013580, tlut: 0x1013700, symbol: aShieldGaugeTex } -D_1013700: - { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: D_1013700 } +aShieldGaugeTLUT: + { type: TEXTURE, format: TLUT, colors: 58, ctype: u16, offset: 0x1013700, symbol: aShieldGaugeTLUT } D_1015320: { type: GFX, offset: 0x1015320, symbol: D_1015320 } @@ -353,11 +353,11 @@ D_10153F8: D_10154F8: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x10154F8, ctype: u16, symbol: D_10154F8 } -D_1015510: - { type: GFX, offset: 0x1015510, symbol: D_1015510 } +aRadarMarkArwingDL: + { type: GFX, offset: 0x1015510, symbol: aRadarMarkArwingDL } -D_1015598: - { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: D_1015598 } +aRadarMarkArwingTex: + { type: TEXTURE, format: IA8, width: 16, height: 16, ctype: u8, offset: 0x1015598, symbol: aRadarMarkArwingTex } D_10156A0: { type: GFX, offset: 0x10156A0, symbol: D_10156A0 } @@ -563,8 +563,8 @@ D_101AED0: D_101AF98: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x101AF98, symbol: D_101AF98 } -D_101B1A0: - { type: GFX, offset: 0x101B1A0, symbol: D_101B1A0 } +aGoldRingFrame12DL: + { type: GFX, offset: 0x101B1A0, symbol: aGoldRingFrame12DL } D_101B268: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B268, tlut: 0x101B2E8, symbol: D_101B268 } @@ -572,8 +572,8 @@ D_101B268: D_101B2E8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B2E8, ctype: u16, symbol: D_101B2E8 } -D_101B310: - { type: GFX, offset: 0x101B310, symbol: D_101B310 } +aGoldRingFrame11DL: + { type: GFX, offset: 0x101B310, symbol: aGoldRingFrame11DL } D_101B3D8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B3D8, tlut: 0x101B458, symbol: D_101B3D8 } @@ -581,8 +581,8 @@ D_101B3D8: D_101B458: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B458, ctype: u16, symbol: D_101B458 } -D_101B480: - { type: GFX, offset: 0x101B480, symbol: D_101B480 } +aGoldRingFrame10DL: + { type: GFX, offset: 0x101B480, symbol: aGoldRingFrame10DL } D_101B548: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B548, tlut: 0x101B5C8, symbol: D_101B548 } @@ -590,8 +590,8 @@ D_101B548: D_101B5C8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B5C8, ctype: u16, symbol: D_101B5C8 } -D_101B5F0: - { type: GFX, offset: 0x101B5F0, symbol: D_101B5F0 } +aGoldRingFrame9DL: + { type: GFX, offset: 0x101B5F0, symbol: aGoldRingFrame9DL } D_101B6B8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B6B8, tlut: 0x101B738, symbol: D_101B6B8 } @@ -599,8 +599,8 @@ D_101B6B8: D_101B738: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B738, ctype: u16, symbol: D_101B738 } -D_101B760: - { type: GFX, offset: 0x101B760, symbol: D_101B760 } +aGoldRingFrame8DL: + { type: GFX, offset: 0x101B760, symbol: aGoldRingFrame8DL } D_101B828: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B828, tlut: 0x101B8A8, symbol: D_101B828 } @@ -608,8 +608,8 @@ D_101B828: D_101B8A8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101B8A8, ctype: u16, symbol: D_101B8A8 } -D_101B8D0: - { type: GFX, offset: 0x101B8D0, symbol: D_101B8D0 } +aGoldRingFrame7DL: + { type: GFX, offset: 0x101B8D0, symbol: aGoldRingFrame7DL } D_101B998: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101B998, tlut: 0x101BA18, symbol: D_101B998 } @@ -617,8 +617,8 @@ D_101B998: D_101BA18: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BA18, ctype: u16, symbol: D_101BA18 } -D_101BA40: - { type: GFX, offset: 0x101BA40, symbol: D_101BA40 } +aGoldRingFrame6DL: + { type: GFX, offset: 0x101BA40, symbol: aGoldRingFrame6DL } D_101BB08: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BB08, tlut: 0x101BB88, symbol: D_101BB08 } @@ -626,8 +626,8 @@ D_101BB08: D_101BB88: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BB88, ctype: u16, symbol: D_101BB88 } -D_101BBB0: - { type: GFX, offset: 0x101BBB0, symbol: D_101BBB0 } +aGoldRingFrame5DL: + { type: GFX, offset: 0x101BBB0, symbol: aGoldRingFrame5DL } D_101BC78: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BC78, tlut: 0x101BCF8, symbol: D_101BC78 } @@ -635,8 +635,8 @@ D_101BC78: D_101BCF8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BCF8, ctype: u16, symbol: D_101BCF8 } -D_101BD20: - { type: GFX, offset: 0x101BD20, symbol: D_101BD20 } +aGoldRingFrame4DL: + { type: GFX, offset: 0x101BD20, symbol: aGoldRingFrame4DL } D_101BDE8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BDE8, tlut: 0x101BE68, symbol: D_101BDE8 } @@ -644,8 +644,8 @@ D_101BDE8: D_101BE68: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BE68, ctype: u16, symbol: D_101BE68 } -D_101BE90: - { type: GFX, offset: 0x101BE90, symbol: D_101BE90 } +aGoldRingFrame3DL: + { type: GFX, offset: 0x101BE90, symbol: aGoldRingFrame3DL } D_101BF58: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101BF58, tlut: 0x101BFD8, symbol: D_101BF58 } @@ -653,8 +653,8 @@ D_101BF58: D_101BFD8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101BFD8, ctype: u16, symbol: D_101BFD8 } -D_101C000: - { type: GFX, offset: 0x101C000, symbol: D_101C000 } +aGoldRingFrame2DL: + { type: GFX, offset: 0x101C000, symbol: aGoldRingFrame2DL } D_101C0C8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C0C8, tlut: 0x101C148, symbol: D_101C0C8 } @@ -662,8 +662,8 @@ D_101C0C8: D_101C148: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C148, ctype: u16, symbol: D_101C148 } -D_101C170: - { type: GFX, offset: 0x101C170, symbol: D_101C170 } +aGoldRingFrame1DL: + { type: GFX, offset: 0x101C170, symbol: aGoldRingFrame1DL } D_101C238: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x101C238, tlut: 0x101C2B8, symbol: D_101C238 } @@ -671,11 +671,11 @@ D_101C238: D_101C2B8: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x101C2B8, ctype: u16, symbol: D_101C2B8 } -D_101C2E0: - { type: GFX, offset: 0x101C2E0, symbol: D_101C2E0 } +aStarDL: + { type: GFX, offset: 0x101C2E0, symbol: aStarDL } -D_101C368: - { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: D_101C368 } +aStarTex: + { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, colors: 20, offset: 0x101C368, symbol: aStarTex } D_101C770: { type: GFX, offset: 0x101C770, symbol: D_101C770 } @@ -833,8 +833,8 @@ aSlippyMarkTex: aSlippyMarkTLUT: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024818, ctype: u16, symbol: aSlippyMarkTLUT } -D_1024830: - { type: GFX, offset: 0x1024830, symbol: D_1024830 } +aRadarMarkBossDL: + { type: GFX, offset: 0x1024830, symbol: aRadarMarkBossDL } D_10248F8: { type: TEXTURE, format: CI4, width: 16, height: 16, ctype: u8, offset: 0x10248F8, tlut: 0x1024978, symbol: D_10248F8 } @@ -842,8 +842,8 @@ D_10248F8: D_1024978: { type: TEXTURE, format: TLUT, colors: 12, offset: 0x1024978, ctype: u16, symbol: D_1024978 } -D_1024990: - { type: GFX, offset: 0x1024990, symbol: D_1024990 } +aArrowDL: + { type: GFX, offset: 0x1024990, symbol: aArrowDL } D_1024A58: { type: TEXTURE, format: CI4, width: 16, height: 8, ctype: u8, offset: 0x1024A58, tlut: 0x1024A98, symbol: D_1024A58 } @@ -851,8 +851,8 @@ D_1024A58: D_1024A98: { type: TEXTURE, format: TLUT, colors: 20, offset: 0x1024A98, ctype: u16, symbol: D_1024A98 } -D_1024AC0: - { type: GFX, offset: 0x1024AC0, symbol: D_1024AC0 } +aOrbDL: + { type: GFX, offset: 0x1024AC0, symbol: aOrbDL } D_1024B58: { type: TEXTURE, format: IA8, width: 32, height: 32, ctype: u8, offset: 0x1024B58, symbol: D_1024B58 } @@ -920,8 +920,8 @@ D_102A010: D_102A098: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102A098, symbol: D_102A098 } -D_102A8A0: - { type: GFX, offset: 0x102A8A0, symbol: D_102A8A0 } +aRadarMarkKaSaucererDL: + { type: GFX, offset: 0x102A8A0, symbol: aRadarMarkKaSaucererDL } D_102A928: { type: TEXTURE, format: RGBA16, width: 16, height: 16, ctype: u16, offset: 0x102A928, symbol: D_102A928 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index 2cc6ece2..b7448683 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -15,8 +15,8 @@ # Corneria # Former Army Base -D_CO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: D_CO_6000000 } +aCoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 28, offset: 0x6000000, symbol: aCoTitleCardTex } aCoWaterfallDL: { type: GFX, offset: 0x6000E00, symbol: aCoWaterfallDL } diff --git a/assets/yaml/us/rev1/ast_font_3d.yaml b/assets/yaml/us/rev1/ast_font_3d.yaml index 745d6518..eb676ff8 100644 --- a/assets/yaml/us/rev1/ast_font_3d.yaml +++ b/assets/yaml/us/rev1/ast_font_3d.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_FONT3D_9000000: - { type: GFX, offset: 0x9000000, symbol: D_FONT3D_9000000 } +aFont3D_DOT: + { type: GFX, offset: 0x9000000, symbol: aFont3D_DOT } -D_FONT3D_90001F0: - { type: GFX, offset: 0x90001F0, symbol: D_FONT3D_90001F0 } +aFont3D_1: + { type: GFX, offset: 0x90001F0, symbol: aFont3D_1 } D_FONT3D_9000528: { type: TEXTURE, ctype: u8, format: CI4, width: 8, height: 8, offset: 0x09000528, symbol: D_FONT3D_9000528, tlut: 0x09000548 } @@ -20,109 +20,109 @@ D_FONT3D_9000528: D_FONT3D_9000548: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x09000548, symbol: D_FONT3D_9000548 } -D_FONT3D_9000570: - { type: GFX, offset: 0x9000570, symbol: D_FONT3D_9000570 } +aFont3D_O: + { type: GFX, offset: 0x9000570, symbol: aFont3D_O } -D_FONT3D_9000980: - { type: GFX, offset: 0x9000980, symbol: D_FONT3D_9000980 } +aFont3D_D: + { type: GFX, offset: 0x9000980, symbol: aFont3D_D } -D_FONT3D_9001120: - { type: GFX, offset: 0x9001120, symbol: D_FONT3D_9001120 } +aFont3D_J: + { type: GFX, offset: 0x9001120, symbol: aFont3D_J } -D_FONT3D_90014E0: - { type: GFX, offset: 0x90014E0, symbol: D_FONT3D_90014E0 } +aFont3D_P: + { type: GFX, offset: 0x90014E0, symbol: aFont3D_P } -D_FONT3D_9001A10: - { type: GFX, offset: 0x9001A10, symbol: D_FONT3D_9001A10 } +aFont3D_Z: + { type: GFX, offset: 0x9001A10, symbol: aFont3D_Z } -D_FONT3D_9001E90: - { type: GFX, offset: 0x9001E90, symbol: D_FONT3D_9001E90 } +aFont3D_Y: + { type: GFX, offset: 0x9001E90, symbol: aFont3D_Y } -D_FONT3D_90022A0: - { type: GFX, offset: 0x90022A0, symbol: D_FONT3D_90022A0 } +aFont3D_X: + { type: GFX, offset: 0x90022A0, symbol: aFont3D_X } -D_FONT3D_9002890: - { type: GFX, offset: 0x9002890, symbol: D_FONT3D_9002890 } +aFont3D_W: + { type: GFX, offset: 0x9002890, symbol: aFont3D_W } -D_FONT3D_9002EA0: - { type: GFX, offset: 0x9002EA0, symbol: D_FONT3D_9002EA0 } +aFont3D_V: + { type: GFX, offset: 0x9002EA0, symbol: aFont3D_V } -D_FONT3D_9003230: - { type: GFX, offset: 0x9003230, symbol: D_FONT3D_9003230 } +aFont3D_U: + { type: GFX, offset: 0x9003230, symbol: aFont3D_U } -D_FONT3D_9003620: - { type: GFX, offset: 0x9003620, symbol: D_FONT3D_9003620 } +aFont3D_T: + { type: GFX, offset: 0x9003620, symbol: aFont3D_T } -D_FONT3D_9003A30: - { type: GFX, offset: 0x9003A30, symbol: D_FONT3D_9003A30 } +aFont3D_S: + { type: GFX, offset: 0x9003A30, symbol: aFont3D_S } -D_FONT3D_9004230: - { type: GFX, offset: 0x9004230, symbol: D_FONT3D_9004230 } +aFont3D_R: + { type: GFX, offset: 0x9004230, symbol: aFont3D_R } -D_FONT3D_9004920: - { type: GFX, offset: 0x9004920, symbol: D_FONT3D_9004920 } +aFont3D_Q: + { type: GFX, offset: 0x9004920, symbol: aFont3D_Q } -D_FONT3D_9004E10: - { type: GFX, offset: 0x9004E10, symbol: D_FONT3D_9004E10 } +aFont3D_N: + { type: GFX, offset: 0x9004E10, symbol: aFont3D_N } -D_FONT3D_9005380: - { type: GFX, offset: 0x9005380, symbol: D_FONT3D_9005380 } +aFont3D_M: + { type: GFX, offset: 0x9005380, symbol: aFont3D_M } -D_FONT3D_9005980: - { type: GFX, offset: 0x9005980, symbol: D_FONT3D_9005980 } +aFont3D_L: + { type: GFX, offset: 0x9005980, symbol: aFont3D_L } -D_FONT3D_9005CA0: - { type: GFX, offset: 0x9005CA0, symbol: D_FONT3D_9005CA0 } +aFont3D_K: + { type: GFX, offset: 0x9005CA0, symbol: aFont3D_K } -D_FONT3D_90062D0: - { type: GFX, offset: 0x90062D0, symbol: D_FONT3D_90062D0 } +aFont3D_I: + { type: GFX, offset: 0x90062D0, symbol: aFont3D_I } -D_FONT3D_9006500: - { type: GFX, offset: 0x9006500, symbol: D_FONT3D_9006500 } +aFont3D_H: + { type: GFX, offset: 0x9006500, symbol: aFont3D_H } -D_FONT3D_9006AE0: - { type: GFX, offset: 0x9006AE0, symbol: D_FONT3D_9006AE0 } +aFont3D_G: + { type: GFX, offset: 0x9006AE0, symbol: aFont3D_G } -D_FONT3D_90070C0: - { type: GFX, offset: 0x90070C0, symbol: D_FONT3D_90070C0 } +aFont3D_F: + { type: GFX, offset: 0x90070C0, symbol: aFont3D_F } -D_FONT3D_90075A0: - { type: GFX, offset: 0x90075A0, symbol: D_FONT3D_90075A0 } +aFont3D_E: + { type: GFX, offset: 0x90075A0, symbol: aFont3D_E } -D_FONT3D_9007BB0: - { type: GFX, offset: 0x9007BB0, symbol: D_FONT3D_9007BB0 } +aFont3D_C: + { type: GFX, offset: 0x9007BB0, symbol: aFont3D_C } -D_FONT3D_9007FD0: - { type: GFX, offset: 0x9007FD0, symbol: D_FONT3D_9007FD0 } +aFont3D_B: + { type: GFX, offset: 0x9007FD0, symbol: aFont3D_B } -D_FONT3D_90086F0: - { type: GFX, offset: 0x90086F0, symbol: D_FONT3D_90086F0 } +aFont3D_A: + { type: GFX, offset: 0x90086F0, symbol: aFont3D_A } -D_FONT3D_9008C60: - { type: GFX, offset: 0x9008C60, symbol: D_FONT3D_9008C60 } +aFont3D_9: + { type: GFX, offset: 0x9008C60, symbol: aFont3D_9 } -D_FONT3D_9009280: - { type: GFX, offset: 0x9009280, symbol: D_FONT3D_9009280 } +aFont3D_8: + { type: GFX, offset: 0x9009280, symbol: aFont3D_8 } -D_FONT3D_9009990: - { type: GFX, offset: 0x9009990, symbol: D_FONT3D_9009990 } +aFont3D_7: + { type: GFX, offset: 0x9009990, symbol: aFont3D_7 } -D_FONT3D_9009CB0: - { type: GFX, offset: 0x9009CB0, symbol: D_FONT3D_9009CB0 } +aFont3D_6: + { type: GFX, offset: 0x9009CB0, symbol: aFont3D_6 } -D_FONT3D_900A290: - { type: GFX, offset: 0x900A290, symbol: D_FONT3D_900A290 } +aFont3D_5: + { type: GFX, offset: 0x900A290, symbol: aFont3D_5 } -D_FONT3D_900A870: - { type: GFX, offset: 0x900A870, symbol: D_FONT3D_900A870 } +aFont3D_4: + { type: GFX, offset: 0x900A870, symbol: aFont3D_4 } -D_FONT3D_900AF60: - { type: GFX, offset: 0x900AF60, symbol: D_FONT3D_900AF60 } +aFont3D_3: + { type: GFX, offset: 0x900AF60, symbol: aFont3D_3 } -D_FONT3D_900B580: - { type: GFX, offset: 0x900B580, symbol: D_FONT3D_900B580 } +aFont3D_2: + { type: GFX, offset: 0x900B580, symbol: aFont3D_2 } -D_FONT3D_900BB90: - { type: GFX, offset: 0x900BB90, symbol: D_FONT3D_900BB90 } +aFont3D_0: + { type: GFX, offset: 0x900BB90, symbol: aFont3D_0 } # size = 0xC1D0 diff --git a/assets/yaml/us/rev1/ast_fortuna.yaml b/assets/yaml/us/rev1/ast_fortuna.yaml index 9c931460..db19f082 100644 --- a/assets/yaml/us/rev1/ast_fortuna.yaml +++ b/assets/yaml/us/rev1/ast_fortuna.yaml @@ -14,8 +14,8 @@ # Fortuna # Former Defense Post -D_FO_6000000: - { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_FO_6000000 } +aFoTitleCardTex: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: aFoTitleCardTex } D_FO_6001260: { type: TEXTURE, format: IA8, width: 16, height: 16, offset: 0x6001260, ctype: u8, symbol: D_FO_6001260 } diff --git a/assets/yaml/us/rev1/ast_katina.yaml b/assets/yaml/us/rev1/ast_katina.yaml index 7a1a7729..9aee758d 100644 --- a/assets/yaml/us/rev1/ast_katina.yaml +++ b/assets/yaml/us/rev1/ast_katina.yaml @@ -14,8 +14,8 @@ # Katina # Frontline Base -D_KA_6000000: - { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: D_KA_6000000 } +aKaTitleCardTex: + { type: TEXTURE, format: IA8, width: 168, height: 28, offset: 0x6000000, ctype: u8, symbol: aKaTitleCardTex } D_KA_6001260: { type: TEXTURE, format: IA8, width: 8, height: 8, offset: 0x6001260, ctype: u8, symbol: D_KA_6001260 } diff --git a/assets/yaml/us/rev1/ast_landmaster.yaml b/assets/yaml/us/rev1/ast_landmaster.yaml index 3269c031..641ca684 100644 --- a/assets/yaml/us/rev1/ast_landmaster.yaml +++ b/assets/yaml/us/rev1/ast_landmaster.yaml @@ -8,11 +8,11 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_landmaster_3000000: - { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_landmaster_3000000 } +aLandmasterLifeIconTex: + { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: aLandmasterLifeIconTex } -D_landmaster_3000080: - { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: D_landmaster_3000080 } +aLandmasterLifeIconTLUT: + { type: TEXTURE, format: TLUT, offset: 0x3000080, colors: 8, ctype: u16, symbol: aLandmasterLifeIconTLUT } aLandmasterModelDL: { type: GFX, offset: 0x3000090, symbol: aLandmasterModelDL } diff --git a/assets/yaml/us/rev1/ast_macbeth.yaml b/assets/yaml/us/rev1/ast_macbeth.yaml index 6f435c7b..0b84ef9e 100644 --- a/assets/yaml/us/rev1/ast_macbeth.yaml +++ b/assets/yaml/us/rev1/ast_macbeth.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_MA_6000000: - {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: D_MA_6000000} +aMaTitleCardTex: + {type: TEXTURE, format: IA8, ctype: u8, width: 160, height: 28, offset: 0x6000000, symbol: aMaTitleCardTex} D_MA_6001180: {type: GFX, offset: 0x6001180, symbol: D_MA_6001180} diff --git a/assets/yaml/us/rev1/ast_map.yaml b/assets/yaml/us/rev1/ast_map.yaml index d920225d..18189455 100644 --- a/assets/yaml/us/rev1/ast_map.yaml +++ b/assets/yaml/us/rev1/ast_map.yaml @@ -9,20 +9,20 @@ - '#include "sf64object.h"' # Restart Game (Game Over) -D_MAP_6000000: - { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000000 } +aMapRetryCourseGameOverTex: + { type: TEXTURE, format: IA8, offset: 0x6000000, width: 96, height: 22, ctype: u8, symbol: aMapRetryCourseGameOverTex } # Proceed to Next Course -D_MAP_6000840: - { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: D_MAP_6000840 } +aMapProceedNextCourseTex: + { type: TEXTURE, format: IA8, offset: 0x6000840, width: 96, height: 22, ctype: u8, symbol: aMapProceedNextCourseTex } # Retry Course (Lose 1 Arwing) -D_MAP_6001080: - { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: D_MAP_6001080 } +aMapRetryCourseLose1UPTex: + { type: TEXTURE, format: IA8, offset: 0x6001080, width: 96, height: 22, ctype: u8, symbol: aMapRetryCourseLose1UPTex } # Change Course -D_MAP_60018C0: - { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: D_MAP_60018C0 } +aMapChangeCourseTex: + { type: TEXTURE, format: IA8, offset: 0x60018C0, width: 96, height: 10, ctype: u8, symbol: aMapChangeCourseTex } # Aquas Ocean D_MAP_6001C80: @@ -148,55 +148,55 @@ D_MAP_6017640: D_MAP_6018280: { type: TEXTURE, format: IA8, offset: 0x6018280, width: 184, height: 19, ctype: u8, symbol: D_MAP_6018280 } -D_MAP_6019030: - { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: D_MAP_6019030 } +aMapPrologueTextFadeTex: + { type: TEXTURE, format: IA8, offset: 0x6019030, width: 8, height: 16, ctype: u8, symbol: aMapPrologueTextFadeTex } # Clouds ? -D_MAP_60190B0: - { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60190B0 } +aMapVenomCloudTex: + { type: TEXTURE, format: IA8, offset: 0x60190B0, width: 96, height: 96, ctype: u8, symbol: aMapVenomCloudTex } -D_MAP_601B4B0: - { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: D_MAP_601B4B0 } +aMapOptionBgTex: + { type: TEXTURE, format: IA8, offset: 0x601B4B0, width: 32, height: 32, ctype: u8, symbol: aMapOptionBgTex } # Some text in japanese D_MAP_601B8B0: { type: TEXTURE, format: IA8, offset: 0x601B8B0, width: 80, height: 26, ctype: u8, symbol: D_MAP_1B8B0 } -D_MAP_601C0D0: - { type: GFX, offset: 0x601C0D0, symbol: D_MAP_601C0D0 } +aMapSectorXDL: + { type: GFX, offset: 0x601C0D0, symbol: aMapSectorXDL } D_MAP_601C160: { type: TEXTURE, format: RGBA16, offset: 0x0601C160, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C160 } -D_MAP_601C960: - { type: GFX, offset: 0x601C960, symbol: D_MAP_601C960 } +aMapSectorYDL: + { type: GFX, offset: 0x601C960, symbol: aMapSectorYDL } D_MAP_601C9F0: { type: TEXTURE, format: RGBA16, offset: 0x0601C9F0, width: 32, height: 32, ctype: u16, symbol: D_MAP_601C9F0 } -D_MAP_601D1F0: - { type: GFX, offset: 0x601D1F0, symbol: D_MAP_601D1F0 } +aMapMedalDL: + { type: GFX, offset: 0x601D1F0, symbol: aMapMedalDL } -D_MAP_601D2F0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: D_MAP_601D2F0, tlut: 0x0601DAF0 } +aMapMedalTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x0601D2F0, symbol: aMapMedalTex, tlut: 0x0601DAF0 } D_MAP_601DAF0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x0601DAF0, symbol: D_MAP_601DAF0 } -D_MAP_601DC10: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: D_MAP_601DC10, tlut: 0x0601DC90 } +aMapArwingIconTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DC10, symbol: aMapArwingIconTex, tlut: 0x0601DC90 } -D_MAP_601DC90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: D_MAP_601DC90 } +aMapArwingIconTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x0601DC90, symbol: aMapArwingIconTLUT } -D_MAP_601DCA0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: D_MAP_601DCA0, tlut: 0x0601DCD8 } +aMapXTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 7, offset: 0x0601DCA0, symbol: aMapXTex, tlut: 0x0601DCD8 } -D_MAP_601DCD8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: D_MAP_601DCD8 } +aMapXTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x0601DCD8, symbol: aMapXTLUT } -D_MAP_601DCF0: - { type: GFX, offset: 0x601DCF0, symbol: D_MAP_601DCF0 } +aMapCursorDL: + { type: GFX, offset: 0x601DCF0, symbol: aMapCursorDL } D_MAP_601DDE8: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601DDE8, symbol: D_MAP_601DDE8, tlut: 0x0601DE68 } @@ -204,8 +204,8 @@ D_MAP_601DDE8: D_MAP_601DE68: { type: TEXTURE, ctype: u16, format: TLUT, colors: 12, offset: 0x0601DE68, symbol: D_MAP_601DE68 } -D_MAP_601DE80: - { type: GFX, offset: 0x601DE80, symbol: D_MAP_601DE80 } +aMapArea6DL: + { type: GFX, offset: 0x601DE80, symbol: aMapArea6DL } D_MAP_601F2B0: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0601F2B0, symbol: D_MAP_601F2B0, tlut: 0x0601F4B0 } @@ -219,8 +219,8 @@ D_MAP_601E8F8: D_MAP_601E978: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601E978, symbol: D_MAP_601E978 } -D_MAP_601E9A0: - { type: GFX, offset: 0x601E9A0, symbol: D_MAP_601E9A0 } +aMapArea6ShipDL: + { type: GFX, offset: 0x601E9A0, symbol: aMapArea6ShipDL } D_MAP_601F4D0: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x0601F4D0, symbol: D_MAP_601F4D0, tlut: 0x0601F550 } @@ -240,110 +240,110 @@ D_MAP_601F610: D_MAP_601F690: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0601F690, symbol: D_MAP_601F690 } -D_MAP_601F6B0: - { type: GFX, offset: 0x601F6B0, symbol: D_MAP_601F6B0 } +aMapSectorZDL: + { type: GFX, offset: 0x601F6B0, symbol: aMapSectorZDL } D_MAP_601F740: { type: TEXTURE, format: RGBA16, offset: 0x0601F740, width: 32, height: 32, ctype: u16, symbol: D_MAP_601F740 } # Looks like Aquas -D_MAP_601FF40: - { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: D_MAP_601FF40, tlut: 0x06022340 } +aMapAquasTex: + { type: TEXTURE, format: CI8, offset: 0x601FF40, width: 96, height: 96, ctype: u8, symbol: aMapAquasTex, tlut: 0x06022340 } -D_MAP_6022340: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 75, offset: 0x06022340, symbol: D_MAP_6022340 } +gMapAquasTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x06022340, symbol: gMapAquasTLUT } # Looks like Venom -D_MAP_60223E0: - { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: D_MAP_60223E0, tlut: 0x060247E0 } +aMapVenomTex: + { type: TEXTURE, format: CI8, offset: 0x60223E0, width: 96, height: 96, ctype: u8, symbol: aMapVenomTex, tlut: 0x060247E0 } -D_MAP_60247E0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x060247E0, symbol: D_MAP_60247E0 } +gMapVenomTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x060247E0, symbol: gMapVenomTLUT } # Looks like Corneria -D_MAP_6024890: - { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: D_MAP_6024890, tlut: 0x06026C90 } +aMapCorneriaTex: + { type: TEXTURE, format: CI8, offset: 0x6024890, width: 96, height: 96, ctype: u8, symbol: aMapCorneriaTex, tlut: 0x06026C90 } -D_MAP_6026C90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 108, offset: 0x06026C90, symbol: D_MAP_6026C90 } +gMapCorneriaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 112, offset: 0x06026C90, symbol: gMapCorneriaTLUT } # Looks like Zones -D_MAP_6026D70: - { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: D_MAP_6026D70, tlut: 0x06029170 } +aMapFortunaTex: + { type: TEXTURE, format: CI8, offset: 0x6026D70, width: 96, height: 96, ctype: u8, symbol: aMapFortunaTex, tlut: 0x06029170 } -D_MAP_6029170: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x06029170, symbol: D_MAP_6029170 } +gMapFortunaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x06029170, symbol: gMapFortunaTLUT } # Looks like Solar -D_MAP_6029220: - { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: D_MAP_6029220, tlut: 0x0602B620 } +aMapKatinaTex: + { type: TEXTURE, format: CI8, offset: 0x6029220, width: 96, height: 96, ctype: u8, symbol: aMapKatinaTex, tlut: 0x0602B620 } -D_MAP_602B620: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 84, offset: 0x0602B620, symbol: D_MAP_602B620 } +gMapKatinaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 88, offset: 0x0602B620, symbol: gMapKatinaTLUT } # Looks like Macbeth -D_MAP_602B6D0: - { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602B6D0, tlut: 0x0602DAD0 } +aMapMacbethTex: + { type: TEXTURE, format: CI8, offset: 0x602B6D0, width: 96, height: 96, ctype: u8, symbol: aMapMacbethTex, tlut: 0x0602DAD0 } -D_MAP_602DAD0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 68, offset: 0x0602DAD0, symbol: D_MAP_602DAD0 } +gMapMacbethTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 72, offset: 0x0602DAD0, symbol: gMapMacbethTLUT } # Looks like Sector Z -D_MAP_602DB60: - { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: D_MAP_602DB60, tlut: 0x0602FF60 } +aMapTitaniaTex: + { type: TEXTURE, format: CI8, offset: 0x602DB60, width: 96, height: 96, ctype: u8, symbol: aMapTitaniaTex, tlut: 0x0602FF60 } -D_MAP_602FF60: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: D_MAP_602FF60 } +gMapTitaniaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x0602FF60, symbol: gMapTitaniaTLUT } -D_MAP_602FFD0: - { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: D_MAP_602FFD0, tlut: 0x060323D0 } +aMapZonessTex: + { type: TEXTURE, format: CI8, offset: 0x602FFD0, width: 96, height: 96, ctype: u8, symbol: aMapZonessTex, tlut: 0x060323D0 } -D_MAP_60323D0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 52, offset: 0x060323D0, symbol: D_MAP_60323D0 } +gMapZonessTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 56, offset: 0x060323D0, symbol: gMapZonessTLUT } # Portrait of Falco -D_MAP_6032440: - { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032440 } +aMapRadioCharFalcoTex: + { type: TEXTURE, format: RGBA16, offset: 0x06032440, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharFalcoTex } # Portrait of Peppy -D_MAP_6032A60: - { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: D_MAP_6032A60 } +aMapRadioCharPeppyTex: + { type: TEXTURE, format: RGBA16, offset: 0x06032A60, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharPeppyTex } # Picture of Peppy, James and Pigma used in the narrated intro. -D_MAP_6033080: - { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: D_MAP_6033080 } +aMapPrologue3Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06033080, width: 96, height: 52, ctype: u16, symbol: aMapPrologue3Tex } # Picture of Andross, General Pepper and Venom in the background, used in the narrated intro. -D_MAP_6035780: - { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: D_MAP_6035780 } +aMapPrologue2Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06035780, width: 96, height: 52, ctype: u16, symbol: aMapPrologue2Tex } # Picture of Andross, hands open, Corneria in the middle, used in the narrated intro. -D_MAP_6037E80: - { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6037E80 } +aMapPrologue6Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06037E80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue6Tex } # Picture of an Arwing dodging attacks from enemies, used in the narrated intro. -D_MAP_603A580: - { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: D_MAP_603A580 } +aMapPrologue4Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603A580, width: 96, height: 52, ctype: u16, symbol: aMapPrologue4Tex } # Picture of Slippy, Peppy, Fox and Falco, used in the narrated intro. -D_MAP_603CC80: - { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: D_MAP_603CC80 } +aMapPrologue7Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603CC80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue7Tex } # Picture of Peppy returning from Vemon, used in the narrated intro. -D_MAP_603F380: - { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: D_MAP_603F380 } +aMapPrologue5Tex: + { type: TEXTURE, format: RGBA16, offset: 0x0603F380, width: 96, height: 52, ctype: u16, symbol: aMapPrologue5Tex } # Picture of Corneria, used in the narrated intro. -D_MAP_6041A80: - { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: D_MAP_6041A80 } +aMapPrologue1Tex: + { type: TEXTURE, format: RGBA16, offset: 0x06041A80, width: 96, height: 52, ctype: u16, symbol: aMapPrologue1Tex } # Portrait of Slippy -D_MAP_6044180: - { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: D_MAP_6044180 } +aMapRadioCharSlippyTex: + { type: TEXTURE, format: RGBA16, offset: 0x06044180, width: 28, height: 28, ctype: u16, symbol: aMapRadioCharSlippyTex } # White Square ? -D_MAP_60447A0: - { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: D_MAP_60447A0 } +aMapWhiteSquareTex: + { type: TEXTURE, format: RGBA16, offset: 0x060447A0, width: 8, height: 8, ctype: u16, symbol: aMapWhiteSquareTex } # Picture of Fox receiving orders from General Pepper, used in the map (briefing) D_MAP_6044820: @@ -354,29 +354,29 @@ D_MAP_6046CD0: { type: TEXTURE, format: RGBA16, offset: 0x06046CD0, width: 32, height: 34, ctype: u16, symbol: D_MAP_6046CD0 } # Black Square with borders. -D_MAP_6047550: - { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: D_MAP_6047550 } +aMapPathBoxTex: + { type: TEXTURE, format: RGBA16, offset: 0x06047550, width: 24, height: 24, ctype: u16, symbol: aMapPathBoxTex } -D_MAP_60479D0: - { type: GFX, offset: 0x60479D0, symbol: D_MAP_60479D0 } +aMapPlanetExplosionDL: + { type: GFX, offset: 0x60479D0, symbol: aMapPlanetExplosionDL } D_MAP_6047A68: { type: TEXTURE, format: IA8, offset: 0x06047A68, width: 32, height: 32, ctype: u8, symbol: D_MAP_6047A68 } -D_MAP_6047E70: - { type: GFX, offset: 0x6047E70, symbol: D_MAP_6047E70 } +aMapVenomCloudDL: + { type: GFX, offset: 0x6047E70, symbol: aMapVenomCloudDL } -D_MAP_6047F80: - { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: D_MAP_6047F80 } +aMapVenomCloud1Tex: + { type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: aMapVenomCloud1Tex } -D_MAP_6048780: - { type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: D_MAP_6048780 } +aMapVenomCloud2Tex: + { type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: aMapVenomCloud2Tex } D_MAP_6048F80: { type: TEXTURE, format: IA8, offset: 0x06048F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6048F80 } -D_MAP_6049F80: - { type: GFX, offset: 0x6049F80, symbol: D_MAP_6049F80 } +aMapExplosion4DL: + { type: GFX, offset: 0x6049F80, symbol: aMapExplosion4DL } D_MAP_604A048: { type: TEXTURE, format: CI8, offset: 0x0604A048, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A048, tlut: 0x0602FF60 } @@ -384,8 +384,8 @@ D_MAP_604A048: D_MAP_604A148: { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x0604A148, symbol: D_MAP_604A148 } -D_MAP_604A190: - { type: GFX, offset: 0x604A190, symbol: D_MAP_604A190 } +aMapExplosion3DL: + { type: GFX, offset: 0x604A190, symbol: aMapExplosion3DL } D_MAP_604A258: { type: TEXTURE, format: CI8, offset: 0x0604A258, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A258, tlut: 0x0604A358 } @@ -393,8 +393,8 @@ D_MAP_604A258: D_MAP_604A358: { type: TEXTURE, ctype: u16, format: TLUT, colors: 80, offset: 0x0604A358, symbol: D_MAP_604A358 } -D_MAP_604A400: - { type: GFX, offset: 0x604A400, symbol: D_MAP_604A400 } +aMapExplosion2DL: + { type: GFX, offset: 0x604A400, symbol: aMapExplosion2DL } D_MAP_604A4C8: { type: TEXTURE, format: CI8, offset: 0x0604A4C8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A4C8, tlut: 0x0604A5C8 } @@ -402,8 +402,8 @@ D_MAP_604A4C8: D_MAP_604A5C8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 160, offset: 0x0604A5C8, symbol: D_MAP_604A5C8 } -D_MAP_604A710: - { type: GFX, offset: 0x604A710, symbol: D_MAP_604A710 } +aMapExplosion1DL: + { type: GFX, offset: 0x604A710, symbol: aMapExplosion1DL } D_MAP_604A7D8: { type: TEXTURE, format: CI8, offset: 0x0604A7D8, width: 16, height: 16, ctype: u8, symbol: D_MAP_604A7D8, tlut: 0x0604A8D8 } @@ -434,8 +434,8 @@ D_MAP_604B650: { type: TEXTURE, format: RGBA16, offset: 0x0604B650, width: 8, height: 16, ctype: u16, symbol: D_MAP_604B650 } # Model of Bolse -D_MAP_604B750: - { type: GFX, offset: 0x604B750, symbol: D_MAP_604B750 } +aMapBolseDL: + { type: GFX, offset: 0x604B750, symbol: aMapBolseDL } D_MAP_604BC48: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 32, offset: 0x0604BC48, symbol: D_MAP_604BC48, tlut: 0x0604BC48 } @@ -462,20 +462,20 @@ D_MAP_604C328: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x0604C328, symbol: D_MAP_604C328 } # Television outcoming light Model, used during briefing. -D_MAP_604C350: - { type: GFX, offset: 0x604C350, symbol: D_MAP_604C350 } +aMapTvScreenGlowDL: + { type: GFX, offset: 0x604C350, symbol: aMapTvScreenGlowDL } -D_MAP_604C4C0: - { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: D_MAP_604C4C0 } +aMapTvScreenGlowTex: + { type: TEXTURE, format: IA8, offset: 0x0604C4C0, width: 8, height: 16, ctype: u8, symbol: aMapTvScreenGlowTex } -D_MAP_604C540: - { type: GFX, offset: 0x604C540, symbol: D_MAP_604C540 } +aMapTitaniaRings1DL: + { type: GFX, offset: 0x604C540, symbol: aMapTitaniaRings1DL } D_MAP_604C5D8: { type: TEXTURE, format: IA8, offset: 0x0604C5D8, width: 32, height: 64, ctype: u8, symbol: D_MAP_604C5D8 } -D_MAP_604CDE0: - { type: GFX, offset: 0x604CDE0, symbol: D_MAP_604CDE0 } +aMapTitaniaRings2DL: + { type: GFX, offset: 0x604CDE0, symbol: aMapTitaniaRings2DL } D_MAP_604CE78: { type: TEXTURE, format: IA8, offset: 0x0604CE78, width: 32, height: 64, ctype: u8, symbol: D_MAP_604CE78 } @@ -487,8 +487,8 @@ D_MAP_604D708: { type: TEXTURE, format: IA8, offset: 0x0604D708, width: 32, height: 32, ctype: u8, symbol: D_MAP_604D708 } # Solar Rays -D_MAP_604DB10: - { type: GFX, offset: 0x604DB10, symbol: D_MAP_604DB10 } +aMapSolarDL: + { type: GFX, offset: 0x604DB10, symbol: aMapSolarDL } D_MAP_604DD20: { type: TEXTURE, format: IA8, offset: 0x0604DD20, width: 128, height: 32, ctype: u8, symbol: D_MAP_604DD20 } @@ -502,8 +502,8 @@ D_MAP_604FD20: D_MAP_6050D20: { type: TEXTURE, format: IA8, offset: 0x06050D20, width: 128, height: 32, ctype: u8, symbol: D_MAP_6050D20 } -D_MAP_6051D20: - { type: GFX, offset: 0x6051D20, symbol: D_MAP_6051D20 } +aMapGralPepperFace2DL: + { type: GFX, offset: 0x6051D20, symbol: aMapGralPepperFace2DL } D_MAP_6051F20: { type: TEXTURE, format: RGBA16, offset: 0x06051F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6051F20 } @@ -517,8 +517,8 @@ D_MAP_6053F20: D_MAP_6054F20: { type: TEXTURE, format: RGBA16, offset: 0x06054F20, width: 64, height: 32, ctype: u16, symbol: D_MAP_6054F20 } -D_MAP_6055F20: - { type: GFX, offset: 0x6055F20, symbol: D_MAP_6055F20 } +aMapGralPepperFace1DL: + { type: GFX, offset: 0x6055F20, symbol: aMapGralPepperFace1DL } D_MAP_6056120: { type: TEXTURE, format: RGBA16, offset: 0x06056120, width: 64, height: 32, ctype: u16, symbol: D_MAP_6056120 } @@ -568,8 +568,8 @@ D_MAP_605F610: D_MAP_605FE10: { type: TEXTURE, format: IA8, offset: 0x0605FE10, width: 64, height: 32, ctype: u8, symbol: D_MAP_605FE10 } -D_MAP_6060610: - { type: GFX, offset: 0x6060610, symbol: D_MAP_6060610 } +aMapMeteorDL: + { type: GFX, offset: 0x6060610, symbol: aMapMeteorDL } D_MAP_6060698: { type: TEXTURE, format: RGBA16, offset: 0x06060698, width: 32, height: 32, ctype: u16, symbol: D_MAP_6060698 } diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml index 9d364b6b..89e45169 100644 --- a/assets/yaml/us/rev1/ast_meteo.yaml +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -14,8 +14,8 @@ - '#include "sf64mesg.h"' # Meteo # Asteroid Field -D_ME_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: D_ME_6000000 } +aMeTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x6000000, symbol: aMeTitleCardTex } D_ME_6000A80: { type: GFX, offset: 0x6000A80, symbol: D_ME_6000A80 } diff --git a/assets/yaml/us/rev1/ast_option.yaml b/assets/yaml/us/rev1/ast_option.yaml index b3f3637a..b63cec13 100644 --- a/assets/yaml/us/rev1/ast_option.yaml +++ b/assets/yaml/us/rev1/ast_option.yaml @@ -30,82 +30,82 @@ D_OPT_80038C0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80038C0, symbol: D_OPT_80038C0 } # nd -D_OPT_80038E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: D_OPT_80038E0, tlut: 0x8003930 } +aNdTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 10, offset: 0x80038E0, symbol: aNdTex, tlut: 0x8003930 } -D_OPT_8003930: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: D_OPT_8003930 } +aNdTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003930, symbol: aNdTLUT } # rd -D_OPT_8003950: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: D_OPT_8003950, tlut: 0x80039A8 } +aRdTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 11, offset: 0x8003950, symbol: aRdTex, tlut: 0x80039A8 } -D_OPT_80039A8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: D_OPT_80039A8 } +aRdTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x80039A8, symbol: aRdTLUT } # -D_OPT_80039D0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: D_OPT_80039D0, tlut: 0x8003A50 } +aSpeakerCenterTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x80039D0 , symbol: aSpeakerCenterTex, tlut: 0x8003A50 } -D_OPT_8003A50: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: D_OPT_8003A50 } +aSpeakerCenterTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003A50, symbol: aSpeakerCenterTLUT } # st -D_OPT_8003A70: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: D_OPT_8003A70, tlut: 0x8003AB8 } +aStTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003A70, symbol: aStTex, tlut: 0x8003AB8 } -D_OPT_8003AB8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: D_OPT_8003AB8 } +aStTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003AB8, symbol: aStTLUT } # th -D_OPT_8003AE0: - { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: D_OPT_8003AE0, tlut: 0x8003B28 } +aThTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 9, offset: 0x8003AE0, symbol: aThTex, tlut: 0x8003B28 } -D_OPT_8003B28: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: D_OPT_8003B28 } +aThTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x8003B28, symbol: aThTLUT } # Option Title Cards # Main Game -D_OPT_8003B50: - { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: D_OPT_8003B50 } +aMainGameCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 72, height: 12, offset: 0x8003B50, symbol: aMainGameCardTex } # Training -D_OPT_8003EB0: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: D_OPT_8003EB0 } +aTrainingCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8003EB0, symbol: aTrainingCardTex } # Vs. -D_OPT_8004270: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: D_OPT_8004270 } +aVsCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 10, offset: 0x8004270, symbol: aVsCardTex } # Ranking -D_OPT_80043B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: D_OPT_80043B0 } +aRankingCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 12, offset: 0x80043B0, symbol: aRankingCardTex } # Sound -D_OPT_80046B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: D_OPT_80046B0 } +aSoundCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 10, offset: 0x80046B0, symbol: aSoundCardTex } # Data -D_OPT_8004930: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: D_OPT_8004930 } +aDataCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x8004930, symbol: aDataCardTex } -D_OPT_8004C50: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: D_OPT_8004C50 } +aExpertCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x8004C50, symbol: aExpertCardTex } # Option VS Cards # Point Match -D_OPT_8005010: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: D_OPT_8005010 } +aVsPointMatchCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 13, offset: 0x8005010, symbol: aVsPointMatchCardTex } # Battle Royal -D_OPT_80054F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: D_OPT_80054F0 } +aVsBattleRoyalCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 11, offset: 0x80054F0, symbol: aVsBattleRoyalCardTex } # Time Trial -D_OPT_8005910: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: D_OPT_8005910 } +aVsTimeTrialCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8005910, symbol: aVsTimeTrialCardTex } # Sound Options @@ -130,8 +130,8 @@ D_OPT_8006D10: { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x8006D10, symbol: D_OPT_8006D10 } # B to cancel -D_OPT_8006E50: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: D_OPT_8006E50 } +aBtoCancelTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x8006E50, symbol: aBtoCancelTex } # Headphone D_OPT_8007210: @@ -146,8 +146,8 @@ D_OPT_80079F0: { type: TEXTURE, ctype: u8, format: IA8, width: 128, height: 14, offset: 0x80079F0, symbol: D_OPT_80079F0 } # A to confirm -D_OPT_80080F0: - { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: D_OPT_80080F0 } +aAtoConfirmTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 10, offset: 0x80080F0, symbol: aAtoConfirmTex } # Clear Saved Data D_OPT_80084B0: @@ -193,27 +193,27 @@ D_OPT_800D1F0: D_OPT_800E0F0: { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E0F0, symbol: D_OPT_800E0F0 } -D_OPT_800E130: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: D_OPT_800E130 } +aArrowTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x800E130, symbol: aArrowTex } # Mercenary Unit STARFOX Fox Mccloud D_OPT_800E170: { type: TEXTURE, ctype: u16, format: RGBA16, width: 188, height: 60, offset: 0x800E170, symbol: D_OPT_800E170 } # ScrollBar -D_OPT_8013990: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: D_OPT_8013990 } +aSliderFrameTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 104, height: 10, offset: 0x8013990, symbol: aSliderFrameTex } # ScrollBar Indicator -D_OPT_80141B0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: D_OPT_80141B0 } +aSliderTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x80141B0, symbol: aSliderTex } # Speaker -D_OPT_80143B0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: D_OPT_80143B0, tlut: 0x80147B0 } +aSpeakerTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x80143B0, symbol: aSpeakerTex, tlut: 0x80147B0 } -D_OPT_80147B0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: D_OPT_80147B0 } +aSpeakerTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 32, offset: 0x80147B0, symbol: aSpeakerTLUT } D_OPT_80147F0: { type: GFX, offset: 0x80147F0, symbol: D_OPT_80147F0 } @@ -242,8 +242,8 @@ D_OPT_8015550: D_OPT_80155E8: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x080155E8, symbol: D_OPT_80155E8 } -D_OPT_8015DF0: - { type: GFX, offset: 0x8015DF0, symbol: D_OPT_8015DF0 } +aLightningDL: + { type: GFX, offset: 0x8015DF0, symbol: aLightningDL } -D_OPT_8015E88: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: D_OPT_8015E88 } +aLightningTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x08015E88, symbol: aLightningTex } diff --git a/assets/yaml/us/rev1/ast_sector_x.yaml b/assets/yaml/us/rev1/ast_sector_x.yaml index e36aea16..cc8fa3a8 100644 --- a/assets/yaml/us/rev1/ast_sector_x.yaml +++ b/assets/yaml/us/rev1/ast_sector_x.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_SX_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SX_6000000 } +aSxTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSxTitleCardTex } aSxSpaceMineDL: { type: GFX, offset: 0x6000840, symbol: aSxSpaceMineDL } diff --git a/assets/yaml/us/rev1/ast_sector_y.yaml b/assets/yaml/us/rev1/ast_sector_y.yaml index 3039dccc..f4a999d5 100644 --- a/assets/yaml/us/rev1/ast_sector_y.yaml +++ b/assets/yaml/us/rev1/ast_sector_y.yaml @@ -15,8 +15,8 @@ - '#include "sf64mesg.h"' # Sector Y: Combat Zone -D_SY_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SY_6000000 } +aSyTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSyTitleCardTex } # Saruzin flagship icon in radar D_SY_6000840: diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml index 9dde3d7c..0038ef9e 100644 --- a/assets/yaml/us/rev1/ast_sector_z.yaml +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -14,8 +14,8 @@ - '#include "sf64mesg.h"' # Sector Z: Combat Zone -D_SZ_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: D_SZ_6000000 } +aSzTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 12, offset: 0x6000000, symbol: aSzTitleCardTex } # One of the so called "Boss titles", unused in the game. A version of the same thing # seems to have been implemented in the 3DS version. @@ -94,8 +94,8 @@ D_SZ_6004458: D_SZ_6004558: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x06004558, symbol: D_SZ_6004558 } -D_SZ_6004570: - { type: GFX, offset: 0x6004570, symbol: D_SZ_6004570 } +aSzMissileRadarMarkDL: + { type: GFX, offset: 0x6004570, symbol: aSzMissileRadarMarkDL } aSzSpaceJunk4DL: { type: GFX, offset: 0x60045E0, symbol: aSzSpaceJunk4DL } diff --git a/assets/yaml/us/rev1/ast_solar.yaml b/assets/yaml/us/rev1/ast_solar.yaml index a6e5ee0e..80989a56 100644 --- a/assets/yaml/us/rev1/ast_solar.yaml +++ b/assets/yaml/us/rev1/ast_solar.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_SO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: D_SO_6000000} +aSoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 13, offset: 0x6000000, symbol: aSoTitleCardTex} D_SO_60005B0: { type: GFX, offset: 0x60005B0, symbol: D_SO_60005B0} diff --git a/assets/yaml/us/rev1/ast_text.yaml b/assets/yaml/us/rev1/ast_text.yaml index faaadd71..d68f5913 100644 --- a/assets/yaml/us/rev1/ast_text.yaml +++ b/assets/yaml/us/rev1/ast_text.yaml @@ -53,8 +53,8 @@ aTextMissionNo: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 19, offset: 0x5000500, symbol: aTextMissionNo } # Training -aTextTraining: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTextTraining } +aTrTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 12, offset: 0x5000D50, symbol: aTrTitleCardTex } # Enemies Down aTextEnemiesDown: diff --git a/assets/yaml/us/rev1/ast_titania.yaml b/assets/yaml/us/rev1/ast_titania.yaml index a0cc8a19..3d9ad2ec 100644 --- a/assets/yaml/us/rev1/ast_titania.yaml +++ b/assets/yaml/us/rev1/ast_titania.yaml @@ -13,8 +13,8 @@ - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_TI_6000000: - {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: D_TI_6000000} +aTiTitleCardTex: + {type: TEXTURE, format: IA8, ctype: u8, width: 96, height: 28, offset: 0x6000000, symbol: aTiTitleCardTex} D_TI_6000A80: {type: GFX, offset: 0x6000A80, symbol: D_TI_6000A80} diff --git a/assets/yaml/us/rev1/ast_title.yaml b/assets/yaml/us/rev1/ast_title.yaml index a369b62e..d1799354 100644 --- a/assets/yaml/us/rev1/ast_title.yaml +++ b/assets/yaml/us/rev1/ast_title.yaml @@ -8,75 +8,75 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -starfox_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: gTitleStarfoxLogo } +aTitleStarfoxLogoTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: aTitleStarfoxLogoTex } -nintendo64_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: gTitleNintendo64Logo } +aTitleN64LogoTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 128, height: 88, offset: 0x6006EA0, symbol: aTitleN64LogoTex } -radio_static: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } +gTitleRadioStatic: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x600C6A0, symbol: gTitleRadioStatic } -sun_beam: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: gTitleSunBeam } +aTitleSunGlareTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x600D5C0, symbol: aTitleSunGlareTex } -nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: gTitleNintendoCopyright } +a1997NintendoTex: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 12, offset: 0x600DDC0, symbol: a1997NintendoTex } -press_start: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: gTitlePressStart } +aTitlePressStartTex: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x600E360, symbol: aTitlePressStartTex } -great_fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: gTitleGreatFoxCard } +aTitleGreatFoxCardTex: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 28, offset: 0x600E980, symbol: aTitleGreatFoxCardTex } -slippy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } +gTitleSlippyCard: { type: TEXTURE, ctype: u8, format: IA8, width: 144, height: 13, offset: 0x600F940, symbol: gTitleSlippyCard } -peppy_card: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } +gTitlePeppyCard: { type: TEXTURE, ctype: u8, format: IA8, width: 120, height: 13, offset: 0x6010090, symbol: gTitlePeppyCard } -falco_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } +gTitleFalcoCard: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x60106B0, symbol: gTitleFalcoCard } -fox_card: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } +gTitleFoxCard: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 13, offset: 0x6010FA0, symbol: gTitleFoxCard } -arwing_card: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: gTitleArwingCard } +aTitleArwingCardTex: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 26, offset: 0x6011890, symbol: aTitleArwingCardTex } -no_controller: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: gTitleNoController } +aTitleNoControllerTex: { type: TEXTURE, ctype: u8, format: IA8, width: 176, height: 24, offset: 0x60123F0, symbol: aTitleNoControllerTex } -copyright_symbol: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: gTitleCopyrightSymbol } +aTitleCopyrightTex: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 16, offset: 0x6013470, symbol: aTitleCopyrightTex } -unused_nintendo_copyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } +gTitleUnusedNintendoCopyright: { type: TEXTURE, ctype: u8, format: IA8, width: 168, height: 18, offset: 0x6013570, symbol: gTitleUnusedNintendoCopyright } -starfox_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: gTextIntroStarfox } +aIntroStarfoxLogoTex: { type: TEXTURE, ctype: u8, format: CI4, width: 256, height: 13, offset: 0x6014140, tlut: 0x60147C0, symbol: aIntroStarfoxLogoTex } -starfox_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: gTextIntroStarfoxPalette } +aIntroStarfoxLogoTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60147C0, symbol: aIntroStarfoxLogoTLUT } -in_text_intro: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: gTextIntroIn } +aIntroInTex: { type: TEXTURE, ctype: u8, format: CI4, width: 32, height: 13, offset: 0x60147E0, tlut: 0x60147C0, symbol: aIntroInTex } -in_text_intro_palette: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: gTextIntroInPalette } +aIntroInTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x60148B0, symbol: aIntroInTLUT } -D_TITLE_60148D0: { type: GFX, offset: 0x60148D0, symbol: D_TITLE_60148D0 } +a64LogoDL: { type: GFX, offset: 0x60148D0, symbol: a64LogoDL } -D_TITLE_6014DE8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: D_TITLE_6014DE8 } +a64Logo1Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6014DE8, tlut: 0x60155E8, symbol: a64Logo1Tex } -D_TITLE_60155E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: D_TITLE_60155E8 } +a64Logo1TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 152, offset: 0x60155E8, symbol: a64Logo1TLUT } -D_TITLE_6015718: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: D_TITLE_6015718 } +a64Logo2Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6015718, tlut: 0x6015EF8, symbol: a64Logo2Tex } -D_TITLE_6015EF8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: D_TITLE_6015EF8 } +a64Logo2TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 64, offset: 0x6015EF8, symbol: a64Logo2TLUT } -D_TITLE_6015F78: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: D_TITLE_6015F78 } +a64Logo3Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6015F78, tlut: 0x6016778, symbol: a64Logo3Tex } -D_TITLE_6016778: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: D_TITLE_6016778 } +a64Logo3TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6016778, symbol: a64Logo3TLUT } -D_TITLE_6016908: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: D_TITLE_6016908 } +a64Logo4Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 63, offset: 0x6016908, tlut: 0x60170E8, symbol: a64Logo4Tex } -D_TITLE_60170E8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: D_TITLE_60170E8 } +a64Logo4TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 144, offset: 0x60170E8, symbol: a64Logo4TLUT } -D_TITLE_6017208: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: D_TITLE_6017208 } +a64Logo5Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017208, tlut: 0x6017A08, symbol: a64Logo5Tex } -D_TITLE_6017A08: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: D_TITLE_6017A08 } +a64Logo5TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 136, offset: 0x6017A08, symbol: a64Logo5TLUT } -D_TITLE_6017B18: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: D_TITLE_6017B18 } +a64Logo6Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x6017B18, tlut: 0x6018318, symbol: a64Logo6Tex } -D_TITLE_6018318: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: D_TITLE_6018318 } +a64Logo6TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 200, offset: 0x6018318, symbol: a64Logo6TLUT } -D_TITLE_60184A8: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: D_TITLE_60184A8 } +a64Logo7Tex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 64, offset: 0x60184A8, tlut: 0x6018CA8, symbol: a64Logo7Tex } -D_TITLE_6018CA8: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: D_TITLE_6018CA8 } +a64Logo7TLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 76, offset: 0x6018CA8, symbol: a64Logo7TLUT } -D_TITLE_6018D40: { type: GFX, offset: 0x6018D40, symbol: D_TITLE_6018D40 } +aTitleGreatFoxDeckDL: { type: GFX, offset: 0x6018D40, symbol: aTitleGreatFoxDeckDL } D_TITLE_60195C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60195C0, symbol: D_TITLE_60195C0 } @@ -88,9 +88,9 @@ D_TITLE_601B5C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_601B7C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601B7C0, symbol: D_TITLE_601B7C0 } -D_TITLE_601BFC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: D_TITLE_601BFC0 } +aTitleCsPassageWayWallTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601BFC0, symbol: aTitleCsPassageWayWallTex } -D_TITLE_601C7C0: { type: GFX, offset: 0x601C7C0, symbol: D_TITLE_601C7C0 } +aTitleGreatFoxDeckLauncherDL: { type: GFX, offset: 0x601C7C0, symbol: aTitleGreatFoxDeckLauncherDL } D_TITLE_601CCD0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x601CCD0, symbol: D_TITLE_601CCD0 } @@ -98,9 +98,9 @@ D_TITLE_601CED0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 8, height: D_TITLE_601CF50: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x601CF50, symbol: D_TITLE_601CF50 } -D_TITLE_601D750: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: D_TITLE_601D750 } +aNoControllerBgTex: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x601D750, tlut: 0x601DB50, symbol: aNoControllerBgTex } -D_TITLE_601DB50: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: D_TITLE_601DB50 } +aNoControllerBgTLUT: { type: TEXTURE, ctype: u16, format: TLUT, colors: 8, offset: 0x601DB50, symbol: aNoControllerBgTLUT } D_TITLE_601E424: { type: SF64:ANIM, offset: 0x601E424, symbol: D_TITLE_601E424 } @@ -164,9 +164,9 @@ D_TITLE_6029BE4: { type: SF64:ANIM, offset: 0x6029BE4, symbol: D_TITLE_6029BE4 } D_TITLE_602A710: { type: SF64:ANIM, offset: 0x602A710, symbol: D_TITLE_602A710 } -D_TITLE_602A720: { type: GFX, offset: 0x602A720, symbol: D_TITLE_602A720 } +aTitleGreatFoxDeckPlatformDL: { type: GFX, offset: 0x602A720, symbol: aTitleGreatFoxDeckPlatformDL } -D_TITLE_602A8C0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: D_TITLE_602A8C0 } +aTitleCsPassageWayCeilingTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602A8C0, symbol: aTitleCsPassageWayCeilingTex } D_TITLE_602B8C0: { type: GFX, offset: 0x602B8C0, symbol: D_TITLE_602B8C0 } @@ -178,41 +178,41 @@ D_TITLE_602DD30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: D_TITLE_602DF30: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x602DF30, symbol: D_TITLE_602DF30 } -D_TITLE_602E380: { type: GFX, offset: 0x602E380, symbol: D_TITLE_602E380 } +aTitleCsPassageWayDL: { type: GFX, offset: 0x602E380, symbol: aTitleCsPassageWayDL } -D_TITLE_602E550: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: D_TITLE_602E550 } +aTitleCsPassageWayFloorTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x602E550, symbol: aTitleCsPassageWayFloorTex } -D_TITLE_602F8E0: { type: SF64:ANIM, offset: 0x602F8E0, symbol: D_TITLE_602F8E0 } +aFoxRunningAnim: { type: SF64:ANIM, offset: 0x602F8E0, symbol: aFoxRunningAnim } -D_TITLE_602FBAC: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: D_TITLE_602FBAC} +aFoxSkel: {type: SF64:SKELETON, offset: 0x602FBAC, symbol: aFoxSkel} -D_TITLE_60305C0: { type: SF64:ANIM, offset: 0x60305C0, symbol: D_TITLE_60305C0 } +aFalcoRunningAnim: { type: SF64:ANIM, offset: 0x60305C0, symbol: aFalcoRunningAnim } -D_TITLE_603088C: {type: SF64:SKELETON, offset: 0x603088C, symbol: D_TITLE_603088C} +aFalcoSkel: {type: SF64:SKELETON, offset: 0x603088C, symbol: aFalcoSkel} -D_TITLE_6031120: { type: SF64:ANIM, offset: 0x6031120, symbol: D_TITLE_6031120 } +aSlippyRunningAnim: { type: SF64:ANIM, offset: 0x6031120, symbol: aSlippyRunningAnim } -D_TITLE_60313AC: {type: SF64:SKELETON, offset: 0x60313AC, symbol: D_TITLE_60313AC} +aSlippySkel: {type: SF64:SKELETON, offset: 0x60313AC, symbol: aSlippySkel} -D_TITLE_6031DB8: { type: SF64:ANIM, offset: 0x6031DB8, symbol: D_TITLE_6031DB8 } +aPeppyRunningAnim: { type: SF64:ANIM, offset: 0x6031DB8, symbol: aPeppyRunningAnim } -D_TITLE_6032084: {type: SF64:SKELETON, offset: 0x6032084, symbol: D_TITLE_6032084} +aPeppySkel: {type: SF64:SKELETON, offset: 0x6032084, symbol: aPeppySkel} -D_TITLE_60320E0: { type: GFX, offset: 0x60320E0, symbol: D_TITLE_60320E0 } +aTitleArwingEngineGlowDL: { type: GFX, offset: 0x60320E0, symbol: aTitleArwingEngineGlowDL } -D_TITLE_6032178: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: D_TITLE_6032178} +aTitleArwingEngineGlowTex: {type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 32, offset: 0x6032178, symbol: aTitleArwingEngineGlowTex} -D_TITLE_6032580: { type: GFX, offset: 0x6032580, symbol: D_TITLE_6032580 } +aTitleArwingShadowDL: { type: GFX, offset: 0x6032580, symbol: aTitleArwingShadowDL } -D_TITLE_6032608: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: D_TITLE_6032608 } +aTitleArwingShadowTex: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x6032608, symbol: aTitleArwingShadowTex } -D_TITLE_60338DC: { type: SF64:ANIM, offset: 0x60338DC, symbol: D_TITLE_60338DC } +aFalcoAnim: { type: SF64:ANIM, offset: 0x60338DC, symbol: aFalcoAnim } -D_TITLE_6035024: { type: SF64:ANIM, offset: 0x6035024, symbol: D_TITLE_6035024 } +aFoxAnim: { type: SF64:ANIM, offset: 0x6035024, symbol: aFoxAnim } -D_TITLE_603531C: { type: SF64:ANIM, offset: 0x603531C, symbol: D_TITLE_603531C } +aPeppyAnim: { type: SF64:ANIM, offset: 0x603531C, symbol: aPeppyAnim } -D_TITLE_6036278: { type: SF64:ANIM, offset: 0x6036278, symbol: D_TITLE_6036278 } +aSlippyAnim: { type: SF64:ANIM, offset: 0x6036278, symbol: aSlippyAnim } D_TITLE_6036290: { type: GFX, offset: 0x6036290, symbol: D_TITLE_6036290 } @@ -222,7 +222,7 @@ D_TITLE_6036B30: { type: GFX, offset: 0x6036B30, symbol: D_TITLE_6036B30 } D_TITLE_6036BC8: { type: TEXTURE, ctype: u16, format: IA16, width: 32, height: 32, offset: 0x6036BC8, symbol: D_TITLE_6036BC8 } -D_TITLE_6037CF0: { type: GFX, offset: 0x6037CF0, symbol: D_TITLE_6037CF0 } +aPlanetCorneriaDL: { type: GFX, offset: 0x6037CF0, symbol: aPlanetCorneriaDL } D_TITLE_60380D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x60380D0, symbol: D_TITLE_60380D0} @@ -242,7 +242,7 @@ D_TITLE_603F0D0: {type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: D_TITLE_60408C0: { type: GFX, offset: 0x60408C0, symbol: D_TITLE_60408C0 } -D_TITLE_6041070: { type: GFX, offset: 0x6041070, symbol: D_TITLE_6041070 } +aTeamShadowDL: { type: GFX, offset: 0x6041070, symbol: aTeamShadowDL } D_TITLE_60410F8: {type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60410F8, symbol: D_TITLE_60410F8} diff --git a/assets/yaml/us/rev1/ast_venom_1.yaml b/assets/yaml/us/rev1/ast_venom_1.yaml index 95fc884a..cb8fd9f8 100644 --- a/assets/yaml/us/rev1/ast_venom_1.yaml +++ b/assets/yaml/us/rev1/ast_venom_1.yaml @@ -19,8 +19,8 @@ D_VE1_6000000: D_VE1_6000A80: { type: TEXTURE, format: IA8, width: 40, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE1_6000A80 } -D_VE1_6000D80: - { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: D_VE1_6000D80 } +aVe1TitleCardTex: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x6000D80, ctype: u8, symbol: aVe1TitleCardTex } D_VE1_6001B80: { type: TEXTURE, format: IA8, width: 128, height: 19, offset: 0x6001B80, ctype: u8, symbol: D_VE1_6001B80 } diff --git a/assets/yaml/us/rev1/ast_venom_2.yaml b/assets/yaml/us/rev1/ast_venom_2.yaml index f3246b04..661e1bde 100644 --- a/assets/yaml/us/rev1/ast_venom_2.yaml +++ b/assets/yaml/us/rev1/ast_venom_2.yaml @@ -18,8 +18,8 @@ D_VE2_6000000: D_VE2_6000A80: { type: TEXTURE, format: IA8, width: 112, height: 19, offset: 0x6000A80, ctype: u8, symbol: D_VE2_6000A80 } -D_VE2_60012D0: - { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: D_VE2_60012D0 } +aVe2TitleCardTex: + { type: TEXTURE, format: IA8, width: 128, height: 28, offset: 0x60012D0, ctype: u8, symbol: aVe2TitleCardTex } D_VE2_60020D0: { type: TEXTURE, format: IA8, width: 104, height: 19, offset: 0x60020D0, ctype: u8, symbol: D_VE2_60020D0 } diff --git a/assets/yaml/us/rev1/ast_versus.yaml b/assets/yaml/us/rev1/ast_versus.yaml index d0b75a41..b9ccd2f1 100644 --- a/assets/yaml/us/rev1/ast_versus.yaml +++ b/assets/yaml/us/rev1/ast_versus.yaml @@ -72,14 +72,14 @@ D_versus_3000A10: D_versus_3000B00: { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x3000B00, symbol: D_versus_3000B00 } -D_versus_3000B20: - { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: D_versus_3000B20 } +aVsBoostGaugeFrameTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 32, height: 5, offset: 0x3000B20, symbol: aVsBoostGaugeFrameTex } -D_versus_3000BC0: - { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: D_versus_3000BC0 } +aVsShieldGaugeFrameTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 26, offset: 0x3000BC0, symbol: aVsShieldGaugeFrameTex } -D_versus_30013E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: D_versus_30013E0 } +aVsStarTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 8, height: 8, offset: 0x30013E0, symbol: aVsStarTex } D_versus_3001420: { type: TEXTURE, ctype: u8, format: CI8, width: 256, height: 42, offset: 0x3001420, symbol: D_versus_3001420, tlut: 0x3003E20 } @@ -141,20 +141,20 @@ D_versus_300C660: D_versus_300D150: {type: TEXTURE, ctype: u16, format: TLUT, colors: 251, offset: 0x300D150, symbol: D_versus_300D150 } -D_versus_300D350: - { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: D_versus_300D350, tlut: 0x300D398 } -D_versus_300D398: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: D_versus_300D398 } +aVsBoostGaugeCoolTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D350, symbol: aVsBoostGaugeCoolTex, tlut: 0x300D398 } +aVsBoostGaugeCoolTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 16, offset: 0x300D398, symbol: aVsBoostGaugeCoolTLUT } -D_versus_300D3C0: - { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: D_versus_300D3C0, tlut: 0x300D408 } -D_versus_300D408: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: D_versus_300D408 } +aVsBoostGaugeOverheatTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 24, height: 3, offset: 0x300D3C0, symbol: aVsBoostGaugeOverheatTex, tlut: 0x300D408 } +aVsBoostGaugeOverheatTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x300D408, symbol: aVsBoostGaugeOverheatTLUT } -D_versus_300D440: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: D_versus_300D440, tlut: 0x300D500 } -D_versus_300D500: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: D_versus_300D500 } +aVsShieldGaugeTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 4, offset: 0x300D440, symbol: aVsShieldGaugeTex, tlut: 0x300D500 } +aVsShieldGaugeTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 40, offset: 0x300D500, symbol: aVsShieldGaugeTLUT } D_versus_300D550: { type: GFX, offset: 0x300D550, symbol: D_versus_300D550} diff --git a/assets/yaml/us/rev1/ast_vs_menu.yaml b/assets/yaml/us/rev1/ast_vs_menu.yaml index 28cd189e..6f0cd152 100644 --- a/assets/yaml/us/rev1/ast_vs_menu.yaml +++ b/assets/yaml/us/rev1/ast_vs_menu.yaml @@ -8,23 +8,23 @@ - '#include "gfx.h"' - '#include "sf64object.h"' -D_VS_MENU_7000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: D_VS_MENU_7000000} +aVsPlayerNum1Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: aVsPlayerNum1Tex} -D_VS_MENU_70000D0: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: D_VS_MENU_70000D0} +aVsPlayerNum2Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x70000D0, symbol: aVsPlayerNum2Tex} -D_VS_MENU_7000210: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: D_VS_MENU_7000210} +aVsPlayerNum3Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000210, symbol: aVsPlayerNum3Tex} -D_VS_MENU_7000350: - { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: D_VS_MENU_7000350} +aVsPlayerNum4Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 24, height: 13, offset: 0x7000350, symbol: aVsPlayerNum4Tex} D_VS_MENU_7000490: { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 42, offset: 0x7000490, symbol: D_VS_MENU_7000490} -D_VS_MENU_7000F10: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: D_VS_MENU_7000F10} +aVsTextContTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 7, offset: 0x7000F10, symbol: aVsTextContTex} D_VS_MENU_7001030: { type: TEXTURE, ctype: u8, format: IA8, width: 64, height: 9, offset: 0x7001030, symbol: D_VS_MENU_7001030} @@ -32,14 +32,14 @@ D_VS_MENU_7001030: D_VS_MENU_7001270: { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 12, offset: 0x7001270, symbol: D_VS_MENU_7001270} -D_VS_MENU_70017B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: D_VS_MENU_70017B0} +aVsTextCorneriaTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70017B0, symbol: aVsTextCorneriaTex} -D_VS_MENU_70019E0: - { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: D_VS_MENU_70019E0} +aVsTextSectorZTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 56, height: 10, offset: 0x70019E0, symbol: aVsTextSectorZTex} -D_VS_MENU_7001C10: - { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: D_VS_MENU_7001C10} +aVsTextKatinaTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 48, height: 10, offset: 0x7001C10, symbol: aVsTextKatinaTex} D_VS_MENU_7001DF0: { type: TEXTURE, ctype: u8, format: IA8, width: 80, height: 10, offset: 0x7001DF0, symbol: D_VS_MENU_7001DF0} @@ -62,14 +62,14 @@ D_VS_MENU_7002BF0: D_VS_MENU_7002E50: { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 15, offset: 0x7002E50, symbol: D_VS_MENU_7002E50} -D_VS_MENU_70030B0: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: D_VS_MENU_70030B0} +aVsHandicapLvl1Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x70030B0, symbol: aVsHandicapLvl1Tex} -D_VS_MENU_7003290: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: D_VS_MENU_7003290} +aVsHandicapLvl2Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003290, symbol: aVsHandicapLvl2Tex} -D_VS_MENU_7003470: - { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: D_VS_MENU_7003470} +aVsHandicapLvl3Tex: + { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003470, symbol: aVsHandicapLvl3Tex} D_VS_MENU_7003650: { type: TEXTURE, ctype: u8, format: IA8, width: 40, height: 12, offset: 0x7003650, symbol: D_VS_MENU_7003650} @@ -116,29 +116,29 @@ D_VS_MENU_70044D0: D_VS_MENU_7004990: { type: TEXTURE, ctype: u16, format: TLUT, colors: 17, offset: 0x7004990, symbol: D_VS_MENU_7004990} -D_VS_MENU_70049C0: - { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: D_VS_MENU_70049C0, tlut: 0x7004B80} +aVsFoxNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 8, offset: 0x70049C0, symbol: aVsFoxNameTex, tlut: 0x7004B80} -D_VS_MENU_7004B80: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: D_VS_MENU_7004B80} +aVsFoxNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004B80, symbol: aVsFoxNameTLUT} -D_VS_MENU_7004BB0: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: D_VS_MENU_7004BB0, tlut: 0x7004D90} +aVsPeppyNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 10, offset: 0x7004BB0, symbol: aVsPeppyNameTex, tlut: 0x7004D90} -D_VS_MENU_7004D90: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: D_VS_MENU_7004D90} +aVsPeppyNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004D90, symbol: aVsPeppyNameTLUT} -D_VS_MENU_7004DC0: - { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: D_VS_MENU_7004DC0, tlut: 0x7004FF0} +aVsSlippyNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 56, height: 10, offset: 0x7004DC0, symbol: aVsSlippyNameTex, tlut: 0x7004FF0} -D_VS_MENU_7004FF0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: D_VS_MENU_7004FF0} +aVsSlippyNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x7004FF0, symbol: aVsSlippyNameTLUT} -D_VS_MENU_7005020: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: D_VS_MENU_7005020, tlut: 0x70051A0} +aVsFalcoNameTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 8, offset: 0x7005020, symbol: aVsFalcoNameTex, tlut: 0x70051A0} -D_VS_MENU_70051A0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: D_VS_MENU_70051A0} +aVsFalcoNameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 18, offset: 0x70051A0, symbol: aVsFalcoNameTLUT} D_VS_MENU_70051D0: { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x70051D0, symbol: D_VS_MENU_70051D0, tlut: 0x70055D0} @@ -146,56 +146,56 @@ D_VS_MENU_70051D0: D_VS_MENU_70055D0: { type: TEXTURE, ctype: u16, format: TLUT, colors: 20, offset: 0x70055D0, symbol: D_VS_MENU_70055D0} -D_VS_MENU_7005600: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: D_VS_MENU_7005600, tlut: 0x7005D20} +aVsCorneriaTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005600, symbol: aVsCorneriaTex, tlut: 0x7005D20} -D_VS_MENU_7005D20: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: D_VS_MENU_7005D20} +aVsCorneriaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 248, offset: 0x7005D20, symbol: aVsCorneriaTLUT} -D_VS_MENU_7005F10: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: D_VS_MENU_7005F10, tlut: 0x7006630} +aVsSectorZTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7005F10, symbol: aVsSectorZTex, tlut: 0x7006630} -D_VS_MENU_7006630: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: D_VS_MENU_7006630} +aVsSectorZTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 168, offset: 0x7006630, symbol: aVsSectorZTLUT} -D_VS_MENU_7006780: - { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: D_VS_MENU_7006780, tlut: 0x7006EA0} +aVsKatinaTex: + { type: TEXTURE, ctype: u8, format: CI8, width: 48, height: 38, offset: 0x7006780, symbol: aVsKatinaTex, tlut: 0x7006EA0} -D_VS_MENU_7006EA0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: D_VS_MENU_7006EA0} +aVsKatinaTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 256, offset: 0x7006EA0, symbol: aVsKatinaTLUT} -D_VS_MENU_70070A0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: D_VS_MENU_70070A0} +aVsFalcoFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x70070A0, symbol: aVsFalcoFaceTex} D_VS_MENU_7007FC0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7007FC0, symbol: D_VS_MENU_7007FC0} -D_VS_MENU_7008EE0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: D_VS_MENU_7008EE0} +aVsFoxFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7008EE0, symbol: aVsFoxFaceTex} D_VS_MENU_7009E00: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x7009E00, symbol: D_VS_MENU_7009E00} -D_VS_MENU_700AD20: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: D_VS_MENU_700AD20} +aVsPeppyFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700AD20, symbol: aVsPeppyFaceTex} D_VS_MENU_700BC40: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700BC40, symbol: D_VS_MENU_700BC40} -D_VS_MENU_700CB60: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: D_VS_MENU_700CB60} +aVsSlippyFaceTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700CB60, symbol: aVsSlippyFaceTex} D_VS_MENU_700DA80: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x700DA80, symbol: D_VS_MENU_700DA80} -D_VS_MENU_700E9A0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: D_VS_MENU_700E9A0} +aVsN64ConsoleTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 144, height: 42, offset: 0x700E9A0, symbol: aVsN64ConsoleTex} -D_VS_MENU_70118E0: - { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: D_VS_MENU_70118E0, tlut: 0x70123F8} +aVsHandicapFrameTex: + { type: TEXTURE, ctype: u8, format: CI4, width: 80, height: 71, offset: 0x70118E0, symbol: aVsHandicapFrameTex, tlut: 0x70123F8} -D_VS_MENU_70123F8: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: D_VS_MENU_70123F8} +aVsHandicapFrameTLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 5, offset: 0x70123F8, symbol: aVsHandicapFrameTLUT} D_VS_MENU_7012410: { type: GFX, offset: 0x7012410, symbol: D_VS_MENU_7012410} diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml index 15b5e989..efe86f24 100644 --- a/assets/yaml/us/rev1/ast_zoness.yaml +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -12,8 +12,8 @@ - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - '#include "sf64mesg.h"' -D_ZO_6000000: - { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: D_ZO_6000000} +aZoTitleCardTex: + { type: TEXTURE, ctype: u8, format: IA8, width: 112, height: 28, offset: 0x6000000, symbol: aZoTitleCardTex} D_ZO_6000C40: { type: GFX, offset: 0x6000C40, symbol: D_ZO_6000C40} diff --git a/include/context.h b/include/context.h index a1381601..600d5247 100644 --- a/include/context.h +++ b/include/context.h @@ -312,8 +312,8 @@ extern s32 gLeftWingDebrisTimer[4]; extern s32 gBombCount[4]; extern s32 gVsPoints[4]; extern s32 gVsKills[4][10]; -extern s32 gVsMatchOver; -extern s32 gVsMatchStart; +extern s32 gVsMatchWon; +extern bool gVsMatchStart; extern bool gChangeTo360; extern Vec3f gTeamArrowsViewPos[10]; extern f32 D_ctx_80177F20[65]; diff --git a/include/fox_hud.h b/include/fox_hud.h new file mode 100644 index 00000000..effc38e3 --- /dev/null +++ b/include/fox_hud.h @@ -0,0 +1,58 @@ +#ifndef FOX_HUD_H +#define FOX_HUD_H + +typedef struct { + /* 0x00 */ u8* levelIdxTex; + /* 0x04 */ s32 width; + /* 0x08 */ s32 height; + /* 0x0C */ u8* titleCardTex; + /* 0x10 */ s32 titleCardWidth; + /* 0x14 */ s32 titleCardHeight; +} LevelTitleCard; + +typedef enum LevelClearScreenState { + /* 0 */ LEVEL_CLEAR_STATE_0, + /* 1 */ LEVEL_CLEAR_STATE_1, + /* 2 */ LEVEL_CLEAR_STATE_2, + /* 3 */ LEVEL_CLEAR_STATE_3, + /* 4 */ LEVEL_CLEAR_STATE_4, + /* 5 */ LEVEL_CLEAR_STATE_5, +} LevelClearScreenState; + +typedef enum BombCounterStates { + /* 0 */ BOMB_COUNTER_INIT, + /* 1 */ BOMB_COUNTER_STATE_1, + /* 2 */ BOMB_COUNTER_STATE_2, + /* 3 */ BOMB_COUNTER_STATE_3, + /* 4 */ BOMB_COUNTER_STATE_4, + /* 5 */ BOMB_COUNTER_STATE_5, + /* 6 */ BOMB_COUNTER_STATE_6, + /* 7 */ BOMB_COUNTER_STATE_7, +} BombCounterStates; + +typedef enum RadarMarkTypes { + /* 0 */ RADARMARK_FOX, + /* 1 */ RADARMARK_FALCO, + /* 2 */ RADARMARK_SLIPPY, + /* 3 */ RADARMARK_PEPPY, + /* 4 */ RADARMARK_WOLF, + /* 5 */ RADARMARK_LEON, + /* 6 */ RADARMARK_PIGMA, + /* 7 */ RADARMARK_ANDREW, + /* 8 */ RADARMARK_KATT, + /* 100 */ RADARMARK_MISSILE = 100, + /* 101 */ RADARMARK_KA_SAUCERER, + /* 102 */ RADARMARK_BOSS, + /* 103 */ RADARMARK_SUPPIES, + /* 200 */ RADARMARK_ITEM_1 = 200, + /* 201 */ RADARMARK_ITEM_2, + /* 999 */ RADARMARK_NOTHING = 999 +} RadarMarkTypes; + +typedef enum ActorMissileSeekMode { + /* 0 */ MISSILE_SEEK_TEAMMATES, + /* 1 */ MISSILE_SEEK_PLAYER, + /* 2 */ MISSILE_SEEK_EITHER, +} ActorMissileSeekMode; + +#endif diff --git a/include/fox_map.h b/include/fox_map.h index caabbefa..31b52711 100644 --- a/include/fox_map.h +++ b/include/fox_map.h @@ -29,7 +29,7 @@ typedef struct { /* 0x18 */ s32 alpha; } PlanetPath; // size = 0x1C -typedef enum { +typedef enum PlanetAnim { /* 0 */ PL_ANIM_STATIC, /* 1 */ PL_ANIM_BILLBOARD, /* 2 */ PL_ANIM_ROTATE_Y, @@ -63,4 +63,34 @@ typedef struct { /* 0xC */ f32 xPos; } TitleCard; // size = 0x10 +typedef enum MapStates { + /* 0 */ MAP_PROLOGUE, + /* 1 */ MAP_LYLAT_CARD, + /* 2 */ MAP_ZOOM_PLANET, + /* 3 */ MAP_IDLE, + /* 4 */ MAP_LEVEL_START, + /* 5 */ MAP_ZOOM_PLANET_PATH, // After level ends + /* 6 */ MAP_PATH_CHANGE, // Path selection by the player + /* 7 */ MAP_GAME_OVER +} MapStates; + +typedef enum PlanetStatus { + /* 0 */ PLANET_UNCLEARED, + /* 1 */ PLANET_CLEARED, + /* 2 */ PLANET_MEDAL +} PlanetStatus; + +typedef enum PlanetExplosions { + /* 0 */ EXPLOSIONS_CORNERIA, + /* 1 */ EXPLOSIONS_KATINA, + /* 2 */ EXPLOSIONS_SECTOR_Y, + /* 3 */ EXPLOSIONS_MAX +} PlanetExplosions; + +typedef enum PlanetSaveSlotTypes { + /* 0 */ SAVETYPE_PLAYED, + /* 1 */ SAVETYPE_MEDAL, + /* 2 */ SAVETYPE_CLEAR +} PlanetSaveSlotTypes; + #endif diff --git a/include/fox_option.h b/include/fox_option.h index 46a4c6c5..e6b65f00 100644 --- a/include/fox_option.h +++ b/include/fox_option.h @@ -5,7 +5,7 @@ typedef struct { /* 0x00 */ s32 type; - /* 0x04 */ s32 unk_04; + /* 0x04 */ s32 unk_04; // Always set to 0 and never used /* 0x08 */ void* texture; /* 0x0C */ u16* palette; /* 0x10 */ s32 width; @@ -18,7 +18,7 @@ typedef struct { /* 0x2C */ s32 green; /* 0x30 */ s32 blue; /* 0x34 */ s32 alpha; -} OptionTexture; // size = 0x38 +} OptionCardTexture; // size = 0x38 typedef struct { /* 0x00 */ f32 x; @@ -26,32 +26,32 @@ typedef struct { /* 0x08 */ f32 z; /* 0x0C */ f32 xScale; /* 0x10 */ f32 yScale; -} MenuContext_38; // size = 0x14 +} OptionCardFrame; // size = 0x14 typedef struct { /* 0x0 */ f32 x; /* 0x4 */ f32 y; /* 0x8 */ f32 range; -} ArwingPosition; // size = 0xC +} ArwingCursorPos; // size = 0xC typedef struct { - /* 0x00 */ OptionTexture unk_00; - /* 0x38 */ MenuContext_38 unk_38; - /* 0x4C */ ArwingPosition unk_4C; - /* 0x58 */ bool unk_58; - /* 0x5C */ bool unk_5C; + /* 0x00 */ OptionCardTexture tex; + /* 0x38 */ OptionCardFrame frame; + /* 0x4C */ ArwingCursorPos pos; + /* 0x58 */ bool drawTex; + /* 0x5C */ bool drawFrame; } OptionEntry; // size = 0x60 typedef struct { - /* 0x0 */ PlanetId unk_0; - /* 0x4 */ PlanetId unk_4; - /* 0x8 */ s32 unk_8; -} UnkStruct_D_menu_801AED4C; // size = 0xC + /* 0x0 */ PlanetId start; + /* 0x4 */ PlanetId end; + /* 0x8 */ s32 color; +} RouteColoredLine; // size = 0xC typedef struct { s32 unk_0; s32 unk_4; -} UnkStruct_D_menu_801B9250; +} StickInput; typedef enum OptionId { /* 1000 */ OPTION_MAIN_MENU = 1000, @@ -63,163 +63,161 @@ typedef enum OptionId { /* 4 */ OPTION_SOUND = 4, /* 5 */ OPTION_DATA = 5, /* 6 */ OPTION_EXPERT_SOUND = 6, - /* 10 */ OPTION_POINT_MATCH = 10, - /* 20 */ OPTION_BR_MATCH = 20, - /* 30 */ OPTION_TT_MATCH = 30, - /* 200 */ OPTION_NAME = 200, + /* 10 */ OPTION_POINT_MATCH = 10, // Point Match + /* 20 */ OPTION_BR_MATCH = 20, // Battle Royal Match + /* 30 */ OPTION_TT_MATCH = 30, // Time Trial Match + /* 200 */ OPTION_NAME_ENTRY = 200, /* 300 */ OPTION_SCORE = 300, /* 400 */ OPTION_INVOICE = 400, /* 401 */ OPTION_MAX, } OptionId; -#define OPTION_COUNT ARRAY_COUNT(sOptionCardList) +extern u8* gBSSMapPlanetTextures[9]; +extern u8* gAssetMapPlanetTextures[9]; -extern u8* D_menu_801B68B0[]; -extern u8* D_menu_801B68D4[]; - -extern s32 D_menu_801B8220[]; // total hits ranking? see Option_80197DE4 -extern s32 D_menu_801B827C; // engine -extern s32 D_menu_801B8280; -extern s32 D_menu_801B8284; -extern s32 D_menu_801B8288; +extern s32 gTotalHitsRanking[]; +extern bool gGoToTitle; // engine +extern bool sLevelStartState; +extern s32 sWipeHeight; +extern s32 sTitleRankMaxRecords; // Planet textures -extern u8 D_menu_801B9410[96 * 96]; -extern u8 D_menu_801BB810[96 * 96]; -extern u8 D_menu_801BDC10[96 * 96]; -extern u8 D_menu_801C0010[96 * 96]; -extern u8 D_menu_801C2410[96 * 96]; -extern u8 D_menu_801C4810[96 * 96]; -extern u8 D_menu_801C6C10[96 * 96]; -extern u8 D_menu_801C9010[96 * 96]; -extern u8 D_menu_801CB410[96 * 96]; +extern u8 gMapVenomCloudTex[96 * 96]; +extern u8 gMapCorneriaTex[96 * 96]; +extern u8 gMapFortunaTex[96 * 96]; +extern u8 gMapAquasTex[96 * 96]; +extern u8 gMapVenomTex[96 * 96]; +extern u8 gMapTitaniaTex[96 * 96]; +extern u8 gMapKatinaTex[96 * 96]; +extern u8 gMapMacbethTex[96 * 96]; +extern u8 gMapZonessTex[96 * 96]; void Title_UpdateEntry(void); -s32 Title_80187ABC(void); -void Title_80187B00(void); -void Title_80187E28(void); -void Title_801888E8(void); -void Title_8018994C(void); -void Title_8018A644(void); -void Title_8018ACEC(void); -void Title_8018B5C4(void); -void Title_8018C644(void); -void Title_80187CA8(void); -s32 Title_80188010(void); -void Title_80189208(void); -void Title_8018A2F8(void); -void Title_8018A990(void); -void Title_8018B038(void); -void Title_8018C114(void); -void Title_8018CB90(void); -void Title_8018F680(void); -void Title_8018F77C(void); -void Title_8018F85C(void); -void Title_8018F8E4(void); -void Title_8018FC14(void); -void Title_8018FD08(void); -void Title_8018FF74(void); +s32 Title_CheckControllers(void); +void Title_Ranking_Update(void); +void Title_RankingData_Draw(void); +void Title_Screen_Update(void); +void Title_CsGreatFoxTraveling_Update(void); +void Title_CsTeamRunning_Update(void); +void Title_CsGreatFoxCloseUp_Update(void); +void Title_CsTakeOff_Update(void); +void Title_CsTakeOffSpace_Update(void); +void Title_Ranking_Draw(void); +s32 Title_GetRankTotalHits(void); +void Title_Screen_Draw(void); +void Title_CsGreatFoxTraveling_Draw(void); +void Title_CsTeamRunning_Draw(void); +void Title_CsGreatFoxCloseUp_Draw(void); +void Title_CsTakeOff_Draw(void); +void Title_CsTakeOffSpace_Draw(void); +void Title_StarfoxLogo_Draw(void); +void Title_64Logo_Draw(void); +void Title_CopyrightSymbol_Draw(void); +void Title_PressStart_Draw(void); +void Title_Copyright_Draw(void); +void Title_TeamName_Draw(void); +void Title_SunGlare_Draw(void); -void Option_UpdateEntry(void); -void Option_MapUpdate(void); -void Option_MainMenuUpdate(void); -void Option_TrainingUpdate(void); -void Option_MainMenuDraw(void); -void Option_VersusUpdate(void); -void Option_VersusDraw(void); -void Option_SoundInit(void); -void Option_SoundUpdate(void); -void Option_80194AEC(void); -void Option_80194BD0(void); -void Option_SoundDraw(void); -void Option_801952B4(void); -void Option_ExpertSoundInit(void); -void Option_ExpertSoundUpdate(void); -void Option_ExpertSoundDraw(void); -void Option_DataInit(void); -void Option_DataUpdate(void); -void Option_8019669C(void); -void Option_DataDraw(void); -void Option_RankingInit(void); -void Option_RankingUpdate(void); -void Option_RankingDraw(void); -void Option_80196FC4(void); -void Option_80197074(void); -void Option_8019715C(void); -void Option_RankingMenuDraw(void); -void Option_8019752C(void); +void Option_Entry_Update(void); +void Option_Map_Update(void); +void Option_MainMenu_Update(void); +void Option_Training_Update(void); +void Option_MainMenu_Draw(void); +void Option_Versus_Update(void); +void Option_Versus_Draw(void); +void Option_Sound_Setup(void); +void Option_Sound_Update(void); +void Option_Sound_SetSoundMode(void); +void Option_Sound_SetVolumeLevels(void); +void Option_Sound_Draw(void); +void Option_Sound_Speaker_Draw(void); +void Option_ExpertSound_Setup(void); +void Option_ExpertSound_Update(void); +void Option_ExpertSound_Draw(void); +void Option_Data_Setup(void); +void Option_Data_Update(void); +void Option_Data_Select(void); +void Option_Data_Draw(void); +void Option_Ranking_Setup(void); +void Option_Ranking_Update(void); +void Option_Ranking_Draw(void); +void Option_Ranking_Select(void); +void Option_Ranking_Cursor(void); +void Option_Ranking2_Cursor(void); +void Option_RankingMenu_Draw(void); +void Option_RankingMenu2_Draw(void); void Option_80197914(void); -void Option_80197A3C(s32, s32, s32); -void Option_80197D30(s32, s32, s32); -void Option_80197DE4(s32, s32, s32); -void Option_80197F74(s32, s32, s32); -void Option_80198164(s32, f32, f32); -void Option_801982B0(s32, s32, f32, f32, s32); -void Option_801984D0(s32, s32, f32, f32); -void Option_80198608(s32, s32, f32, f32); -void Option_8019882C(s32, s32, f32, f32); -void Option_8019896C(s32, f32, s32); -void Option_80199198(f32 arg0, f32 arg1, f32 arg2); -s32 Option_80199284(PlanetId start, PlanetId end); -void Option_VersusMenuInit(void); -void Option_VersusMenuUpdate(void); -void Option_8019949C(void); -void Option_VersusMenuDraw(void); -void Option_80199820(s32); -void Option_80199EA8(void); -void Option_VersusStageInit(void); +void Option_OrdinalNumbers_Draw(s32, s32, s32); +void Option_RankingName_Draw(s32, s32, s32); +void Option_RankingTotalHits_Draw(s32, s32, s32); +void Option_RankingTeamAlive_Draw(s32, s32, s32); +void Option_RankingRoute_Draw(s32, f32, f32); +void Option_RankingRouteFrame_Draw(s32, s32, f32, f32, s32); +void Option_RankingHitCount_Draw(s32, s32, f32, f32); +void Option_RankingTeamPresence_Draw(s32, s32, f32, f32); +void Option_RankingPlanetName_Draw(s32, s32, f32, f32); +void Option_RankingPlanetRoute_Draw(s32, f32, s32); +void Option_RankingRouteMedal_Draw(f32 xPos, f32 yPos, f32 zPos); +s32 Option_GetRouteLineColor(PlanetId start, PlanetId end); +void Option_VersusMenu_Setup(void); +void Option_VersusMenu_Update(void); +void Option_VersusMenu_Cursor(void); +void Option_VersusMenu_Draw(void); +void Option_VS_HandicapSet_Draw(s32); +void Option_VS_N64Console_Draw(void); +void Option_VersusStage_Setup(void); void Option_8019A080(void); -void Option_VersusStageUpdate(void); -void Option_8019A124(void); -void Option_8019A1A8(void); -void Option_8019A214(void); -void Option_8019A298(void); -void Option_8019A2E0(void); -void Option_8019A4DC(void); -void Option_8019A6DC(void); -void Option_8019A954(void); -void Option_VersusStageDraw(void); -void Option_8019AB30(void); -void Option_8019AD84(void); -void Option_8019AFFC(void); -void Option_8019B1F8(void); -void Option_8019B3DC(void); -void Option_8019B5AC(void); -void Option_8019B6D8(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b); -void Option_8019B7D4(void); -void Option_8019B8A0(s32 arg0); -void Option_8019B8C8(void); +void Option_VersusStage_Update(void); +void Option_Vs_PointMatch_Update(void); +void Option_Vs_BattleRoyal_Update(void); +void Option_Vs_TimeTrial_Update(void); +void Option_Vs_StartMatch(void); +void Option_Vs_Point_Selection(void); +void Option_VsTimeSelection(void); +void Option_VsStageSelection(void); +void Option_VsConfirmSelection(void); +void Option_VersusStage_Draw(void); +void Option_VsPointMatch_Draw(void); +void Option_VsTimeTrial_Draw(void); +void Option_VsStageSelect_Draw(void); +void Option_VsTimeTrialStageSelect_Draw(void); +void Option_VsStageSelect2_Draw(void); +void Option_VsOKConfirm_Draw(void); +void Option_VsSelectionArrows_Draw(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b); +void Option_AcceptCancel_Draw(void); +void Option_VsBackToSubMenu(OptionId menuEntryState); +void Option_VsMenuCard_Draw(void); void Option_DrawMenuLabel(void); -void Option_DrawMenuCard(MenuContext_38 arg0); -void Option_DrawMenuArwing(ArwingPosition arwing); +void Option_DrawMenuCard(OptionCardFrame arg0); +void Option_DrawMenuArwing(ArwingCursorPos arwing); void Option_DrawArwing(f32, f32, f32, f32, f32, f32); -void Option_8019BDF0(void); -void Option_8019BE7C(f32, f32, f32, f32*, f32*, f32*); -void Option_8019BF34(void); -void Option_8019C04C(void); -void Option_DrawCardLabel(OptionTexture tex); -bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, - UnkStruct_D_menu_801B9250* arg8); -s32 Option_8019C5A0(s32*); -bool Option_8019C66C(f32* arg0, f32 arg1, f32 arg2, UnkStruct_D_menu_801B9250* arg3); -void Option_8019C824(f32*); -s32 Option_8019C8C4(void); -void Option_8019CAE0(void); -void Option_8019CBC0(void); -void Option_8019CD54(void); -void Option_8019D118(void); -void Option_8019D624(void); -void Option_8019DB20(s32, f32, f32, f32, f32, f32, f32, f32); -s32 Option_8019DCE8(s32 arg0); -void Option_8019DD44(void); -void Option_8019DE74(void); -void Option_8019DF64(void); -void Option_InvoiceUpdate(void); +void Option_Menu_Push(void); +void Option_SetMenuLightPos(f32, f32, f32, f32*, f32*, f32*); +void Option_CardLightning_Update(void); +void Option_CardLightning_Draw(void); +void Option_DrawCardLabel(OptionCardTexture tex); +bool Option_Input_MoveCursor_Y(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 controllerNum, + StickInput* stickY); +s32 Option_Input_DataSelect_X(s32*); +bool Option_Input_Sound_X(f32* arg0, f32 arg1, f32 arg2, StickInput* arg3); +void Option_Color_FlashRed(f32*); +s32 Option_RankInPos_Check(void); +void Option_NameEntry_Update(void); +void Option_NameEntry_Setup(void); +void Option_NameEntry_Select(void); +void Option_NameEntry_Draw(void); +void Option_Ranking_SaveData(void); +void Option_3DFont_Draw(s32, f32, f32, f32, f32, f32, f32, f32); +s32 Option_GetCharIndex(s32 character); +void Option_Score_Update(void); +void Option_Score_Update2(void); +void Option_Score_Draw(void); +void Option_Invoice_Update(void); void Option_InvoiceDraw(void); void Map_Main(void); -void Map_801A07E8(u8*, u8*, f32*); -void Map_801AD7EC(s32, s32, s32); -void Map_801A9FD4(s32); +void Map_Texture_Sphere(u8*, u8*, f32*); +void Map_RemainingLives_Draw(s32, s32, s32); +void Map_801A9FD4(bool); #endif diff --git a/include/functions.h b/include/functions.h index 8e603aa7..c1d997fd 100644 --- a/include/functions.h +++ b/include/functions.h @@ -5,6 +5,7 @@ #include "sf64object.h" #include "sf64player.h" #include "sf64mesg.h" +#include "fox_hud.h" // fox_360 void AllRange_FortunaIntro(Player*); @@ -376,54 +377,54 @@ void Effect_Effect399_Draw(Effect*); void Wipe_Draw(WipeMode mode, s32 frame); // fox_hud -void func_hud_80084B94(s32); -void func_hud_800857DC(f32, f32, f32, f32); -void func_hud_80085890(f32, f32, f32, f32); -void func_hud_80086110(f32, f32, s32); -void func_hud_80086664(f32, f32); -void func_hud_800869A0(f32, f32, s32, f32, s32, s32); -void func_hud_80087530(f32, f32, s32); -void func_hud_800884E4(void); -void func_hud_80088564(void); +void HUD_TeamDownWrench_Draw(s32); +void HUD_BoostGaugeOverheat_Draw(f32, f32, f32, f32); +void HUD_BoostGaugeCool_Draw(f32, f32, f32, f32); +void HUD_TeamShields_Draw(f32, f32, s32); +void HUD_TitleCard_Draw(f32, f32); +void HUD_Number_Draw(f32, f32, s32, f32, bool, s32); +void HUD_LivesCount2_Draw(f32, f32, s32); +void HUD_SetMissionTeamStatus(void); +void HUD_Bolse_Area6_SaveData(void); void HUD_DrawStatusScreens(void); -s32 ActorMissileSeek_ModeCheck(s32); +s32 ActorMissileSeek_ModeCheck(ActorMissileSeekMode mode); void HUD_RadioCharacterName_Draw(void); -void func_hud_8008B5B0(f32 x, f32 y); -s32 func_hud_8008B774(void); -void func_hud_8008BD00(u8*, s32, s32, u8); -void func_hud_8008C104(u16*, u16*); +void HUD_PlayerShieldGauge_Draw(f32 x, f32 y); +s32 HUD_RadioDamage_Type(void); +void HUD_Texture_Scroll(u8*, s32, s32, u8); +void HUD_Texture_Wave(u16*, u16*); void HUD_DisplaySmallNumber(f32, f32, f32, s32); -void func_hud_8008C5C8(f32, f32, f32, s32); -void func_hud_8008C6F4(s32, s32); -s32 func_hud_8008BCBC(s32); -void HUD_DrawEdgeArrows(void); -s32 HUD_dummy_8008CB8C(void); -void func_hud_8008D0DC(f32, f32, f32, f32, f32); +void HUD_VsModePortraitTex_Draw(f32, f32, f32, s32); +void HUD_EdgeArrows_Draw(s32, bool); +s32 HUD_CountDigits(s32); +void HUD_EdgeArrows_Update(void); +s32 HUD_8008CB8C(void); +void HUD_VS_ShieldGaugeTex_Draw(f32, f32, f32, f32, f32); void HUD_DrawBossHealth(void); void HUD_DrawCountdown(s32* , f32); -void func_hud_8008E9EC(f32, f32); -void func_hud_8008EA14(f32, f32); +void HUD_Shield_GoldRings_HitPoints(f32, f32); +void HUD_BombCounter_Draw(f32, f32); void HUD_Draw(void); -void HUD_FoBase_Draw(Boss*); -void func_hud_8008FFF0(Boss*, s32); -s32 HUD_FoBase_ExplodeCs(Boss* this); -bool func_hud_8009092C(Actor*); -void HUD_FoBase_Update(Boss*); -bool func_hud_800915FC(Actor*); -bool func_hud_800924E0(Actor*); +void FoBase_Draw(Boss*); +void FoBase_BurnEffects(Boss*, s32); +s32 FoBase_ExplodeCs(Boss* this); +bool ActorTeamBoss_SetTarget(Actor*); +void FoBase_Update(Boss*); +bool ActorTeamBoss_ObstacleCheck(Actor*); +bool ActorTeamBoss_SomerSault(Actor*); void ActorTeamBoss_Init(Actor*); void ActorTeamBoss_Update(Actor* this); -void func_hud_80093164(Actor*); -void HUD_AquasStart(Player*); -void func_hud_800953A0(Actor*, s32); -void func_hud_8009546C(Actor*, s32); -void func_hud_80095538(Actor*, s32); -void HUD_AquasComplete(Player*); -void Hud_Effect363_Update(Effect*); -void Hud_Effect363_Draw(Effect*); -void func_hud_80094D20(f32, f32); -void func_hud_80096A74(Player* player); +void Aquas_CsIntroActors_Update(Actor*); +void Aquas_CsLevelStart(Player*); +void Aquas_AqBump2_Setup(Actor*, s32); +void Aquas_AqCoralReef2_Setup(Actor*, s32); +void Aquas_AqRock_Setup(Actor*, s32); +void Aquas_CsLevelComplete(Player*); +void Aquas_Effect363_Update(Effect*); +void Aquas_Effect363_Draw(Effect*); +void HUD_Hitpoints_Draw(f32, f32); +void Venom1_LevelStart2(Player* player); // fox_col1 void func_col1_80098860(PlaneF* plane, Vec3f* point, Vec3f* normal); diff --git a/include/gfx.h b/include/gfx.h index de8ba7ad..b110d953 100644 --- a/include/gfx.h +++ b/include/gfx.h @@ -118,8 +118,8 @@ void Lights_SetTwoLights(Gfx** dList, s32 dir1x, s32 dir1y, s32 dir1z, s32 dir2x char* Graphics_ClearPrintBuffer(char *buf, s32 fill, s32 len); s32 Graphics_Printf(const char *fmt, ...); -void Texture_Scroll(u16 *texture, s32 width, s32 height, u8 mode); -void Texture_Mottle(u16 *dst, u16 *src, u8 mode); +void Lib_Texture_Scroll(u16 *texture, s32 width, s32 height, u8 mode); +void Lib_Texture_Mottle(u16 *dst, u16 *src, u8 mode); s32 Animation_GetLimbIndex(Limb* limb, Limb** skeleton); void Animation_DrawLimb(s32 mode, Limb* limb, Limb* *skeleton, Vec3f* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* data); void Animation_DrawSkeleton(s32 mode, Limb** skeletonSegment, Vec3f* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, void* data, Matrix* transform); @@ -128,23 +128,23 @@ s32 Animation_GetFrameCount(Animation *animationSegment); void Animation_FindBoundingBox(Gfx* dList, s32 len, Vec3f *min, Vec3f *max, s32 *vtxFound, s32 *vtxCount, Vtx* *vtxList); void Animation_GetDListBoundingBox(Gfx *dList, s32 len, Vec3f *min, Vec3f *max); void Animation_GetSkeletonBoundingBox(Limb** skeletonSegment, Animation *animationSegment, s32 frame, Vec3f *min, Vec3f* max); -void TextureRect_CI4(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_CI4_Flip(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_CI4_MirX(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_CI4_MirY(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_CI8(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_RGBA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_RGBA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8_FlipMirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8_FlipMirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8_MirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA8_MirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA16_MirY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_IA16_MirXY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); -void TextureRect_RGBA32(Gfx **gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI4(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI4_Flip(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI4_MirX(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI4_MirY(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_CI8(Gfx **gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_RGBA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_RGBA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8_FlipMirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8_FlipMirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8_MirX(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA8_MirY(Gfx **gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA16(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA16_MirX(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA16_MirY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_IA16_MirXY(Gfx **gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); +void Lib_TextureRect_RGBA32(Gfx **gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale); void Graphics_FillRectangle(Gfx **gfxPtr, s32 ulx, s32 uly, s32 lrx, s32 lry, u8 r, u8 g, u8 b, u8 a); u16* Graphics_SetupTextureRender(Gfx **gfxPtr, u8 width, u8 height); void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number); diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index bfdb6acf..eea7762b 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -58,21 +58,21 @@ typedef enum { } SfxChannelLayout; typedef enum { - /* 0 */ AUDIOSPEC_0, - /* 1 */ AUDIOSPEC_1, - /* 2 */ AUDIOSPEC_2, - /* 3 */ AUDIOSPEC_3, - /* 4 */ AUDIOSPEC_4, - /* 5 */ AUDIOSPEC_5, + /* 0 */ AUDIOSPEC_CO, + /* 1 */ AUDIOSPEC_ME, + /* 2 */ AUDIOSPEC_TI, + /* 3 */ AUDIOSPEC_SX, + /* 4 */ AUDIOSPEC_ZO, + /* 5 */ AUDIOSPEC_A6, /* 6 */ AUDIOSPEC_6, - /* 7 */ AUDIOSPEC_7, - /* 8 */ AUDIOSPEC_8, - /* 9 */ AUDIOSPEC_9, - /* 10 */ AUDIOSPEC_10, - /* 11 */ AUDIOSPEC_11, - /* 12 */ AUDIOSPEC_12, - /* 13 */ AUDIOSPEC_13, - /* 14 */ AUDIOSPEC_14, + /* 7 */ AUDIOSPEC_SY, + /* 8 */ AUDIOSPEC_FO, + /* 9 */ AUDIOSPEC_SO, + /* 10 */ AUDIOSPEC_BO, + /* 11 */ AUDIOSPEC_KA, + /* 12 */ AUDIOSPEC_AQ, + /* 13 */ AUDIOSPEC_SZ, + /* 14 */ AUDIOSPEC_MA, /* 15 */ AUDIOSPEC_15, /* 16 */ AUDIOSPEC_16, /* 17 */ AUDIOSPEC_17, diff --git a/include/sf64object.h b/include/sf64object.h index ec5bb7d3..c31f3cc1 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -85,7 +85,7 @@ typedef struct { } ObjectInit; // size = 0x14 typedef struct { - /* 0x00 */ u8 status; + /* 0x00 */ u8 enabled; /* 0x02 */ u16 type; /* 0x04 */ Vec3f pos; /* 0x10 */ f32 yRot; diff --git a/include/sf64player.h b/include/sf64player.h index 511141fb..71f28f91 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -150,7 +150,7 @@ typedef struct ArwingInfo { /* 0x2C */ u8 drawFace; /* 0x30 */ f32 teamFaceXrot; /* 0x34 */ f32 teamFaceYrot; - /* 0x38 */ f32 windshieldXrot; + /* 0x38 */ f32 cockpitGlassXrot; } ArwingInfo; // size = 0x3C typedef struct PlayerSfx { @@ -246,8 +246,8 @@ typedef struct Player { /* 0x184 */ f32 unk_184; /* 0x188 */ f32 unk_188; /* 0x18C */ f32 unk_18C; - /* 0x190 */ f32 unk_190; - /* 0x194 */ f32 unk_194; + /* 0x190 */ f32 unk_190; // Related to engine glow. Investigate + /* 0x194 */ f32 unk_194; // Related to engine glow. Investigate /* 0x198 */ s32 savedAlternateView; /* 0x19C */ s32 unk_19C; // used to indicate whether a U-turn is forced, whether to draw ground in TI intro, and to stop the landmaster /* 0x1A0 */ s32 unk_1A0; // tank muzzle flash timer diff --git a/include/sf64save.h b/include/sf64save.h index 7be617a8..75e900bf 100644 --- a/include/sf64save.h +++ b/include/sf64save.h @@ -3,8 +3,17 @@ #include "PR/ultratypes.h" +#define RANKING_MAX (10) // Maximum number of entries in the ranking +#define ROUTE_MAX (7) // Maximum number of planets in a route +#define ENTRY_MAX (3) // Maximum number of letters for name entry + +#define TEAMSTATUS_PEPPY (0x00FF0000) +#define TEAMSTATUS_SLIPPY (0x0000FF00) +#define TEAMSTATUS_FALCO (0x000000FF) +#define TEAMSTATUS_ALIVE (0x00FFFFFF) + typedef struct { - /* bit 0 */ u8 unk_0 : 3; + /* bit 0 */ u8 unk_0 : 3; // unused /* bit 3 */ u8 expertMedal : 1; /* bit 4 */ u8 expertClear : 1; /* bit 5 */ u8 played : 1; @@ -12,27 +21,27 @@ typedef struct { /* bit 7 */ u8 normalClear : 1; } PlanetData; // size = 0x1 -typedef struct { - /* bit 0 */ u16 unk_0 : 8; - /* bit 8 */ u16 unk_8 : 4; - /* bit C */ u16 unk_C : 1; - /* bit D */ u16 unk_D : 1; - /* bit E */ u16 unk_E : 1; - /* bit F */ u16 unk_F : 1; -} Save_SubStruct_5E; // size = 0x10 +typedef struct PlanetStats { + /* bit 0 */ u16 hitCount : 8; + /* bit 8 */ u16 planetId : 4; + /* bit C */ u16 unk_C : 1; // hitCount related + /* bit D */ u16 peppyAlive : 1; + /* bit E */ u16 falcoAlive : 1; + /* bit F */ u16 slippyAlive : 1; +} PlanetStats; // size = 0x10 -typedef struct{ +typedef struct SaveData { /* 0x00 */ PlanetData planet[16]; /* 0x10 */ char pad10[0x4]; /* 0x14 */ u8 soundMode; /* 0x15 */ u8 musicVolume; /* 0x16 */ u8 voiceVolume; /* 0x17 */ u8 sfxVolume; - /* 0x18 */ u8 unk_18[10][3]; - /* 0x36 */ u8 unk_36[10]; - /* 0x40 */ u8 unk_40[10]; - /* 0x4A */ u16 unk_4A[10]; - /* 0x5E */ Save_SubStruct_5E unk_5E[10][7]; + /* 0x18 */ u8 rankNameEntry[RANKING_MAX][ENTRY_MAX]; // Name entries in the ranking + /* 0x36 */ u8 rankingRoute[RANKING_MAX]; // Maximum number of planets played in the current record + /* 0x40 */ u8 rankingLives[RANKING_MAX]; // Player lives left in the current record + /* 0x4A */ u16 rankingMedal[RANKING_MAX]; // Medals obtained in the current record + /* 0x5E */ PlanetStats stats[RANKING_MAX][ROUTE_MAX]; /* 0xEA */ u8 unk_EA; /* 0xEB */ char padEB[0x3]; /* 0xEE */ char padEE[0x10]; @@ -40,9 +49,9 @@ typedef struct{ typedef struct { /* 0x00 */ union { - u8 raw[sizeof(SaveData)]; - SaveData data; - }; + u8 raw[sizeof(SaveData)]; + SaveData data; + }; /* 0xFE */ u16 checksum; } Save; // size = 0x100 diff --git a/include/variables.h b/include/variables.h index 502bdb6a..dff14fc4 100644 --- a/include/variables.h +++ b/include/variables.h @@ -185,7 +185,7 @@ extern f32 gRadioPortraitPosX; extern f32 gRadioPortraitPosY; // fox_versus -extern s32 D_versus_80178750; +extern bool gVsMatchOver; extern s32 gVsMatchState; extern s32 D_versus_80178758; extern s32 sUnlockLandmaster; // sUnlockLandmaster diff --git a/linker_scripts/eu/rev0/symbol_addrs.txt b/linker_scripts/eu/rev0/symbol_addrs.txt index dc8958ef..219477ce 100644 --- a/linker_scripts/eu/rev0/symbol_addrs.txt +++ b/linker_scripts/eu/rev0/symbol_addrs.txt @@ -5956,7 +5956,7 @@ D_menu_801B56B8 = 0x801B56B8; //segment:ovl_menu D_menu_801B5728 = 0x801B5728; //segment:ovl_menu D_menu_801B574C = 0x801B574C; //segment:ovl_menu D_menu_801B5798 = 0x801B5798; //segment:ovl_menu -D_menu_801B57A8 = 0x801B57A8; //segment:ovl_menu +gMapVenomDL = 0x801B57A8; //segment:ovl_menu D_menu_801B59A0 = 0x801B59A0; //segment:ovl_menu D_menu_801B5B98 = 0x801B5B98; //segment:ovl_menu D_menu_801B5BD4 = 0x801B5BD4; //segment:ovl_menu @@ -5985,7 +5985,7 @@ D_menu_801B8930 = 0x801B8930; //segment:ovl_menu D_menu_801B8C98 = 0x801B8C98; //segment:ovl_menu D_menu_801B9000 = 0x801B9000; //segment:ovl_menu D_menu_801B9368 = 0x801B9368; //segment:ovl_menu -D_menu_801B936C = 0x801B936C; //segment:ovl_menu +sPointConfirmTimer = 0x801B936C; //segment:ovl_menu D_menu_801B9388 = 0x801B9388; //segment:ovl_menu D_menu_801B938C = 0x801B938C; //segment:ovl_menu D_menu_801B9390 = 0x801B9390; //segment:ovl_menu diff --git a/linker_scripts/eu/rev0/symbol_addrs_assets.txt b/linker_scripts/eu/rev0/symbol_addrs_assets.txt index 192ed16c..b8b2fabb 100644 --- a/linker_scripts/eu/rev0/symbol_addrs_assets.txt +++ b/linker_scripts/eu/rev0/symbol_addrs_assets.txt @@ -20,7 +20,7 @@ D_10124B0 = 0x10124B0; D_10124C0 = 0x10124C0; D_1012540 = 0x1012540; D_1012850 = 0x1012850; -D_10128C0 = 0x10128C0; +aBoostGaugeOverheatTex = 0x10128C0; D_10128D0 = 0x10128D0; D_10129A0 = 0x10129A0; D_10129C0 = 0x10129C0; @@ -1006,7 +1006,7 @@ D_D005C30 = 0xD005C30; D_D006B50 = 0xD006B50; D_D007A70 = 0xD007A70; D_D008990 = 0xD008990; -D_D0098B0 = 0xD0098B0; +aKattRadarMarkDL = 0xD0098B0; aKattShipDL = 0xD009A40; aBillShipDL = 0xD00B880; D_E000000 = 0xE000000; diff --git a/linker_scripts/eu/rev0/undefined_syms.ld b/linker_scripts/eu/rev0/undefined_syms.ld index 192ed16c..b8b2fabb 100644 --- a/linker_scripts/eu/rev0/undefined_syms.ld +++ b/linker_scripts/eu/rev0/undefined_syms.ld @@ -20,7 +20,7 @@ D_10124B0 = 0x10124B0; D_10124C0 = 0x10124C0; D_1012540 = 0x1012540; D_1012850 = 0x1012850; -D_10128C0 = 0x10128C0; +aBoostGaugeOverheatTex = 0x10128C0; D_10128D0 = 0x10128D0; D_10129A0 = 0x10129A0; D_10129C0 = 0x10129C0; @@ -1006,7 +1006,7 @@ D_D005C30 = 0xD005C30; D_D006B50 = 0xD006B50; D_D007A70 = 0xD007A70; D_D008990 = 0xD008990; -D_D0098B0 = 0xD0098B0; +aKattRadarMarkDL = 0xD0098B0; aKattShipDL = 0xD009A40; aBillShipDL = 0xD00B880; D_E000000 = 0xE000000; diff --git a/linker_scripts/jp/rev0/symbol_addrs.txt b/linker_scripts/jp/rev0/symbol_addrs.txt index 40ff4f45..6d14e396 100644 --- a/linker_scripts/jp/rev0/symbol_addrs.txt +++ b/linker_scripts/jp/rev0/symbol_addrs.txt @@ -2261,7 +2261,7 @@ D_800D19B8 = 0x800D19B8; D_800D19C8 = 0x800D19C8; D_800D19D8 = 0x800D19D8; D_800D19E8 = 0x800D19E8; -D_800D19F8 = 0x800D19F8; +sBombCounterState = 0x800D19F8; D_800D1A10 = 0x800D1A10; D_800D1DA0 = 0x800D1DA0; D_800D1DD0 = 0x800D1DD0; @@ -3392,7 +3392,7 @@ D_801617E1 = 0x801617E1; D_80161808 = 0x80161808; D_80161820 = 0x80161820; D_80161830 = 0x80161830; -D_801618B0 = 0x801618B0; +sGoldRingsFwork = 0x801618B0; D_801618C0 = 0x801618C0; D_801618C8 = 0x801618C8; D_801618D0 = 0x801618D0; @@ -6511,16 +6511,16 @@ D_menu_801ADFD0 = 0x801ADFD0; //segment:ovl_menu D_menu_801AE0F0 = 0x801AE0F0; //segment:ovl_menu D_menu_801AF0B0 = 0x801AF0B0; D_menu_801AF0C0 = 0x801AF0C0; //segment:ovl_menu -D_menu_801AF0C4 = 0x801AF0C4; //segment:ovl_menu +sTeamLetter = 0x801AF0C4; //segment:ovl_menu D_menu_801AF0C8 = 0x801AF0C8; //segment:ovl_menu D_menu_801AF0CC = 0x801AF0CC; //segment:ovl_menu -D_menu_801AF0D0 = 0x801AF0D0; //segment:ovl_menu +sTeamAlivePrimR = 0x801AF0D0; //segment:ovl_menu D_menu_801AF0D4 = 0x801AF0D4; //segment:ovl_menu D_menu_801AF0D8 = 0x801AF0D8; //segment:ovl_menu -D_menu_801AF0DC = 0x801AF0DC; //segment:ovl_menu +sTeamAlivePrimG = 0x801AF0DC; //segment:ovl_menu D_menu_801AF0E0 = 0x801AF0E0; //segment:ovl_menu D_menu_801AF0E4 = 0x801AF0E4; //segment:ovl_menu -D_menu_801AF0E8 = 0x801AF0E8; //segment:ovl_menu +sTeamAlivePrimB = 0x801AF0E8; //segment:ovl_menu D_menu_801AF0EC = 0x801AF0EC; //segment:ovl_menu D_menu_801AF0F0 = 0x801AF0F0; //segment:ovl_menu D_menu_801AF0F4 = 0x801AF0F4; //segment:ovl_menu @@ -6544,26 +6544,26 @@ D_menu_801AF138 = 0x801AF138; //segment:ovl_menu D_menu_801AF13C = 0x801AF13C; //segment:ovl_menu D_menu_801AF140 = 0x801AF140; //segment:ovl_menu D_menu_801AF144 = 0x801AF144; //segment:ovl_menu -D_menu_801AF148 = 0x801AF148; //segment:ovl_menu +sVsHandicapFrameXpos = 0x801AF148; //segment:ovl_menu D_menu_801AF14C = 0x801AF14C; //segment:ovl_menu D_menu_801AF150 = 0x801AF150; //segment:ovl_menu D_menu_801AF154 = 0x801AF154; //segment:ovl_menu -D_menu_801AF158 = 0x801AF158; //segment:ovl_menu +sVsHandicapFrameYpos = 0x801AF158; //segment:ovl_menu D_menu_801AF15C = 0x801AF15C; //segment:ovl_menu D_menu_801AF160 = 0x801AF160; //segment:ovl_menu D_menu_801AF164 = 0x801AF164; //segment:ovl_menu -D_menu_801AF168 = 0x801AF168; //segment:ovl_menu +sCharNameWidth = 0x801AF168; //segment:ovl_menu D_menu_801AF16C = 0x801AF16C; //segment:ovl_menu D_menu_801AF170 = 0x801AF170; //segment:ovl_menu D_menu_801AF174 = 0x801AF174; //segment:ovl_menu -D_menu_801AF178 = 0x801AF178; //segment:ovl_menu +sCharNameHeight = 0x801AF178; //segment:ovl_menu D_menu_801AF17C = 0x801AF17C; //segment:ovl_menu D_menu_801AF180 = 0x801AF180; //segment:ovl_menu D_menu_801AF1A8 = 0x801AF1A8; //segment:ovl_menu D_menu_801AF1AC = 0x801AF1AC; //segment:ovl_menu D_menu_801AF1B0 = 0x801AF1B0; //segment:ovl_menu -D_menu_801AF1B4 = 0x801AF1B4; //segment:ovl_menu -D_menu_801AF1B8 = 0x801AF1B8; //segment:ovl_menu +sPlayerFaceXoffsetPos = 0x801AF1B4; //segment:ovl_menu +sPlayerFaceYoffsetPos = 0x801AF1B8; //segment:ovl_menu D_menu_801AF1BC = 0x801AF1BC; //segment:ovl_menu D_menu_801AF1C0 = 0x801AF1C0; //segment:ovl_menu D_menu_801AF1C4 = 0x801AF1C4; //segment:ovl_menu diff --git a/linker_scripts/jp/rev1/undefined_syms.ld b/linker_scripts/jp/rev1/undefined_syms.ld new file mode 100644 index 00000000..b74d60e3 --- /dev/null +++ b/linker_scripts/jp/rev1/undefined_syms.ld @@ -0,0 +1 @@ +bootproc = 0x80004EB8; diff --git a/linker_scripts/us/rev0/symbol_addrs_engine.txt b/linker_scripts/us/rev0/symbol_addrs_engine.txt new file mode 100644 index 00000000..4cd84ae7 --- /dev/null +++ b/linker_scripts/us/rev0/symbol_addrs_engine.txt @@ -0,0 +1 @@ +Save_Read = 0x800BED14; \ No newline at end of file diff --git a/linker_scripts/us/rev1/symbol_addrs.txt b/linker_scripts/us/rev1/symbol_addrs.txt index a428d50b..3e1538a7 100644 --- a/linker_scripts/us/rev1/symbol_addrs.txt +++ b/linker_scripts/us/rev1/symbol_addrs.txt @@ -69,7 +69,7 @@ gTeamEventActorIndex = 0x800CFF80;//size:0x10 gLockOnTargetViewPos = 0x80161578;//size:0x30 D_display_800CA23C = 0x800CA23C;//size:0x18 -D_display_800CA26C = 0x800CA26C;//size:0x20 +sFaceDL = 0x800CA26C;//size:0x20 D_800CA260 = 0x800CA260;//size:0xC D_display_801613E0 = 0x801613E0;//size:0x18 gObjectInfo = 0x800CC124;//type:u8 diff --git a/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt b/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt index 4fe5c3c2..4b589a82 100644 --- a/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt +++ b/linker_scripts/us/rev1/symbol_addrs_EBFBE0.txt @@ -1,5 +1,5 @@ -Option_ExpertSoundUpdate = 0x80195944; // segment:ovl_menu -Option_VersusStageInit = 0x80199FA8; // segment:ovl_menu +Option_ExpertSound_Update = 0x80195944; // segment:ovl_menu +Option_VersusStage_Setup = 0x80199FA8; // segment:ovl_menu planet = 0x801AF4A0; // type:Planet segment:ovl_menu size:0x38 sPlanetNames = 0x801AF9F4; // type:s32 segment:ovl_menu size:0xF Map_GetPlanetId = 0x801A6480; // force_migration:True segment:ovl_menu @@ -7,13 +7,13 @@ sOptionCardList = 0x801AE638; // type:OptionEntry segment:ovl_menu size:0x240 D_menu_801AE99C = 0x801AE99C; // force_migration:True segment:ovl_menu sTimeTrialMinuteTextures = 0x801AF28C; // force_migration:True segment:ovl_menu sPlanetList = 0x801AF7E8;// segment:ovl_menu -spectrumAnalyzerMode = 0x801B9318;// segment:ovl_menu -D_menu_801AE998 = 0x801AE998; //size:4 segment:ovl_menu +sSpectrumAnalyzerMode = 0x801B9318;// segment:ovl_menu +sSoundMode = 0x801AE998; //size:4 segment:ovl_menu sPaths = 0x801AFD18; // segment:ovl_menu D_menu_801B6E50 = 0x801B6E50; // force_migration:True segment:ovl_menu D_menu_801B7BA0 = 0x801B7BA0;// segment:ovl_menu -D_menu_801B8248 = 0x801B8248; // size:0x28 segment:ovl_menu -D_menu_801B827C = 0x801B827C; // segment:ovl_menu +sRankNameEntry = 0x801B8248; // size:0x28 segment:ovl_menu +gGoToTitle = 0x801B827C; // segment:ovl_menu D_menu_801B9710 = 0x801B9710; // segment:ovl_menu D_menu_801B9A10 = 0x801B9A10; // segment:ovl_menu D_menu_801B9D10 = 0x801B9D10; // segment:ovl_menu diff --git a/linker_scripts/us/rev1/symbol_addrs_assets.txt b/linker_scripts/us/rev1/symbol_addrs_assets.txt index 6c36a3a3..acb0c6ac 100644 --- a/linker_scripts/us/rev1/symbol_addrs_assets.txt +++ b/linker_scripts/us/rev1/symbol_addrs_assets.txt @@ -92,6 +92,6 @@ D_A6_6028578 = 0x6028578; aA6GorgonHitbox = 0x6028454; D_TITLE_60246F8 = 0x60246F8; -D_TITLE_60338DC = 0x60338DC; -D_TITLE_6036278 = 0x6036278; -D_TITLE_603531C = 0x603531C; \ No newline at end of file +aFalcoAnim = 0x60338DC; +aSlippyAnim = 0x6036278; +aPeppyAnim = 0x603531C; \ No newline at end of file diff --git a/linker_scripts/us/rev1/symbol_addrs_engine.txt b/linker_scripts/us/rev1/symbol_addrs_engine.txt index e622ea48..3a5ed4c3 100644 --- a/linker_scripts/us/rev1/symbol_addrs_engine.txt +++ b/linker_scripts/us/rev1/symbol_addrs_engine.txt @@ -6,8 +6,8 @@ sSmallChars = 0x800D2660;//type:asciz size:42 Graphics_ClearPrintBuffer = 0x80099980; Graphics_Printf = 0x800999D8; -Texture_Scroll = 0x80099A2C; -Texture_Mottle = 0x80099E28; +Lib_Texture_Scroll = 0x80099A2C; +Lib_Texture_Mottle = 0x80099E28; Animation_GetLimbIndex = 0x8009A400; Animation_DrawLimb = 0x8009A440; Animation_DrawSkeleton = 0x8009A72C; @@ -20,23 +20,23 @@ Math_SmoothStepToF = 0x8009BC2C; Math_SmoothStepToAngle = 0x8009BD38; Math_SmoothStepToVec3fArray = 0x8009BEEC; Math_PursueVec3f = 0x8009C124; -TextureRect_CI4 = 0x8009C320; -TextureRect_CI4_Flip = 0x8009C674; -TextureRect_CI4_MirX = 0x8009C9C8; -TextureRect_CI4_MirY = 0x8009CD3C; -TextureRect_CI8 = 0x8009D0BC; -TextureRect_RGBA16 = 0x8009D418; -TextureRect_RGBA16_MirX = 0x8009D6CC; -TextureRect_IA8 = 0x8009D994; -TextureRect_IA8_FlipMirX = 0x8009DC4C; -TextureRect_IA8_FlipMirY = 0x8009DF14; -TextureRect_IA8_MirX = 0x8009E1E8; -TextureRect_IA8_MirY = 0x8009E4B0; -TextureRect_IA16 = 0x8009E784; -TextureRect_IA16_MirX = 0x8009EA38; -TextureRect_IA16_MirY = 0x8009ED04; -TextureRect_IA16_MirXY = 0x8009EFDC; -TextureRect_RGBA32 = 0x8009F2C0; +Lib_TextureRect_CI4 = 0x8009C320; +Lib_TextureRect_CI4_Flip = 0x8009C674; +Lib_TextureRect_CI4_MirX = 0x8009C9C8; +Lib_TextureRect_CI4_MirY = 0x8009CD3C; +Lib_TextureRect_CI8 = 0x8009D0BC; +Lib_TextureRect_RGBA16 = 0x8009D418; +Lib_TextureRect_RGBA16_MirX = 0x8009D6CC; +Lib_TextureRect_IA8 = 0x8009D994; +Lib_TextureRect_IA8_FlipMirX = 0x8009DC4C; +Lib_TextureRect_IA8_FlipMirY = 0x8009DF14; +Lib_TextureRect_IA8_MirX = 0x8009E1E8; +Lib_TextureRect_IA8_MirY = 0x8009E4B0; +Lib_TextureRect_IA16 = 0x8009E784; +Lib_TextureRect_IA16_MirX = 0x8009EA38; +Lib_TextureRect_IA16_MirY = 0x8009ED04; +Lib_TextureRect_IA16_MirXY = 0x8009EFDC; +Lib_TextureRect_RGBA32 = 0x8009F2C0; Graphics_FillRectangle = 0x8009F574; Math_Vec3fFromAngles = 0x8009F6CC; Math_RadToDeg = 0x8009F768; @@ -394,7 +394,7 @@ gTotalHits = 0x80161714; gShowBossHealth = 0x80161734; gMedalStatus = 0x801617B4; gMedalFlashTimer = 0x801617B8; -D_800D1AEC = 0x800D1AEC; //type:s32 size:0x1B0 +sLevelTitleCard = 0x800D1AEC; //type:s32 size:0x1B0 // fox_play gSavedZoSearchlightStatus = 0x80161A50; diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 6bf0178c..c860a2ea 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -82,7 +82,7 @@ u8 sSeqCmdWritePos = 0; u8 sSeqCmdReadPos = 0; u8 sStartSeqDisabled = 0; u8 sSoundModeList[4] = { SOUNDMODE_STEREO, SOUNDMODE_HEADSET, SOUNDMODE_SURROUND, SOUNDMODE_MONO }; -u8 sAudioSpecId = AUDIOSPEC_0; +u8 sAudioSpecId = AUDIOSPEC_CO; u8 sAudioResetStatus = AUDIORESET_READY; s32 D_800C5D5C = 0; // unused. file split? s8 sEnvReverb = 0; @@ -130,35 +130,35 @@ SoundTestTrack sSoundTestTracks[] = { /* 1 */ { NA_BGM_TITLE, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 }, /* 2 */ { NA_BGM_SELECT, AUDIOSPEC_23 | (SFXCHAN_0 << 8), -1 }, /* 3 */ { NA_BGM_MAP, AUDIOSPEC_24 | (SFXCHAN_1 << 8), -1 }, - /* 4 */ { NA_BGM_START_DEMO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 5 */ { NA_BGM_START_DEMO_S, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 6 */ { NA_BGM_START_DEMO_M, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 7 */ { NA_BGM_ME_START_DEMO, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 8 */ { NA_BGM_FO_START_DEMO, AUDIOSPEC_8 | (SFXCHAN_0 << 8), -1 }, - /* 9 */ { NA_BGM_STAGE_CO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 10 */ { NA_BGM_STAGE_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 11 */ { NA_BGM_STAGE_TI, AUDIOSPEC_2 | (SFXCHAN_0 << 8), -1 }, - /* 12 */ { NA_BGM_STAGE_SX, AUDIOSPEC_3 | (SFXCHAN_0 << 8), -1 }, - /* 13 */ { NA_BGM_STAGE_ZO, AUDIOSPEC_4 | (SFXCHAN_0 << 8), -1 }, - /* 14 */ { NA_BGM_STAGE_A6, AUDIOSPEC_5 | (SFXCHAN_0 << 8), -1 }, + /* 4 */ { NA_BGM_START_DEMO, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 5 */ { NA_BGM_START_DEMO_S, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 6 */ { NA_BGM_START_DEMO_M, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 7 */ { NA_BGM_ME_START_DEMO, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 8 */ { NA_BGM_FO_START_DEMO, AUDIOSPEC_FO | (SFXCHAN_0 << 8), -1 }, + /* 9 */ { NA_BGM_STAGE_CO, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 10 */ { NA_BGM_STAGE_ME, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 11 */ { NA_BGM_STAGE_TI, AUDIOSPEC_TI | (SFXCHAN_0 << 8), -1 }, + /* 12 */ { NA_BGM_STAGE_SX, AUDIOSPEC_SX | (SFXCHAN_0 << 8), -1 }, + /* 13 */ { NA_BGM_STAGE_ZO, AUDIOSPEC_ZO | (SFXCHAN_0 << 8), -1 }, + /* 14 */ { NA_BGM_STAGE_A6, AUDIOSPEC_A6 | (SFXCHAN_0 << 8), -1 }, /* 15 */ { NA_BGM_STAGE_VE1, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, - /* 16 */ { NA_BGM_STAGE_SY, AUDIOSPEC_7 | (SFXCHAN_0 << 8), -1 }, - /* 17 */ { NA_BGM_STAGE_FO, AUDIOSPEC_8 | (SFXCHAN_0 << 8), -1 }, - /* 18 */ { NA_BGM_STAGE_BO, AUDIOSPEC_10 | (SFXCHAN_0 << 8), -1 }, - /* 19 */ { NA_BGM_STAGE_KA, AUDIOSPEC_11 | (SFXCHAN_0 << 8), -1 }, - /* 20 */ { NA_BGM_STAGE_AQ, AUDIOSPEC_12 | (SFXCHAN_0 << 8), -1 }, - /* 21 */ { NA_BGM_STAGE_WZ, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 22 */ { NA_BGM_KATT, AUDIOSPEC_13 | (SFXCHAN_0 << 8), -1 }, - /* 23 */ { NA_BGM_BILL, AUDIOSPEC_11 | (SFXCHAN_0 << 8), -1 }, - /* 24 */ { NA_BGM_BOSS_CO, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 25 */ { NA_BGM_BOSS_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), 0 }, - /* 26 */ { NA_BGM_BOSS_ME, AUDIOSPEC_1 | (SFXCHAN_0 << 8), -1 }, - /* 27 */ { NA_BGM_REAL_BOSS, AUDIOSPEC_7 | (SFXCHAN_0 << 8), -1 }, - /* 28 */ { NA_BGM_BOSS_BO, AUDIOSPEC_10 | (SFXCHAN_0 << 8), -1 }, + /* 16 */ { NA_BGM_STAGE_SY, AUDIOSPEC_SY | (SFXCHAN_0 << 8), -1 }, + /* 17 */ { NA_BGM_STAGE_FO, AUDIOSPEC_FO | (SFXCHAN_0 << 8), -1 }, + /* 18 */ { NA_BGM_STAGE_BO, AUDIOSPEC_BO | (SFXCHAN_0 << 8), -1 }, + /* 19 */ { NA_BGM_STAGE_KA, AUDIOSPEC_KA | (SFXCHAN_0 << 8), -1 }, + /* 20 */ { NA_BGM_STAGE_AQ, AUDIOSPEC_AQ | (SFXCHAN_0 << 8), -1 }, + /* 21 */ { NA_BGM_STAGE_WZ, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 22 */ { NA_BGM_KATT, AUDIOSPEC_SZ | (SFXCHAN_0 << 8), -1 }, + /* 23 */ { NA_BGM_BILL, AUDIOSPEC_KA | (SFXCHAN_0 << 8), -1 }, + /* 24 */ { NA_BGM_BOSS_CO, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 25 */ { NA_BGM_BOSS_ME, AUDIOSPEC_ME | (SFXCHAN_0 << 8), 0 }, + /* 26 */ { NA_BGM_BOSS_ME, AUDIOSPEC_ME | (SFXCHAN_0 << 8), -1 }, + /* 27 */ { NA_BGM_REAL_BOSS, AUDIOSPEC_SY | (SFXCHAN_0 << 8), -1 }, + /* 28 */ { NA_BGM_BOSS_BO, AUDIOSPEC_BO | (SFXCHAN_0 << 8), -1 }, /* 29 */ { NA_BGM_STARWOLF, AUDIOSPEC_6 | (SFXCHAN_0 << 8), -1 }, - /* 30 */ { NA_BGM_COURSE_CLEAR, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 31 */ { NA_BGM_COURSE_FAILURE, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, - /* 32 */ { NA_BGM_PLAYER_DOWN, AUDIOSPEC_0 | (SFXCHAN_0 << 8), -1 }, + /* 30 */ { NA_BGM_COURSE_CLEAR, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 31 */ { NA_BGM_COURSE_FAILURE, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, + /* 32 */ { NA_BGM_PLAYER_DOWN, AUDIOSPEC_CO | (SFXCHAN_0 << 8), -1 }, /* 33 */ { NA_BGM_GAME_OVER, AUDIOSPEC_25 | (SFXCHAN_0 << 8), -1 }, /* 34 */ { NA_BGM_TRAINING, AUDIOSPEC_28 | (SFXCHAN_0 << 8), -1 }, /* 35 */ { NA_BGM_BATTLE, AUDIOSPEC_16 | (SFXCHAN_3 << 8), -1 }, @@ -618,7 +618,7 @@ void Audio_LoadInstruments(void) { } void Audio_LoadAquasSequence(void) { - if (sAudioSpecId == AUDIOSPEC_12) { + if (sAudioSpecId == AUDIOSPEC_AQ) { AUDIOCMD_GLOBAL_SYNC_LOAD_SEQ_PARTS(NA_BGM_STAGE_AQ, 0); } } @@ -2714,7 +2714,7 @@ void Audio_RestartSeqPlayers(void) { u16 fadeIn = 1; Audio_StartSequence(SEQ_PLAYER_VOICE, NA_BGM_VO, -1, 1); - if (sAudioSpecId == AUDIOSPEC_12) { + if (sAudioSpecId == AUDIOSPEC_AQ) { fadeIn = 360; } else if (sAudioSpecId < AUDIOSPEC_23) { fadeIn = 90; diff --git a/src/audio/audio_load.c b/src/audio/audio_load.c index 7b5a2216..b8d5d6b1 100644 --- a/src/audio/audio_load.c +++ b/src/audio/audio_load.c @@ -946,7 +946,7 @@ void AudioLoad_Init(void) { } } - gAudioSpecId = AUDIOSPEC_0; + gAudioSpecId = AUDIOSPEC_CO; gAudioResetStep = 1; AudioHeap_ResetStep(); diff --git a/src/audio/audio_thread.c b/src/audio/audio_thread.c index dfa3cfe1..14e07fd2 100644 --- a/src/audio/audio_thread.c +++ b/src/audio/audio_thread.c @@ -432,7 +432,7 @@ void AudioThread_ResetAudioHeap(s32 specId) { void AudioThread_PreNMIReset(void) { gAudioResetTimer = 1; - AudioThread_ResetAudioHeap(AUDIOSPEC_0); + AudioThread_ResetAudioHeap(AUDIOSPEC_CO); gAudioResetStep = 0; } diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index d1be5ea4..a283479b 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -2223,7 +2223,7 @@ void ActorAllRange_Update(ActorAllRange* this) { ActorAllRange_ApplyDamage(this); radarMark = &gRadarMarks[this->index]; - radarMark->status = 1; + radarMark->enabled = true; if (this->aiType == AI360_MISSILE) { radarMark->type = 100; diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index adb02894..ffe9c215 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -1306,7 +1306,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { gDPSetEnvColor(gMasterDisp++, 0, 128, 255, 255); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } else { Matrix_Scale(gGfxMatrix, shot->scale, shot->scale, shot->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -1422,7 +1422,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 32, 32, 0, shot->unk_58); gDPSetEnvColor(gMasterDisp++, 32, 16, 16, shot->unk_58); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } else if (shot->unk_5C == 0) { if (shot->scale > 1.5f) { break; @@ -1457,10 +1457,10 @@ void PlayerShot_DrawShot(PlayerShot* shot) { } Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_Pop(&gGfxMatrix); if (((gGameFrameCount % 2) == 0)) { Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.7f, MTXF_APPLY); @@ -1468,7 +1468,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.3f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_29); gSPDisplayList(gMasterDisp++, D_10231A0); @@ -1487,7 +1487,7 @@ void PlayerShot_DrawShot(PlayerShot* shot) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); gDPSetEnvColor(gMasterDisp++, 255, 128, 128, 255); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } break; case PLAYERSHOT_GFOX_LASER: diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 09669d29..4b623be9 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -45,12 +45,16 @@ u16 gStarColors[16] = { 0x294B, 0x18DF, 0x294B, 0x1085, 0x39FF, 0x108B, 0x18CD, 0x108B, }; Gfx* sSunDLs[13] = { - D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_BG_PLANET_20112C0, D_102A8A0, - D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_BG_PLANET_20112C0, D_102A8A0, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, D_BG_PLANET_20112C0, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, D_BG_PLANET_20112C0, + aRadarMarkKaSaucererDL, }; Gfx* sKaSunDLs[13] = { - D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, - D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, aRadarMarkKaSaucererDL, + aRadarMarkKaSaucererDL, }; f32 sSunShifts[13] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, 13.0f, 20.0f, 35.0f, 40.0f, 50.0f, 50.0f, 70.0f, diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index cfe7acf3..7396c973 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -18,6 +18,11 @@ LevelMode gLevelMode; DrawMode gDrawMode; s32 gPlayerNum; s32 gCamCount; +/** + * gTeamShields[1] = Falco + * gTeamShields[2] = Slippy + * gTeamShields[3] = Peppy + */ s32 gTeamShields[6]; s32 gSavedTeamShields[6]; s32 gPrevPlanetSavedTeamShields[6]; @@ -46,6 +51,11 @@ s32 gTitleState; s32 gMainController; s32 gMapState; s32 gMissionNumber; +/** + * 0x 00 FF 00 00 Peppy + * 0x 00 00 FF 00 Slippy + * 0x 00 00 00 FF Falco + */ s32 gMissionTeamStatus[7]; s32 gMissionHitCount[7]; PlanetId gMissionPlanet[7]; @@ -351,8 +361,8 @@ s32 gLeftWingDebrisTimer[4]; s32 gBombCount[4]; s32 gVsPoints[4]; s32 gVsKills[4][10]; -s32 gVsMatchOver; -s32 gVsMatchStart; +s32 gVsMatchWon; +bool gVsMatchStart; bool gChangeTo360; Vec3f gTeamArrowsViewPos[10]; f32 D_ctx_80177F20[65]; // Seem to be an early implementation of RadarMark diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index aeaa775c..224c0e8e 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -167,11 +167,11 @@ void Cutscene_WarpZoneComplete(Player* player) { break; case 200: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 400: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 420: @@ -623,7 +623,7 @@ void Cutscene_LevelStart(Player* player) { break; case LEVEL_AQUAS: - HUD_AquasStart(player); + Aquas_CsLevelStart(player); break; case LEVEL_AREA_6: @@ -1251,11 +1251,11 @@ void Cutscene_CoComplete2(Player* player) { switch (gCsFrameCount) { case 961: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1161: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1255: @@ -1389,7 +1389,7 @@ void Cutscene_LevelComplete(Player* player) { case FORM_BLUE_MARINE: if (gCurrentLevel == LEVEL_AQUAS) { - HUD_AquasComplete(player); + Aquas_CsLevelComplete(player); } break; } @@ -2301,7 +2301,7 @@ void func_demo_8004F798(ActorCutscene* this) { void ActorCutscene_Update(ActorCutscene* this) { if (gCurrentLevel == LEVEL_AQUAS) { - func_hud_80093164(this); + Aquas_CsIntroActors_Update(this); return; } @@ -2499,7 +2499,7 @@ void func_demo_8004FCB8(ActorCutscene* this, s32 arg1) { Matrix_RotateY(gGfxMatrix, angle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } } @@ -2565,7 +2565,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->iwork[0]); gDPSetEnvColor(gMasterDisp++, 255, 255, 00, this->iwork[0]); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 20: @@ -2764,7 +2764,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { 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); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 38: @@ -2794,7 +2794,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { Matrix_RotateX(gGfxMatrix, -x, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Math_SmoothStepToF(&this->fwork[0], 0.0f, 0.1f, 0.2f, 0.05f); } @@ -2826,7 +2826,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { Matrix_RotateX(gGfxMatrix, -x, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Math_SmoothStepToF(&this->fwork[6], 0.00f, 0.1f, 0.6f, 0); } break; @@ -2856,7 +2856,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { Matrix_Scale(gGfxMatrix, this->fwork[0], this->fwork[0], this->fwork[0], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); if (this->iwork[0] != 0) { this->iwork[0] -= 7; @@ -2899,11 +2899,11 @@ void Cutscene_DrawGreatFox(void) { PRINTF("d Enm->wrk0 %d\n"); if (gGameState == GSTATE_TITLE) { - dList = D_TITLE_60320E0; + dList = aTitleArwingEngineGlowDL; } else if (gGameState == GSTATE_ENDING) { dList = D_END_7010970; } else { - dList = D_1024AC0; + dList = aOrbDL; } if (gCurrentLevel == LEVEL_TITANIA) { diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 91014a98..77927cd2 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -333,8 +333,8 @@ void Display_Landmaster(Player* player) { Matrix_Pop(&gGfxMatrix); } -Gfx* D_display_800CA26C[] = { D_arwing_3000090, D_arwing_3016CC0, D_arwing_3005AB0, D_arwing_3003CE0 }; -Gfx* D_display_800CA27C[] = { D_arwing_3001C90, D_arwing_3016CC0, D_arwing_3005AB0, D_arwing_3003CE0 }; +Gfx* sFaceDL[] = { aAwFoxHeadDL, aAwFalcoHeadDL, aAwSlippyHeadDL, aAwPeppyHeadDL }; +Gfx* sExpertFaceDL[] = { aAwJamesHeadDL, aAwFalcoHeadDL, aAwSlippyHeadDL, aAwPeppyHeadDL }; f32 D_display_800CA28C = 2.0f; f32 D_display_800CA290 = 13.0f; f32 D_display_800CA294 = -10.0f; @@ -361,7 +361,7 @@ void Display_LandmasterMuzzleFlash(Player* player) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 0, 255, 0, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } Matrix_Pop(&gGfxMatrix); @@ -463,7 +463,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos *gfxPtr = NULL; } if (arwing->rightWingState == WINGSTATE_BROKEN) { - *gfxPtr = D_arwing_3015120; + *gfxPtr = aAwLeftWingBrokenDL; } if (D_display_800CA22C && ((gRightWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); @@ -497,7 +497,7 @@ bool Display_ArwingWingsOverrideLimbDraw(s32 limbIndex, Gfx** gfxPtr, Vec3f* pos *gfxPtr = NULL; } if (arwing->leftWingState == WINGSTATE_BROKEN) { - *gfxPtr = D_arwing_3014BF0; + *gfxPtr = aAwRightWingBrokenDL; } if (D_display_800CA22C && ((gLeftWingFlashTimer[0] % 2) != 0)) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); @@ -595,20 +595,23 @@ void Display_ArwingWings(ArwingInfo* arwing) { Matrix_RotateY(gGfxMatrix, arwing->teamFaceYrot * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, arwing->teamFaceXrot * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f / 70.925f, 1.0f / 70.925f, 1.0f / 70.925f, MTXF_APPLY); + if (gGameState == GSTATE_ENDING) { Matrix_Scale(gGfxMatrix, 0.95f, 0.95f, 0.95f, MTXF_APPLY); } + Matrix_SetGfxMtx(&gMasterDisp); + if (gExpertMode) { - gSPDisplayList(gMasterDisp++, D_display_800CA27C[drawFace - 1]); + gSPDisplayList(gMasterDisp++, sExpertFaceDL[drawFace - 1]); } else { - gSPDisplayList(gMasterDisp++, D_display_800CA26C[drawFace - 1]); + gSPDisplayList(gMasterDisp++, sFaceDL[drawFace - 1]); } Matrix_Pop(&gGfxMatrix); } Matrix_Translate(gGfxMatrix, 0.0f, 17.2f, -25.8f, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, arwing->windshieldXrot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, arwing->cockpitGlassXrot * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64_2(); @@ -674,7 +677,7 @@ void Display_Arwing(Player* player, s32 reflectY) { Matrix_Translate(gGfxMatrix, 0.0f, -8.0f, 5.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_arwing_30131F0); + gSPDisplayList(gMasterDisp++, aAwCockpitViewDL); Matrix_Pop(&gGfxMatrix); } } else { @@ -808,7 +811,7 @@ void Display_PlayerShadow_Draw(Player* player) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Pop(&gGfxMatrix); break; @@ -833,7 +836,7 @@ void Display_DrawEngineGlow(EngineGlowColor color) { gDPSetEnvColor(gMasterDisp++, 255, 64, 0, 255); break; } - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } void Display_LandmasterEngineGlow_Draw(Player* player) { @@ -927,8 +930,8 @@ void Display_UnusedShield(Player* player) { gDPSetEnvColor(gMasterDisp++, 255, 0, 255, (s32) gShieldAlpha[player->num]); gSPDisplayList(gMasterDisp++, aUnusedShieldDL); Matrix_Pop(&gGfxMatrix); - Texture_Scroll(aUnusedShieldTex, 32, 32, 3); - Texture_Scroll(aUnusedShieldTex, 32, 32, 3); + Lib_Texture_Scroll(aUnusedShieldTex, 32, 32, 3); + Lib_Texture_Scroll(aUnusedShieldTex, 32, 32, 3); } } @@ -990,10 +993,10 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_Pop(&gGfxMatrix); if (player->alternateView && (gLevelMode == LEVELMODE_ON_RAILS)) { @@ -1008,7 +1011,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } @@ -1039,7 +1042,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); break; @@ -1060,7 +1063,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1068,7 +1071,7 @@ void Display_ArwingLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, gMuzzleFlashScale[player->num], gMuzzleFlashScale[player->num], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); break; @@ -1119,11 +1122,11 @@ void Display_LandmasterLaserCharge(Player* player) { Matrix_RotateZ(gGfxMatrix, gGameFrameCount * 53.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_RotateZ(gGfxMatrix, gGameFrameCount * -53.0f * 2.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_Pop(&gGfxMatrix); Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 1.0f, MTXF_APPLY); @@ -1134,7 +1137,7 @@ void Display_LandmasterLaserCharge(Player* player) { Matrix_Scale(gGfxMatrix, 1.3f, 1.3f, 1.0f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } } @@ -1243,7 +1246,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); Matrix_Pop(&gGfxMatrix); } if (player->arwing.rightWingState == WINGSTATE_INTACT) { @@ -1256,7 +1259,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); Matrix_Pop(&gGfxMatrix); } } @@ -1712,7 +1715,9 @@ void Display_Update(void) { tempVec.x = camPlayer->cam.eye.x - camPlayer->pos.x; tempVec.y = camPlayer->cam.eye.y - camPlayer->pos.y; tempVec.z = camPlayer->cam.eye.z - (camPlayer->trueZpos + camPlayer->zPath); + Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayCamEye); + gPlayCamEye.x += camPlayer->pos.x; gPlayCamEye.y += camPlayer->pos.y; gPlayCamEye.z += camPlayer->trueZpos + camPlayer->zPath; @@ -1720,7 +1725,9 @@ void Display_Update(void) { tempVec.x = camPlayer->cam.at.x - camPlayer->pos.x; tempVec.y = camPlayer->cam.at.y - camPlayer->pos.y; tempVec.z = camPlayer->cam.at.z - (camPlayer->trueZpos + camPlayer->zPath); + Matrix_MultVec3f(gCalcMatrix, &tempVec, &gPlayCamAt); + gPlayCamAt.x += camPlayer->pos.x; gPlayCamAt.y += camPlayer->pos.y; gPlayCamAt.z += camPlayer->trueZpos + camPlayer->zPath; @@ -1900,7 +1907,7 @@ void Display_Update(void) { if ((gCamCount != 1) && ((camPlayer->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (camPlayer->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { HUD_Draw(); - HUD_DrawEdgeArrows(); + HUD_EdgeArrows_Update(); } Matrix_Pop(&gGfxMatrix); Display_DrawHelpAlert(); diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index a5dc6c08..cad96ccd 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -424,7 +424,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_BOSS_SX_SPYBORG_RIGHT_ARM */ {(void*) SectorX_SxSpyborgRightArm_Draw, 2, (ObjectFunc) SectorX_SxSpyborgRightArm_Update, aSxSpyborgRightArmHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 10 }, /* OBJ_BOSS_TI_GORAS */ {(void*) Titania_TiGoras_Draw, 1, (ObjectFunc) Titania_TiGoras_Update, aTiGorasHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_ZO_SARUMARINE */ {(void*) Zoness_ZoSarumarine_Draw, 2, (ObjectFunc) Zoness_ZoSarumarine_Update, aZoSarumarineHitbox, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, - /* OBJ_BOSS_FO_BASE */ {(void*) HUD_FoBase_Draw, 1, (ObjectFunc) HUD_FoBase_Update, aFoBaseHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_FO_BASE */ {(void*) FoBase_Draw, 1, (ObjectFunc) FoBase_Update, aFoBaseHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_BO_BASE */ {(void*) BoBase_Draw, 1, (ObjectFunc) BoBase_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_BO_BASE_SHIELD */ {(void*) BoBaseShield_Draw, 1, (ObjectFunc) BoBaseShield_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_BO_BASE_CORE */ {(void*) Bolse_BoBaseCore_Draw, 2, (ObjectFunc) Bolse_BoBaseCore_Update, aBoBaseCoreHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, @@ -479,7 +479,7 @@ ObjectInfo gObjectInfo[] = { /* 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_363 */ {(void*) Aquas_Effect363_Draw, 1, (ObjectFunc) Aquas_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 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index ded922f6..0fc75bd5 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -252,23 +252,23 @@ void ActorDebris_Draw(ActorDebris* this) { Matrix_Translate(gGfxMatrix, 18.0f, 15.0f, -15.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_arwing_3016660); + gSPDisplayList(gMasterDisp++, aAwLeftWingDL); break; case 1: Matrix_Translate(gGfxMatrix, -18.0f, 15.0f, -15.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_arwing_3015D80); + gSPDisplayList(gMasterDisp++, aAwRightWingDL); break; case 2: Graphics_SetScaleMtx(this->scale); - gSPDisplayList(gMasterDisp++, D_arwing_30155E0); + gSPDisplayList(gMasterDisp++, aAwFlap1DL); break; case 3: - gSPDisplayList(gMasterDisp++, D_arwing_3011720); + gSPDisplayList(gMasterDisp++, aAwLaserGun1DL); break; case 4: @@ -509,7 +509,7 @@ void Actor_DrawEngineAndContrails(Actor* this) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -70.0f, -10.0f, -100.0f, MTXF_APPLY); @@ -518,7 +518,7 @@ void Actor_DrawEngineAndContrails(Actor* this) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * sp54, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); Matrix_Pop(&gGfxMatrix); } } @@ -581,7 +581,7 @@ void ActorTeamArwing_Draw(ActorTeamArwing* this) { gActorTeamArwing.bottomRightFlapYrot = this->fwork[26]; gActorTeamArwing.bottomLeftFlapYrot = this->fwork[27]; gActorTeamArwing.laserGunsYpos = gActorTeamArwing.laserGunsXpos = gActorTeamArwing.wingsXrot = - gActorTeamArwing.wingsYrot = gActorTeamArwing.windshieldXrot = gActorTeamArwing.wingsZrot = 0.0f; + gActorTeamArwing.wingsYrot = gActorTeamArwing.cockpitGlassXrot = gActorTeamArwing.wingsZrot = 0.0f; gActorTeamArwing.unk_28 = this->fwork[17]; gActorTeamArwing.drawFace = this->iwork[14]; gActorTeamArwing.teamFaceXrot = this->fwork[20]; @@ -680,7 +680,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, 1.2f, 0.0f, 1.2f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); } RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; @@ -704,7 +704,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, temp_fv0, temp_fv0, temp_fv0, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; default: @@ -731,7 +731,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { } Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Graphics_SetScaleMtx(150.0f); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); break; case OBJ_BOSS_CO_CARRIER: @@ -778,7 +778,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, gActors[index].scale, 1.0f, gActors[index].scale, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case OBJ_ACTOR_TI_DESERT_CRAWLER: @@ -793,7 +793,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, 6.0f, 1.0f, 7.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case OBJ_ACTOR_TI_BOMB: @@ -806,7 +806,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.2f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -M_PI / 2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case OBJ_ACTOR_MA_BOULDER: @@ -815,7 +815,7 @@ void Object_SetShadowDL(ObjectId objId, s32 index) { gDPSetEnvColor(gMasterDisp++, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 4.0f, 4.0f, 4.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case OBJ_BOSS_VE1_GOLEMECH: diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index d4a89a61..4133d968 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -288,7 +288,7 @@ void Effect_Effect384_Draw(Effect384* this) { break; } - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -298,7 +298,7 @@ void Effect_Effect385_Draw(Effect385* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_38); gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 192, 255, this->unk_44); gDPSetEnvColor(gMasterDisp++, 0, 0, 0, this->unk_44); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -372,7 +372,7 @@ void Effect_Effect347_Draw(Effect347* this) { void Effect_Effect351_Draw(Effect351* this) { Graphics_SetScaleMtx(this->scale2); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->unk_4A); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); } void Effect_Clouds_Draw(EffectClouds* this) { @@ -442,7 +442,7 @@ void Effect_Effect346_Draw(Effect346* this) { tmp = temp_ft3 * 4.0f; gDPSetEnvColor(gMasterDisp++, D_800D173C[tmp + 0], D_800D173C[tmp + 1], D_800D173C[tmp + 2], 255); Graphics_SetScaleMtx(this->scale2); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } @@ -561,7 +561,7 @@ void Effect_Effect393_Draw(Effect393* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 255, 0, 255); Graphics_SetScaleMtx(this->scale2 * this->scale1); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -774,7 +774,7 @@ void Effect_Effect357_Draw(Effect357* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 80, 0, 255); Graphics_SetScaleMtx(this->scale1); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 11: @@ -878,7 +878,7 @@ void Effect_Effect357_Draw(Effect357* this) { } void Effect_Effect383_Update(Effect383* this) { - Texture_Scroll(D_10190C0, 16, 32, 0); + Lib_Texture_Scroll(D_10190C0, 16, 32, 0); gGroundClipMode = 2; this->obj.rot.y += 1.0f; Math_SmoothStepToF(&this->scale2, this->scale1, 0.05f, 1.5f, 0.001f); @@ -3097,7 +3097,7 @@ void Effect_Effect398_Draw(Effect398* this) { Matrix_RotateZ(gGfxMatrix, 30.0f * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 1.5f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; } } @@ -3319,7 +3319,7 @@ void Effect_Effect394_Draw(Effect394* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 190, 255); gDPSetEnvColor(gMasterDisp++, 239, 15, 0, 255); Graphics_SetScaleMtx(this->scale2); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; } } @@ -3894,14 +3894,14 @@ void Effect_Effect395_Draw(Effect395* this) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_41); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Graphics_SetScaleMtx(this->scale2); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); break; case 2: @@ -3910,7 +3910,7 @@ void Effect_Effect395_Draw(Effect395* this) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 32, 32, 255, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 3: @@ -3954,7 +3954,7 @@ void Effect_Effect395_Draw(Effect395* this) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 128, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 9: @@ -3963,12 +3963,12 @@ void Effect_Effect395_Draw(Effect395* this) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 128, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 10: if (gPlayState != PLAY_PAUSE) { - Texture_Scroll(D_A6_6012840, 16, 16, 0); + Lib_Texture_Scroll(D_A6_6012840, 16, 16, 0); } RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Scale(gGfxMatrix, this->unk_60.x, this->unk_60.y, this->unk_60.z, MTXF_APPLY); @@ -3982,7 +3982,7 @@ void Effect_Effect395_Draw(Effect395* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 111, 111, 111, (s32) this->scale1); gDPSetEnvColor(gMasterDisp++, 255, 255, 255, 255); Graphics_SetScaleMtx(this->scale2); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); break; case 12: @@ -4234,6 +4234,6 @@ void Effect_Effect399_Draw(Effect399* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1950[this->unk_44]); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); } - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index cafc06d7..431df8af 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -2131,7 +2131,7 @@ void ActorSupplies_Update(ActorSupplies* this) { Object_Kill(&this->obj, this->sfxSource); } } - gRadarMarks[63].status = 1; + gRadarMarks[63].enabled = true; gRadarMarks[63].type = 103; gRadarMarks[63].pos.x = this->obj.pos.x; gRadarMarks[63].pos.y = this->obj.pos.y; diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index e35f7a0a..b1847580 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -109,7 +109,7 @@ void CoWaterfall_Update(CoWaterfall* this) { Vec3f sp24; Vec3f sp18; - Texture_Scroll(D_CO_60038F8, 32, 32, 1); + Lib_Texture_Scroll(D_CO_60038F8, 32, 32, 1); if ((gGameFrameCount % 4) == 0) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 6cd74a2f..81ed9d83 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -376,11 +376,11 @@ void Game_Update(void) { case GSTATE_SHOW_LOGO: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); gGameState++; break; @@ -400,11 +400,11 @@ void Game_Update(void) { case GSTATE_LOGO_WAIT: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 0], 128, 16, 100.0f, 86.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 1], 128, 16, 100.0f, 102.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 2], 128, 16, 100.0f, 118.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 3], 128, 16, 100.0f, 134.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, &gNintendoLogo[128 * 16 * 4], 128, 10, 100.0f, 150.0f, 1.0f, 1.0f); break; case GSTATE_START: @@ -556,7 +556,7 @@ void Game_Update(void) { gDPFillRectangle(gMasterDisp++, SCREEN_MARGIN, SCREEN_HEIGHT / 2 - 1 - 1, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2 + 1); - HUD_dummy_8008CB8C(); + HUD_8008CB8C(); } partialFill = false; @@ -568,7 +568,7 @@ void Game_Update(void) { Radio_Draw(); if (gShowHud) { HUD_Draw(); - HUD_DrawEdgeArrows(); + HUD_EdgeArrows_Update(); } HUD_DrawBossHealth(); } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index 8d1dec54..f94ab410 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -1,13 +1,6 @@ #include "sf64math.h" +#include "fox_hud.h" #include "prevent_bss_reordering.h" -typedef struct { - /* 0x00 */ u8* unk_00; - /* 0x04 */ s32 width; - /* 0x08 */ s32 height; - /* 0x0C */ u8* unk_0C; - /* 0x10 */ s32 unk_10; - /* 0x14 */ s32 unk_14; -} UnkStruct_D_800D1AEC; Vec3f D_801616A0; Vec3f D_801616B0; @@ -37,8 +30,8 @@ f32 D_80161778; f32 D_8016177C; f32 D_80161780; f32 D_80161784; -s32 D_80161788; -s32 D_8016178C; +s32 D_80161788; // Looks like a timer related to RadioDamage +s32 D_8016178C; // Looks like a timer related to RadioDamage s32 D_80161790; s32 D_80161794; s32 D_80161798; @@ -52,10 +45,10 @@ s32 gMedalStatus; s32 gMedalFlashTimer; s32 D_801617C0[10]; s32 D_801617E8[10]; -s32 D_80161810[10]; -s32 D_80161838[10]; -s32 D_80161860[20]; -f32 D_801618B0[20]; +s32 sPauseScreenIwork[10]; +s32 sPauseScreenTimer[10]; +s32 sGoldRingsIwork[20]; +f32 sGoldRingsFwork[20]; s32 D_80161900[20]; #include "global.h" @@ -88,7 +81,7 @@ s32 D_80161900[20]; #include "assets/ast_allies.h" #include "assets/ast_star_wolf.h" -void func_hud_80087788(void); +void HUD_TeammateStatus_Draw(void); s16 D_hud_800D1970 = 0; @@ -104,9 +97,9 @@ f32 D_800D19E0[] = { 1.0f, 1.0f, 1.0f, 1.0f }; f32 D_800D19F0 = 0.0f; -s32 D_800D19F4 = 0; +s32 sHudBombCount = 0; -s32 D_800D19F8 = 0; +BombCounterStates sBombCounterState = BOMB_COUNTER_INIT; s32 D_800D19FC = 0; @@ -117,90 +110,88 @@ Vtx D_800D1A00[] = { { 10, -10, 0, 0, 0, 0, 255, 255, 255, 255 }, }; -Gfx D_800D1A40[] = { +Gfx sRadioDamageDL[] = { gsSPVertex(D_800D1A00, 4, 0), gsSP1Quadrangle(1, 2, 3, 0, 0), gsSPEndDisplayList(), }; -void func_hud_80084930(f32 arg0, f32 arg1, s32 arg2) { - u8* D_800D1A58[] = { - D_arwing_3000000, - D_blue_marine_3000000, - D_landmaster_3000000, - }; - u16* D_800D1A64[] = { - D_arwing_3000080, - D_blue_marine_3000080, - D_landmaster_3000080, - }; +// Used in the status screen, and when losing a life +void HUD_LivesCount1_Draw(f32 xPos, f32 yPos, s32 lifeCount) { + u8* sLifeIconTex[] = { aArwingLifeIconTex, aBlueMarineLifeIconTex, aLandmasterLifeIconTex }; + u16* sLifeIconTLUT[] = { aArwingLifeIconTLUT, aBlueMarineLifeIconTLUT, aLandmasterLifeIconTLUT }; Player* player; - s32 var_t0; - s32 var_v0; - s32 i; + s32 lifeIconIdx; + s32 maxLives; + s32 digits; RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - player = gPlayer; - var_t0 = 0; + player = &gPlayer[0]; + lifeIconIdx = 0; // default switch (player->form) { case FORM_ARWING: - var_t0 = 0; + lifeIconIdx = 0; break; case FORM_LANDMASTER: - var_t0 = 1; + lifeIconIdx = 1; break; case FORM_BLUE_MARINE: - var_t0 = 2; + lifeIconIdx = 2; break; } - TextureRect_CI4(&gMasterDisp, D_800D1A58[var_t0], D_800D1A64[var_t0], 16, 16, arg0, arg1 - 2.0f, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, arg0 + 16.0f, arg1 + 7.0f, 1.0f, 1.0f); + // Draw Icon + Lib_TextureRect_CI4(&gMasterDisp, sLifeIconTex[lifeIconIdx], sLifeIconTLUT[lifeIconIdx], 16, 16, xPos, yPos - 2.0f, + 1.0f, 1.0f); + // Draw X + Lib_TextureRect_CI4(&gMasterDisp, aXTex, aXTLUT, 16, 7, xPos + 16.0f, yPos + 7.0f, 1.0f, 1.0f); - if (arg2 >= 0) { - arg0 += 11.0f; - arg1 -= 1.0f; + if (lifeCount >= 0) { + xPos += 11.0f; + yPos -= 1.0f; RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - var_v0 = 10; - - if (arg2 < 0) { - arg2 = 0; + if (lifeCount < 0) { + lifeCount = 0; } - if (arg2 > 99) { - arg2 = 99; + if (lifeCount > 99) { + lifeCount = 99; } - for (var_v0 = 10, i = 1; arg2 >= var_v0; i++) { - var_v0 *= 10; + // Count digits + for (maxLives = 10, digits = 1; lifeCount >= maxLives; digits++) { + maxLives *= 10; } - arg0 += 16.0f + 8 * (2 - i); - func_hud_800869A0(arg0, arg1, arg2, 1.0f, 1, 99); + xPos += 16.0f + 8 * (2 - digits); + HUD_Number_Draw(xPos, yPos, lifeCount, 1.0f, true, 99); } } -void func_hud_80084B94(s32 arg0) { +// Wrench drawn on top of teammates when they're down +void HUD_TeamDownWrench_Draw(s32 arg0) { s32 i; - Vec3f D_800D1A70[] = { + Vec3f sTeamDownWrenchPos[] = { { 191.0f, -129.0f, -600.0f }, { 0.0f, -129.0f, -600.0f }, { -191.0f, -129.0f, -600.0f }, }; RCP_SetupDL(&gMasterDisp, SETUPDL_36); + if (arg0 == 0) { for (i = 1; i < 4; i++) { if (((gTeamShields[i] != 0) || (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gTeamShields[i] <= 0) && (gTeamShields[i] != -2)) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_800D1A70[i - 1].x, D_800D1A70[i - 1].y, D_800D1A70[i - 1].z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTeamDownWrenchPos[i - 1].x, sTeamDownWrenchPos[i - 1].y, + sTeamDownWrenchPos[i - 1].z, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.68f, 0.68f, 1.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_PI / 4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -225,7 +216,7 @@ void func_hud_80084B94(s32 arg0) { } } -void func_hud_80084E78(Gfx** gfxP, u8* texture, u16* palette, u32 tWidth, u32 tHeight, f32 xPos, f32 yPos, f32 xScale, +void TextureRect_CI8_2(Gfx** gfxP, u8* texture, u16* palette, u32 tWidth, u32 tHeight, f32 xPos, f32 yPos, f32 xScale, f32 yScale, f32 xWidth, f32 yWidth) { gDPPipeSync((*gfxP)++); gDPLoadTLUT((*gfxP)++, 256, 256, palette); @@ -236,73 +227,83 @@ void func_hud_80084E78(Gfx** gfxP, u8* texture, u16* palette, u32 tWidth, u32 tH (s32) (1 / xScale * (32 * 32)), (s32) (1 / yScale * (32 * 32))); } -void func_hud_800853A4(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); +void HUD_MsgWindowBg_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_CI8(&gMasterDisp, aMsgWindowBgTex, aMsgWindowBgTLUT, 24, 17, xPos, yPos, xScale, yScale); } -void func_hud_80085404(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_CI4(&gMasterDisp, D_1011280, D_10116A0, 48, 44, xPos, yPos, xScale, yScale); +void HUD_RadarWindowFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_CI4(&gMasterDisp, aRadarFrameTex, aRadarFrameTLUT, 48, 44, xPos, yPos, xScale, yScale); } -void func_hud_80085464(f32 arg0, f32 arg1) { - TextureRect_CI4(&gMasterDisp, D_1011AC0, D_1011B90, 16, 26, arg0, arg1, 1.0f, 1.0f); +void HUD_IncomingMsgButton_Draw(f32 xPos, f32 yPos) { + Lib_TextureRect_CI4(&gMasterDisp, aIncomingMsgButtonTex, aIncomingMsgButtonTLUT, 16, 26, xPos, yPos, 1.0f, 1.0f); } -void func_hud_800854BC(f32 arg0, f32 arg1) { - TextureRect_CI4(&gMasterDisp, D_1011BB0, D_1011C80, 16, 26, arg0, arg1, 1.0f, 1.0f); +void HUD_IncomingMsgSignal1_Draw(f32 xPos, f32 yPos) { + Lib_TextureRect_CI4(&gMasterDisp, aIncomingMsgSignal1Tex, aIncomingMsgSignal1TLUT, 16, 26, xPos, yPos, 1.0f, 1.0f); } -void func_hud_80085514(f32 arg0, f32 arg1) { - TextureRect_CI4(&gMasterDisp, D_1011CA0, D_1011D70, 16, 26, arg0, arg1, 1.0f, 1.0f); +void HUD_IncomingMsgSignal2_Draw(f32 xPos, f32 yPos) { + Lib_TextureRect_CI4(&gMasterDisp, aIncomingMsgSignal2Tex, aIncomingMsgSignal2TLUT, 16, 26, xPos, yPos, 1.0f, 1.0f); } -void func_hud_8008556C(f32 arg0, f32 arg1) { - TextureRect_CI4(&gMasterDisp, D_1011D90, D_1011E60, 16, 26, arg0, arg1, 1.0f, 1.0f); +void HUD_IncomingMsgSignal3_Draw(f32 xPos, f32 yPos) { + Lib_TextureRect_CI4(&gMasterDisp, aIncomingMsgSignal3Tex, aIncomingMsgSignal3TLUT, 16, 26, xPos, yPos, 1.0f, 1.0f); } -void func_hud_800855C4(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_IA8_MirX(&gMasterDisp, D_1002280, 8, 12, arg0, arg1, arg2, arg3); +// Right part of the Player shield gauge frame +void HUD_ShieldGaugeEdgeRight_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_IA8_MirX(&gMasterDisp, aShieldGaugeFrameEdgeTex, 8, 12, xPos, yPos, xScale, yScale); } -void func_hud_80085618(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_IA8(&gMasterDisp, D_1002280, 8, 12, arg0, arg1, arg2, arg3); +// Left part of the Player shield gauge frame +void HUD_ShieldGaugeEdgeLeft_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_IA8(&gMasterDisp, aShieldGaugeFrameEdgeTex, 8, 12, xPos, yPos, xScale, yScale); } -void func_hud_8008566C(f32 x, f32 y, f32 arg2, f32 arg3) { - TextureRect_IA8(&gMasterDisp, D_10030D0, 8, 12, x, y, arg2, arg3); +// Top and bottom parts of the Player shield gauge frame +void HUD_ShieldGaugeFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { + Lib_TextureRect_IA8(&gMasterDisp, aShieldGaugeFrameTex, 8, 12, xPos, yPos, xScale, yScale); } -void func_hud_800856C0(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { - func_hud_80084E78(&gMasterDisp, D_1013580, D_1013700, 48, 12, arg0, arg1, arg2, arg3, 48.0f * arg4, 8.0f); +void HUD_ShieldGaugeBars_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale, f32 arg4) { + TextureRect_CI8_2(&gMasterDisp, aShieldGaugeTex, aShieldGaugeTLUT, 48, 12, xPos, yPos, xScale, yScale, 48.0f * arg4, + 8.0f); } -void func_hud_80085740(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { +void HUD_BoostGaugeFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { if (gVersusMode) { - TextureRect_IA8(&gMasterDisp, D_versus_3000B20, 32, 5, arg0, arg1, arg2, arg3); + Lib_TextureRect_IA8(&gMasterDisp, aVsBoostGaugeFrameTex, 32, 5, xPos, yPos, xScale, yScale); } else { - TextureRect_IA8(&gMasterDisp, D_1000E80, 48, 9, arg0, arg1, arg2, arg3); + Lib_TextureRect_IA8(&gMasterDisp, aBoostGaugeFrameTex, 48, 9, xPos, yPos, xScale, yScale); } } -void func_hud_800857DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { +void HUD_BoostGaugeOverheat_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { if (gVersusMode) { - TextureRect_CI8(&gMasterDisp, D_versus_300D3C0, D_versus_300D408, 24, 3, arg0, arg1, arg2, arg3); + Lib_TextureRect_CI8(&gMasterDisp, aVsBoostGaugeOverheatTex, aVsBoostGaugeOverheatTLUT, 24, 3, xPos, yPos, + xScale, yScale); } else { - TextureRect_CI8(&gMasterDisp, D_10128C0, D_1012988, 40, 5, arg0, arg1, arg2, arg3); + Lib_TextureRect_CI8(&gMasterDisp, aBoostGaugeOverheatTex, aBoostGaugeOverheatTLUT, 40, 5, xPos, yPos, xScale, + yScale); } } -void func_hud_80085890(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { +void HUD_BoostGaugeCool_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { if (gVersusMode) { - TextureRect_CI8(&gMasterDisp, D_versus_300D350, D_versus_300D398, 24, 3, arg0, arg1, arg2, arg3); + Lib_TextureRect_CI8(&gMasterDisp, aVsBoostGaugeCoolTex, aVsBoostGaugeCoolTLUT, 24, 3, xPos, yPos, xScale, + yScale); } else { - TextureRect_CI8(&gMasterDisp, D_10127D0, D_1012898, 40, 5, arg0, arg1, arg2, arg3); + Lib_TextureRect_CI8(&gMasterDisp, aBoostGaugeCoolTex, aBoostGaugeCoolTLUT, 40, 5, xPos, yPos, xScale, yScale); } } -void func_hud_80085944(void) { - Gfx* D_800D1A94[] = { D_101C170, D_101C000, D_101BE90, D_101BD20, D_101BBB0, D_101BA40, - D_101B8D0, D_101B760, D_101B5F0, D_101B480, D_101B310, D_101B1A0 }; +void HUD_GoldRings_Draw(void) { + Gfx* sGoldRingDLs[] = { + aGoldRingFrame1DL, aGoldRingFrame2DL, aGoldRingFrame3DL, aGoldRingFrame4DL, + aGoldRingFrame5DL, aGoldRingFrame6DL, aGoldRingFrame7DL, aGoldRingFrame8DL, + aGoldRingFrame9DL, aGoldRingFrame10DL, aGoldRingFrame11DL, aGoldRingFrame12DL, + }; s32 i; s32 j; f32 D_800D1AC4[] = { 0.0f, -30.0f, -26.0f, -22.0f, -18.0f }; @@ -310,14 +311,14 @@ void func_hud_80085944(void) { f32 scale; f32 x; f32 y; - s32 temp; + s32 goldRingFrameIdx; - D_801618B0[6] += 0.7f; - if (D_801618B0[6] >= 12.0f) { - D_801618B0[6] = 0.0f; + sGoldRingsFwork[6] += 0.7f; + if (sGoldRingsFwork[6] >= 12.0f) { + sGoldRingsFwork[6] = 0.0f; } - if (D_80161900[4]) { + if (D_80161900[4] != 0) { D_80161900[4]--; } @@ -336,9 +337,9 @@ void func_hud_80085944(void) { i--; - D_80161860[1 + i] = 1; + sGoldRingsIwork[1 + i] = 1; D_80161900[0 + i] = 14; - D_801618B0[2 + i] = 0.0f; + sGoldRingsFwork[2 + i] = 0.0f; if (i == 2) { D_80161900[4] = 28; @@ -349,8 +350,9 @@ void func_hud_80085944(void) { } } + // One for each gold ring slot for (i = 0; i < 3; i++) { - switch (D_80161860[i + 1]) { + switch (sGoldRingsIwork[i + 1]) { case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_62); Matrix_Push(&gGfxMatrix); @@ -369,7 +371,7 @@ void func_hud_80085944(void) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 0, 50); - gSPDisplayList(gMasterDisp++, D_1012110); + gSPDisplayList(gMasterDisp++, aGoldRingEmptySlotDL); Matrix_Pop(&gGfxMatrix); break; @@ -377,9 +379,9 @@ void func_hud_80085944(void) { case 2: if (D_80161900[i]) { if (D_80161900[i + 0] >= 7) { - D_801618B0[i + 2] += 0.15f; + sGoldRingsFwork[i + 2] += 0.15f; } else { - D_801618B0[i + 2] -= 0.15f; + sGoldRingsFwork[i + 2] -= 0.15f; } RCP_SetupDL(&gMasterDisp, SETUPDL_62); @@ -387,16 +389,17 @@ void func_hud_80085944(void) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_800D1AC4[i + 1], D_800D1AD8[i + 1], -100.0f, MTXF_NEW); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_801618B0[0], MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_801618B0[i + 2], D_801618B0[i + 2], D_801618B0[i + 2], MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sGoldRingsFwork[0], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sGoldRingsFwork[i + 2], sGoldRingsFwork[i + 2], sGoldRingsFwork[i + 2], + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); Matrix_Pop(&gGfxMatrix); } if (D_80161900[i] < 7) { - if (D_80161860[i + 1] == 2) { + if (sGoldRingsIwork[i + 1] == 2) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_36); @@ -418,12 +421,12 @@ void func_hud_80085944(void) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (D_80161860[i + 1] == 2) { + if (sGoldRingsIwork[i + 1] == 2) { gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 0, 50); - gSPDisplayList(gMasterDisp++, D_1012110); + gSPDisplayList(gMasterDisp++, aGoldRingEmptySlotDL); } else { - temp = D_801618B0[6]; - gSPDisplayList(gMasterDisp++, D_800D1A94[temp]); + goldRingFrameIdx = sGoldRingsFwork[6]; + gSPDisplayList(gMasterDisp++, sGoldRingDLs[goldRingFrameIdx]); } Matrix_Pop(&gGfxMatrix); } @@ -436,31 +439,31 @@ void func_hud_80085944(void) { if ((gGoldRingCount[1] && ((gGoldRingCount[1] % 3) == 0)) && (D_80161900[4] == 1)) { for (j = 0; j < 4; j++) { - if (D_80161860[j + 1] == 1) { - D_80161860[j + 1] = 2; + if (sGoldRingsIwork[j + 1] == 1) { + sGoldRingsIwork[j + 1] = 2; D_80161900[j + 0] = 14; - D_801618B0[j + 2] = 0.0f; + sGoldRingsFwork[j + 2] = 0.0f; D_80161900[4] = 28; } else { - D_80161860[j + 1] = 0; + sGoldRingsIwork[j + 1] = 0; D_80161900[j + 0] = 14; - D_801618B0[j + 2] = 0.0f; + sGoldRingsFwork[j + 2] = 0.0f; } } } - D_801618B0[0] += 35.0f; - D_801618B0[1] += 10.0f; + sGoldRingsFwork[0] += 35.0f; + sGoldRingsFwork[1] += 10.0f; } -void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { - f32 temp = 0.82f; +void HUD_TeamShields_Draw(f32 xPos, f32 yPos, s32 arg2) { + f32 xScale = 0.82f; s32 pad; RCP_SetupDL(&gMasterDisp, SETUPDL_75); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); if (arg2 != 0) { - func_hud_800856C0((8.0f * temp) + arg0, arg1 + 2.0f, temp, 1.0f, arg2 / 255.0f); + HUD_ShieldGaugeBars_Draw((8.0f * xScale) + xPos, yPos + 2.0f, xScale, 1.0f, arg2 / 255.0f); } if ((arg2 <= 0) && (arg2 != -2) && @@ -468,20 +471,20 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, " OK "); + Graphics_DisplaySmallText(xPos + (8.0f * xScale) + 4.0f, yPos + 2.0f, 1.0f, 1.0f, " OK "); } else { - Graphics_DisplaySmallText(arg0 + (8.0f * temp) + 4.0f, arg1 + 2.0f, 1.0f, 1.0f, "DOWN"); + Graphics_DisplaySmallText(xPos + (8.0f * xScale) + 4.0f, yPos + 2.0f, 1.0f, 1.0f, "DOWN"); } } RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_80085618(arg0, arg1, temp, 1.0f); - func_hud_800855C4(arg0 + (7.0f * temp) + (temp * 6.0f) * 8.0f, arg1, 1.0f, 1.0f); - func_hud_8008566C(arg0 + (7.0f * temp), arg1, temp * 6.0f, 1.0f); + HUD_ShieldGaugeEdgeLeft_Draw(xPos, yPos, xScale, 1.0f); + HUD_ShieldGaugeEdgeRight_Draw(xPos + (7.0f * xScale) + (xScale * 6.0f) * 8.0f, yPos, 1.0f, 1.0f); + HUD_ShieldGaugeFrame_Draw(xPos + (7.0f * xScale), yPos, xScale * 6.0f, 1.0f); } -s32 func_hud_800863C8(void) { +s32 HUD_GetLevelIndex(void) { s32 ret = 0; switch (gCurrentLevel) { @@ -542,29 +545,29 @@ s32 func_hud_800863C8(void) { return ret; } -UnkStruct_D_800D1AEC D_800D1AEC[] = { - { aLargeText_1, 16, 15, D_CO_6000000, 128, 28 }, { aLargeText_2, 16, 15, D_ME_6000000, 96, 28 }, - { aLargeText_2, 16, 15, D_SY_6000000, 176, 12 }, { aLargeText_3, 16, 15, D_FO_6000000, 168, 28 }, - { aLargeText_3, 16, 15, D_KA_6000000, 168, 28 }, { aLargeText_3, 16, 15, D_AQ_6000000, 96, 13 }, - { aLargeText_4, 16, 15, D_SX_6000000, 176, 12 }, { aLargeText_4, 16, 15, D_SO_6000000, 112, 13 }, - { aLargeText_4, 16, 15, D_ZO_6000000, 112, 28 }, { aLargeText_5, 16, 15, D_TI_6000000, 96, 28 }, - { aLargeText_5, 16, 15, D_MA_6000000, 160, 28 }, { aLargeText_5, 16, 15, D_SZ_6000000, 176, 12 }, - { aLargeText_6, 16, 15, D_BO_6000000, 168, 19 }, { aLargeText_6, 16, 15, D_A6_6000000, 104, 28 }, - { aLargeText_7, 16, 15, D_VE1_6000D80, 128, 28 }, { aLargeText_7, 16, 15, D_VE2_60012D0, 128, 28 }, - { aLargeText_7, 16, 15, D_ANDROSS_C000A80, 128, 28 }, { aLargeText_0, 16, 15, aTextTraining, 80, 12 }, +LevelTitleCard sLevelTitleCard[] = { + { aLargeText_1, 16, 15, aCoTitleCardTex, 128, 28 }, { aLargeText_2, 16, 15, aMeTitleCardTex, 96, 28 }, + { aLargeText_2, 16, 15, aSyTitleCardTex, 176, 12 }, { aLargeText_3, 16, 15, aFoTitleCardTex, 168, 28 }, + { aLargeText_3, 16, 15, aKaTitleCardTex, 168, 28 }, { aLargeText_3, 16, 15, aAqTitleCardTex, 96, 13 }, + { aLargeText_4, 16, 15, aSxTitleCardTex, 176, 12 }, { aLargeText_4, 16, 15, aSoTitleCardTex, 112, 13 }, + { aLargeText_4, 16, 15, aZoTitleCardTex, 112, 28 }, { aLargeText_5, 16, 15, aTiTitleCardTex, 96, 28 }, + { aLargeText_5, 16, 15, aMaTitleCardTex, 160, 28 }, { aLargeText_5, 16, 15, aSzTitleCardTex, 176, 12 }, + { aLargeText_6, 16, 15, aBoTitleCardTex, 168, 19 }, { aLargeText_6, 16, 15, aA6TitleCardTex, 104, 28 }, + { aLargeText_7, 16, 15, aVe1TitleCardTex, 128, 28 }, { aLargeText_7, 16, 15, aVe2TitleCardTex, 128, 28 }, + { aLargeText_7, 16, 15, aAndTitleCardTex, 128, 28 }, { aLargeText_0, 16, 15, aTrTitleCardTex, 80, 12 }, }; -void func_hud_80086444(void) { +void HUD_VenomTitleCard_Draw(void) { s32 i = 9; s32 j; - u8* D_800D1C9C[] = { D_VE1_6001B80, D_VE2_60020D0 }; - s32 D_800D1CA4[] = { 128, 104 }; - s32 D_800D1CAC[] = { 19, 19 }; - f32 D_800D1CB4[] = { 96.0f, 112.0f }; - f32 D_800D1CBC[] = { 89.0f, 89.0f }; - f32 D_800D1CC4[] = { 2.0f, 5.0f }; - f32 D_800D1CCC[] = { 1.6f, 1.6f }; + u8* sVenomTitleCardDLs[] = { D_VE1_6001B80, D_VE2_60020D0 }; + s32 sVenomTitleCardWidths[] = { 128, 104 }; + s32 D_800D1CAC[] = { 19, 19 }; // unused + f32 sVenomTitleCardHeights[] = { 96.0f, 112.0f }; + f32 sVenomTitleCardxPos[] = { 89.0f, 89.0f }; + f32 D_800D1CC4[] = { 2.0f, 5.0f }; // unused + f32 D_800D1CCC[] = { 1.6f, 1.6f }; // unused switch (gCurrentLevel) { case LEVEL_VENOM_2: @@ -584,15 +587,16 @@ void func_hud_80086444(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (j = 0; j < 19; j++) { - TextureRect_IA8(&gMasterDisp, D_800D1C9C[i] + (D_800D1CA4[i] * j), D_800D1CA4[i], 1, D_800D1CB4[i], - D_800D1CBC[i] + j - 28.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sVenomTitleCardDLs[i] + (sVenomTitleCardWidths[i] * j), + sVenomTitleCardWidths[i], 1, sVenomTitleCardHeights[i], + sVenomTitleCardxPos[i] + j - 28.0f, 1.0f, 1.0f); } } } -void func_hud_80086664(f32 x, f32 y) { +void HUD_TitleCard_Draw(f32 x, f32 y) { s32 i; - s32 j; + s32 levelIdx; f32 x0; f32 y0; f32 x1; @@ -600,7 +604,7 @@ void func_hud_80086664(f32 x, f32 y) { f32 x2; f32 y2; - j = func_hud_800863C8(); + levelIdx = HUD_GetLevelIndex(); x0 = x; y0 = y; @@ -608,11 +612,10 @@ void func_hud_80086664(f32 x, f32 y) { x1 = x0 + 72.0f; y1 = y0; - x2 = x0 - ((D_800D1AEC[j].unk_10 - 88.0f - D_800D1AEC[j].width) / 2.0f); - + x2 = x0 - (sLevelTitleCard[levelIdx].titleCardWidth - 88.0f - sLevelTitleCard[levelIdx].width) / 2.0f; y2 = y0 + 19.0f + 8.0f; - if (j == 7) { + if (levelIdx == 7) { // LEVEL_SECTOR_Z x2 += 4.0f; } @@ -655,67 +658,67 @@ void func_hud_80086664(f32 x, f32 y) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - if ((j != 14) && (j != 15)) { - TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x0 - 12.0f, y0 + 4.0f, 1.0f, 1.0f); + if ((levelIdx != 14) && (levelIdx != 15)) { // LEVEL_KATINA || LEVEL_FORTUNA + Lib_TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x0 - 12.0f, y0 + 4.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x1 + 28.0f, - y1 + 4.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLevelTitleCard[levelIdx].levelIdxTex, sLevelTitleCard[levelIdx].width, + sLevelTitleCard[levelIdx].height, x1 + 28.0f, y1 + 4.0f, 1.0f, 1.0f); } else { - func_hud_80086444(); + HUD_VenomTitleCard_Draw(); } - for (i = 0; i < D_800D1AEC[j].unk_14; i++) { - TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_0C + (D_800D1AEC[j].unk_10 * i), D_800D1AEC[j].unk_10, 1, x2, - y2 + i, 1.0f, 1.0f); + for (i = 0; i < sLevelTitleCard[levelIdx].titleCardHeight; i++) { + Lib_TextureRect_IA8(&gMasterDisp, + sLevelTitleCard[levelIdx].titleCardTex + (sLevelTitleCard[levelIdx].titleCardWidth * i), + sLevelTitleCard[levelIdx].titleCardWidth, 1, x2, y2 + i, 1.0f, 1.0f); } if ((gSavedObjectLoadIndex == 0) && (gAllRangeCheckpoint == 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING)) { - func_hud_80087788(); - func_hud_80084B94(0); + HUD_TeammateStatus_Draw(); + HUD_TeamDownWrench_Draw(0); } if (gCurrentLevel != LEVEL_TRAINING) { - func_hud_80084930(132.0f, 124.0f, gLifeCount[gPlayerNum]); + HUD_LivesCount1_Draw(132.0f, 124.0f, gLifeCount[gPlayerNum]); } } -void func_hud_800869A0(f32 arg0, f32 arg1, s32 k, f32 arg3, s32 arg4, s32 arg5) { - s32 var_s2; +void HUD_Number_Draw(f32 xPos, f32 yPos, s32 k, f32 scale, bool skipLeadingZeroes, s32 maxNumber) { + bool shouldDraw; s32 i; s32 j; - - u8* D_800D1CD4[] = { + u8* sNumber[] = { aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9, }; - if (arg4 != 0) { - var_s2 = false; + if (skipLeadingZeroes) { + shouldDraw = false; } else { - var_s2 = true; + shouldDraw = true; } - i = arg5 + 1; + i = maxNumber + 1; k %= i; for (i /= 10; i != 1; i /= 10) { j = k / i; - if ((j != 0) || (var_s2 == true)) { - TextureRect_IA8(&gMasterDisp, D_800D1CD4[j], 16, 15, arg0, arg1, arg3, arg3); - arg0 += 13.0f * arg3; + if ((j != 0) || (shouldDraw == true)) { + Lib_TextureRect_IA8(&gMasterDisp, sNumber[j], 16, 15, xPos, yPos, scale, scale); + xPos += 13.0f * scale; k %= i; - var_s2 = true; + shouldDraw = true; } } - TextureRect_IA8(&gMasterDisp, D_800D1CD4[k], 16, 15, arg0, arg1, arg3, arg3); + Lib_TextureRect_IA8(&gMasterDisp, sNumber[k], 16, 15, xPos, yPos, scale, scale); } -void func_hud_80086C08(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void HUD_MsgWindowBg_Draw2(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 128, 96); gDPSetAlphaDither(gMasterDisp++, G_AD_DISABLE); - TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, aMsgWindowBgTex, aMsgWindowBgTLUT, 24, 17, xPos, yPos, xScale, yScale); } void HUD_DrawLevelStartStatusScreen(void) { @@ -736,13 +739,13 @@ void HUD_DrawLevelStartStatusScreen(void) { sp18 = 81.0f; if (gLevelStartStatusScreenTimer != 0) { - func_hud_80086C08(temp - 4.5f - 32.0f, sp18 - 24.0f - 4.0f, 7.4f, 3.9f); + HUD_MsgWindowBg_Draw2(temp - 4.5f - 32.0f, sp18 - 24.0f - 4.0f, 7.4f, 3.9f); if (gCurrentLevel != LEVEL_TRAINING) { - func_hud_80086C08(122.0f, 122.0f, 2.9f, 1.2f); + HUD_MsgWindowBg_Draw2(122.0f, 122.0f, 2.9f, 1.2f); } - func_hud_80086664(temp, sp18 - 24.0f); + HUD_TitleCard_Draw(temp, sp18 - 24.0f); } } @@ -750,9 +753,9 @@ f32 D_800D1CFC = 0.0f; void HUD_DrawLevelClearScreen(void) { s32 i; - s32 j; - s32 temp; - bool boolTemp; + s32 levelIdx; + LevelClearScreenState levelClearState; + MissionStatus missionStatus; f32 x; f32 y; @@ -760,37 +763,36 @@ void HUD_DrawLevelClearScreen(void) { gLevelClearScreenTimer--; } - boolTemp = gMissionStatus; + missionStatus = gMissionStatus; if ((gCurrentLevel == LEVEL_TITANIA) || (gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_VENOM_1) || (gCurrentLevel == LEVEL_VENOM_2) || (gCurrentLevel == LEVEL_AREA_6) || (gCurrentLevel == LEVEL_AQUAS) || (gCurrentLevel == LEVEL_SOLAR)) { - boolTemp = true; + missionStatus = MISSION_ACCOMPLISHED; } - temp = 0; - + levelClearState = LEVEL_CLEAR_STATE_0; if (gCurrentLevel == LEVEL_AQUAS) { if (gLevelClearScreenTimer <= 100) { - temp = 5; + levelClearState = LEVEL_CLEAR_STATE_5; } if (gLevelClearScreenTimer <= 96) { - temp = 5; + levelClearState = LEVEL_CLEAR_STATE_5; } if (gLevelClearScreenTimer <= 92) { - temp = 4; + levelClearState = LEVEL_CLEAR_STATE_4; } if (gLevelClearScreenTimer <= 87) { - temp = 3; + levelClearState = LEVEL_CLEAR_STATE_3; } if (gLevelClearScreenTimer <= 82) { - temp = 2; + levelClearState = LEVEL_CLEAR_STATE_2; } if (gLevelClearScreenTimer <= 77) { - temp = 1; + levelClearState = LEVEL_CLEAR_STATE_1; } if (gLevelClearScreenTimer == 0) { - temp = 0; + levelClearState = LEVEL_CLEAR_STATE_0; } if ((gLevelClearScreenTimer == 92) || (gLevelClearScreenTimer == 87) || (gLevelClearScreenTimer == 82) || @@ -799,30 +801,30 @@ void HUD_DrawLevelClearScreen(void) { } } else { if (gLevelClearScreenTimer <= 100) { - temp = 5; + levelClearState = LEVEL_CLEAR_STATE_5; } if (gLevelClearScreenTimer <= 90) { - temp = 5; + levelClearState = LEVEL_CLEAR_STATE_5; } if (gLevelClearScreenTimer <= 80) { - temp = 4; + levelClearState = LEVEL_CLEAR_STATE_4; } if (gLevelClearScreenTimer <= 72) { - temp = 3; + levelClearState = LEVEL_CLEAR_STATE_3; } if (gLevelClearScreenTimer <= 64) { - temp = 2; + levelClearState = LEVEL_CLEAR_STATE_2; } if (gLevelClearScreenTimer <= 56) { - temp = 1; + levelClearState = LEVEL_CLEAR_STATE_1; } if (gLevelClearScreenTimer == 0) { - temp = 0; + levelClearState = LEVEL_CLEAR_STATE_0; } if ((gLevelClearScreenTimer == 80) || (gLevelClearScreenTimer == 72) || (gLevelClearScreenTimer == 64) || (gLevelClearScreenTimer == 56)) { - if (!boolTemp) { + if (missionStatus == MISSION_COMPLETE) { AUDIO_PLAY_SFX(NA_SE_MISSION_COMPLETE, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(NA_SE_MISSION_ACCOMPLISHED, gDefaultSfxSource, 4); @@ -830,7 +832,7 @@ void HUD_DrawLevelClearScreen(void) { } } - switch (temp) { + switch (levelClearState) { case 0: D_800D1CFC = 330.0f; break; @@ -851,60 +853,60 @@ void HUD_DrawLevelClearScreen(void) { break; } - j = func_hud_800863C8(); + levelIdx = HUD_GetLevelIndex(); - if (temp != 0) { + if (levelClearState != LEVEL_CLEAR_STATE_0) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); x = 98.0f; y = 64.0f; } - switch (temp) { - case 1: - if (boolTemp) { + switch (levelClearState) { + case LEVEL_CLEAR_STATE_1: + if (missionStatus != MISSION_COMPLETE) { for (i = 0; i < 11; i++) { - TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 2, x + 50.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 2, x + 50.0f, + y + 50.0f + (2 * i), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 1, x + 50.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextPLISHED + (136 * 2 * i), 136, 1, x + 50.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } else { for (i = 0; i < 10; i++) { - TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 2, x + 66.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 2, x + 66.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 1, x + 66.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextLETE + (80 * 2 * i), 80, 1, x + 66.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } - case 2: - if (boolTemp) { + case LEVEL_CLEAR_STATE_2: + if (missionStatus != MISSION_COMPLETE) { for (i = 0; i < 11; i++) { - TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 2, x - 62.0f, y + 50.0f + (2 * i), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 2, x - 62.0f, + y + 50.0f + (2 * i), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 1, x - 62.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextACCOM + (120 * 2 * i), 120, 1, x - 62.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } else { for (i = 0; i < 11; i++) { - TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 2, x - 22.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 2, x - 22.0f, y + 50.0f + (2 * i), + 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 1, x - 22.0f, y + 50.0f + (2 * i), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextCOMP + (96 * 2 * i), 96, 1, x - 22.0f, y + 50.0f + (2 * i), 1.0f, + 1.0f); } - case 3: - TextureRect_IA8(&gMasterDisp, aTextMISSION, 128, 23, x, y + 25.0f, 1.0f, 1.0f); + case LEVEL_CLEAR_STATE_3: + Lib_TextureRect_IA8(&gMasterDisp, aTextMISSION, 128, 23, x, y + 25.0f, 1.0f, 1.0f); - case 4: - TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x, y, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_00, D_800D1AEC[j].width, D_800D1AEC[j].height, x + 112.0f, - y, 1.0f, 1.0f); + case LEVEL_CLEAR_STATE_4: + Lib_TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, x, y, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLevelTitleCard[levelIdx].levelIdxTex, sLevelTitleCard[levelIdx].width, + sLevelTitleCard[levelIdx].height, x + 112.0f, y, 1.0f, 1.0f); - case 5: - func_hud_80086C08(30.0f + D_800D1CFC, 60.0f, 10.97f, 4.78f); + case LEVEL_CLEAR_STATE_5: + HUD_MsgWindowBg_Draw2(30.0f + D_800D1CFC, 60.0f, 10.97f, 4.78f); break; default: @@ -912,9 +914,10 @@ void HUD_DrawLevelClearScreen(void) { } } -void func_hud_80087530(f32 x, f32 y, s32 number) { - u8* D_800D1D00[] = { D_arwing_3000000, D_blue_marine_3000000, D_landmaster_3000000 }; - u16* D_800D1D0C[] = { D_arwing_3000080, D_blue_marine_3000080, D_landmaster_3000080 }; +// Used in gameplay hud +void HUD_LivesCount2_Draw(f32 x, f32 y, s32 number) { + u8* sLivesCounterTexs[] = { aArwingLifeIconTex, aBlueMarineLifeIconTex, aLandmasterLifeIconTex }; + u16* sLivesCounterTLUTs[] = { aArwingLifeIconTLUT, aBlueMarineLifeIconTLUT, aLandmasterLifeIconTLUT }; Player* player = &gPlayer[0]; f32 x0; f32 x1; @@ -968,19 +971,19 @@ void func_hud_80087530(f32 x, f32 y, s32 number) { } x2 += (2 - i) * 4; - TextureRect_CI4(&gMasterDisp, D_800D1D00[form], D_800D1D0C[form], 16, 16, x0, y0, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, x1, y1, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, sLivesCounterTexs[form], sLivesCounterTLUTs[form], 16, 16, x0, y0, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aXTex, aXTLUT, 16, 7, x1, y1, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplayHUDNumber(x2, y2, number); } -void func_hud_80087788(void) { - u16* D_800D1D18[] = { D_10050E0, D_100BAC0, D_100D900, D_10032A0 }; - u8* D_800D1D28[] = { aTextPeppy, aTextSlippy, aTextFalco }; +void HUD_TeammateStatus_Draw(void) { + u16* sPortraitTex[] = { aFoxPortraitTex, aPeppyPortraitTex, aSlippyPortraitTex, aFalcoPortraitTex }; + u8* sText[] = { aTextPeppy, aTextSlippy, aTextFalco }; s32 shield; - s32 D_800D1D34[] = { 48, 56, 48 }; // width - s32 D_800D1D40[] = { 10, 10, 8 }; // height + s32 sTextWidth[] = { 48, 56, 48 }; + s32 sTextHeght[] = { 10, 10, 8 }; s32 i; s32 j; f32 x[3][3], y[3][3]; @@ -1007,12 +1010,11 @@ void func_hud_80087788(void) { y[2][2] = y[1][2]; for (j = 0; j < 3; j++) { - - func_hud_80086C08(x[j][0] - 6.0f, y[j][1] - 1.0f, 2.4f, 0.7f); + HUD_MsgWindowBg_Draw2(x[j][0] - 6.0f, y[j][1] - 1.0f, 2.4f, 0.7f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_800D1D28[j], D_800D1D34[j], D_800D1D40[j], x[j][1], y[j][1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sText[j], sTextWidth[j], sTextHeght[j], x[j][1], y[j][1], 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); shield = gTeamShields[3 - j]; @@ -1024,17 +1026,17 @@ void func_hud_80087788(void) { } for (i = 0; i < 2; i++) { - TextureRect_RGBA16(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * i), 44, 20, x[j][0], - y[j][0] + (f32) (20 * i), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, sPortraitTex[j + 1] + (44 * 20 * i), 44, 20, x[j][0], + y[j][0] + (f32) (20 * i), 1.0f, 1.0f); } - TextureRect_RGBA16(&gMasterDisp, D_800D1D18[j + 1] + (44 * 20 * 2), 44, 4, x[j][0], y[j][0] + 40.0f, 1.0f, - 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, sPortraitTex[j + 1] + (44 * 20 * 2), 44, 4, x[j][0], y[j][0] + 40.0f, 1.0f, + 1.0f); - func_hud_80086110(x[j][2], y[j][2], shield); + HUD_TeamShields_Draw(x[j][2], y[j][2], shield); } } -void HUD_DrawLevelClearStatusScreen(void) { +void HUD_LevelClearStatusScreen_Draw(void) { s32 i; s32 temp; f32 x0; @@ -1052,12 +1054,12 @@ void HUD_DrawLevelClearStatusScreen(void) { f32 y5; f32 y6; - if (gShowLevelClearStatusScreen == 0) { + if (gShowLevelClearStatusScreen == false) { Audio_KillSfxById(NA_SE_TEAM_SHIELD_UP); D_801617C0[0] = 0; } - if ((gPlayState != PLAY_PAUSE) && (gShowLevelClearStatusScreen == 1) && (D_801617E8[0] == 0)) { + if ((gPlayState != PLAY_PAUSE) && (gShowLevelClearStatusScreen == true) && (D_801617E8[0] == 0)) { switch (D_801617C0[0]) { case 0: D_801617C0[5] = gHitCount; @@ -1076,7 +1078,7 @@ void HUD_DrawLevelClearStatusScreen(void) { D_801617C0[4] = gHitCount / 2; D_801617C0[6] = 0; - func_hud_800884E4(); + HUD_SetMissionTeamStatus(); break; case 1: @@ -1153,7 +1155,7 @@ void HUD_DrawLevelClearStatusScreen(void) { D_801617E8[0] = 10; D_801617C0[0]++; } else { - if (((gGameFrameCount % 2) == 0)) { + if ((gGameFrameCount % 2) == 0) { AUDIO_PLAY_SFX(NA_SE_ONE_UP, gDefaultSfxSource, 4); D_801617C0[3]++; } @@ -1175,7 +1177,7 @@ void HUD_DrawLevelClearStatusScreen(void) { D_801617C0[6]--; } - if (gShowLevelClearStatusScreen == 1) { + if (gShowLevelClearStatusScreen == true) { x0 = 128.0f; y0 = 30.0f; @@ -1197,9 +1199,9 @@ void HUD_DrawLevelClearStatusScreen(void) { x6 = x2 - 56.0f + 16.0f; y6 = y3 + 18.0f; - func_hud_80086C08(x0 - 4.0f, y0 - 4.0f, 2.9f, 3.6f); - func_hud_80086C08(x3 - 4.0f, y3 - 4.0f, 10.0f, 1.0f); - func_hud_80086C08(x6 - 12.0f, y6 + 8.0f, 5.2f, 1.0f); + HUD_MsgWindowBg_Draw2(x0 - 4.0f, y0 - 4.0f, 2.9f, 3.6f); + HUD_MsgWindowBg_Draw2(x3 - 4.0f, y3 - 4.0f, 10.0f, 1.0f); + HUD_MsgWindowBg_Draw2(x6 - 12.0f, y6 + 8.0f, 5.2f, 1.0f); if (D_801617C0[1] < 0) { D_801617C0[1] = 0; @@ -1229,33 +1231,32 @@ void HUD_DrawLevelClearStatusScreen(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 90, 160, 200, 255); - func_hud_800869A0(24.0f, 30.0f + 3.0f, D_801617C0[5], 1.0f, 0, 999); + HUD_Number_Draw(24.0f, 30.0f + 3.0f, D_801617C0[5], 1.0f, false, 999); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, aTextEnemiesDown, 64, 25, x0, y0 + 4.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextEnemiesDown, 64, 25, x0, y0 + 4.0f, 1.0f, 1.0f); - func_hud_800869A0(x1, y1 + 12.0f, D_801617C0[1], 1.0f, 1, 999); + HUD_Number_Draw(x1, y1 + 12.0f, D_801617C0[1], 1.0f, true, 999); - TextureRect_IA8(&gMasterDisp, aTextAccumTotal, 128, 10, x3, y3, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextAccumTotal, 128, 10, x3, y3, 1.0f, 1.0f); - func_hud_800869A0(x4 + 4.0f, y4 + 3.0f, D_801617C0[2], 1.00f, 1, 9999); + HUD_Number_Draw(x4 + 4.0f, y4 + 3.0f, D_801617C0[2], 1.00f, true, 9999); if ((D_801617C0[6] % 2) == 0) { - func_hud_80087530(232.0f, 90.0f, D_801617C0[3]); + HUD_LivesCount2_Draw(232.0f, 90.0f, D_801617C0[3]); } RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, aTextStatusOfTeam, 120, 12, x6 - 8.0f, y6 + 10.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextStatusOfTeam, 120, 12, x6 - 8.0f, y6 + 10.0f, 1.0f, 1.0f); - func_hud_80087788(); - func_hud_80084B94(0); - func_hud_8008B5B0(20.0f, 18.0f); + HUD_TeammateStatus_Draw(); + HUD_TeamDownWrench_Draw(0); + HUD_PlayerShieldGauge_Draw(20.0f, 18.0f); } } - -void func_hud_800884E4(void) { +void HUD_SetMissionTeamStatus(void) { s32 mask; s32 i; @@ -1272,7 +1273,7 @@ void func_hud_800884E4(void) { } } -void func_hud_80088564(void) { +void HUD_Bolse_Area6_SaveData(void) { PlanetId planetId; if ((gCurrentLevel == LEVEL_BOLSE) || (gCurrentLevel == LEVEL_AREA_6)) { @@ -1317,74 +1318,75 @@ void HUD_DrawStatusScreens(void) { } HUD_DrawLevelStartStatusScreen(); HUD_DrawLevelClearScreen(); - HUD_DrawLevelClearStatusScreen(); + HUD_LevelClearStatusScreen_Draw(); } -s32 func_hud_800886B8(void) { - s32 var_v1 = 0; - f32 var_fv1 = gInputPress->stick_y; +s32 HUD_PauseScreenInput(void) { + s32 ret = 0; + f32 stickY = gInputPress->stick_y; - if ((var_fv1 != 0.0f) && (D_80161810[4] != 0)) { + if ((stickY != 0.0f) && (sPauseScreenIwork[4] != 0)) { return 0; } - D_80161810[4] = 0; + sPauseScreenIwork[4] = 0; - if (fabsf(var_fv1) < 30.0f) { - var_fv1 = 0.0f; + if (fabsf(stickY) < 30.0f) { + stickY = 0.0f; } - if (var_fv1 != 0.0f) { - if (D_80161810[2] == 0) { - if (var_fv1 > 0) { - var_v1 = 1; + if (stickY != 0.0f) { + if (sPauseScreenIwork[2] == 0) { + if (stickY > 0) { + ret = 1; } else { - var_v1 = -1; + ret = -1; } - D_80161810[2] = 1; + sPauseScreenIwork[2] = 1; } } else { - D_80161810[2] = 0; + sPauseScreenIwork[2] = 0; } - return var_v1; + + return ret; } -void func_hud_80088784(s32 arg0) { - Gfx* D_800D1D4C[] = { +void HUD_LoseLifeExplosion_Draw(s32 animFrames) { + Gfx* sLoseLifePlanetAnimDLs[] = { D_BG_PLANET_200B630, D_BG_PLANET_200A5A0, D_BG_PLANET_2009510, D_BG_PLANET_2008480, D_BG_PLANET_20073F0, D_BG_PLANET_2006360, D_BG_PLANET_200C6C0, D_BG_PLANET_20052D0, D_BG_PLANET_2004240, D_BG_PLANET_20031B0, D_BG_PLANET_2002120, D_BG_PLANET_2001090, D_BG_SPACE_2000000, D_BG_PLANET_2010A30, D_BG_PLANET_20101A0, D_BG_PLANET_200F910, D_BG_PLANET_200F080, D_BG_PLANET_200E7F0, }; - Gfx* D_800D1D94[] = { + Gfx* sLoseLifeSpaceAnimDLs[] = { D_BG_SPACE_20066C0, D_BG_SPACE_2005E30, D_BG_SPACE_20055A0, D_BG_SPACE_2004D10, D_BG_SPACE_2004480, D_BG_SPACE_2003BF0, D_BG_SPACE_2003360, D_BG_SPACE_2002AD0, D_BG_SPACE_2002240, D_BG_SPACE_20019B0, D_BG_SPACE_2001120, D_BG_SPACE_2000890, D_BG_SPACE_2000000, }; - s32 D_800D1DC8[] = { + s32 sLoseLifePrimColors[] = { 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 200, 150, 100, 50, }; - if (arg0 != 0) { - arg0--; + if (animFrames != 0) { + animFrames--; RCP_SetupDL(&gMasterDisp, SETUPDL_36); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D1DC8[arg0]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sLoseLifePrimColors[animFrames]); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 3.9f, -3.3f, -100.0f, MTXF_NEW); Matrix_Scale(gGfxMatrix, 0.37f, 0.37f, 0.37f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gLevelType == LEVELTYPE_PLANET) { - gSPDisplayList(gMasterDisp++, D_800D1D4C[arg0]); + gSPDisplayList(gMasterDisp++, sLoseLifePlanetAnimDLs[animFrames]); } else { - gSPDisplayList(gMasterDisp++, D_800D1D94[arg0]); + gSPDisplayList(gMasterDisp++, sLoseLifeSpaceAnimDLs[animFrames]); } Matrix_Pop(&gGfxMatrix); } } -void func_hud_80088970(void) { +void HUD_PauseScreen_Update(void) { s32 i; s32 j; Player* player; @@ -1398,50 +1400,52 @@ void func_hud_80088970(void) { s32 temp; s32 ret; - D_80161838[0]++; + sPauseScreenTimer[0]++; if (gPlayState != PLAY_PAUSE) { - D_80161838[0] = 0; - D_80161838[1] = 0; + sPauseScreenTimer[0] = 0; + sPauseScreenTimer[1] = 0; // clang-format off - for(i = 0; i < 5; i++) { D_80161810[i] = 0; } + for (i = 0; i < 5; i++) { \ + sPauseScreenIwork[i] = 0; + } // clang-format on - D_80161810[4] = 1; + sPauseScreenIwork[4] = 1; } - if (D_80161810[0] >= 2) { + if (sPauseScreenIwork[0] >= 2) { gPauseEnabled = false; } player = &gPlayer[gPlayerNum]; if ((gPlayState == PLAY_PAUSE) && (gLevelStartStatusScreenTimer == 0) && !gVersusMode) { - switch (D_80161810[0]) { + switch (sPauseScreenIwork[0]) { case 0: - D_80161838[0] = 0; - D_80161810[1] = 0; - D_80161810[0] = 1; + sPauseScreenTimer[0] = 0; + sPauseScreenIwork[1] = 0; + sPauseScreenIwork[0] = 1; break; case 1: - ret = func_hud_800886B8(); + ret = HUD_PauseScreenInput(); if (ret != 0) { - D_80161838[0] = 0; - if (((ret > 0) && (D_80161810[1] == 1)) || ((ret < 0) && (D_80161810[1] == 0))) { - D_80161810[1] ^= 1; + sPauseScreenTimer[0] = 0; + if (((ret > 0) && (sPauseScreenIwork[1] == 1)) || ((ret < 0) && (sPauseScreenIwork[1] == 0))) { + sPauseScreenIwork[1] ^= 1; AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } } if (gInputPress->button & B_BUTTON) { - D_80161810[0] = 10; + sPauseScreenIwork[0] = 10; } if (gInputPress->button & A_BUTTON) { - if (D_80161810[1] == 0) { - D_80161810[0] = 10; + if (sPauseScreenIwork[1] == 0) { + sPauseScreenIwork[0] = 10; } else { - D_80161810[0] = 2; + sPauseScreenIwork[0] = 2; } } break; @@ -1468,13 +1472,13 @@ void func_hud_80088970(void) { gFillScreenAlpha = 255; if (gLifeCount[gPlayerNum] == 0) { - D_80161810[0] = 3; + sPauseScreenIwork[0] = 3; } else { - D_80161810[0] = 3; + sPauseScreenIwork[0] = 3; } - D_80161838[1] = 0; - D_80161838[0] = 0; + sPauseScreenTimer[1] = 0; + sPauseScreenTimer[0] = 0; case 3: Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0, 0, 0, 255); @@ -1496,29 +1500,29 @@ void func_hud_80088970(void) { } else { if (gFillScreenAlpha == 0) { if (gLevelType == LEVELTYPE_PLANET) { - if (D_80161838[1] == 0) { + if (sPauseScreenTimer[1] == 0) { Audio_PlayDeathSequence(); } - if (D_80161838[1] == 10) { + if (sPauseScreenTimer[1] == 10) { gLifeCount[gPlayerNum]--; } - D_80161838[1]++; - if (D_80161838[1] > 18) { - D_80161810[0] = 4; - D_80161838[1] = 0; + sPauseScreenTimer[1]++; + if (sPauseScreenTimer[1] > 18) { + sPauseScreenIwork[0] = 4; + sPauseScreenTimer[1] = 0; } } else { - if (D_80161838[1] == 0) { + if (sPauseScreenTimer[1] == 0) { Audio_PlayDeathSequence(); } - if (D_80161838[1] == 6) { + if (sPauseScreenTimer[1] == 6) { gLifeCount[gPlayerNum]--; } - D_80161838[1]++; - if (D_80161838[1] > 13) { - D_80161810[0] = 4; - D_80161838[1] = 0; + sPauseScreenTimer[1]++; + if (sPauseScreenTimer[1] > 13) { + sPauseScreenIwork[0] = 4; + sPauseScreenTimer[1] = 0; } } } @@ -1527,7 +1531,7 @@ void func_hud_80088970(void) { case 4: Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, 0, 0, 0, 255); - if (D_80161838[0] < 140) { + if (sPauseScreenTimer[0] < 140) { break; } @@ -1539,7 +1543,7 @@ void func_hud_80088970(void) { if (gFillScreenAlpha > 255) { gFillScreenAlpha = 255; } - if (D_80161838[0] < 160) { + if (sPauseScreenTimer[0] < 160) { break; } @@ -1584,11 +1588,12 @@ void func_hud_80088970(void) { } } - if ((D_80161810[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && (gLevelStartStatusScreenTimer == 0)) { - switch (D_80161810[0]) { + if ((sPauseScreenIwork[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && + (gLevelStartStatusScreenTimer == 0)) { + switch (sPauseScreenIwork[0]) { case 0: case 1: - j = func_hud_800863C8(); + j = HUD_GetLevelIndex(); x0 = 140.0f; y0 = 92.0f + 4.0f; @@ -1596,10 +1601,10 @@ void func_hud_80088970(void) { x1 = x0 - 28.0f; y1 = y0 + 18.0f; - x2 = 160.0f - (D_800D1AEC[j].unk_10 / 2.0f); + x2 = 160.0f - (sLevelTitleCard[j].titleCardWidth / 2.0f); y2 = y0 - 40.0f; - func_hud_80086C08(69.0f, y2 - 4.0f, 7.6f, 2.1f); + HUD_MsgWindowBg_Draw2(69.0f, y2 - 4.0f, 7.6f, 2.1f); switch (gCurrentLevel) { case LEVEL_CORNERIA: @@ -1640,17 +1645,18 @@ void func_hud_80088970(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - for (i = 0; i < D_800D1AEC[j].unk_14; i++) { - TextureRect_IA8(&gMasterDisp, D_800D1AEC[j].unk_0C + (D_800D1AEC[j].unk_10 * i), - D_800D1AEC[j].unk_10, 1, x2, y2 + i, 1.0f, 1.0f); + for (i = 0; i < sLevelTitleCard[j].titleCardHeight; i++) { + Lib_TextureRect_IA8(&gMasterDisp, + sLevelTitleCard[j].titleCardTex + (sLevelTitleCard[j].titleCardWidth * i), + sLevelTitleCard[j].titleCardWidth, 1, x2, y2 + i, 1.0f, 1.0f); } - func_hud_80086C08(x1 - 10.0f, y0 - 4.0f, 4.7f, 2.8f); + HUD_MsgWindowBg_Draw2(x1 - 10.0f, y0 - 4.0f, 4.7f, 2.8f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); - if (D_80161810[1] == 0) { - temp = (D_80161838[0] % 20); + if (sPauseScreenIwork[1] == 0) { + temp = (sPauseScreenTimer[0] % 20); if (temp >= 10) { temp = 20 - temp; } @@ -1662,10 +1668,10 @@ void func_hud_80088970(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 64, 64, 64, 255); } - TextureRect_IA8(&gMasterDisp, D_1000000, 64, 10, x0 - 12.0f, y0, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_1000000, 64, 10, x0 - 12.0f, y0, 1.0f, 1.0f); - if (D_80161810[1] == 1) { - temp = (D_80161838[0] % 20); + if (sPauseScreenIwork[1] == 1) { + temp = (sPauseScreenTimer[0] % 20); if (temp >= 10) { temp = 20 - temp; } @@ -1678,26 +1684,26 @@ void func_hud_80088970(void) { } if (gCurrentLevel == LEVEL_TRAINING) { - TextureRect_IA8(&gMasterDisp, D_TR_6000000, 96, 12, x1, y1, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_TR_6000000, 96, 12, x1, y1, 1.0f, 1.0f); } else { if (gLifeCount[gPlayerNum]) { - TextureRect_IA8(&gMasterDisp, D_1000280, 96, 10, x1, y1, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_1000280, 96, 10, x1, y1, 1.0f, 1.0f); } else { - TextureRect_IA8(&gMasterDisp, D_1000640, 96, 22, x1, y1, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_1000640, 96, 22, x1, y1, 1.0f, 1.0f); } } if ((gCurrentLevel != LEVEL_VENOM_ANDROSS) && (gCurrentLevel != LEVEL_TRAINING)) { - func_hud_80087788(); - func_hud_80084B94(0); + HUD_TeammateStatus_Draw(); + HUD_TeamDownWrench_Draw(0); } break; case 3: case 4: if (gCurrentLevel != LEVEL_TRAINING) { - func_hud_80084930(132.0f, 124.0f, gLifeCount[gPlayerNum]); - func_hud_80088784(D_80161838[1]); + HUD_LivesCount1_Draw(132.0f, 124.0f, gLifeCount[gPlayerNum]); + HUD_LoseLifeExplosion_Draw(sPauseScreenTimer[1]); } break; @@ -1707,50 +1713,50 @@ void func_hud_80088970(void) { } } -void func_hud_80089670(void) { +void HUD_RadarMark_Item_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 18.64f, 21.04f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } -void func_hud_80089710(void) { +void HUD_RadarMark_Enemy_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 11.0f, 11.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } -void func_hud_800897B0(void) { +void HUD_RadarMark_Boss_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 130.0f, 130.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024830); + gSPDisplayList(gMasterDisp++, aRadarMarkBossDL); } -void func_hud_80089850(void) { +void HUD_RadarMark_KaSaucerer_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 125.0f, 125.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102A8A0); + gSPDisplayList(gMasterDisp++, aRadarMarkKaSaucererDL); } -void func_hud_800898F0(void) { +void HUD_RadarMark_Missile_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_1); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 208, 80, 255); Matrix_Scale(gGfxMatrix, 30.0f, 30.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_SZ_6004570); + gSPDisplayList(gMasterDisp++, aSzMissileRadarMarkDL); } f32 D_800D1E10 = 0.0f; -void func_hud_80089994(s32 arg0) { - s32 D_800D1E14[][4] = { +void HUD_RadarMark_Arwing_Draw(s32 colorIdx) { + s32 arwingMarkColor[][4] = { { 177, 242, 12, 255 }, { 89, 121, 6, 128 }, { 90, 90, 255, 255 }, { 45, 45, 128, 128 }, { 0, 179, 67, 255 }, { 0, 90, 34, 128 }, { 255, 30, 0, 255 }, { 128, 15, 0, 128 }, }; @@ -1766,14 +1772,14 @@ void func_hud_80089994(s32 arg0) { } RCP_SetupDL(&gMasterDisp, SETUPDL_62); - gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D1E14[arg0][0], D_800D1E14[arg0][1], D_800D1E14[arg0][2], - D_800D1E14[arg0][3]); + gDPSetPrimColor(gMasterDisp++, 0, 0, arwingMarkColor[colorIdx][0], arwingMarkColor[colorIdx][1], + arwingMarkColor[colorIdx][2], arwingMarkColor[colorIdx][3]); Matrix_Scale(gGfxMatrix, var_fv1, var_fv2, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1015510); + gSPDisplayList(gMasterDisp++, aRadarMarkArwingDL); } -void func_hud_80089AF4(void) { +void HUD_RadarMark_StarWolf_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); @@ -1781,15 +1787,15 @@ void func_hud_80089AF4(void) { gSPDisplayList(gMasterDisp++, aStarWolfRadarMarkDL); } -void func_hud_80089B94(void) { +void HUD_RadarMark_Katt_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 92, 92, 255); Matrix_Scale(gGfxMatrix, 54.0f, 54.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_D0098B0); + gSPDisplayList(gMasterDisp++, aKattRadarMarkDL); } -void func_hud_80089C38(void) { +void HUD_RadarMark_Supplies_Draw(void) { s32 alpha; RCP_SetupDL(&gMasterDisp, SETUPDL_12); @@ -1807,111 +1813,113 @@ void func_hud_80089C38(void) { gSPDisplayList(gMasterDisp++, D_1024230); } -void func_hud_80089D28(void) { - s32 gb; +void HUD_RadarMissileAlarm_Draw(void) { + s32 colorGB; RCP_SetupDL(&gMasterDisp, SETUPDL_1); - gb = gGameFrameCount % 21; + colorGB = gGameFrameCount % 21; - if (gb > 10) { - gb = 20 - gb; + if (colorGB > 10) { + colorGB = 20 - colorGB; } - gb *= 25.5f; + colorGB *= 25.5f; - if ((gb == 10) || (gb == 0)) { - // clang-format off - //! FAKE: Probably a MACRO - if (1) {AUDIO_PLAY_SFX(NA_SE_MISSILE_ALARM, gDefaultSfxSource, 4);} - // clang-format on + // clang-format off + if ((colorGB == 10) || (colorGB == 0)) { \ + AUDIO_PLAY_SFX(NA_SE_MISSILE_ALARM, gDefaultSfxSource, 4); } + // clang-format on - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, gb, gb, 255); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); Matrix_Translate(gGfxMatrix, 0.0f, -185.92001f, 0, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.55f, 0.13f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024230); } -void HUD_RadarMark_Draw(s32 arg0) { - s32 var_a1; - s32 var_a1_2; +void HUD_RadarMark_Draw(s32 type) { + s32 arwingMarkColor; + s32 playernum; - switch (arg0) { - case 0: - case 1: - case 2: - case 3: - var_a1_2 = var_a1 = arg0; - if (gCamCount != 1) { - if (arg0 == 1) { - var_a1 = 3; + switch (type) { + case RADARMARK_FOX: + case RADARMARK_FALCO: + case RADARMARK_SLIPPY: + case RADARMARK_PEPPY: + playernum = arwingMarkColor = type; + + if (gCamCount != 1) { // Multiplayer + if (type == RADARMARK_FALCO) { + arwingMarkColor = 3; } - if (arg0 == 3) { - var_a1 = 1; + if (type == RADARMARK_PEPPY) { + arwingMarkColor = 1; } - if (gPlayer[arg0].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { + if (gPlayer[type].state_1C8 == PLAYERSTATE_1C8_VS_STANDBY) { break; } } - if ((var_a1_2 == gPlayerNum) && (gGameFrameCount & 2)) { - var_a1 = (var_a1 * 2) + 1; + + if ((playernum == gPlayerNum) && (gGameFrameCount & 2)) { + arwingMarkColor = (arwingMarkColor * 2) + 1; } else { - var_a1 = var_a1 * 2; + arwingMarkColor = arwingMarkColor * 2; } - func_hud_80089994(var_a1); + + HUD_RadarMark_Arwing_Draw(arwingMarkColor); break; - case 4: - case 5: - case 6: - case 7: - func_hud_80089AF4(); + case RADARMARK_WOLF: + case RADARMARK_LEON: + case RADARMARK_PIGMA: + case RADARMARK_ANDREW: + HUD_RadarMark_StarWolf_Draw(); break; - case 8: - func_hud_80089B94(); + case RADARMARK_KATT: + HUD_RadarMark_Katt_Draw(); break; - case 100: - func_hud_800898F0(); + case RADARMARK_MISSILE: + HUD_RadarMark_Missile_Draw(); break; - case 101: - func_hud_80089850(); + case RADARMARK_KA_SAUCERER: + HUD_RadarMark_KaSaucerer_Draw(); break; - case 102: - func_hud_800897B0(); + case RADARMARK_BOSS: + HUD_RadarMark_Boss_Draw(); break; - case 103: + case RADARMARK_SUPPIES: if (gVersusMode == true) { - func_hud_80089670(); + HUD_RadarMark_Item_Draw(); } else { - func_hud_80089C38(); + HUD_RadarMark_Supplies_Draw(); } break; - case 200: - case 201: - func_hud_80089670(); + case RADARMARK_ITEM_1: + case RADARMARK_ITEM_2: + HUD_RadarMark_Item_Draw(); break; - case 999: + case RADARMARK_NOTHING: break; default: - func_hud_80089710(); + HUD_RadarMark_Enemy_Draw(); break; } } -void func_hud_8008A07C(f32 x, f32 y) { - f32 D_800D1E94[] = { 20.0f, 180.0f, 20.0f, 180.0f }; - f32 D_800D1EA4[] = { 72.0f, 72.0f, 192.0f, 192.0f }; +void HUD_RadarWindow_Draw(f32 x, f32 y) { + f32 sVsRadarWindowXpos[] = { 20.0f, 180.0f, 20.0f, 180.0f }; + f32 sVsRadarWindowYpos[] = { 72.0f, 72.0f, 192.0f, 192.0f }; f32 xPos; f32 yPos; f32 xScale; @@ -1919,14 +1927,14 @@ void func_hud_8008A07C(f32 x, f32 y) { f32 xScale1; f32 yScale1; - if (gCamCount != 1) { - xPos = D_800D1E94[gPlayerNum]; - yPos = D_800D1EA4[gPlayerNum]; + if (gCamCount != 1) { // Versus mode + xPos = sVsRadarWindowXpos[gPlayerNum]; + yPos = sVsRadarWindowYpos[gPlayerNum]; xScale = 1.21f; yScale = 1.69f; xScale1 = 0.70f; yScale1 = 0.70f; - } else { + } else { // Simple player mode xPos = x - 32.0f; yPos = y - 14.0f; xScale = 2.98f; @@ -1937,13 +1945,12 @@ void func_hud_8008A07C(f32 x, f32 y) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); - func_hud_800853A4(xPos + 1.0f, yPos + 1.0f, xScale, yScale); - + HUD_MsgWindowBg_Draw(xPos + 1.0f, yPos + 1.0f, xScale, yScale); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_80085404(xPos, yPos, xScale1, yScale1); + HUD_RadarWindowFrame_Draw(xPos, yPos, xScale1, yScale1); } -void func_hud_8008A240(void) { +void HUD_RadarMarks_Setup(void) { s32 i; Item* item; @@ -1951,7 +1958,7 @@ void func_hud_8008A240(void) { if (gPlayer[i].state_1C8 == PLAYERSTATE_1C8_NEXT) { continue; } - gRadarMarks[i].status = 1; + gRadarMarks[i].enabled = true; gRadarMarks[i].type = i; gRadarMarks[i].yRot = gPlayer[i].yRot_114 + gPlayer[i].rot.y; gRadarMarks[i].pos.z = gPlayer[i].trueZpos; @@ -1961,7 +1968,7 @@ void func_hud_8008A240(void) { continue; } - if (gVersusMode && gVersusStage == VS_STAGE_SECTOR_Z) { + if (gVersusMode && (gVersusStage == VS_STAGE_SECTOR_Z)) { continue; } @@ -1978,10 +1985,10 @@ void func_hud_8008A240(void) { } } - if (gVersusMode == 1) { - for (i = 0, item = gItems; i < ARRAY_COUNT(gItems); i++, item++) { + if (gVersusMode == true) { + for (i = 0, item = &gItems[0]; i < ARRAY_COUNT(gItems); i++, item++) { if (item->obj.status >= OBJ_ACTIVE) { - gRadarMarks[item->index + 50].status = 1; + gRadarMarks[item->index + 50].enabled = true; gRadarMarks[item->index + 50].type = 103; gRadarMarks[item->index + 50].pos.x = item->obj.pos.x; gRadarMarks[item->index + 50].pos.y = item->obj.pos.y; @@ -1992,7 +1999,7 @@ void func_hud_8008A240(void) { } } -s32 func_hud_8008A4DC(void) { +s32 HUD_RadarMarks_Update(void) { s32 i; f32 scale; f32 x1; @@ -2066,7 +2073,7 @@ s32 func_hud_8008A4DC(void) { y = 162.000f; x1 += D_800D1E10 * temp3; } else { - if (!gVsMatchStart || (D_versus_80178750 != 0)) { + if (!gVsMatchStart || gVsMatchOver) { return 0; } temp2 = 13000.00f; @@ -2077,8 +2084,8 @@ s32 func_hud_8008A4DC(void) { y1 = -166.00f; } - func_hud_8008A240(); - func_hud_8008A07C(x, y); + HUD_RadarMarks_Setup(); + HUD_RadarWindow_Draw(x, y); if (!gVersusMode && ((gCurrentLevel == LEVEL_SECTOR_Z) || (gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2) || @@ -2089,15 +2096,15 @@ s32 func_hud_8008A4DC(void) { switch (gCurrentLevel) { case LEVEL_SECTOR_Z: - TextureRect_IA8(&gMasterDisp, D_SZ_60012D0, 16, 9, 251.0f + D_800D1E10, 181.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_SZ_60012D0, 16, 9, 251.0f + D_800D1E10, 181.0f, 1.00f, 1.00f); break; case LEVEL_FORTUNA: - TextureRect_IA8(&gMasterDisp, D_FO_6001260, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_FO_6001260, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; case LEVEL_BOLSE: - TextureRect_IA8(&gMasterDisp, D_BO_6000C80, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_BO_6000C80, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; case LEVEL_SECTOR_Y: @@ -2108,16 +2115,16 @@ s32 func_hud_8008A4DC(void) { if ((y < 150.0f) || (y > 206.0f)) { break; } - TextureRect_IA8(&gMasterDisp, D_SY_6000840, 64, 64, 250.0f + D_800D1E10, temp, 0.25f, 0.25f); + Lib_TextureRect_IA8(&gMasterDisp, D_SY_6000840, 64, 64, 250.0f + D_800D1E10, temp, 0.25f, 0.25f); } break; case LEVEL_KATINA: - TextureRect_IA8(&gMasterDisp, D_KA_6001260, 8, 8, 254.0f + D_800D1E10, 182.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_KA_6001260, 8, 8, 254.0f + D_800D1E10, 182.0f, 1.00f, 1.00f); break; case LEVEL_VENOM_2: - TextureRect_IA8(&gMasterDisp, D_VE2_6002890, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); + Lib_TextureRect_IA8(&gMasterDisp, D_VE2_6002890, 16, 16, 251.0f + D_800D1E10, 178.0f, 1.00f, 1.00f); break; } } @@ -2127,13 +2134,13 @@ s32 func_hud_8008A4DC(void) { if ((gCurrentLevel == LEVEL_SECTOR_Z) && (D_hud_80161710 != 0)) { Matrix_Push(&gGfxMatrix); - func_hud_80089D28(); + HUD_RadarMissileAlarm_Draw(); Matrix_Pop(&gGfxMatrix); D_hud_80161710--; } for (i = ARRAY_COUNT(gRadarMarks) - 1; i >= 0; i--) { - if ((gRadarMarks[i].status == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) || + if ((gRadarMarks[i].enabled == 0) || (fabsf(gRadarMarks[i].pos.x) >= (temp2 + 1000.0f)) || (fabsf(gRadarMarks[i].pos.z) >= (temp2 + 1000.0f))) { continue; } @@ -2152,34 +2159,33 @@ s32 func_hud_8008A4DC(void) { HUD_RadarMark_Draw(gRadarMarks[i].type); Matrix_Pop(&gGfxMatrix); - gRadarMarks[i].status = 0; + gRadarMarks[i].enabled = false; } Matrix_Pop(&gGfxMatrix); return 0; } -// Why is this function here in fox_hud? Weird. -s32 ActorMissileSeek_ModeCheck(s32 missileSeekMode) { +s32 ActorMissileSeek_ModeCheck(ActorMissileSeekMode mode) { Actor* actor; s32 i; s32 ret = 0; for (i = 0, actor = &gActors[0]; i < 60; i++, actor++) { - switch (missileSeekMode) { - case 0: // follows teammates + switch (mode) { + case MISSILE_SEEK_TEAMMATES: if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_MISSILE_SEEK_TEAM)) { ret++; } break; - case 1: // follows player + case MISSILE_SEEK_PLAYER: if ((actor->obj.status == OBJ_ACTIVE) && (actor->obj.id == OBJ_MISSILE_SEEK_PLAYER)) { ret++; } break; - case 2: // follows either + case MISSILE_SEEK_EITHER: if (((actor->obj.id == OBJ_MISSILE_SEEK_TEAM) || (actor->obj.id == OBJ_MISSILE_SEEK_PLAYER)) && (actor->obj.status == OBJ_ACTIVE)) { ret++; @@ -2244,7 +2250,7 @@ void HUD_RadioCharacterName_Draw(void) { } } -void func_hud_8008B044(void) { +void HUD_IncomingMsg_Update(void) { switch (D_80161798) { case 0: if (gCallTimer == 0) { @@ -2280,34 +2286,35 @@ void func_hud_8008B044(void) { } } -void func_hud_8008B1B0(void) { - f32 temp = 142.0f; - f32 temp2 = 18.0f; +void HUD_IncomingMsg_Draw(void) { + f32 xPos = 142.0f; + f32 yPos = 18.0f; RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); switch (D_80161790 / 2) { case 3: - func_hud_8008556C(temp + 31.0f, temp2); + HUD_IncomingMsgSignal3_Draw(xPos + 31.0f, yPos); case 2: - func_hud_80085514(temp + 24.0f, temp2); + HUD_IncomingMsgSignal2_Draw(xPos + 24.0f, yPos); case 1: - func_hud_800854BC(temp + 18.0f, temp2); + HUD_IncomingMsgSignal1_Draw(xPos + 18.0f, yPos); case 0: - func_hud_80085464(temp, temp2); + HUD_IncomingMsgButton_Draw(xPos, yPos); break; + default: break; } } -void func_hud_8008B2A4(void) { +void HUD_IncomingMsg(void) { if (gPlayState != PLAY_PAUSE) { - func_hud_8008B044(); + HUD_IncomingMsg_Update(); } if (gCallTimer != 0) { - func_hud_8008B1B0(); + HUD_IncomingMsg_Draw(); } } @@ -2315,7 +2322,7 @@ s32 D_800D1EB4 = 255; s32 D_800D1EB8 = 255; s32 D_800D1EBC = 255; -void func_hud_8008B2F0(void) { +void HUD_PlayerShieldGauge_Update(void) { f32 shields; switch (D_hud_80161730) { @@ -2377,77 +2384,78 @@ void func_hud_8008B2F0(void) { } } -void func_hud_8008B5B0(f32 x, f32 y) { +void HUD_PlayerShieldGauge_Draw(f32 x, f32 y) { RCP_SetupDL(&gMasterDisp, SETUPDL_75); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800856C0(x + 8.0f, y + 2.0f, D_801617A8, 1.0f, D_801617AC); + HUD_ShieldGaugeBars_Draw(x + 8.0f, y + 2.0f, D_801617A8, 1.0f, D_801617AC); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D1EB4, D_800D1EB8, D_800D1EBC, 255); - func_hud_80085618(x, y, 1.0f, 1.0f); - func_hud_800855C4(x + 7.0f + (D_801617A8 * 6.0f * 8.0f), y, 1.0f, 1.0f); - func_hud_8008566C(x + 7.0f, y, D_801617A8 * 6.0f, 1.0f); + HUD_ShieldGaugeEdgeLeft_Draw(x, y, 1.0f, 1.0f); + HUD_ShieldGaugeEdgeRight_Draw(x + 7.0f + (D_801617A8 * 6.0f * 8.0f), y, 1.0f, 1.0f); + HUD_ShieldGaugeFrame_Draw(x + 7.0f, y, D_801617A8 * 6.0f, 1.0f); } -void func_hud_8008B734(void) { - func_hud_8008B2F0(); - func_hud_8008B5B0(20.0f, 18.0f); - func_hud_80085944(); +void HUD_PlayerShield_GoldRings(void) { + HUD_PlayerShieldGauge_Update(); + HUD_PlayerShieldGauge_Draw(20.0f, 18.0f); + HUD_GoldRings_Draw(); } -s32 func_hud_8008B774(void) { +s32 HUD_RadioDamage_Type(void) { s32 i; s32 ret = 0; s32 temp; switch (gCurrentRadioPortrait) { - case 0: - case 1: + case RCID_FOX: + case RCID_FOX + 1: i = 0; break; - case 10: - case 11: + case RCID_FALCO: + case RCID_FALCO + 1: temp = 1; i = 1; break; - case 20: - case 21: + case RCID_SLIPPY: + case RCID_SLIPPY + 1: temp = 2; i = 2; break; - case 30: - case 31: + case RCID_PEPPY: + case RCID_PEPPY + 1: temp = 3; i = 3; break; - case 240: - case 241: - case 200: - case 201: + case RCID_WOLF: + case RCID_WOLF + 1: + case RCID_WOLF_2: + case RCID_WOLF_2 + 1: i = 4; break; - case 260: - case 261: - case 220: - case 221: + case RCID_LEON: + case RCID_LEON + 1: + case RCID_LEON_2: + case RCID_LEON_2 + 1: i = 5; break; - case 250: - case 251: - case 210: - case 211: + case RCID_PIGMA: + case RCID_PIGMA + 1: + case RCID_PIGMA_2: + case RCID_PIGMA_2 + 1: i = 6; break; - case 270: - case 271: - case 230: - case 231: + case RCID_ANDREW: + case RCID_ANDREW + 1: + case RCID_ANDREW_2: + case RCID_ANDREW_2 + 1: i = 7; break; @@ -2478,12 +2486,14 @@ s32 func_hud_8008B774(void) { } switch (i) { + // Fox case 0: if (gPlayer[0].radioDamageTimer != 0) { ret = 1; } break; + // Star Wolf case 4: case 5: case 6: @@ -2502,6 +2512,7 @@ s32 func_hud_8008B774(void) { case 9: break; + // Teammates default: if (gActors[i].timer_0C6 != 0) { ret = 1; @@ -2512,8 +2523,8 @@ s32 func_hud_8008B774(void) { return ret; } -void func_hud_8008B9E8(void) { - s32 temp; +void HUD_RadioDamage_Update(void) { + s32 radioDamageType; // clang-format off if ((D_8016178C != 0) && (D_8016178C != 1)) { D_8016178C--; } @@ -2526,11 +2537,11 @@ void func_hud_8008B9E8(void) { if ((D_80161788 == 0) && (D_8016178C == 0)) { if ((gRadioState >= 4) && (gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) { - temp = func_hud_8008B774(); - if (temp == 1) { + radioDamageType = HUD_RadioDamage_Type(); + if (radioDamageType == RCID_FOX + 1) { D_80161788 = 20; } - if (temp == 2) { + if (radioDamageType == RCID_STATIC) { D_8016178C = 60; } } else { @@ -2544,7 +2555,7 @@ void func_hud_8008B9E8(void) { } } -void func_hud_8008BAE4(void) { +void HUD_RadioDamage_Draw(void) { s32 r; s32 g; s32 b; @@ -2567,80 +2578,79 @@ void func_hud_8008BAE4(void) { Matrix_Translate(gGfxMatrix, -53.9f, -38.5f, -139.4f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_800D1A40); + gSPDisplayList(gMasterDisp++, sRadioDamageDL); Matrix_Pop(&gGfxMatrix); } } -void func_hud_8008BC80(void) { +void HUD_RadioDamage(void) { if (gPlayState != PLAY_PAUSE) { - func_hud_8008B9E8(); - func_hud_8008BAE4(); + HUD_RadioDamage_Update(); + HUD_RadioDamage_Draw(); } } -s32 func_hud_8008BCBC(s32 arg0) { - s32 temp = 10; - s32 ret; +s32 HUD_CountDigits(s32 number) { + s32 threshold = 10; + s32 digitCount; - if (arg0 < 0) { - arg0 = (s64) -arg0; + if (number < 0) { + number *= -1; // Convert to absolute value if negative } - ret = 1; - - while (arg0 >= temp) { - ret++; - temp *= 10; + for (digitCount = 1; threshold <= number; digitCount++) { + threshold *= 10; } - return ret; + return digitCount; } -void func_hud_8008BD00(u8* texturePtr, s32 xPos, s32 yPos, u8 arg3) { +void HUD_Texture_Scroll(u8* texturePtr, s32 xPos, s32 yPos, u8 type) { u8* texture = SEGMENTED_TO_VIRTUAL(texturePtr); - u8 temp; + u8 pixel; s32 x; s32 y; - switch (arg3) { - case 0: + switch (type) { + case 0: // Upwards vertical scroll for (x = 0; x < xPos; x++) { - temp = texture[x]; + pixel = texture[x]; for (y = 1; y < yPos; y++) { texture[(y - 1) * xPos + x] = texture[y * xPos + x]; } - texture[(yPos - 1) * xPos + x] = temp; + texture[(yPos - 1) * xPos + x] = pixel; } break; - case 1: + case 1: // Downwards vertical scroll for (x = 0; x < xPos; x++) { - temp = texture[(yPos - 1) * xPos + x]; + pixel = texture[(yPos - 1) * xPos + x]; for (y = yPos - 2; y >= 0; y--) { texture[(y + 1) * xPos + x] = texture[y * xPos + x]; } - texture[x] = temp; + texture[x] = pixel; } break; - case 2: + case 2: // Right horizontal scroll for (y = 0; y < yPos; y++) { - temp = texture[y * xPos + xPos - 1]; + pixel = texture[y * xPos + xPos - 1]; for (x = xPos - 2; x >= 0; x--) { texture[y * xPos + x + 1] = texture[y * xPos + x]; } - texture[y * xPos] = temp; + texture[y * xPos] = pixel; } break; - case 3: + case 3: // Left horizontal scroll for (y = 0; y < yPos; y++) { - temp = texture[y * xPos]; + pixel = texture[y * xPos]; // clang-format off - for (x = 1; x < xPos; x++) { texture[y * xPos + x - 1] = texture[y * xPos + x]; } + for (x = 1; x < xPos; x++) { \ + texture[y * xPos + x - 1] = texture[y * xPos + x]; + } + texture[(y * xPos) + xPos - 1] = pixel; // clang-format on - texture[(y * xPos) + xPos - 1] = temp; } break; @@ -2649,7 +2659,7 @@ void func_hud_8008BD00(u8* texturePtr, s32 xPos, s32 yPos, u8 arg3) { } } -void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { +void HUD_Texture_Wave(u16* srcTexture, u16* dstTexture) { u16 *src, *dst; u16 buffer[1024]; f32 rowPhase; @@ -2664,7 +2674,7 @@ void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { src = SEGMENTED_TO_VIRTUAL(srcTexture); dst = SEGMENTED_TO_VIRTUAL(dstTexture); - Texture_Scroll(srcTexture, width, height, 1); + Lib_Texture_Scroll(srcTexture, width, height, 1); halfHeight = height / 2; @@ -2692,7 +2702,7 @@ void func_hud_8008C104(u16* srcTexture, u16* dstTexture) { src[(((halfHeight - offset) + (halfHeight - 1)) * width) + j]; } } - Texture_Mottle(dst, buffer, 2); + Lib_Texture_Mottle(dst, buffer, 2); } void HUD_DisplaySmallNumber(f32 xPos, f32 yPos, f32 scale, s32 number) { @@ -2704,34 +2714,35 @@ void HUD_DisplaySmallNumber(f32 xPos, f32 yPos, f32 scale, s32 number) { for (i = 10; i != 1; i /= 10) { if ((xPos > 0.0f) && (yPos > 0.0f)) { - TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); + Lib_TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); } xPos += 9.0f * scale; number %= i; } if ((xPos > 0.0f) && (yPos > 0.0f)) { - TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); + Lib_TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / i], 16, 8, xPos, yPos, scale, scale); } } -void func_hud_8008C5C8(f32 arg0, f32 arg1, f32 arg2, s32 arg3) { - u16* D_800D1EE8[] = { - D_10050E0, - D_100BAC0, - D_100D900, - D_10032A0, +void HUD_VsModePortraitTex_Draw(f32 xPos, f32 yPos, f32 scale, s32 idx) { + u16* sVsModeFaceDL[] = { + aFoxPortraitTex, + aPeppyPortraitTex, + aSlippyPortraitTex, + aFalcoPortraitTex, }; s32 i; for (i = 0; i < 2; i++) { - TextureRect_RGBA16(&gMasterDisp, D_800D1EE8[arg3] + (44 * 20 * i), 44, 20, arg0, (20 * i * arg2) + arg1, arg2, - arg2); + Lib_TextureRect_RGBA16(&gMasterDisp, sVsModeFaceDL[idx] + (44 * 20 * i), 44, 20, xPos, (20 * i * scale) + yPos, + scale, scale); } - TextureRect_RGBA16(&gMasterDisp, D_800D1EE8[arg3] + 44 * 20 * 2, 44, 4, arg0, (40.0f * arg2) + arg1, arg2, arg2); + Lib_TextureRect_RGBA16(&gMasterDisp, sVsModeFaceDL[idx] + 44 * 20 * 2, 44, 4, xPos, (40.0f * scale) + yPos, scale, + scale); } -void func_hud_8008C6F4(s32 idx, s32 arg1) { +void HUD_EdgeArrows_Draw(s32 idx, bool arg1) { f32 D_800D1EF8[] = { 0.0f, 0.0f, -9.0f, 9.0f, 10.0f, 10.0f, 10.0f, 10.0f, 0.0f, 0.0f, -8.0f, 8.0f }; f32 D_800D1F28[] = { -7.0f, 7.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 8.0f, -8.0f, 0.0f, 0.0f }; f32 D_800D1F58[] = { @@ -2752,7 +2763,7 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { Matrix_RotateZ(gGfxMatrix, M_DTOR * D_800D1F88[idx], MTXF_APPLY); } - if (arg1 != 0) { + if (arg1) { Matrix_Translate(gGfxMatrix, D_800D1EF8[idx] + D_800D1FE8[idx], D_800D1F28[idx] + D_800D2018[idx], D_800D1F58[idx], MTXF_APPLY); } else { @@ -2765,12 +2776,12 @@ void func_hud_8008C6F4(s32 idx, s32 arg1) { RCP_SetupDL(&gMasterDisp, SETUPDL_62); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 150); - gSPDisplayList(gMasterDisp++, D_1024990); + gSPDisplayList(gMasterDisp++, aArrowDL); Matrix_Pop(&gGfxMatrix); } -void HUD_DrawEdgeArrows(void) { +void HUD_EdgeArrows_Update(void) { s32 D_800D2048[] = { 0x80, 0x40, 0x20, 0x10, 8 | 2, 8 | 1, 4 | 2, 4 | 1, 8, 4, 2, 1, }; @@ -2789,30 +2800,31 @@ void HUD_DrawEdgeArrows(void) { j = (D_800D2048[i] ^ 0xFF) & j; if (gGameFrameCount & 4) { - func_hud_8008C6F4(i, 0); + HUD_EdgeArrows_Draw(i, false); } if ((gGameFrameCount - 2) & 4) { - func_hud_8008C6F4(i, 1); + HUD_EdgeArrows_Draw(i, true); } } - func_hud_8008BD00(D_1024A58, 8, 8, 2); + HUD_Texture_Scroll(D_1024A58, 8, 8, 2); } } -s32 HUD_dummy_8008CB8C(void) { +// Unused +s32 HUD_8008CB8C(void) { return 0; } -void func_hud_8008CB98(f32 arg0, f32 arg1, f32 arg2) { - TextureRect_IA8(&gMasterDisp, D_versus_30013E0, 8, 8, arg0, arg1, arg2, arg2); +void HUD_StarTex_Draw(f32 arg0, f32 arg1, f32 arg2) { + Lib_TextureRect_IA8(&gMasterDisp, aVsStarTex, 8, 8, arg0, arg1, arg2, arg2); } -void func_hud_8008CBE4(void) { - f32 D_800D2078[] = { 62.0f, 222.0f, 62.0f, 222.0f }; // X - f32 D_800D2088[] = { 86.0f, 86.0f, 206.0f, 206.0f }; // Y - s32 D_800D2098[] = { 177, 255, 0, 30 }; // R - s32 D_800D20A8[] = { 242, 30, 179, 30 }; // G - s32 D_800D20B8[] = { 12, 0, 67, 255 }; // B +void HUD_KillCountStars_Update(void) { + f32 xPos[] = { 62.0f, 222.0f, 62.0f, 222.0f }; + f32 yPos[] = { 86.0f, 86.0f, 206.0f, 206.0f }; + s32 r[] = { 177, 255, 0, 30 }; + s32 g[] = { 242, 30, 179, 30 }; + s32 b[] = { 12, 0, 67, 255 }; s32 i; s32 j; @@ -2866,45 +2878,46 @@ void func_hud_8008CBE4(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_77); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - gDPSetEnvColor(gMasterDisp++, D_800D2098[j], D_800D20A8[j], D_800D20B8[j], 0); + gDPSetEnvColor(gMasterDisp++, r[j], g[j], b[j], 0); - func_hud_8008CB98(D_800D2078[gPlayerNum] + (i * 9.0f), D_800D2088[gPlayerNum], 1.0f); + HUD_StarTex_Draw(xPos[gPlayerNum] + (i * 9.0f), yPos[gPlayerNum], 1.0f); } break; } } -void func_hud_8008CFB8(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { +void HUD_VS_ShieldGaugeFrame_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { s32 i; for (i = 0; i < 3; i++) { - TextureRect_IA8(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 8, arg0, (8 * i * arg3) + arg1, - arg2, arg3); + Lib_TextureRect_IA8(&gMasterDisp, aVsShieldGaugeFrameTex + 2 * ((80 * 8 * i) / 2), 80, 8, xPos, + (8 * i * yScale) + yPos, xScale, yScale); } - TextureRect_IA8(&gMasterDisp, D_versus_3000BC0 + 2 * ((80 * 8 * i) / 2), 80, 2, arg0, (8 * i * arg3) + arg1, arg2, - arg3); + Lib_TextureRect_IA8(&gMasterDisp, aVsShieldGaugeFrameTex + 2 * ((80 * 8 * i) / 2), 80, 2, xPos, + (8 * i * yScale) + yPos, xScale, yScale); } -void func_hud_8008D0DC(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { - u32 var_t8 = 48.0f * arg4; +void HUD_VS_ShieldGaugeTex_Draw(f32 xPos, f32 yPos, f32 xScale, f32 yScale, f32 width) { + u32 xWidth = 48.0f * width; - func_hud_80084E78(&gMasterDisp, D_versus_300D440, D_versus_300D500, 48, 4, arg0, arg1, arg2, arg3, var_t8, 4); + TextureRect_CI8_2(&gMasterDisp, aVsShieldGaugeTex, aVsShieldGaugeTLUT, 48, 4, xPos, yPos, xScale, yScale, xWidth, + 4); } -void func_hud_8008D1F0(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, arg0, arg1, arg2, arg3); +void HUD_VS_BombIcon_Draw(f32 arg0, f32 arg1, f32 arg2, f32 arg3) { + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, arg0, arg1, arg2, arg3); } -void func_hud_8008D250(void) { - f32 D_800D20C8[] = { 113.0f, 273.0f, 113.0f, 273.0f }; - f32 D_800D20D8[] = { 79.0f, 79.0f, 199.0f, 199.0f }; +void HUD_VsModePortrait_Draw(void) { + f32 faceXpos[] = { 113.0f, 273.0f, 113.0f, 273.0f }; + f32 faceYpos[] = { 79.0f, 79.0f, 199.0f, 199.0f }; RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_8008C5C8(D_800D20C8[gPlayerNum], D_800D20D8[gPlayerNum], 0.54f, gPlayerNum); + HUD_VsModePortraitTex_Draw(faceXpos[gPlayerNum], faceYpos[gPlayerNum], 0.54f, gPlayerNum); } -void func_hud_8008D31C(void) { +void HUD_VS_ShieldGauge_Draw(void) { f32 D_800D20E8[] = { 60.0f, 220.0f, 60.0f, 220.0f }; f32 D_800D20F8[] = { 78.0f, 78.0f, 198.0f, 198.0f }; @@ -2912,20 +2925,20 @@ void func_hud_8008D31C(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_8008D0DC(D_800D20E8[gPlayerNum] + 3.0f, D_800D20F8[gPlayerNum] + 18.0f, 1.0f, 1.0f, - D_800D19E0[gPlayerNum]); + HUD_VS_ShieldGaugeTex_Draw(D_800D20E8[gPlayerNum] + 3.0f, D_800D20F8[gPlayerNum] + 18.0f, 1.0f, 1.0f, + D_800D19E0[gPlayerNum]); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_8008CFB8(D_800D20E8[gPlayerNum], D_800D20F8[gPlayerNum], 1.0f, 1.0f); + HUD_VS_ShieldGaugeFrame_Draw(D_800D20E8[gPlayerNum], D_800D20F8[gPlayerNum], 1.0f, 1.0f); } -void func_hud_8008D4F0(f32 arg0, f32 arg1) { - f32 D_800D2108[] = { +void HUD_BoostGauge_Draw(f32 xPos, f32 yPos) { + f32 boostGaugeXpos[] = { 110.0f, 270.0f, 110.0f, 270.0f, 0.0f, }; - f32 D_800D211C[] = { + f32 boostGaugeYpos[] = { 16.0f, 16.0f, 136.0f, 136.0f, 0.0f, }; f32 temp_fv0; @@ -2935,20 +2948,20 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { f32 temp; f32 sp60; s32 temp_t9; - s32 var_v1; + s32 playerNum; if (gVersusMode) { temp = 2.0f; sp60 = 1.0f; - var_v1 = gPlayerNum; + playerNum = gPlayerNum; sp68 = 24.0f; } else { temp = 2.0f; sp60 = 2.0f; sp68 = 40.0f; - var_v1 = 4; - D_800D2108[var_v1] = arg0; - D_800D211C[var_v1] = arg1; + playerNum = 4; // index for Single Player + boostGaugeXpos[playerNum] = xPos; + boostGaugeYpos[playerNum] = yPos; } temp_fs0 = gPlayer[gPlayerNum].boostMeter * (1.0f / 90.0f); @@ -2957,64 +2970,68 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { temp2 = sp68 * temp_fs0; if (!gPlayer[gPlayerNum].boostCooldown) { - Math_SmoothStepToF(&D_800D19AC[var_v1], 255.0f, 0.4f, 100.0f, 0.01f); + Math_SmoothStepToF(&D_800D19AC[playerNum], 255.0f, 0.4f, 100.0f, 0.01f); } else { - Math_SmoothStepToF(&D_800D19AC[var_v1], 100.0f, 0.4f, 100.0f, 0.01f); + Math_SmoothStepToF(&D_800D19AC[playerNum], 100.0f, 0.4f, 100.0f, 0.01f); } - temp_t9 = D_800D19AC[var_v1]; + temp_t9 = D_800D19AC[playerNum]; RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, temp_t9, temp_t9, temp_t9, 255); if (temp_fv0 > 0.01f) { - func_hud_80085890(D_800D2108[var_v1] + temp + temp2, D_800D211C[var_v1] + sp60, temp_fv0, 1.0f); + HUD_BoostGaugeCool_Draw(boostGaugeXpos[playerNum] + temp + temp2, boostGaugeYpos[playerNum] + sp60, temp_fv0, + 1.0f); } if (temp_fs0 > 0.01f) { - func_hud_800857DC(D_800D2108[var_v1] + temp + 1.0f, D_800D211C[var_v1] + sp60, temp_fs0, 1.0f); + HUD_BoostGaugeOverheat_Draw(boostGaugeXpos[playerNum] + temp + 1.0f, boostGaugeYpos[playerNum] + sp60, temp_fs0, + 1.0f); } RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_80085740(D_800D2108[var_v1], D_800D211C[var_v1], 1.0f, 1.0f); + HUD_BoostGaugeFrame_Draw(boostGaugeXpos[playerNum], boostGaugeYpos[playerNum], 1.0f, 1.0f); } -void func_hud_8008D7F4(void) { - s32 D_800D2130[] = { 146, 165, 146, 165 }; - s32 D_800D2140[] = { 106, 106, 125, 125 }; - s32 D_800D2150[] = { 177, 255, 0, 30 }; - s32 D_800D2160[] = { 242, 30, 179, 30 }; - s32 D_800D2170[] = { 12, 0, 67, 255 }; +void HUD_VS_PlayerNumber_Draw(void) { + s32 playerNumberXpos[] = { 146, 165, 146, 165 }; + s32 playerNumberYpos[] = { 106, 106, 125, 125 }; + s32 playerNumberR[] = { 177, 255, 0, 30 }; + s32 playerNumberG[] = { 242, 30, 179, 30 }; + s32 playerNumberB[] = { 12, 0, 67, 255 }; RCP_SetupDL(&gMasterDisp, SETUPDL_78); - gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D2150[gPlayerNum], D_800D2160[gPlayerNum], D_800D2170[gPlayerNum], 255); - Graphics_DisplayHUDNumber(D_800D2130[gPlayerNum], D_800D2140[gPlayerNum], gPlayerNum + 1); + gDPSetPrimColor(gMasterDisp++, 0, 0, playerNumberR[gPlayerNum], playerNumberG[gPlayerNum], + playerNumberB[gPlayerNum], 255); + Graphics_DisplayHUDNumber(playerNumberXpos[gPlayerNum], playerNumberYpos[gPlayerNum], gPlayerNum + 1); } -s32 D_800D2180[4] = { 0, 0, 0, 0 }; -s32 D_800D2190[4] = { 0, 0, 0, 0 }; +s32 sVsSavedBombCount[4] = { 0, 0, 0, 0 }; // Set but not used +s32 sVsBombCountFlashTimer[4] = { 0, 0, 0, 0 }; f32 D_800D21A0 = 255.0f; f32 D_800D21A4 = 0.0f; -void func_hud_8008D984(void) { - s32 D_800D21A8[] = { 146, 165, 146, 165 }; - s32 D_800D21B8[] = { 94, 94, 137, 137 }; +void HUD_VS_BombCount_Draw(void) { + s32 bombIconXpos[] = { 146, 165, 146, 165 }; + s32 bombIconYpos[] = { 94, 94, 137, 137 }; - if (gBombCount[gPlayerNum] != D_800D2180[gPlayerNum]) { - D_800D2180[gPlayerNum] = gBombCount[gPlayerNum]; + if (gBombCount[gPlayerNum] != sVsSavedBombCount[gPlayerNum]) { + sVsSavedBombCount[gPlayerNum] = gBombCount[gPlayerNum]; if (gBombCount[gPlayerNum] == 0) { - D_800D2190[gPlayerNum] = 0; + sVsBombCountFlashTimer[gPlayerNum] = 0; } else { - D_800D2190[gPlayerNum] = 30; + sVsBombCountFlashTimer[gPlayerNum] = 30; } } - if (D_800D2190[gPlayerNum] != 0) { - D_800D2190[gPlayerNum]--; + if (sVsBombCountFlashTimer[gPlayerNum] != 0) { + sVsBombCountFlashTimer[gPlayerNum]--; } - if (((D_800D2190[gPlayerNum] & 2) != 0) || ((D_800D2190[gPlayerNum] == 0) && (gBombCount[gPlayerNum] != 0))) { + if (((sVsBombCountFlashTimer[gPlayerNum] & 2) != 0) || + ((sVsBombCountFlashTimer[gPlayerNum] == 0) && (gBombCount[gPlayerNum] != 0))) { RCP_SetupDL_78(); if (gBombCount[gPlayerNum] >= 2) { if (Math_SmoothStepToF(&D_800D21A4, D_800D21A0, 0.4f, 100.0f, 0.1f) == 0.0f) { @@ -3028,38 +3045,38 @@ void func_hud_8008D984(void) { D_800D21A4 = 255.0f; } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_800D21A4); - func_hud_8008D1F0(D_800D21A8[gPlayerNum], D_800D21B8[gPlayerNum], 1.0f, 1.0f); + HUD_VS_BombIcon_Draw(bombIconXpos[gPlayerNum], bombIconYpos[gPlayerNum], 1.0f, 1.0f); } } -void func_hud_8008DC34(void) { - if (gVsMatchStart && (D_versus_80178750 == 0)) { - func_hud_8008D250(); - func_hud_8008D7F4(); - func_hud_8008D4F0(0, 0); - func_hud_8008D31C(); - func_hud_8008D984(); +void HUD_VS_DrawHUD(void) { + if (gVsMatchStart && !gVsMatchOver) { + HUD_VsModePortrait_Draw(); + HUD_VS_PlayerNumber_Draw(); + HUD_BoostGauge_Draw(0, 0); + HUD_VS_ShieldGauge_Draw(); + HUD_VS_BombCount_Draw(); } - if (D_versus_80178750 == 0) { - func_hud_8008CBE4(); + if (!gVsMatchOver) { + HUD_KillCountStars_Update(); } } -void func_hud_8008DCB0(f32 arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4) { +void HUD_VS_X_Draw(f32 xPos, f32 yPos, s32 r, s32 g, s32 b) { RCP_SetupDL_78(); - gDPSetPrimColor(gMasterDisp++, 0, 0, arg2, arg3, arg4, D_hud_80161708); - TextureRect_CI4(&gMasterDisp, D_1011ED0, D_1011F08, 16, 7, arg0, arg1, 1.0f, 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, D_hud_80161708); + Lib_TextureRect_CI4(&gMasterDisp, aXTex, aXTLUT, 16, 7, xPos, yPos, 1.0f, 1.0f); } -void func_hud_8008DD78(f32 arg0, f32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { +void HUD_VS_LivesCount_Draw(f32 xPos, f32 yPos, s32 number, s32 r, s32 g, s32 b) { RCP_SetupDL_78(); - gDPSetPrimColor(gMasterDisp++, 0, 0, arg3, arg4, arg5, D_hud_80161708); + gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, D_hud_80161708); - if (arg2 >= 10) { - Graphics_DisplayHUDNumber((s32) arg0 - (func_hud_8008BCBC(arg2) * 8) + 11, arg1, arg2); + if (number >= 10) { + Graphics_DisplayHUDNumber((s32) xPos - (HUD_CountDigits(number) * 8) + 11, yPos, number); } else { - Graphics_DisplayHUDNumber(arg0, arg1, arg2); + Graphics_DisplayHUDNumber(xPos, yPos, number); } } @@ -3091,10 +3108,10 @@ void HUD_DrawBossHealth(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI4(&gMasterDisp, D_1011A40, D_1011AB0, 32, 7, temp2, temp3, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_1011A40, D_1011AB0, 32, 7, temp2, temp3, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); - TextureRect_IA8(&gMasterDisp, D_1002040, 40, 12, sp3C, temp1, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_1002040, 40, 12, sp3C, temp1, 1.0f, 1.0f); if (sp3C >= 25.0f) { Math_SmoothStepToF(&D_801616C4, 0.88f, 0.3f, 0.2f, 0.1f); @@ -3103,7 +3120,7 @@ void HUD_DrawBossHealth(void) { if ((D_801616C4 >= 0.1f) && (sp3C >= 25.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI8(&gMasterDisp, D_10129C0, D_1013090, 16, 109, temp4, temp5, 1.0f, D_801616C4); + Lib_TextureRect_CI8(&gMasterDisp, D_10129C0, D_1013090, 16, 109, temp4, temp5, 1.0f, D_801616C4); } RCP_SetupDL(&gMasterDisp, SETUPDL_76); @@ -3126,7 +3143,7 @@ void HUD_DrawBossHealth(void) { temp6 = sp3C + 8.0f; temp7 = 101.0f - ((2200.0f / 69.0f) * D_801616C8) + temp1; if (D_801616C8 > 0.0f) { - TextureRect_RGBA16(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8); + Lib_TextureRect_RGBA16(&gMasterDisp, D_Tex_800D99F8, 32, 32, temp6, temp7, 0.2f, D_801616C8); } } } else { @@ -3157,7 +3174,8 @@ void HUD_DisplayCountdown(f32 xPos, f32 yPos, s32* countdown, f32 scale) { if ((i % 2) != 0) { RCP_SetupDL_78(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * scale) + xPos, yPos, scale, scale); + Lib_TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, (var_fs0 * scale) + xPos, yPos, scale, + scale); } else { RCP_SetupDL_76(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); @@ -3169,7 +3187,7 @@ void HUD_DisplayCountdown(f32 xPos, f32 yPos, s32* countdown, f32 scale) { } void HUD_DrawCountdown(s32* countdown, f32 scale) { - //! FAKE: + //! FAKE: Weird control flow if (1) {} if (gPlayState != PLAY_PAUSE) { @@ -3197,83 +3215,83 @@ void HUD_DrawCountdown(s32* countdown, f32 scale) { } } -void func_hud_8008E5E8(void) { +void HUD_Radar(void) { if (gVersusMode) { - func_hud_8008DC34(); + HUD_VS_DrawHUD(); } - func_hud_8008A4DC(); + HUD_RadarMarks_Update(); } -void func_hud_8008E620(f32 arg0, f32 arg1) { +void HUD_Hitpoints_Update(f32 xPos, f32 yPos) { f32 r; f32 g; f32 b; - s32 ret; + bool medalStatus; switch (gCurrentLevel) { case LEVEL_CORNERIA: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_METEO: - ret = Play_CheckMedalStatus(200); + medalStatus = Play_CheckMedalStatus(200); break; case LEVEL_FORTUNA: - ret = Play_CheckMedalStatus(50); + medalStatus = Play_CheckMedalStatus(50); break; case LEVEL_SECTOR_X: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_TITANIA: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_BOLSE: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_SECTOR_Y: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_KATINA: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_SOLAR: - ret = Play_CheckMedalStatus(100); + medalStatus = Play_CheckMedalStatus(100); break; case LEVEL_MACBETH: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_AQUAS: - ret = Play_CheckMedalStatus(150); + medalStatus = Play_CheckMedalStatus(150); break; case LEVEL_ZONESS: - ret = Play_CheckMedalStatus(250); + medalStatus = Play_CheckMedalStatus(250); break; case LEVEL_SECTOR_Z: - ret = Play_CheckMedalStatus(100); + medalStatus = Play_CheckMedalStatus(100); break; case LEVEL_AREA_6: - ret = Play_CheckMedalStatus(300); + medalStatus = Play_CheckMedalStatus(300); break; case LEVEL_VENOM_ANDROSS: case LEVEL_VENOM_2: - ret = Play_CheckMedalStatus(200); + medalStatus = Play_CheckMedalStatus(200); break; default: - ret = false; + medalStatus = false; break; } @@ -3281,9 +3299,9 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { gMedalFlashTimer--; } - if (ret != gMedalStatus) { + if (medalStatus != gMedalStatus) { gMedalFlashTimer = 30; - gMedalStatus = ret; + gMedalStatus = medalStatus; } if ((gMedalFlashTimer % 2) != 0) { @@ -3291,7 +3309,7 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { g = 255; b = 255; } else { - if (ret != 0) { + if (medalStatus) { r = 200; g = 100; b = 50; @@ -3301,121 +3319,123 @@ void func_hud_8008E620(f32 arg0, f32 arg1) { b = 200; } } + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); - func_hud_80094D20(arg0, arg1); + HUD_Hitpoints_Draw(xPos, yPos); } -void func_hud_8008E9EC(f32 arg0, f32 arg1) { - func_hud_8008E620(arg0, arg1); - func_hud_8008B734(); +void HUD_Shield_GoldRings_HitPoints(f32 xPos, f32 yPos) { + HUD_Hitpoints_Update(xPos, yPos); + HUD_PlayerShield_GoldRings(); } -void func_hud_8008EA14(f32 x, f32 y) { +void HUD_BombCounter_Draw(f32 x, f32 y) { s32 i; s32 sp68; f32 temp_fv0; f32 temp; + // Max bombs if (gBombCount[gPlayerNum] > 9) { gBombCount[gPlayerNum] = 9; } - switch (D_800D19F8) { - case 0: - D_800D19F4 = gBombCount[gPlayerNum]; + switch (sBombCounterState) { + case BOMB_COUNTER_INIT: + sHudBombCount = gBombCount[gPlayerNum]; sp68 = 0; - D_800D19F8 = 1; + sBombCounterState = BOMB_COUNTER_STATE_1; D_80161770 = D_80161774 = D_80161778 = 255.0f; D_8016177C = D_80161780 = D_80161784 = 255.0f; break; - case 1: - temp_fv0 = gBombCount[gPlayerNum] - D_800D19F4; + case BOMB_COUNTER_STATE_1: + temp_fv0 = gBombCount[gPlayerNum] - sHudBombCount; if (temp_fv0 > 0.0f) { - D_800D19F4++; - if (D_800D19F4 > 5) { + sHudBombCount++; + if (sHudBombCount > 5) { sp68 = 0; break; } - if (D_800D19F4 == 5) { + if (sHudBombCount == 5) { D_800D19F0 = 0.0f; sp68 = 4; - D_800D19F8 = 6; + sBombCounterState = BOMB_COUNTER_STATE_6; break; } else { D_800D19F0 = 0.0f; sp68 = 3; - D_800D19F8 = 5; + sBombCounterState = BOMB_COUNTER_STATE_5; } break; } if (temp_fv0 < 0.0f) { - D_800D19F8 = 2; + sBombCounterState = BOMB_COUNTER_STATE_2; } sp68 = 0; break; - case 2: - D_800D19F4--; + case BOMB_COUNTER_STATE_2: + sHudBombCount--; sp68 = 0; - D_800D19F8 = 1; - if (D_800D19F4 <= 3) { + sBombCounterState = BOMB_COUNTER_STATE_1; + if (sHudBombCount <= 3) { D_800D19F0 = 0.0f; sp68 = 2; - D_800D19F8 = 4; + sBombCounterState = BOMB_COUNTER_STATE_4; break; } - if (D_800D19F4 == 4) { + if (sHudBombCount == 4) { D_800D19F0 = 0.0f; sp68 = 1; - D_800D19F8 = 3; + sBombCounterState = BOMB_COUNTER_STATE_3; break; } break; - case 3: + case BOMB_COUNTER_STATE_3: sp68 = 1; if (Math_SmoothStepToF(&D_800D19F0, 10.0f, 0.3f, 10.0f, 0.1f) == 0.0f) { - D_800D19F8 = 1; + sBombCounterState = BOMB_COUNTER_STATE_1; D_800D19F0 = 10.0f; sp68 = 1; } break; - case 4: + case BOMB_COUNTER_STATE_4: sp68 = 2; if (Math_SmoothStepToF(&D_800D19F0, 10.0f, 0.3f, 10.0f, 0.1f) == 0.0f) { - D_800D19F8 = 1; + sBombCounterState = BOMB_COUNTER_STATE_1; D_800D19F0 = 10.0f; sp68 = 2; } break; - case 5: + case BOMB_COUNTER_STATE_5: sp68 = 3; - if (Math_SmoothStepToF(&D_800D19F0, 20.0f + ((D_800D19F4 - 1) * 10), 0.3f, 10.0f, 0.001f) == 0.0f) { - D_800D19F8 = 1; - D_800D19F0 = 20.0f + ((D_800D19F4 - 1) * 10); + if (Math_SmoothStepToF(&D_800D19F0, 20.0f + ((sHudBombCount - 1) * 10), 0.3f, 10.0f, 0.001f) == 0.0f) { + sBombCounterState = BOMB_COUNTER_STATE_1; + D_800D19F0 = 20.0f + ((sHudBombCount - 1) * 10); sp68 = 3; } break; - case 6: + case BOMB_COUNTER_STATE_6: sp68 = 4; if (Math_SmoothStepToF(&D_800D19F0, 10.0f, 0.3f, 10.0f, 0.1f) == 0.0f) { - D_800D19F8 = 7; + sBombCounterState = BOMB_COUNTER_STATE_7; D_800D19F0 = 0.0f; sp68 = 5; } break; - case 7: + case BOMB_COUNTER_STATE_7: sp68 = 5; if (0.0f == Math_SmoothStepToF(&D_800D19F0, 12.0f, 0.3f, 10.0f, 5.0f)) { - D_800D19F8 = 1; + sBombCounterState = BOMB_COUNTER_STATE_1; D_800D19F0 = 0.0f; sp68 = 0; } @@ -3445,86 +3465,96 @@ void func_hud_8008EA14(f32 x, f32 y) { switch (sp68) { case 0: - if (D_800D19F4 >= 5) { - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); - func_hud_8008DCB0(x + 14.0f, y + 2.0f, D_8016177C, D_80161780, D_80161784); - func_hud_8008DD78(x + 29.0f, y + 1.0f, D_800D19F4, D_8016177C, D_80161780, D_80161784); + if (sHudBombCount >= 5) { + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x, y, 1.0f, 1.0f); + HUD_VS_X_Draw(x + 14.0f, y + 2.0f, D_8016177C, D_80161780, D_80161784); + HUD_VS_LivesCount_Draw(x + 29.0f, y + 1.0f, sHudBombCount, D_8016177C, D_80161780, D_80161784); } else { - for (i = (D_800D19F4 - 1); i >= 0; i--) { - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)), y, 1.0f, 1.0f); + for (i = (sHudBombCount - 1); i >= 0; i--) { + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (30.0f - (i * 10)), + y, 1.0f, 1.0f); } } break; case 1: - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 3.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 2.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 1.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (D_800D19F0 * 0.0f), y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (D_800D19F0 * 3.0f), y, 1.0f, + 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (D_800D19F0 * 2.0f), y, 1.0f, + 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (D_800D19F0 * 1.0f), y, 1.0f, + 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (D_800D19F0 * 0.0f), y, 1.0f, + 1.0f); break; case 2: - for (i = D_800D19F4; i >= 0; i--) { + for (i = sHudBombCount; i >= 0; i--) { if (i == 0) { temp = D_800D19F0 * 4.0f; } else { temp = D_800D19F0; } - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)) + temp, y, 1.0f, - 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, + x + (30.0f - (i * 10)) + temp, y, 1.0f, 1.0f); } break; case 3: - for (i = (D_800D19F4 - 2); i >= 0; i--) { - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + (30.0f - (i * 10)), y, 1.0f, 1.0f); + for (i = (sHudBombCount - 2); i >= 0; i--) { + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + (30.0f - (i * 10)), y, + 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 50.0f - D_800D19F0, y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + 50.0f - D_800D19F0, y, 1.0f, + 1.0f); break; case 4: - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 30.0f - (D_800D19F0 * 3.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 20.0f - (D_800D19F0 * 2.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x + 10.0f - (D_800D19F0 * 1.0f), y, 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + 30.0f - (D_800D19F0 * 3.0f), + y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + 20.0f - (D_800D19F0 * 2.0f), + y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x + 10.0f - (D_800D19F0 * 1.0f), + y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x, y, 1.0f, 1.0f); break; case 5: - func_hud_8008DCB0(x + D_800D19F0, y + 2.0f, D_8016177C, D_80161780, D_80161784); - func_hud_8008DD78(x + 15.0f + D_800D19F0, y + 1.0f, D_800D19F4, D_8016177C, D_80161780, D_80161784); - TextureRect_CI4(&gMasterDisp, D_10116B0, D_1011730, 16, 16, x, y, 1.0f, 1.0f); + HUD_VS_X_Draw(x + D_800D19F0, y + 2.0f, D_8016177C, D_80161780, D_80161784); + HUD_VS_LivesCount_Draw(x + 15.0f + D_800D19F0, y + 1.0f, sHudBombCount, D_8016177C, D_80161780, D_80161784); + Lib_TextureRect_CI4(&gMasterDisp, aVsBombIconTex, aVsBombIconTLUT, 16, 16, x, y, 1.0f, 1.0f); break; case 6: RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI4(&gMasterDisp, D_blue_marine_3000090, D_blue_marine_3000120, 32, 9, x + 1.0f, y, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_blue_marine_3000090, D_blue_marine_3000120, 32, 9, x + 1.0f, y, 1.0f, + 1.0f); break; } } -void func_hud_8008F94C(void) { - func_hud_8008E5E8(); +void HUD_VS_Radar(void) { + HUD_Radar(); } -void func_hud_8008F96C(void) { +void HUD_SinglePlayer(void) { if (gPlayState != PLAY_PAUSE) { - func_hud_8008E5E8(); + HUD_Radar(); } RCP_SetupDL_36(); - if ((gLevelMode != LEVELMODE_TURRET) && (D_hud_80161708 != 0)) { - func_hud_8008D4F0(246.0f, 28.0f); - func_hud_8008EA14(250.0f, 38.0f); + HUD_BoostGauge_Draw(246.0f, 28.0f); + HUD_BombCounter_Draw(250.0f, 38.0f); } - func_hud_8008B2A4(); + HUD_IncomingMsg(); if (D_hud_80161708 != 0) { - func_hud_8008E9EC(24.0f, 30.0f); + HUD_Shield_GoldRings_HitPoints(24.0f, 30.0f); if (gCurrentLevel != LEVEL_TRAINING) { - func_hud_80087530(248.0f, 11.0f, gLifeCount[gPlayerNum]); + HUD_LivesCount2_Draw(248.0f, 11.0f, gLifeCount[gPlayerNum]); } } @@ -3542,14 +3572,14 @@ void HUD_Draw(void) { for (i = 0; i < 10; i++) { D_801617E8[i] = 0; D_801617C0[i] = 0; - D_80161838[i] = 0; - D_80161810[i] = 0; + sPauseScreenTimer[i] = 0; + sPauseScreenIwork[i] = 0; } for (i = 0; i < 20; i++) { D_80161900[i] = 0; - D_80161860[i] = 0; - D_801618B0[i] = 0.0f; + sGoldRingsIwork[i] = 0; + sGoldRingsFwork[i] = 0.0f; } if (gGoldRingCount[0] != 0) { @@ -3560,7 +3590,7 @@ void HUD_Draw(void) { for (i = 0; i < goldRings; i++) { if (goldRings != 3) { - D_80161860[i + 1] = 1; + sGoldRingsIwork[i + 1] = 1; } } gGoldRingCount[1] = gGoldRingCount[0]; @@ -3568,7 +3598,7 @@ void HUD_Draw(void) { gGoldRingCount[1] = 0; } - D_800D19F8 = 0; + sBombCounterState = BOMB_COUNTER_INIT; D_80161788 = 0; D_8016178C = 0; gMedalStatus = 0; @@ -3639,15 +3669,15 @@ void HUD_Draw(void) { } if (gCamCount != 1) { - func_hud_8008F94C(); + HUD_VS_Radar(); } else { - func_hud_8008F96C(); + HUD_SinglePlayer(); } - func_hud_8008BC80(); - func_hud_80088970(); + HUD_RadioDamage(); + HUD_PauseScreen_Update(); } -void HUD_FoBase_Draw(Boss* boss) { +void FoBase_Draw(Boss* boss) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPDisplayList(gMasterDisp++, aFoBaseDL2); RCP_SetupDL_34(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -3658,7 +3688,7 @@ void HUD_FoBase_Draw(Boss* boss) { gDPSetTextureFilter(gMasterDisp++, G_TF_BILERP); } -void func_hud_8008FFF0(FoBase* this, s32 arg1) { +void FoBase_BurnEffects(FoBase* this, s32 timer) { Vec3s D_800D21C8[] = { { -385, 54, 233 }, { -324, 148, 193 }, { -267, 186, 136 }, { -128, 430, 180 }, { -231, 584, 140 }, { -431, 551, -120 }, { -285, 516, -32 }, { -285, 601, 18 }, { 300, 596, 18 }, { 300, 529, -65 }, @@ -3673,8 +3703,8 @@ void func_hud_8008FFF0(FoBase* this, s32 arg1) { f32 temp; s32 temp2; - if (arg1 >= 7000) { - temp2 = arg1 - 7000; + if (timer >= 7000) { + temp2 = timer - 7000; if (temp2 > 1596) { temp2 = 1596; @@ -3700,14 +3730,14 @@ void func_hud_8008FFF0(FoBase* this, s32 arg1) { } } -s32 HUD_FoBase_ExplodeCs(FoBase* this) { +s32 FoBase_ExplodeCs(FoBase* this) { Vec3f dest; Vec3f src; Player* player; s32 csState = 0; if (this->swork[0] == 1) { - func_hud_8008FFF0(this, 8596); + FoBase_BurnEffects(this, 8596); player = &gPlayer[0]; csState = 1; @@ -3808,7 +3838,7 @@ s32 HUD_FoBase_ExplodeCs(FoBase* this) { return csState; } -void HUD_FoBase_Update(FoBase* this) { +void FoBase_Update(FoBase* this) { switch (this->state) { case 0: if ((this->fwork[1] == 255.0f) && (this->fwork[2] == 212.0f)) { @@ -3829,13 +3859,13 @@ void HUD_FoBase_Update(FoBase* this) { } break; } - func_hud_8008FFF0(this, gAllRangeEventTimer); + FoBase_BurnEffects(this, gAllRangeEventTimer); } -bool func_hud_8009092C(ActorTeamBoss* this) { +bool ActorTeamBoss_SetTarget(ActorTeamBoss* this) { bool ret = false; Boss* boss; - s32 i = 0; + s32 i; if (this->aiIndex != 0) { return true; @@ -3858,7 +3888,7 @@ bool func_hud_8009092C(ActorTeamBoss* this) { return ret; } -bool func_hud_80090A00(ActorTeamBoss* this) { +bool ActorTeamBoss_SlippyEscapeFromTiBoss(ActorTeamBoss* this) { switch (this->iwork[5]) { case 0: this->fwork[8] = 0.0f; @@ -3932,10 +3962,10 @@ bool func_hud_80090A00(ActorTeamBoss* this) { return false; } -bool func_hud_80090CCC(ActorTeamBoss* this) { +bool ActorTeamBoss_Attack(ActorTeamBoss* this) { bool ret = false; - if (func_hud_8009092C(this)) { + if (ActorTeamBoss_SetTarget(this)) { this->fwork[6] = gBosses[this->aiIndex].obj.pos.z; this->fwork[5] = gBosses[this->aiIndex].obj.pos.y; this->fwork[4] = gBosses[this->aiIndex].obj.pos.x; @@ -3974,11 +4004,11 @@ bool func_hud_80090CCC(ActorTeamBoss* this) { return ret; } -s32 func_hud_80090E8C(ActorTeamBoss* this) { +s32 ActorTeamBoss_FlyAroundAllRange(ActorTeamBoss* this) { f32 x; f32 y; f32 z; - f32 var_fv1_2; + f32 range; if (this->timer_0BC == 0) { if (gLevelType == LEVELTYPE_SPACE) { @@ -4000,13 +4030,13 @@ s32 func_hud_80090E8C(ActorTeamBoss* this) { } if (this->aiType == AI360_FALCO) { - var_fv1_2 = 3000.0f; + range = 3000.0f; } else { - var_fv1_2 = 5000.0f; + range = 5000.0f; } - if ((var_fv1_2 < fabsf(this->obj.pos.x - gBosses[0].obj.pos.x)) && - (var_fv1_2 < fabsf(this->obj.pos.z - gBosses[0].obj.pos.z))) { + if ((range < fabsf(this->obj.pos.x - gBosses[0].obj.pos.x)) && + (range < fabsf(this->obj.pos.z - gBosses[0].obj.pos.z))) { this->state = 0; } @@ -4017,7 +4047,7 @@ s32 func_hud_80090E8C(ActorTeamBoss* this) { return false; } -bool func_hud_800910C0(ActorTeamBoss* this) { +bool ActorTeamBoss_FlyAroundOnRails(ActorTeamBoss* this) { f32 var_fv1; if (this->timer_0BC == 0) { @@ -4048,15 +4078,15 @@ bool func_hud_800910C0(ActorTeamBoss* this) { return false; } -void func_hud_80091254(ActorTeamBoss* this) { +void ActorTeamBoss_FlyAround(ActorTeamBoss* this) { if (gLevelMode == LEVELMODE_ALL_RANGE) { - func_hud_80090E8C(this); + ActorTeamBoss_FlyAroundAllRange(this); } else { - func_hud_800910C0(this); + ActorTeamBoss_FlyAroundOnRails(this); } } -bool func_hud_80091298(ActorTeamBoss* this) { +bool ActorTeamBoss_FlyAlongPlayer(ActorTeamBoss* this) { this->fwork[1] = gPlayer[0].baseSpeed + 10.0f; this->fwork[3] = 3.6f; this->fwork[4] = gPlayer[0].pos.x + ((f32) (this->aiType - 2) * 700.0f); @@ -4070,7 +4100,7 @@ bool func_hud_80091298(ActorTeamBoss* this) { return false; } -bool func_hud_80091368(ActorTeamBoss* this) { +bool ActorTeamBoss_Retreat(ActorTeamBoss* this) { switch (this->iwork[5]) { case 0: this->fwork[5] = 20000.0f; @@ -4113,26 +4143,26 @@ bool func_hud_80091368(ActorTeamBoss* this) { return false; } -void func_hud_800914FC(ActorTeamBoss* this) { +void ActorTeamBoss_SetAction(ActorTeamBoss* this) { switch (this->state) { case 0: - if (!func_hud_80090CCC(this)) { + if (!ActorTeamBoss_Attack(this)) { break; } case 1: - func_hud_80091254(this); + ActorTeamBoss_FlyAround(this); break; case 2: - func_hud_80091298(this); + ActorTeamBoss_FlyAlongPlayer(this); break; case 3: - func_hud_80091368(this); + ActorTeamBoss_Retreat(this); break; case 7: - func_hud_80090A00(this); + ActorTeamBoss_SlippyEscapeFromTiBoss(this); break; } @@ -4149,7 +4179,7 @@ void func_hud_800914FC(ActorTeamBoss* this) { } } -bool func_hud_800915FC(ActorTeamBoss* this) { +bool ActorTeamBoss_ObstacleCheck(ActorTeamBoss* this) { s32 i; f32 y; Vec3f vec; @@ -4203,7 +4233,7 @@ bool func_hud_800915FC(ActorTeamBoss* this) { return ret; } -bool func_hud_80091864(ActorTeamBoss* this) { +bool ActorTeamBoss_SetFlyingAngle(ActorTeamBoss* this) { f32 sp44; f32 sp40; f32 sp3C; @@ -4220,7 +4250,7 @@ bool func_hud_80091864(ActorTeamBoss* this) { sp40 = Math_RadToDeg(Math_Atan2F(x, z)); sp44 = Math_RadToDeg(Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); - if ((func_hud_800915FC(this) != 0) && (this->iwork[4] == 0)) { + if (ActorTeamBoss_ObstacleCheck(this) && (this->iwork[4] == 0)) { sp44 += 40.0f; if (sp44 >= 360.0f) { sp44 -= 360.0f; @@ -4262,7 +4292,7 @@ bool func_hud_80091864(ActorTeamBoss* this) { return false; } -bool func_hud_80091B90(ActorTeamBoss* this) { +bool ActorTeamBoss_SetFlyingSpeed(ActorTeamBoss* this) { Vec3f vec; this->obj.rot.x = -this->rot_0F4.x; @@ -4290,7 +4320,7 @@ bool func_hud_80091B90(ActorTeamBoss* this) { return false; } -bool func_hud_80091CF8(ActorTeamBoss* this) { +bool ActorTeamBoss_SetBoost(ActorTeamBoss* this) { if (this->iwork[1] != 0) { if (this->fwork[10] < 0.1f) { this->fwork[10] = 20.0f; @@ -4309,7 +4339,7 @@ bool func_hud_80091CF8(ActorTeamBoss* this) { return false; } -bool func_hud_80091DF4(ActorTeamBoss* this) { +bool ActorTeamBoss_Shoot(ActorTeamBoss* this) { Vec3f src; Vec3f dest; @@ -4326,14 +4356,14 @@ bool func_hud_80091DF4(ActorTeamBoss* this) { return false; } -bool func_hud_80091F00(ActorTeamBoss* this) { - u8 temp_v0 = this->dmgType; - Vec3f sp40; - Vec3f sp34; +bool ActorTeamBoss_HandleDamage(ActorTeamBoss* this) { + u8 prevDmgType = this->dmgType; + Vec3f src; + Vec3f dest; this->dmgType = DMG_NONE; - if ((this->state == 3) || (temp_v0 == DMG_EXPLOSION)) { + if ((this->state == 3) || (prevDmgType == DMG_EXPLOSION)) { return false; } @@ -4344,23 +4374,25 @@ bool func_hud_80091F00(ActorTeamBoss* this) { this->timer_0C6 = 20; 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); + Matrix_RotateY(gCalcMatrix, this->rot_0F4.y * M_DTOR, MTXF_NEW); if (Rand_ZeroOne() < 0.5f) { - sp40.x = -20.0f; + src.x = -20.0f; } else { - sp40.x = 20.0f; + src.x = 20.0f; } - sp40.y = RAND_FLOAT_CENTERED(20.0f); - sp40.z = 0.0f; + src.y = RAND_FLOAT_CENTERED(20.0f); + src.z = 0.0f; - Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp40, &sp34); + Matrix_MultVec3fNoTranslate(gCalcMatrix, &src, &dest); - this->fwork[13] = sp34.x; - this->fwork[14] = sp34.y; - this->fwork[12] = sp34.z; + this->fwork[13] = dest.x; + this->fwork[14] = dest.y; + this->fwork[12] = dest.z; gTeamShields[this->aiType] = this->health; @@ -4414,8 +4446,8 @@ bool func_hud_80091F00(ActorTeamBoss* this) { return false; } -void func_hud_80092244(ActorTeamBoss* this) { - gRadarMarks[this->index].status = 1; +void ActorTeamBoss_Radarmarks_Init(ActorTeamBoss* this) { + gRadarMarks[this->index].enabled = true; gRadarMarks[this->index].type = this->aiType; gRadarMarks[this->index].pos.x = this->obj.pos.x; gRadarMarks[this->index].pos.y = this->obj.pos.y; @@ -4423,7 +4455,7 @@ void func_hud_80092244(ActorTeamBoss* this) { gRadarMarks[this->index].yRot = this->rot_0F4.y + 180.0f; } -void func_hud_800922F4(ActorTeamBoss* this) { +void ActorTeamBoss_DmgEffect(ActorTeamBoss* this) { s32 mask; if ((gTeamShields[this->aiType] < 64) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { @@ -4451,7 +4483,7 @@ void func_hud_800922F4(ActorTeamBoss* this) { } } -bool func_hud_800924E0(ActorTeamBoss* this) { +bool ActorTeamBoss_SomerSault(ActorTeamBoss* this) { Vec3f src; Vec3f dest; f32 var_fv0; @@ -4468,7 +4500,6 @@ bool func_hud_800924E0(ActorTeamBoss* this) { } var_fv0 = 60.0f; - if (this->fwork[19] > 240.0f) { var_fv0 = -50.0f; } @@ -4517,7 +4548,7 @@ bool func_hud_800924E0(ActorTeamBoss* this) { return ret; } -bool func_hud_800927A0(ActorTeamBoss* this) { +bool ActorTeamBoss_UTurn(ActorTeamBoss* this) { Vec3f src; Vec3f dest; f32 sp54; @@ -4685,19 +4716,19 @@ void ActorTeamBoss_Init(ActorTeamBoss* this) { } void ActorTeamBoss_Update(ActorTeamBoss* this) { - f32 var_fv1; + f32 range; this->health = gTeamShields[this->aiType]; switch (this->work_048) { case 0: - func_hud_800914FC(this); - func_hud_80091864(this); - func_hud_80091B90(this); - func_hud_80091DF4(this); + ActorTeamBoss_SetAction(this); + ActorTeamBoss_SetFlyingAngle(this); + ActorTeamBoss_SetFlyingSpeed(this); + ActorTeamBoss_Shoot(this); if (this->dmgType != DMG_NONE) { - func_hud_80091F00(this); + ActorTeamBoss_HandleDamage(this); } if (this->state == 3) { @@ -4706,19 +4737,19 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { switch (gCurrentLevel) { case LEVEL_SECTOR_Z: - var_fv1 = 20000.0f; + range = 20000.0f; break; case LEVEL_CORNERIA: - var_fv1 = 8000.0f; + range = 8000.0f; break; case LEVEL_BOLSE: - var_fv1 = 10000.0f; + range = 10000.0f; break; default: - var_fv1 = 12500.0f; + range = 12500.0f; break; } @@ -4729,7 +4760,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { } if ((gLevelMode == LEVELMODE_ALL_RANGE) && - (fabsf(this->obj.pos.x > var_fv1) || fabsf(this->obj.pos.z > var_fv1)) && + (fabsf(this->obj.pos.x > range) || fabsf(this->obj.pos.z > range)) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE)) { this->work_048 = 2; this->work_04A = 1; @@ -4737,14 +4768,14 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { break; case 1: - if (func_hud_800924E0(this) != 0) { + if (ActorTeamBoss_SomerSault(this) != 0) { this->work_048 = 0; this->iwork[9] = RAND_INT(30.0f) + 90; } break; case 2: - if (func_hud_800927A0(this) != 0) { + if (ActorTeamBoss_UTurn(this) != 0) { this->work_04A = 0; this->work_048 = this->work_04A; this->iwork[9] = RAND_INT(30.0f) + 90; @@ -4752,9 +4783,9 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { break; } - func_hud_80091CF8(this); - func_hud_800922F4(this); - func_hud_80092244(this); + ActorTeamBoss_SetBoost(this); + ActorTeamBoss_DmgEffect(this); + ActorTeamBoss_Radarmarks_Init(this); if (this->iwork[9] != 0) { this->iwork[9]--; @@ -4762,7 +4793,7 @@ void ActorTeamBoss_Update(ActorTeamBoss* this) { this->iwork[10] = 0; } -void func_hud_80093164(ActorCutscene* this) { +void Aquas_CsIntroActors_Update(ActorCutscene* this) { Vec3f src; Vec3f dest; Player* player = &gPlayer[0]; @@ -4807,7 +4838,7 @@ void func_hud_80093164(ActorCutscene* this) { this->obj.rot.z = -this->rot_0F4.z; } -void func_hud_80093310(void) { +void Aquas_CsIntroGreatFox_Init(void) { ActorCutscene* actor = &gActors[0]; Actor_Initialize(actor); @@ -4821,7 +4852,7 @@ void func_hud_80093310(void) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); } -void func_hud_800933D8(f32 x, f32 y, f32 z, f32 arg3) { +void Aquas_Effect363_Spawn(f32 x, f32 y, f32 z, f32 arg3) { s32 i; Effect* effect = &gEffects[ARRAY_COUNT(gEffects) - 1]; Player* player = gPlayer; @@ -4881,7 +4912,7 @@ f32 D_800D22CC = 260.0f; s32 D_800D22D0 = 50; s32 D_800D22D4 = 2; -void HUD_AquasStart(Player* player) { +void Aquas_CsLevelStart(Player* player) { Vec3f D_800D22D8[] = { { -1730.0f, 1600.0f, -6690.0f }, { -830.0f, 1600.0f, -7380.0f }, { 0.0f, 1600.0f, -7380.0f } }; @@ -4913,7 +4944,7 @@ void HUD_AquasStart(Player* player) { switch (player->csState) { case 0: - func_hud_80093310(); + Aquas_CsIntroGreatFox_Init(); gCsFrameCount = 0; gDrawBackdrop = 1; gAqDrawMode = 1; @@ -4964,7 +4995,7 @@ void HUD_AquasStart(Player* player) { y = dest.y; z = dest.z; - func_hud_800933D8(x, y, z, 20.0f); + Aquas_Effect363_Spawn(x, y, z, 20.0f); i = (i + 1) % 32; } @@ -4983,7 +5014,7 @@ void HUD_AquasStart(Player* player) { y = dest.y; z = dest.z; - func_hud_800933D8(x, y, z, 20.0f); + Aquas_Effect363_Spawn(x, y, z, 20.0f); i = (i + 1) % 32; } @@ -5163,10 +5194,10 @@ void HUD_AquasStart(Player* player) { if ((player->unk_018 > -200.0f) && (D_ctx_80177A10[8] < 6)) { if (D_ctx_80177A10[8] < 2) { - func_hud_800933D8(player->pos.x, player->pos.y - 400.0f, player->pos.z, 20.0f); + Aquas_Effect363_Spawn(player->pos.x, player->pos.y - 400.0f, player->pos.z, 20.0f); } if (D_ctx_80177A10[8] >= 2) { - func_hud_800933D8(player->pos.x, player->pos.y, player->pos.z, 10.0f); + Aquas_Effect363_Spawn(player->pos.x, player->pos.y, player->pos.z, 10.0f); } D_ctx_80177A10[8]++; } @@ -5249,7 +5280,7 @@ void HUD_AquasStart(Player* player) { gCsCamAtZ = player->pos.z + (gPathProgress - 1.0f); if (((player->csTimer % 2) == 0) && (player->csTimer > 962)) { - func_hud_800933D8(player->pos.x, player->pos.y, player->pos.z + 50.0f, 20.0f); + Aquas_Effect363_Spawn(player->pos.x, player->pos.y, player->pos.z + 50.0f, 20.0f); } if (player->csTimer <= 900) { @@ -5308,7 +5339,7 @@ f32 D_800D24C0[] = { 128.0f, 128.0f, 255.0f, 128.0f }; s32 D_800D24C8[] = { 0, 900 }; f32 D_800D24CC = 0.02f; -void Hud_Effect363_Update(Effect363* this) { +void Aquas_Effect363_Update(Effect363* this) { Player* player = &gPlayer[0]; if ((player->state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (player->csState < 2)) { @@ -5365,7 +5396,7 @@ void Hud_Effect363_Update(Effect363* this) { } } -void Hud_Effect363_Draw(Effect363* this) { +void Aquas_Effect363_Draw(Effect363* this) { if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].csState < 2)) { RCP_SetupDL(&gMasterDisp, SETUPDL_68); @@ -5385,7 +5416,7 @@ void stub_80094D10(void) { void stub_80094D18(void) { } -void func_hud_80094D20(f32 x, f32 y) { +void HUD_Hitpoints_Draw(f32 x, f32 y) { u8* D_800D24DC[] = { aLargeText_0, aLargeText_1, aLargeText_2, aLargeText_3, aLargeText_4, aLargeText_5, aLargeText_6, aLargeText_7, aLargeText_8, aLargeText_9 }; s32 D_800D2504[] = { 100, 10, 1 }; @@ -5455,13 +5486,13 @@ void func_hud_80094D20(f32 x, f32 y) { } if (xScale != 0.0f) { - TextureRect_IA8(&gMasterDisp, D_800D24DC[temp], 16, 15, x1, y1, xScale, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D24DC[temp], 16, 15, x1, y1, xScale, 1.0f); } boolTemp = true; } if (!boolTemp && (xScale != 0.0f)) { - TextureRect_IA8(&gMasterDisp, D_800D24DC[0], 16, 15, x1, y1, xScale, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D24DC[0], 16, 15, x1, y1, xScale, 1.0f); } x += 13.0f; @@ -5506,7 +5537,7 @@ void func_hud_80094D20(f32 x, f32 y) { } if (xScale != 0.0f) { - TextureRect_IA8(&gMasterDisp, D_800D24DC[temp3], 16, 15, x1, y1, xScale, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D24DC[temp3], 16, 15, x1, y1, xScale, 1.0f); } if ((gHitCount != gDisplayedHitCount) && (D_hud_80161720[0] == 0.0f) && (D_hud_80161720[1] == 0.0f) && @@ -5520,16 +5551,16 @@ void func_hud_80094D20(f32 x, f32 y) { } } -void func_hud_80095350(ActorCutscene* this) { +void Aquas_Camera_Setup(ActorCutscene* this) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->animFrame = 9999; + this->animFrame = 9999; // Invalid model type Object_SetInfo(&this->info, this->obj.id); } -void func_hud_800953A0(ActorCutscene* this, s32 arg1) { - Vec3f D_800D2510[] = { +void Aquas_AqBump2_Setup(ActorCutscene* this, s32 posIdx) { + Vec3f sAqBump2Pos[] = { { 1800.0f, 0.0f, -4000.0f }, { -1000.0f, 0.0f, -4800.0f }, { 800.0f, 0.0f, -5600.0f }, @@ -5539,14 +5570,14 @@ void func_hud_800953A0(ActorCutscene* this, s32 arg1) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos = D_800D2510[arg1]; + this->obj.pos = sAqBump2Pos[posIdx]; this->obj.pos.z -= gPathProgress; this->animFrame = 45; Object_SetInfo(&this->info, this->obj.id); } -void func_hud_8009546C(ActorCutscene* this, s32 arg1) { - Vec3f D_800D2540[] = { +void Aquas_AqCoralReef2_Setup(ActorCutscene* this, s32 posIdx) { + Vec3f sAqCoralReef2Pos[] = { { 1300.0f, 0.0f, -2000.0f }, { -1000.0f, 0.0f, -3000.0f }, { 800.0f, 0.0f, 0.0f }, { -1200.0f, 0.0f, -1000.0f }, { -1400.0f, 0.0f, 700.0f }, }; @@ -5554,30 +5585,31 @@ void func_hud_8009546C(ActorCutscene* this, s32 arg1) { Actor_Initialize(this); this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos = D_800D2540[arg1]; + this->obj.pos = sAqCoralReef2Pos[posIdx]; this->obj.pos.z -= gPathProgress; this->animFrame = 46; Object_SetInfo(&this->info, this->obj.id); } -void func_hud_80095538(Actor* actor, s32 index) { - Vec3f D_800D257C[] = { +void Aquas_AqRock_Setup(ActorCutscene* this, s32 posIdx) { + Vec3f sAqRockPos[] = { { 0.0f, 0.0f, -200.0f }, { -300.0f, 0.0f, -700.0f }, { 400.0f, 0.0f, -900.0f }, { 300.0f, 0.0f, -1700.0f }, { -260.0f, 0.0f, -2000.0f }, { -200.0f, 0.0f, -2600.0f }, }; - Actor_Initialize(actor); - actor->obj.status = OBJ_ACTIVE; - actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->obj.pos = D_800D257C[index]; - actor->obj.pos.z -= gPathProgress; - actor->animFrame = 47; - Object_SetInfo(&actor->info, actor->obj.id); + Actor_Initialize(this); + this->obj.status = OBJ_ACTIVE; + this->obj.id = OBJ_ACTOR_CUTSCENE; + this->obj.pos = sAqRockPos[posIdx]; + this->obj.pos.z -= gPathProgress; + this->animFrame = 47; + Object_SetInfo(&this->info, this->obj.id); } -void HUD_AquasComplete(Player* player) { + +void Aquas_CsLevelComplete(Player* player) { s32 i; s32 j; - Actor* actor; + ActorCutscene* camera; f32 x; f32 y; f32 z; @@ -5589,7 +5621,7 @@ void HUD_AquasComplete(Player* player) { Vec3f dest; s32 shield; - actor = &gActors[0]; + camera = &gActors[0]; switch (player->csState) { case 0: @@ -5746,37 +5778,37 @@ void HUD_AquasComplete(Player* player) { player->zPath = gPathProgress = 0; j = 0; - func_hud_80095350(actor); + Aquas_Camera_Setup(camera); j++; for (i = 0; i < 6; i++, j++) { - func_hud_80095538(&gActors[j], i); + Aquas_AqRock_Setup(&gActors[j], i); } for (i = 0; i < 5; i++, j++) { - func_hud_8009546C(&gActors[j], i); + Aquas_AqCoralReef2_Setup(&gActors[j], i); } for (i = 0; i < 4; i++, j++) { - func_hud_800953A0(&gActors[j], i); + Aquas_AqBump2_Setup(&gActors[j], i); } player->pos.z -= gPathProgress; player->trueZpos = player->pos.z; - actor->fwork[1] = 0.0f; - actor->fwork[2] = 600.0f; - actor->fwork[3] = 2600.0f; - actor->fwork[7] = 0.5f; + camera->fwork[1] = 0.0f; + camera->fwork[2] = 600.0f; + camera->fwork[3] = 2600.0f; + camera->fwork[7] = 0.5f; - actor->rot_0F4.y = 130.0f; + camera->rot_0F4.y = 130.0f; - src.x = actor->fwork[1]; - src.y = actor->fwork[2]; - src.z = actor->fwork[3]; + src.x = camera->fwork[1]; + src.y = camera->fwork[2]; + src.z = camera->fwork[3]; Matrix_Translate(gCalcMatrix, player->pos.x, player->pos.y, player->trueZpos + gPathProgress, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->rot_0F4.y), MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * camera->rot_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); player->cam.at.x = gCsCamAtX = player->pos.x; @@ -5800,22 +5832,22 @@ void HUD_AquasComplete(Player* player) { case 12: if ((gCsFrameCount >= 380) && (gCsFrameCount < 640 + 280)) { - Math_SmoothStepToF(&actor->fwork[2], 0.0f, 0.02f, 1000.0f, 0.001f); - Math_SmoothStepToF(&actor->fwork[3], 300.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[2], 0.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[3], 300.0f, 0.02f, 1000.0f, 0.001f); } if (gCsFrameCount >= 920) { - Math_SmoothStepToF(&actor->fwork[3], 200.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[3], 200.0f, 0.02f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1120) { - Math_SmoothStepToF(&actor->fwork[7], 0.1f, 0.05f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[7], 0.1f, 0.05f, 1000.0f, 0.001f); } if (gCsFrameCount >= 1200) { - Math_SmoothStepToF(&actor->fwork[3], 800.0f, 0.02f, 1000.0f, 0.001f); + Math_SmoothStepToF(&camera->fwork[3], 800.0f, 0.02f, 1000.0f, 0.001f); Math_SmoothStepToF(&player->baseSpeed, 5.0f, 0.1f, 1000.0f, 0.001f); } else { - actor->fwork[4] = player->pos.x; - actor->fwork[5] = player->pos.y; - actor->fwork[6] = player->trueZpos + gPathProgress; + camera->fwork[4] = player->pos.x; + camera->fwork[5] = player->pos.y; + camera->fwork[6] = player->trueZpos + gPathProgress; } if (gCsFrameCount < 1200) { @@ -5829,20 +5861,20 @@ void HUD_AquasComplete(Player* player) { } D_ctx_80177A48[0] = 0.05f; - actor->rot_0F4.y += actor->fwork[7]; - if ((actor->rot_0F4.y) < 0.0f) { - actor->rot_0F4.y += 360.0f; + camera->rot_0F4.y += camera->fwork[7]; + if ((camera->rot_0F4.y) < 0.0f) { + camera->rot_0F4.y += 360.0f; } - if ((actor->rot_0F4.y) > 360.0f) { - actor->rot_0F4.y -= 360.0f; + if ((camera->rot_0F4.y) > 360.0f) { + camera->rot_0F4.y -= 360.0f; } - src.x = actor->fwork[1]; - src.y = actor->fwork[2]; - src.z = actor->fwork[3]; + src.x = camera->fwork[1]; + src.y = camera->fwork[2]; + src.z = camera->fwork[3]; - Matrix_Translate(gCalcMatrix, actor->fwork[4], actor->fwork[5], actor->fwork[6], MTXF_NEW); - Matrix_RotateY(gCalcMatrix, -(M_DTOR * actor->rot_0F4.y), MTXF_APPLY); + Matrix_Translate(gCalcMatrix, camera->fwork[4], camera->fwork[5], camera->fwork[6], MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -(M_DTOR * camera->rot_0F4.y), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); gCsCamEyeX = dest.x; @@ -5919,11 +5951,11 @@ void HUD_AquasComplete(Player* player) { break; case 1000: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1200: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; } @@ -5974,7 +6006,7 @@ void HUD_AquasComplete(Player* player) { Math_SmoothStepToF(&player->cam.at.z, gCsCamAtZ, D_ctx_80177A48[0], 50000.0f, 0.001f); } -void func_hud_80096A74(Player* player) { +void Venom1_LevelStart2(Player* player) { Vec3f src, dest; s32 button; diff --git a/src/engine/fox_load.c b/src/engine/fox_load.c index 4f05552d..bd428569 100644 --- a/src/engine/fox_load.c +++ b/src/engine/fox_load.c @@ -179,14 +179,14 @@ u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup) { case SCENE_LOGO: changeScene = Load_SceneFiles(&sNoOvl_Logo[sceneSetup]); // Logo does not load an overlay file if (changeScene == true) { - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_14); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_MA); } break; case SCENE_CREDITS: changeScene = Load_SceneFiles(&sOvlending_Ending[sceneSetup]); break; default: - (void) "DMA MODE ERROR %d\n"; + PRINTF("DMA MODE ERROR %d\n"); changeScene = false; break; } diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index b49886e4..bf0a8986 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2674,7 +2674,7 @@ void Player_ResetVsData(void) { gLaserStrength[i] = LASERS_SINGLE; gBombCount[i] = 0; } - gVsMatchStart = gVsMatchOver = false; + gVsMatchStart = gVsMatchWon = false; } void Player_InitVersus(void) { @@ -2721,7 +2721,7 @@ void Play_Init(void) { gTraining360MsgTimer = gTraining360MsgIndex = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = gAllRangeSuppliesSent = 0; D_display_800CA220 = 0; - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; if (gCurrentLevel != LEVEL_VERSUS) { gSceneSetup = 0; @@ -5834,7 +5834,7 @@ void Player_Update(Player* player) { player->csState = 0; Camera_FollowPlayer(player, player->attacker - 1, 1); } else { - if (gVsMatchStart == 1) { + if (gVsMatchStart == true) { gVsMatchStart++; for (i = 0; i < 4; i++) { Player_PlaySfx(gPlayer[i].sfxSource, NA_SE_ARWING_BOOST, gPlayer[i].num); @@ -5928,7 +5928,7 @@ void Player_Update(Player* player) { player->draw = false; if (gPlayerInactive[player->num] == true) { Camera_FollowPlayer(player, player->attacker - 1, 0); - } else if (!gVsMatchOver && (player->csState != 0)) { + } else if (!gVsMatchWon && (player->csState != 0)) { player->csState = 0; Player_Initialize(player); Player_Setup(player); @@ -6733,7 +6733,7 @@ void Play_UpdateLevel(void) { break; case LEVEL_METEO: - Texture_Scroll(D_102FF08, 8, 8, 1); + Lib_Texture_Scroll(D_102FF08, 8, 8, 1); /* fallthrough */ case LEVEL_SECTOR_X: if (gLevelPhase == 1) { @@ -6757,26 +6757,26 @@ void Play_UpdateLevel(void) { break; case LEVEL_CORNERIA: - func_hud_8008C104(D_CO_603EB38, D_CO_6028A60); + HUD_Texture_Wave(D_CO_603EB38, D_CO_6028A60); if ((gGameFrameCount % 2) != 0) { - Texture_Scroll(D_CO_600CBD8, 64, 32, 3); + Lib_Texture_Scroll(D_CO_600CBD8, 64, 32, 3); } break; case LEVEL_AQUAS: - func_hud_8008C104(D_AQ_603158C, D_AQ_602ACC0); + HUD_Texture_Wave(D_AQ_603158C, D_AQ_602ACC0); break; case LEVEL_SOLAR: Play_UpdateDynaFloor(); for (gPathTexScroll; gPathTexScroll >= 10.0f; gPathTexScroll -= 10.0f) { - Texture_Scroll(D_SO_6005710, 32, 32, 1); + Lib_Texture_Scroll(D_SO_6005710, 32, 32, 1); } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { - Texture_Scroll(D_SO_6005710, 32, 32, 1); + Lib_Texture_Scroll(D_SO_6005710, 32, 32, 1); } - Texture_Mottle(D_SO_601E1E8, D_SO_6020F60, 3); + Lib_Texture_Mottle(D_SO_601E1E8, D_SO_6020F60, 3); if (gPlayer[0].pos.y > 600.0f) { cycleMask = 8 - 1; @@ -6827,7 +6827,7 @@ void Play_UpdateLevel(void) { RAND_FLOAT(10.0f) + 20.0f); // check } - func_hud_8008C104(D_SO_60229A4, D_SO_6010198); + HUD_Texture_Wave(D_SO_60229A4, D_SO_6010198); if (gPlayer[0].shields == 0) { gSoShieldsEmpty = 1; @@ -6837,13 +6837,13 @@ void Play_UpdateLevel(void) { case LEVEL_ZONESS: Play_UpdateDynaFloor(); for (gPathTexScroll; gPathTexScroll >= 20.0f; gPathTexScroll -= 20.0f) { - Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); + Lib_Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_NEXT) { - Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); + Lib_Texture_Scroll(D_ZO_602C2CC, 32, 32, 1); } - func_hud_8008C104(D_ZO_602C2CC, D_ZO_600D990); + HUD_Texture_Wave(D_ZO_602C2CC, D_ZO_600D990); if (Play_CheckDynaFloorCollision(&sp3C, &sp40, gPlayer[0].cam.eye.x, gPlayer[0].cam.eye.y, gPlayer[0].cam.eye.z - gPathProgress)) { diff --git a/src/engine/fox_radio.c b/src/engine/fox_radio.c index 3a6200f6..c3faae27 100644 --- a/src/engine/fox_radio.c +++ b/src/engine/fox_radio.c @@ -169,7 +169,7 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_FOX: - radioPortraitTex = D_10050E0; + radioPortraitTex = aFoxPortraitTex; break; case RCID_FOX_RED + 1: sRadioUseRedBox = true; @@ -187,7 +187,7 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_FALCO: - radioPortraitTex = D_10032A0; + radioPortraitTex = aFalcoPortraitTex; break; case RCID_FALCO_RED + 1: sRadioUseRedBox = true; @@ -199,7 +199,7 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_SLIPPY: - radioPortraitTex = D_100D900; + radioPortraitTex = aSlippyPortraitTex; break; case RCID_SLIPPY_RED + 1: sRadioUseRedBox = true; @@ -211,7 +211,7 @@ void func_radio_800BAAE8(void) { sRadioUseRedBox = true; /* fallthrough */ case RCID_PEPPY: - radioPortraitTex = D_100BAC0; + radioPortraitTex = aPeppyPortraitTex; break; case RCID_PEPPY_RED + 1: sRadioUseRedBox = true; @@ -428,22 +428,22 @@ void func_radio_800BAAE8(void) { if (mirror) { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + Lib_TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), + 1.0f, gRadioPortraitScaleY); } - TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + Lib_TextureRect_RGBA16_MirX(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } else { for (i = 0, j = 0; i < 2; i++, j += 44 * 20) { - TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + Lib_TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[j], 44, 20, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (i * 20.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } - TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, - gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, - gRadioPortraitScaleY); + Lib_TextureRect_RGBA16(&gMasterDisp, &radioPortraitTex[44 * 20 * 2], 44, 4, gRadioPortraitPosX, + gRadioPortraitPosY + 20.0f + sp38 + (40.0f * gRadioPortraitScaleY), 1.0f, + gRadioPortraitScaleY); } } } @@ -471,13 +471,13 @@ void func_radio_800BB388(void) { switch (gGameState) { case GSTATE_TITLE: case GSTATE_ENDING: - texture = D_TITLE_601D750; - palette = D_TITLE_601DB50; + texture = aNoControllerBgTex; + palette = aNoControllerBgTLUT; break; case GSTATE_PLAY: - texture = D_1013170; - palette = D_1013570; + texture = aMsgWindowBgTex; + palette = aMsgWindowBgTLUT; break; } @@ -487,8 +487,8 @@ void func_radio_800BB388(void) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 60, 60, 255, 170); } - TextureRect_CI8(&gMasterDisp, texture, palette, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, - gRadioTextBoxScaleX, gRadioTextBoxScaleY); + Lib_TextureRect_CI8(&gMasterDisp, texture, palette, 32, 32, gRadioTextBoxPosX, gRadioTextBoxPosY + 16.0f + sp30, + gRadioTextBoxScaleX, gRadioTextBoxScaleY); } if (gRadioTextBoxScaleY == 1.3f) { @@ -712,11 +712,11 @@ void Radio_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 0, 255); Graphics_DisplaySmallText(31, 167, 1.0f, 1.0f, "DOWN"); - func_hud_80084B94(1); + HUD_TeamDownWrench_Draw(1); } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && (gCurrentRadioPortrait != RCID_1000)) { - func_hud_80086110(22.0f, 165.0f, gTeamShields[idx]); + HUD_TeamShields_Draw(22.0f, 165.0f, gTeamShields[idx]); } } @@ -764,7 +764,7 @@ void Radio_Draw(void) { } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && (gCurrentRadioPortrait != RCID_1000)) { - func_hud_80086110(22.0f, 165.0f, gActors[idx].health * 2.55f); + HUD_TeamShields_Draw(22.0f, 165.0f, gActors[idx].health * 2.55f); } } if (((gCurrentRadioPortrait != RCID_STATIC) && (gCurrentRadioPortrait != RCID_STATIC + 1)) && diff --git a/src/engine/fox_rcp_setup.c b/src/engine/fox_rcp_setup.c index 1623f140..d13ff44f 100644 --- a/src/engine/fox_rcp_setup.c +++ b/src/engine/fox_rcp_setup.c @@ -2,6 +2,7 @@ Gfx gRcpSetupDLs[][9] = { { + /* SETUPDL_0 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -15,6 +16,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_1 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -28,6 +30,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_2 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -41,6 +44,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_3 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -54,6 +58,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_4 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -67,6 +72,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_5 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -80,6 +86,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_6 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -93,6 +100,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_7 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -106,6 +114,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_8 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -119,6 +128,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_9 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -132,6 +142,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_10 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -146,6 +157,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_11 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -159,6 +171,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_12 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -172,6 +185,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_13 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -185,6 +199,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_14 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -198,6 +213,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_15 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -211,6 +227,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_16 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -224,6 +241,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_17 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -237,6 +255,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_18 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -250,6 +269,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_19 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -263,6 +283,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_20 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -276,6 +297,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_21 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -289,6 +311,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_22 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -302,6 +325,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_23 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -315,6 +339,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_24 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -328,6 +353,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_25 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -341,6 +367,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_26 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -357,6 +384,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_27 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -370,6 +398,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_28 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -384,6 +413,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_29 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -397,6 +427,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_30 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -410,6 +441,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_31 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -424,6 +456,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_32 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -437,6 +470,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_33 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -450,6 +484,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_34 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -463,6 +498,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_35 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -477,6 +513,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_36 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -490,6 +527,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_37 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -503,6 +541,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_38 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -517,6 +556,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_39 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -530,6 +570,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_40 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -543,6 +584,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_41 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -556,6 +598,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_42 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -569,6 +612,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_43 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -582,6 +626,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_44 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -595,6 +640,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_45 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -608,6 +654,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_46 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -621,6 +668,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_47 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -634,6 +682,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_48 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -647,6 +696,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_49 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -661,6 +711,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_50 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -674,6 +725,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_51 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -689,6 +741,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_52 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -702,6 +755,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_53 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -715,6 +769,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_54 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -728,6 +783,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_55 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -741,6 +797,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_56 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -754,6 +811,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_57 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -767,6 +825,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_58 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -780,6 +839,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_59 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -793,6 +853,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_60 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -806,6 +867,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_61 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -819,6 +881,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_62 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -832,6 +895,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_63 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -846,6 +910,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_64 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -859,6 +924,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_65 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -872,6 +938,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_66 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -885,6 +952,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_67 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -899,6 +967,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_68 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -913,6 +982,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_69 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -927,6 +997,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_70 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -943,6 +1014,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_71 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -958,6 +1030,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_72 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -975,6 +1048,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_73 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -988,6 +1062,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_74 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1001,6 +1076,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_75 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1014,6 +1090,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_76 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1027,6 +1104,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_77 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1041,6 +1119,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_78 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1054,6 +1133,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_79 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1067,6 +1147,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_80 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1080,6 +1161,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_81 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1093,6 +1175,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_82 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1109,6 +1192,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_83 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1122,6 +1206,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_84 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1135,6 +1220,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_85 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1148,6 +1234,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_86 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), @@ -1164,6 +1251,7 @@ Gfx gRcpSetupDLs[][9] = { gsSPEndDisplayList(), }, { + /* SETUPDL_87 */ gsDPPipeSync(), gsSPClearGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR | G_LOD | G_SHADING_SMOOTH), diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index 2e678ca7..86289379 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -25,7 +25,7 @@ s32 Graphics_Printf(const char* fmt, ...) { return 0; } -void Texture_Scroll(u16* texture, s32 width, s32 height, u8 mode) { +void Lib_Texture_Scroll(u16* texture, s32 width, s32 height, u8 mode) { u16* pixel = SEGMENTED_TO_VIRTUAL(texture); u16 tempPxl; s32 u; @@ -71,7 +71,7 @@ void Texture_Scroll(u16* texture, s32 width, s32 height, u8 mode) { } } -void Texture_Mottle(u16* dst, u16* src, u8 mode) { +void Lib_Texture_Mottle(u16* dst, u16* src, u8 mode) { s32 u; s32 v; u8* dst8; @@ -538,8 +538,8 @@ s32 Math_PursueVec3f(Vec3f* pos, Vec3f* target, Vec3f* rot, f32 stepSize, f32 sc return (VEC3F_MAG(&diff)) < dist; } -void TextureRect_CI4(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_CI4(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTLUT_pal16((*gfxPtr)++, 0, palette); gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -548,8 +548,8 @@ void TextureRect_CI4(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 hei (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_CI4_Flip(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void Lib_TextureRect_CI4_Flip(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, + f32 xScale, f32 yScale) { gDPLoadTLUT_pal16((*gfxPtr)++, 0, palette); gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -558,8 +558,8 @@ void TextureRect_CI4_Flip(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u3 G_TX_RENDERTILE, 0, 0, (s32) (1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_CI4_MirX(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void Lib_TextureRect_CI4_MirX(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, + f32 xScale, f32 yScale) { gDPLoadTLUT_pal16((*gfxPtr)++, 0, palette); gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -568,8 +568,8 @@ void TextureRect_CI4_MirX(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u3 (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_CI4_MirY(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, - f32 xScale, f32 yScale) { +void Lib_TextureRect_CI4_MirY(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, + f32 xScale, f32 yScale) { gDPLoadTLUT_pal16((*gfxPtr)++, 0, palette); gDPLoadTextureBlock_4b((*gfxPtr)++, texture, G_IM_FMT_CI, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -578,8 +578,8 @@ void TextureRect_CI4_MirY(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u3 (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_CI8(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_CI8(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTLUT_pal256((*gfxPtr)++, palette); gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_CI, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); @@ -588,7 +588,8 @@ void TextureRect_CI8(Gfx** gfxPtr, u8* texture, u16* palette, u32 width, u32 hei (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_RGBA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void Lib_TextureRect_RGBA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -596,8 +597,8 @@ void TextureRect_RGBA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 x (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_RGBA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_RGBA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_RGBA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -605,7 +606,7 @@ void TextureRect_RGBA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA8(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void Lib_TextureRect_IA8(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -613,8 +614,8 @@ void TextureRect_IA8(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA8_FlipMirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA8_FlipMirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), @@ -623,8 +624,8 @@ void TextureRect_IA8_FlipMirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, (s32) (1.0f / xScale * 1024.0f)); } -void TextureRect_IA8_FlipMirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA8_FlipMirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangleFlip((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), @@ -633,8 +634,8 @@ void TextureRect_IA8_FlipMirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, (u16) (s32) (-1.0f / xScale * 1024.0f)); } -void TextureRect_IA8_MirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA8_MirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -642,8 +643,8 @@ void TextureRect_IA8_MirX(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA8_MirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA8_MirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -651,7 +652,8 @@ void TextureRect_IA8_MirY(Gfx** gfxPtr, u8* texture, u32 width, u32 height, f32 (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_IA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void Lib_TextureRect_IA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -659,8 +661,8 @@ void TextureRect_IA16(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPo (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -668,8 +670,8 @@ void TextureRect_IA16_MirX(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f3 (u16) (s32) (-1.0f / xScale * 1024.0f), (s32) (1.0f / yScale * 1024.0f)); } -void TextureRect_IA16_MirY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA16_MirY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -677,8 +679,8 @@ void TextureRect_IA16_MirY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f3 (s32) (1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_IA16_MirXY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, - f32 yScale) { +void Lib_TextureRect_IA16_MirXY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_IA, G_IM_SIZ_16b, width, height, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -686,7 +688,8 @@ void TextureRect_IA16_MirXY(Gfx** gfxPtr, u16* texture, u32 width, u32 height, f (u16) (s32) (-1.0f / xScale * 1024.0f), (u16) (s32) (-1.0f / yScale * 1024.0f)); } -void TextureRect_RGBA32(Gfx** gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, f32 yScale) { +void Lib_TextureRect_RGBA32(Gfx** gfxPtr, u32* texture, u32 width, u32 height, f32 xPos, f32 yPos, f32 xScale, + f32 yScale) { gDPLoadTextureBlock((*gfxPtr)++, texture, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); gSPTextureRectangle((*gfxPtr)++, (s32) (xPos * 4.0f), (s32) (yPos * 4.0f), (s32) ((xPos + width * xScale) * 4.0f), @@ -781,15 +784,15 @@ void Graphics_DisplayHUDNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, - 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, + yPos, 1.0f, 1.0f); startNumber = true; xPos += 9; number %= place; } } - TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, 1.0f, - 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, hudNumberTex[number / place], hudNumberPal[number / place], 16, 8, xPos, yPos, + 1.0f, 1.0f); } u8* sSmallNumberTex[] = { aSmallText_0, aSmallText_1, aSmallText_2, aSmallText_3, aSmallText_4, @@ -803,13 +806,13 @@ void Graphics_DisplaySmallNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); startNumber = true; xPos += 9; number %= place; } } - TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sSmallNumberTex[number / place], 16, 8, xPos, yPos, 1.0f, 1.0f); } char sSmallChars[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ!:-.0123456789"; @@ -961,7 +964,8 @@ void Graphics_DisplayLargeText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* if ((text[0] == 'W') || (text[0] == 'X')) { width = 32; } - TextureRect_IA8(&gMasterDisp, sLargeCharTex[charIndex], width, 15, xPosCurrent, yPos, xScale, yScale); + Lib_TextureRect_IA8(&gMasterDisp, sLargeCharTex[charIndex], width, 15, xPosCurrent, yPos, xScale, + yScale); } startPrint = true; xPosCurrent += (sLargeCharWidths[charIndex] * xScale) + 2.0f; @@ -1102,13 +1106,13 @@ void Graphics_DisplayLargeNumber(s32 xPos, s32 yPos, s32 number) { place = 1000000; for (place = 1000000; place != 1; place /= 10) { if ((number / place != 0) || (startNumber == true)) { - TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); startNumber = true; xPos += 13; number %= place; } } - TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeNumberTex[number / place], 16, 15, xPos, yPos, 1.0f, 1.0f); } void Graphics_DisplaySmallText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* text) { @@ -1127,7 +1131,7 @@ void Graphics_DisplaySmallText(s32 xPos, s32 yPos, f32 xScale, f32 yScale, char* if (var_t0 > 30) { width = 16; } - TextureRect_IA8(&gMasterDisp, sSmallCharTex[var_t0], width, 8, xPosCurrent, yPos, xScale, yScale); + Lib_TextureRect_IA8(&gMasterDisp, sSmallCharTex[var_t0], width, 8, xPosCurrent, yPos, xScale, yScale); if (1) {} } switch (text[0]) { diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 98b3d0b4..967aed0b 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -486,7 +486,7 @@ void func_tank_80044868(Player* player) { } } if (player->baseSpeed > 0.0f) { - Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); + Lib_Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); if ((gCurrentLevel == LEVEL_TITANIA) && !gBossActive) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } @@ -495,7 +495,7 @@ void func_tank_80044868(Player* player) { } } if (player->baseSpeed > 10.0f) { - Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); + Lib_Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); if ((gCurrentLevel == LEVEL_TITANIA) && !gBossActive) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index 0ea9aa97..9b39e5ea 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -7,7 +7,7 @@ #define VS_TIE 99 -s32 D_versus_80178750; +bool gVsMatchOver; s32 gVsMatchState; s32 D_versus_80178758; s32 sUnlockLandmaster; @@ -84,19 +84,19 @@ void Versus_Exit(void) { } void func_versus_800BC88C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003830, 64, 17, xPos, yPos, scale, scale); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003830, 64, 17, xPos, yPos, scale, scale); } void func_versus_800BC8D8(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 8, xPos, - yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 8, xPos, + yPos + (8 * i * scale), scale, scale); } - TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 7, xPos, - yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_300A470 + (152 * 8 * i), D_versus_300B218, 152, 7, xPos, + yPos + (8 * i * scale), scale, scale); } void func_versus_800BC9DC(f32 xPos, f32 yPos, f32 scale, s32 yScale) { @@ -106,8 +106,8 @@ void func_versus_800BC9DC(f32 xPos, f32 yPos, f32 scale, s32 yScale) { s32 i; for (i = 0; i < 5; i++) { - TextureRect_CI8(&gMasterDisp, D_800D4ABC[yScale] + (D_800D4AB0[yScale] * 8 * i), D_800D4AA4[yScale], - D_800D4AB0[yScale], 8, xPos, yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_800D4ABC[yScale] + (D_800D4AB0[yScale] * 8 * i), D_800D4AA4[yScale], + D_800D4AB0[yScale], 8, xPos, yPos + (8 * i * scale), scale, scale); } } @@ -115,11 +115,11 @@ void func_versus_800BCB44(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 2; i++) { - TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 8, xPos, - yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 8, xPos, + yPos + (8 * i * scale), scale, scale); } - TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 7, xPos, - yPos + (8 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3006C60 + (96 * 8 * i), D_versus_3007500, 96, 7, xPos, + yPos + (8 * i * scale), scale, scale); } void func_versus_800BCC48(f32 xPos, f32 yPos, f32 xScale, f32 yScale, s32 arg4) { @@ -129,19 +129,19 @@ void func_versus_800BCC48(f32 xPos, f32 yPos, f32 xScale, f32 yScale, s32 arg4) s32 i; for (i = 0; i < 3; i++) { - TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], - 8, xPos, yPos + (8 * i * yScale), xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], + D_800D4AE8[arg4], 8, xPos, yPos + (8 * i * yScale), xScale, yScale); } - TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], 1, - xPos, yPos + (8 * i * yScale), xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, D_800D4AD8[arg4] + (D_800D4AE8[arg4] * 8 * i), D_800D4AC8[arg4], D_800D4AE8[arg4], + 1, xPos, yPos + (8 * i * yScale), xScale, yScale); } void func_versus_800BCE24(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { s32 i; for (i = 0; i < 6; i++) { - TextureRect_CI8(&gMasterDisp, D_versus_3001420 + (256 * 7 * i), D_versus_3003E20, 256, 7, xPos, - yPos + (7 * i * yScale), xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3001420 + (256 * 7 * i), D_versus_3003E20, 256, 7, xPos, + yPos + (7 * i * yScale), xScale, yScale); } } @@ -149,66 +149,66 @@ void func_versus_800BCEF8(f32 xPos, f32 yPos, f32 scale) { s32 i; for (i = 0; i < 12; i++) { - TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 2, xPos, - yPos + (2 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 2, xPos, + yPos + (2 * i * scale), scale, scale); } - TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 1, xPos, - yPos + (2 * i * scale), scale, scale); + Lib_TextureRect_CI8(&gMasterDisp, D_versus_3004010 + (136 * 2 * i), D_versus_3004D58, 136, 1, xPos, + yPos + (2 * i * scale), scale, scale); } void func_versus_800BCFFC(f32 xPos, f32 yPos, f32 xScale, f32 yScale) { - TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, xPos, yPos, xScale, yScale); + Lib_TextureRect_CI8(&gMasterDisp, aMsgWindowBgTex, aMsgWindowBgTLUT, 24, 17, xPos, yPos, xScale, yScale); } void func_versus_800BD05C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_CI4(&gMasterDisp, D_versus_30003A0, D_versus_30004E0, 64, 10, xPos, yPos, scale, scale); + Lib_TextureRect_CI4(&gMasterDisp, D_versus_30003A0, D_versus_30004E0, 64, 10, xPos, yPos, scale, scale); } void func_versus_800BD0B4(f32 xPos, f32 yPos, f32 scale) { - TextureRect_CI4(&gMasterDisp, D_versus_3000510, D_versus_30006A0, 80, 10, xPos, yPos, scale, scale); + Lib_TextureRect_CI4(&gMasterDisp, D_versus_3000510, D_versus_30006A0, 80, 10, xPos, yPos, scale, scale); } void func_versus_800BD10C(f32 xPos, f32 yPos, f32 scale) { - TextureRect_CI4(&gMasterDisp, D_versus_30006D0, D_versus_3000810, 64, 10, xPos, yPos, scale, scale); + Lib_TextureRect_CI4(&gMasterDisp, D_versus_30006D0, D_versus_3000810, 64, 10, xPos, yPos, scale, scale); } void func_versus_800BD164(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003C70, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003C70, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD1B0(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003F10, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003F10, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD1FC(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003E10, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003E10, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD248(f32 xPos, f32 yPos) { - TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004050, D_VS_MENU_7004150, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004050, D_VS_MENU_7004150, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD2A0(f32 xPos, f32 yPos) { - TextureRect_CI8(&gMasterDisp, D_VS_MENU_70041F0, D_VS_MENU_70042F0, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, D_VS_MENU_70041F0, D_VS_MENU_70042F0, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD2F8(f32 xPos, f32 yPos) { - TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004360, D_VS_MENU_7004460, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, D_VS_MENU_7004360, D_VS_MENU_7004460, 16, 16, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD350(f32 xPos, f32 yPos) { - TextureRect_CI8(&gMasterDisp, D_VS_MENU_70044D0, D_VS_MENU_7004990, 64, 19, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, D_VS_MENU_70044D0, D_VS_MENU_7004990, 64, 19, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD3A8(f32 xPos, f32 yPos) { s32 i; for (i = 0; i < 8; i++) { - TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + ((80 * 8 * i) / 2), D_VS_MENU_70123F8, 80, 8, xPos, - yPos + (i * 8), 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsHandicapFrameTex + ((80 * 8 * i) / 2), aVsHandicapFrameTLUT, 80, 8, xPos, + yPos + (i * 8), 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + ((80 * 8 * i) / 2), D_VS_MENU_70123F8, 80, 7, xPos, - yPos + (i * 8), 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aVsHandicapFrameTex + ((80 * 8 * i) / 2), aVsHandicapFrameTLUT, 80, 7, xPos, + yPos + (i * 8), 1.0f, 1.0f); } void func_versus_800BD4D4(f32 xPos, f32 yPos, s32 arg2) { @@ -223,21 +223,21 @@ void func_versus_800BD4D4(f32 xPos, f32 yPos, s32 arg2) { for (i /= 10; i != 1; i /= 10) { j = arg2 / i; if (j || (var_s2 == true)) { - TextureRect_IA8(&gMasterDisp, D_800D4AF8[j / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4AF8[j / i], 16, 8, xPos, yPos, 1.0f, 1.0f); xPos += 9.0f; arg2 %= i; var_s2 = true; } } - TextureRect_IA8(&gMasterDisp, D_800D4AF8[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4AF8[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD720(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, D_versus_30013E0, 8, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aVsStarTex, 8, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD76C(f32 xPos, f32 yPos) { - TextureRect_CI4(&gMasterDisp, D_versus_30001E0, D_versus_3000380, 64, 13, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_versus_30001E0, D_versus_3000380, 64, 13, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BD7C4(f32 xPos, f32 yPos, s32 arg2) { @@ -247,23 +247,23 @@ void func_versus_800BD7C4(f32 xPos, f32 yPos, s32 arg2) { for (i = 10; i != 1; i /= 10) { if ((xPos > 0) && (yPos > 0)) { - TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } xPos += 9.0f; arg2 %= i; } if ((xPos > 0) && (yPos > 0)) { - TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B20[arg2 / i], 16, 8, xPos, yPos, 1.0f, 1.0f); } } void func_versus_800BD9FC(f32 xPos, f32 yPos) { - TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_1011E80, D_1011EC0, 16, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BDA54(f32 xPos, f32 yPos) { - TextureRect_IA8(&gMasterDisp, aSmallText_L, 8, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aSmallText_L, 8, 8, xPos, yPos, 1.0f, 1.0f); } void func_versus_800BDAA0(f32 xPos, f32 yPos, s32 arg2, s32 arg3, s32 arg4) { @@ -282,15 +282,19 @@ void func_versus_800BDAA0(f32 xPos, f32 yPos, s32 arg2, s32 arg3, s32 arg4) { temp1 = arg2 / i; temp2 = arg3 / i; if (temp1 == temp2) { - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, 15, xPos, yPos, 0.7f, 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, 15, xPos, yPos, 0.7f, 0.7f); } else { if (temp3 > y3) { - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2] + (16 * arg4), 16, 15 - arg4, xPos, yPos, 0.7f, 0.7f); - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, arg4, xPos, yPos + (15 - arg4) * 0.7f, 0.7f, 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2] + (16 * arg4), 16, 15 - arg4, xPos, yPos, 0.7f, + 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1], 16, arg4, xPos, yPos + (15 - arg4) * 0.7f, 0.7f, + 0.7f); } if (temp3 < y3) { - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2], 16, 15 - arg4, xPos, yPos + (arg4 * 0.7f), 0.7f, 0.7f); - TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1] + (16 * (15 - arg4)), 16, arg4, xPos, yPos, 0.7f, 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp2], 16, 15 - arg4, xPos, yPos + (arg4 * 0.7f), 0.7f, + 0.7f); + Lib_TextureRect_IA8(&gMasterDisp, D_800D4B48[temp1] + (16 * (15 - arg4)), 16, arg4, xPos, yPos, 0.7f, + 0.7f); } } xPos += 13.0f * 0.7f; @@ -388,7 +392,7 @@ s32 Versus_DrawCountdown(f32 xPos, f32 yPos, s32* countdown) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); - TextureRect_CI8(&gMasterDisp, D_1013170, D_1013570, 24, 17, 120.0f, 115.0f, 3.33f, 0.53f); + Lib_TextureRect_CI8(&gMasterDisp, aMsgWindowBgTex, aMsgWindowBgTLUT, 24, 17, 120.0f, 115.0f, 3.33f, 0.53f); xTemp = 0.0f; @@ -790,7 +794,7 @@ bool Versus_CheckForWinner(void) { } if ((sVsPlayerCount == 1) && (numDown == 4)) { - gVsMatchOver = true; + gVsMatchWon = true; sVsWinner = VS_TIE; } else { for (i = 0; i < 4; i++) { @@ -818,7 +822,7 @@ bool Versus_CheckForWinner(void) { } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - gVsMatchOver = true; + gVsMatchWon = true; sVsWinner = i; } break; @@ -833,7 +837,7 @@ bool Versus_CheckForWinner(void) { } } if ((sVsPlayerCount == 1) && (numDown == 4)) { - gVsMatchOver = true; + gVsMatchWon = true; sVsWinner = VS_TIE; } else { if (numDown >= 2) { @@ -857,7 +861,7 @@ bool Versus_CheckForWinner(void) { } gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - gVsMatchOver = true; + gVsMatchWon = true; } break; @@ -958,7 +962,7 @@ bool Versus_CheckForWinner(void) { gPlayer[j].state_1C8 = PLAYERSTATE_1C8_VS_STANDBY; } - gVsMatchOver = true; + gVsMatchWon = true; break; default: @@ -1043,7 +1047,7 @@ s32 func_versus_800C04DC(f32 xPos, f32 scale, s32 arg2) { Graphics_DisplaySmallText(x + 45.0f, y, 1.0f, 1.0f, "SCORE"); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800869A0(x + 18.0f, y + 16.0f, D_800D4A94, 1.0f, 0, 9999); + HUD_Number_Draw(x + 18.0f, y + 16.0f, D_800D4A94, 1.0f, 0, 9999); } else { if (arg2 < 4) { RCP_SetupDL(&gMasterDisp, SETUPDL_78); @@ -1262,7 +1266,7 @@ s32 func_versus_800C0E78(void) { Graphics_DisplaySmallText(D_800D4C90[i], D_800D4CA4[i], 1.0f, 1.0f, D_800D4C80[i]); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800869A0(D_800D4C90[i], D_800D4CA4[i] + 9.0f, D_80178838[i], 1.0f, 0, 999); + HUD_Number_Draw(D_800D4C90[i], D_800D4CA4[i] + 9.0f, D_80178838[i], 1.0f, 0, 999); } } @@ -1329,7 +1333,7 @@ void Versus_InitMatch(void) { sVsMatchMenuOption = 0; sVsWinner = VS_TIE; D_801787B8 = 0; - D_versus_80178750 = 0; + gVsMatchOver = false; gBgColor = 0; D_80178830 = 0; D_800D4A90 = 0; @@ -1538,7 +1542,7 @@ bool Versus_Update(void) { break; } - D_versus_80178750 = 1; + gVsMatchOver = true; gVsMatchState = VS_STATE_6; func_versus_800C024C(); } @@ -1660,7 +1664,7 @@ bool Versus_Update(void) { if (D_80178830 > 224) { Versus_Exit(); - D_menu_801B827C = 1; + gGoToTitle = true; } } break; diff --git a/src/mods/levelselect.c b/src/mods/levelselect.c index 30cc4d25..50d0e07e 100644 --- a/src/mods/levelselect.c +++ b/src/mods/levelselect.c @@ -3,15 +3,15 @@ extern PlanetId sPlanetList[15]; extern PlanetId sCurrentPlanetId; -extern s32 D_menu_801B8280; +extern bool sLevelStartState; extern s32 D_menu_801CD968; -extern s32 D_menu_801CD944; -extern s32 D_menu_801CD948; +extern s32 sMapState; +extern s32 sMapSubState; -void Map_801A61B4(LevelId level); -void Map_801A6368(void); -void Map_801A914C(void); -void Map_801A6628(void); +void Map_LevelStart_AudioSpecSetup(LevelId level); +void Map_CurrentLevel_Setup(void); +void Map_PositionCursor(void); +void Map_PlayLevel(void); static PlanetId sPlanetArray[][3] = { { PLANET_CORNERIA, PLANET_CORNERIA, PLANET_CORNERIA }, { PLANET_METEO, PLANET_METEO, PLANET_SECTOR_Y }, @@ -67,8 +67,8 @@ void Map_LevelSelect(void) { if (sCurrentPlanetId != nextPlanetId) { sCurrentPlanetId = nextPlanetId; startOption = 0; - Map_801A6368(); - Map_801A914C(); + Map_CurrentLevel_Setup(); + Map_PositionCursor(); } if (contPress->button & L_TRIG) { startOption ^= 1; @@ -113,7 +113,7 @@ void Map_LevelSelect(void) { } // Bypass briefing - if ((D_menu_801CD944 == 2) && (D_menu_801CD948 > 0)) { + if ((sMapState == 2) && (sMapSubState > 0)) { if (sCurrentPlanetId == PLANET_VENOM) { if (startOption) { gCurrentLevel = LEVEL_VENOM_ANDROSS; @@ -123,10 +123,10 @@ void Map_LevelSelect(void) { } else if ((sCurrentPlanetId == PLANET_AREA_6) && startOption) { gCurrentLevel = LEVEL_UNK_4; } - Map_801A61B4(gCurrentLevel); - D_menu_801B8280 = 0; + Map_LevelStart_AudioSpecSetup(gCurrentLevel); + sLevelStartState = 0; D_menu_801CD968 = 0; - Map_801A6628(); + Map_PlayLevel(); if (startOption && ((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X) || (sPlanetArray[mission][difficulty] == SAVE_SLOT_VENOM_2))) { gLevelPhase = 1; diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index 20ef358b..a3e4d376 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -3,11 +3,11 @@ #include "fox_option.h" #include "sf64audio_provisional.h" -extern s32 spectrumAnalyzerMode; +extern s32 sSpectrumAnalyzerMode; extern bool sMusicPlaying; -extern s32 D_menu_801B9244; -extern OptionId D_menu_801B9124; -extern s32 D_menu_801B912C; +extern bool sMainMenuFromCancel; +extern OptionId sMenuEntryState; +extern s32 sMainMenuState; static s32 showJukebox = 0; static u32 prevSfx = NA_SE_NONE; @@ -171,9 +171,9 @@ void Jukebox_Update(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = 1000; + sMainMenuState = 0; + sMainMenuFromCancel = 1; return; } else { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); @@ -186,9 +186,9 @@ void Jukebox_Update(void) { // Spectrum Analyzer mode selector if (contPress->button & Z_TRIG) { - spectrumAnalyzerMode++; - if (spectrumAnalyzerMode > 2) { - spectrumAnalyzerMode = 0; + sSpectrumAnalyzerMode++; + if (sSpectrumAnalyzerMode > 2) { + sSpectrumAnalyzerMode = 0; } } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 24aee6be..27e93a9e 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -81,14 +81,14 @@ void Ending_80187520(s32 arg0) { switch (arg0) { case 0: for (j = 0, i = 0; i < 67; j += 316 * 4, i++) { - TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); } - TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 3, 0.0f, 4 * i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingAwardBack + j, 316, 3, 0.0f, 4 * i, 1.0f, 1.0f); break; case 1: for (j = 0, i = 0; i < 60; j += 316 * 4, i++) { - TextureRect_RGBA16(&gMasterDisp, gEndingAwardFront + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingAwardFront + j, 316, 4, 0.0f, 4 * i, 1.0f, 1.0f); } break; } @@ -109,7 +109,7 @@ void Ending_801876A4(void) { Matrix_RotateX(gGfxMatrix, (D_ending_80196D08[i].rot.x + 5.0f) * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, D_ending_80196D08[i].rot.z * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_6041070); + gSPDisplayList(gMasterDisp++, aTeamShadowDL); Matrix_Pop(&gGfxMatrix); } } @@ -118,7 +118,7 @@ void Ending_80187860(s32 arg0, s32 arg1) { Vec3f frameTable[50]; s32 i; s32 limbCount; - Animation* sp70[4] = { &D_TITLE_60246F8, &D_TITLE_60338DC, &D_TITLE_6036278, &D_TITLE_603531C }; + Animation* sp70[4] = { &D_TITLE_60246F8, &aFalcoAnim, &aSlippyAnim, &aPeppyAnim }; s32 pad; for (i = arg0; i < D_ending_80196F88; i++) { @@ -152,13 +152,13 @@ void Ending_80187860(s32 arg0, s32 arg1) { limbCount = Animation_GetFrameData(&D_TITLE_60246F8, 0, frameTable); break; case 1: - limbCount = Animation_GetFrameData(&D_TITLE_60338DC, 0, frameTable); + limbCount = Animation_GetFrameData(&aFalcoAnim, 0, frameTable); break; case 2: - limbCount = Animation_GetFrameData(&D_TITLE_6036278, 0, frameTable); + limbCount = Animation_GetFrameData(&aSlippyAnim, 0, frameTable); break; case 3: - limbCount = Animation_GetFrameData(&D_TITLE_603531C, 0, frameTable); + limbCount = Animation_GetFrameData(&aPeppyAnim, 0, frameTable); break; } Math_SmoothStepToVec3fArray(frameTable, D_ending_80197900[i], 1, limbCount, 0.1f, 100.0f, 0.01f); @@ -180,7 +180,7 @@ void Ending_80187D3C(s32 arg0) { Vec3f sp23C = { 0.0f, 0.0f, 0.0f }; UnkStruct_196D08 sp13C[4] = { { &D_TITLE_602A710, - D_TITLE_602FBAC, + aFoxSkel, 23, { 110.0f, -520.0f, -1390.0f }, { -20.0f, 0.0f, 0.0f }, @@ -190,7 +190,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_601E424, - D_TITLE_603088C, + aFalcoSkel, 23, { 380.0f, -670.0f, -1840.0f }, { -20.0f, 0.0f, 0.0f }, @@ -200,7 +200,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_6020058, - D_TITLE_60313AC, + aSlippySkel, 23, { -100.0f, -590.0f, -1630.0f }, { -20.0f, 0.0f, 0.0f }, @@ -210,7 +210,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_6029BE4, - D_TITLE_6032084, + aPeppySkel, 23, { -330.0f, -660.0f, -1840.0f }, { -20.0f, 0.0f, 0.0f }, @@ -222,7 +222,7 @@ void Ending_80187D3C(s32 arg0) { }; UnkStruct_196D08 sp3C[4] = { { &D_TITLE_602A710, - D_TITLE_602FBAC, + aFoxSkel, 23, { -80.0f, -400.0f, -50.0f }, { 0.0f, 180.0f, 0.0f }, @@ -232,7 +232,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_601E424, - D_TITLE_603088C, + aFalcoSkel, 23, { -160.0f, -400.0f, 350.0f }, { 0.0f, 180.0f, 0.0f }, @@ -242,7 +242,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_6020058, - D_TITLE_60313AC, + aSlippySkel, 23, { 60.0f, -400.0f, 150.0f }, { 0.0f, 180.0f, 0.0f }, @@ -252,7 +252,7 @@ void Ending_80187D3C(s32 arg0) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_6029BE4, - D_TITLE_6032084, + aPeppySkel, 23, { 160.0f, -400.0f, 350.0f }, { 350.0f, 180.0f, 0.0f }, @@ -430,16 +430,16 @@ void Ending_801886F4(void) { switch ((D_ending_80196F90 % 8) / 2) { case 3: - TextureRect_CI4(&gMasterDisp, D_END_70110E0, D_END_70111B0, 16, 26, temp + 31.0f, 18.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_END_70110E0, D_END_70111B0, 16, 26, temp + 31.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 2: - TextureRect_CI4(&gMasterDisp, D_END_7010FF0, D_END_70110C0, 16, 26, temp + 24.0f, 18.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_END_7010FF0, D_END_70110C0, 16, 26, temp + 24.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 1: - TextureRect_CI4(&gMasterDisp, D_END_7010F00, D_END_7010FD0, 16, 26, temp + 18.0f, 18.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_END_7010F00, D_END_7010FD0, 16, 26, temp + 18.0f, 18.0f, 1.0f, 1.0f); /* fallthrough */ case 0: - TextureRect_CI4(&gMasterDisp, D_END_7010E10, D_END_7010EE0, 16, 26, temp, 18.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_END_7010E10, D_END_7010EE0, 16, 26, temp, 18.0f, 1.0f, 1.0f); } } @@ -504,8 +504,8 @@ void Ending_80188DB4(void) { 0, 0, { 0, 0, 0, 0 } }, - { &D_TITLE_60338DC, - D_TITLE_603088C, + { &aFalcoAnim, + aFalcoSkel, 23, { 230.0f, -370.0f, -620.0f }, { 350.0f, 0.0f, 0.0f }, @@ -514,8 +514,8 @@ void Ending_80188DB4(void) { 0, 0, { 0, 0, 0, 0 } }, - { &D_TITLE_6036278, - D_TITLE_60313AC, + { &aSlippyAnim, + aSlippySkel, 23, { -120.0f, -350.0f, -600.0f }, { 350.0f, 10.0f, 0.0f }, @@ -524,8 +524,8 @@ void Ending_80188DB4(void) { 0, 0, { 0, 0, 0, 0 } }, - { &D_TITLE_603531C, - D_TITLE_6032084, + { &aPeppyAnim, + aPeppySkel, 23, { -260.0f, -350.0f, -710.0f }, { 350.0f, 10.0f, 0.0f }, @@ -535,7 +535,7 @@ void Ending_80188DB4(void) { 0, { 0, 0, 0, 0 } }, { &D_TITLE_60246F8, - D_TITLE_602FBAC, + aFoxSkel, 23, { 30.0f, -330.0f, -320.0f }, { 350.0f, 0.0f, 0.0f }, diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 6c37abed..a058a2de 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -44,18 +44,18 @@ void Ending_8018CE20(u32 arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 0, 192, 5, 64.0f, 105.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 1, 192, 5, 64.0f, 110.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 2, 192, 5, 64.0f, 115.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 3, 192, 5, 64.0f, 120.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 4, 192, 5, 64.0f, 125.0f, - 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 5, 192, 5, 64.0f, 130.0f, - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 0, 192, 5, 64.0f, + 105.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 1, 192, 5, 64.0f, + 110.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 2, 192, 5, 64.0f, + 115.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 3, 192, 5, 64.0f, + 120.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 4, 192, 5, 64.0f, + 125.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_ending_80192E74[i].unk_00 + 192 * 5 * 5, 192, 5, 64.0f, + 130.0f, 1.0f, 1.0f); } else { xPos = (320 - Graphics_GetSmallTextWidth(D_ending_80192E74[i].unk_00)) / 2; RCP_SetupDL(&gMasterDisp, SETUPDL_83); @@ -158,9 +158,9 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) { if (gExpertMode != 0) { for (i = 0; i < 240; i += 4) { if (gVenomHardClear == 0) { - TextureRect_RGBA16(&gMasterDisp, gEndingNormalReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingNormalReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); } else { - TextureRect_RGBA16(&gMasterDisp, gEndingExpertReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, gEndingExpertReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); } } } else { @@ -183,10 +183,13 @@ void Ending_8018D814(u32 arg0, AssetInfo* asset) { gDPSetPrimColor(gMasterDisp++, 0, 0, asset->prim.r, asset->prim.g, asset->prim.b, alpha); - TextureRect_IA8(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 2, asset->unk_18.y, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, sLargeText_1997_7, 16, 15, asset->unk_18.x + 16.0f * 3, asset->unk_18.y, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeText_1997_1, 16, 15, asset->unk_18.x, asset->unk_18.y, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 1, asset->unk_18.y, 1.0f, + 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeText_1997_9, 16, 15, asset->unk_18.x + 16.0f * 2, asset->unk_18.y, 1.0f, + 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sLargeText_1997_7, 16, 15, asset->unk_18.x + 16.0f * 3, asset->unk_18.y, 1.0f, + 1.0f); } void Ending_8018DA0C(u32 arg0, AssetInfo* asset) { @@ -234,27 +237,27 @@ bool Ending_8018DCB4(void) { s32 k; s32 m; s32 temp; - s32 temp2 = 0; + s32 teamAlive = 0; s32 temp3 = 0; s32 temp4[10]; - s32 unk_5E[10][7]; + s32 stats[10][7]; s32 unk40[10]; for (i = 0; i < gMissionNumber + 1; i++) { - temp2 += ((gMissionTeamStatus[i] & 0x00FF0000) >> 16) & 1; - temp2 += ((gMissionTeamStatus[i] & 0x0000FF00) >> 8) & 1; - temp2 += (gMissionTeamStatus[i] & 0x000000FF) & 1; + teamAlive += ((gMissionTeamStatus[i] & TEAMSTATUS_PEPPY) >> 16) & 1; + teamAlive += ((gMissionTeamStatus[i] & TEAMSTATUS_SLIPPY) >> 8) & 1; + teamAlive += (gMissionTeamStatus[i] & TEAMSTATUS_FALCO) & 1; } for (i = 0; i < 10; i += 1) { temp4[i] = 0; - unk40[i] = gSaveFile.save.data.unk_40[i]; + unk40[i] = gSaveFile.save.data.rankingLives[i]; for (j = 0; j < 7; j += 1) { - temp4[i] += gSaveFile.save.data.unk_5E[i][j].unk_0 + (gSaveFile.save.data.unk_5E[i][j].unk_C * 256); - unk_5E[i][0] += gSaveFile.save.data.unk_5E[i][j].unk_D & 1; - unk_5E[i][1] += gSaveFile.save.data.unk_5E[i][j].unk_F & 1; - unk_5E[i][2] += gSaveFile.save.data.unk_5E[i][j].unk_E & 1; + temp4[i] += gSaveFile.save.data.stats[i][j].hitCount + (gSaveFile.save.data.stats[i][j].unk_C * 256); + stats[i][0] += gSaveFile.save.data.stats[i][j].peppyAlive & 1; + stats[i][1] += gSaveFile.save.data.stats[i][j].slippyAlive & 1; + stats[i][2] += gSaveFile.save.data.stats[i][j].falcoAlive & 1; } } @@ -280,10 +283,10 @@ bool Ending_8018DCB4(void) { temp3 = 0; for (m = 0; m < 3; m++) { - temp3 += unk_5E[k][m]; + temp3 += stats[k][m]; } - if (temp2 > temp3) { + if (teamAlive > temp3) { temp = k; break; } @@ -733,7 +736,7 @@ void Ending_80190778(u32 arg0, AssetInfo* asset) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_arwing_3005AB0); + gSPDisplayList(gMasterDisp++, aAwSlippyHeadDL); } void Ending_80190CF0(u32 arg0, AssetInfo* asset) { @@ -861,7 +864,7 @@ void Ending_80191294(u32 arg0, AssetInfo* asset) { D_ending_80198590.drawFace = false; } - D_ending_80198590.windshieldXrot = 0.0f; + D_ending_80198590.cockpitGlassXrot = 0.0f; D_ending_80198590.teamFaceXrot = +D_ending_801985F0.x; D_ending_80198590.teamFaceYrot = -D_ending_801985F0.y; diff --git a/src/overlays/ovl_ending/fox_end2_data.c b/src/overlays/ovl_ending/fox_end2_data.c index 40923b13..cea5159b 100644 --- a/src/overlays/ovl_ending/fox_end2_data.c +++ b/src/overlays/ovl_ending/fox_end2_data.c @@ -194,10 +194,10 @@ AssetInfo D_ending_801934B4[] = { { NULL, Ending_8018F64C, 29, 100, 820, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, { NULL, Ending_8018F64C, 29, 920, 960, 1.0f, -900.0f, 600.0f, -1200.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 4, 0 }, { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 3, 0 }, - { D_arwing_3016CC0, NULL, 29, 920, 150, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1070, 19, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1089, 1, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -1.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, - { D_arwing_3016CC0, NULL, 29, 1090, 30, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { aAwFalcoHeadDL, NULL, 29, 920, 150, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { aAwFalcoHeadDL, NULL, 29, 1070, 19, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -40.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { aAwFalcoHeadDL, NULL, 29, 1089, 1, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, -1.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, + { aAwFalcoHeadDL, NULL, 29, 1090, 30, 1.0f, -1000.0f, 506.8f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, { D_arwing_30194E0, NULL, 45, 100, 1020, 1.0f, -1000.0f, 516.9f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 7, 0 }, { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, -1000.0f, 500.0f, -64.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, -1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 5, 0 }, @@ -210,22 +210,22 @@ AssetInfo D_ending_801934B4[] = { { NULL, Ending_80191294, 29, 100, 1780, 1.0f, 1000.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 7, 0 }, { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, 500.0f, -57.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, { &D_arwing_3015C28, D_arwing_3016610, 29, 100, 1780, 1.0f, 1000.0f, -500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 11, 0 }, - { D_arwing_3003CE0, NULL, 29, 850, 20, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 870, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 871, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 872, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 873, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 874, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 875, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 11.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 876, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 877, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 878, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 879, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 880, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 881, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 882, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 883, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { D_arwing_3003CE0, NULL, 29, 884, 36, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 850, 20, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 870, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 871, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 872, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 873, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 874, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 875, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 11.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 876, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 877, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 878, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 879, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 880, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 16.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 881, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 14.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 882, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 10.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 883, 1, 1.0f, 1000.0f, -493.2f, -16.0f, 7.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { aAwPeppyHeadDL, NULL, 29, 884, 36, 1.0f, 1000.0f, -493.2f, -16.0f, 5.0f, 0.0f, 0.0f, 0.012f, 0.012f, 0.012f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, { D_arwing_30194E0, NULL, 45, 850, 70, 1.0f, 999.0f, -483.1f, -25.9f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.2f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {255, 255, 255, 140,}, 11, 0 }, { NULL, Ending_8018E1B8, 67, 100, 1780, 1.0f, 1000.0f, -500.0f, -34.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.3f, 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {0, 0, 255, 0,}, {255, 255, 255, 255,}, 0, 0 }, { NULL, Ending_8018F2A8, 29, 100, 420, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, @@ -248,14 +248,14 @@ AssetInfo D_ending_801934B4[] = { { NULL, Ending_8018E7B8, 67, 3800, 950, 1.0f, 15600.0f, -6710.0f, -9960.0f, 0.0f, 0.0f, -10.0f, 35.0f, 10.0f, 20.0f, -22.0f, 12.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {240, 176, 64, 0}, 996, 1000, {255, 255, 0, 0,}, {255, 255, 255, 164,}, 0, 0 }, { NULL, Ending_8018D4BC, 0, 3100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, { NULL, Ending_8018EDB8, 20, 3100, 1800, 1.0f, 0.0f, -470.0f, -3500.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 996, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, - { &D_TITLE_602F8E0, D_TITLE_602FBAC, 12, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 10, 0 }, - { &D_TITLE_602F8E0, D_TITLE_602FBAC, 23, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, - { &D_TITLE_60305C0, D_TITLE_603088C, 12, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, - { &D_TITLE_60305C0, D_TITLE_603088C, 23, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, - { &D_TITLE_6031DB8, D_TITLE_6032084, 12, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, - { &D_TITLE_6031DB8, D_TITLE_6032084, 23, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, - { &D_TITLE_6031120, D_TITLE_60313AC, 12, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, - { &D_TITLE_6031120, D_TITLE_60313AC, 23, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &aFoxRunningAnim, aFoxSkel, 12, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 10, 0 }, + { &aFoxRunningAnim, aFoxSkel, 23, 3100, 1800, 5.0f, -300.0f, -300.0f, -1300.0f, 5.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 10, 0 }, + { &aFalcoRunningAnim, aFalcoSkel, 12, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &aFalcoRunningAnim, aFalcoSkel, 23, 3100, 1800, 5.0f, -100.0f, -300.0f, -1300.0f, 10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &aPeppyRunningAnim, aPeppySkel, 12, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &aPeppyRunningAnim, aPeppySkel, 23, 3100, 1800, 6.0f, 100.0f, -300.0f, -1300.0f, -10.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, + { &aSlippyRunningAnim, aSlippySkel, 12, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, -90.0f, 0.6f, 0.1f, 6.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 200,}, 0, 0 }, + { &aSlippyRunningAnim, aSlippySkel, 23, 3100, 1800, 7.0f, 300.0f, -300.0f, -1300.0f, -15.0f, -90.0f, 0.0f, 0.6f, 0.6f, 0.6f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.1f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, { NULL, Ending_8018D250, 5, 5000, 2000, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 2, 0 }, { NULL, Ending_8018D4BC, 0, 5100, 1800, 0.0f, 0.0f, 32.0f, -32.0f, 200.0f, 70.0f, 10.0f, 10.0f, 6.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, { D_END_7016540, NULL, 17, 5100, 310, 1.0f, 0.0f, -2800.0f, -6900.0f, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, -4.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, {0, 0, 0, 0}, 995, 1000, {0, 0, 0, 0,}, {0, 0, 0, 0,}, 0, 0 }, diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 196a0889..3eed01e7 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -657,7 +657,7 @@ void Corneria_CoGranga_Update(CoGranga* this) { } gBossFrameCount++; - gRadarMarks[59].status = 1; + gRadarMarks[59].enabled = true; gRadarMarks[59].type = 102; gRadarMarks[59].pos.x = this->obj.pos.x; gRadarMarks[59].pos.y = this->obj.pos.y; @@ -1336,7 +1336,7 @@ void Corneria_CoGaruda1_Update(CoGaruda1* this) { switch (this->state) { case 0: this->fwork[1] += 20.0f; - Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); this->animFrame = 0; this->fwork[0] += 1.0f; @@ -1417,7 +1417,7 @@ void Corneria_CoGaruda2_Update(CoGaruda2* this) { case 1: this->fwork[0] = -10.0f; - Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); if (this->timer_0BC == 0) { this->state = 2; this->iwork[2] = RAND_INT(10.0f) + 10; @@ -1426,7 +1426,7 @@ void Corneria_CoGaruda2_Update(CoGaruda2* this) { case 2: this->fwork[0] = -10.0f; - Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); this->animFrame++; if (this->animFrame >= Animation_GetFrameCount(&D_CO_602AA04)) { @@ -1485,7 +1485,7 @@ void Corneria_CoGaruda3_Update(CoGaruda3* this) { case 1: this->fwork[0] = 5.0f; this->fwork[1] += 5.0f; - Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); this->animFrame++; if (this->animFrame >= Animation_GetFrameCount(&aCoGaruda3Anim)) { this->animFrame = 0; @@ -2918,26 +2918,26 @@ void Corneria_LevelStart(Player* player) { // Cloud reflexions on Arwing windshields if (sp2C >= 0.0f) { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); } else { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); } for (i = 0; (i < 40) && (D_ctx_80177A48[6] >= 0.2f); i++, D_ctx_80177A48[6] -= 0.2f) { if (sp44 >= 0) { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 2); } else { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 3); } } for (i = 0; (i < 40) && (D_ctx_80177A48[7] >= 0.3f); i++, D_ctx_80177A48[7] -= 0.3f) { if (sp40 >= 0) { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 0); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 0); } else { - Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 1); + Lib_Texture_Scroll(aWindshieldClouldReflextionTex, 64, 32, 1); } } @@ -3626,11 +3626,11 @@ void Corneria_LevelComplete1(Player* player) { switch (gCsFrameCount) { case 981: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1181: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 240: diff --git a/src/overlays/ovl_i1/fox_tr.c b/src/overlays/ovl_i1/fox_tr.c index 5bd61820..343566da 100644 --- a/src/overlays/ovl_i1/fox_tr.c +++ b/src/overlays/ovl_i1/fox_tr.c @@ -11,7 +11,7 @@ void Training_RingPassCount_Draw(void) { if (gRingPassCount != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - func_hud_800869A0(250.0f, 50.0f, gRingPassCount, 1.0f, 0, 999); + HUD_Number_Draw(250.0f, 50.0f, gRingPassCount, 1.0f, 0, 999); } } diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index 6886ba18..55f03cdb 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -158,7 +158,7 @@ void Training_Enemy_Update(ActorAllRange* this) { ActorAllRange_ApplyDamage(this); radarMark = &gRadarMarks[this->index]; - radarMark->status = 1; + radarMark->enabled = true; radarMark->type = this->aiType; radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 045259ff..4b4bd7da 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -2358,7 +2358,7 @@ void Venom1_Ve1Golemech_SetShadow(Ve1Golemech* this) { Matrix_Scale(gGfxMatrix, 10.0f, 0.0f, 8.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -90.0f * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } void Venom1_80198414(void) { @@ -2442,5 +2442,5 @@ void Venom1_8019864C(PlayerShot* shot) { } void Venom1_LevelStart(Player* player) { - func_hud_80096A74(player); + Venom1_LevelStart2(player); } diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index c0aab937..9536c9ff 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -2418,11 +2418,11 @@ void Meteo_LevelComplete(Player* player) { break; case 976: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1176: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1300: diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index da46ca18..e892400e 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -1806,11 +1806,11 @@ void SectorX_LevelComplete(Player* player) { switch (gCsFrameCount) { case 706: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 906: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 100: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 3307d341..5e3c9cb2 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -1851,7 +1851,7 @@ void Area6_8018C0D0(f32* arg0, f32 arg1, Vec3f* arg2, f32 arg3, s32 arg4) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, (s32) D_i3_801C22F0.r[arg4], (s32) D_i3_801C22F0.g[arg4], (s32) D_i3_801C22F0.b[arg4], 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_MultVec3f(gCalcMatrix, &spB0, arg2); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_47); @@ -1888,7 +1888,7 @@ void Area6_A6Gorgon_Draw(A6Gorgon* this) { Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, this->fwork[A6_FWK_33] * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_101C2E0); + gSPDisplayList(gMasterDisp++, aStarDL); } else if (D_i3_801C22F0.unk_24 != 0.0f) { Animation_GetFrameData(&D_A6_6018994, 0, jointTable); @@ -2880,7 +2880,7 @@ void Area6_LevelComplete(Player* player) { gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_2; - func_hud_80088564(); + HUD_Bolse_Area6_SaveData(); } } @@ -2901,11 +2901,11 @@ void Area6_LevelComplete(Player* player) { break; case 700: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 900: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 940: diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 9709ce67..21e3cb9c 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -4057,7 +4057,7 @@ void Aquas_AqAnglerFish_Draw(AqAnglerFish* this) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) this->iwork[12]); gDPSetEnvColor(gMasterDisp++, 127, 127, 0, (s32) this->iwork[12]); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index df8bd2d2..06f4ed24 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -3049,7 +3049,7 @@ void Solar_SoVulkain_Draw(SoVulkain* this) { MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[3], D_i3_801C2768[2], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); for (i = 0; i < 9; i++) { Matrix_Pop(&gGfxMatrix); @@ -3060,7 +3060,7 @@ void Solar_SoVulkain_Draw(SoVulkain* this) { Matrix_RotateX(gGfxMatrix, spA0[i] * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_i3_801C2768[4 + i], 100.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (D_i3_801C2768[13] > 0.0f) { @@ -3460,11 +3460,11 @@ void Solar_LevelComplete(Player* player) { break; case 1186: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1386: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1460: diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 2db978e3..23705049 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -4999,11 +4999,11 @@ void Zoness_LevelComplete(Player* player) { break; case 906: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1106: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1180: diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 9fe5a6b2..7d11e33c 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1653,7 +1653,7 @@ void Bolse_LevelComplete(Player* player) { gPrevPlanetTeamShields[i] = 255; } } - func_hud_80088564(); + HUD_Bolse_Area6_SaveData(); } } break; @@ -1661,11 +1661,11 @@ void Bolse_LevelComplete(Player* player) { switch (gCsFrameCount) { case 400: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 600: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 620: @@ -1852,7 +1852,7 @@ void Bolse_Effect397_Draw(Effect397* this) { gDPSetEnvColor(gMasterDisp++, 0, 128, 255, this->unk_44); Matrix_Scale(gGfxMatrix, this->scale2, this->scale2, this->scale2, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); break; } @@ -2054,8 +2054,8 @@ void Bolse_BoBaseShield_Update(BoBaseShield* this) { Math_SmoothStepToF(&this->fwork[0], D_BO_801A03DC * 9.0f + 10.0f, 1.0f, 10.0f, 0.0f); - Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); - Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); + Lib_Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); + Lib_Texture_Scroll(aBoBaseShieldTex, 16, 16, 0); switch (this->state) { case 2: diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index ddea95a6..81799cb2 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -795,7 +795,7 @@ void Fortuna_LevelComplete(Player* player) { gBosses[0].swork[0] = 1; - if ((HUD_FoBase_ExplodeCs(&gBosses[0]) == 2) || (gMissionStatus != MISSION_COMPLETE)) { + if ((FoBase_ExplodeCs(&gBosses[0]) == 2) || (gMissionStatus != MISSION_COMPLETE)) { Play_ClearObjectData(); if (gMissionStatus == MISSION_COMPLETE) { player->csState = 10; @@ -1292,7 +1292,7 @@ void Fortuna_LevelComplete(Player* player) { break; case 1080: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1240: @@ -1317,7 +1317,7 @@ void Fortuna_LevelComplete(Player* player) { peppy->fwork[29] = 5.0f; peppy->iwork[11] = 2; } - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1300: @@ -1425,10 +1425,10 @@ void Fortuna_LevelComplete(Player* player) { if (player->csState < 20) { switch (gCsFrameCount) { case 1020: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1220: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; } } diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 620430d8..87fad000 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -273,7 +273,7 @@ void Katina_LaserEnergyParticlesDraw(Effect358* this) { Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -1491,7 +1491,7 @@ void Katina_KaSaucerer_Update(KaSaucerer* this) { this->obj.rot.y += 360.0f; } - gRadarMarks[64].status = 1; + gRadarMarks[64].enabled = true; gRadarMarks[64].type = 101; gRadarMarks[64].pos.x = this->obj.pos.x; gRadarMarks[64].pos.y = this->obj.pos.y; @@ -1665,7 +1665,7 @@ void Katina_KaSaucerer_Draw(KaSaucerer* this) { this->fwork[BOSS_LASER_LIGHT_SCALE], MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1677,7 +1677,7 @@ void Katina_KaSaucerer_Draw(KaSaucerer* this) { MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -90 * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } @@ -1982,11 +1982,11 @@ void Katina_LevelComplete(Player* player) { break; case 350: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 550: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1010: @@ -2595,7 +2595,7 @@ void Katina_EnemyUpdate(ActorAllRange* this) { ActorAllRange_ApplyDamage(this); radarMark = &gRadarMarks[this->index]; - radarMark->status = 1; + radarMark->enabled = true; radarMark->type = this->aiType; radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index d0b92417..063862c2 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -2666,7 +2666,7 @@ void Macbeth_TrainTrack_Draw(Scenery* this) { Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x, D_i5_801BE688[1].y + 50.0f, @@ -2674,7 +2674,7 @@ void Macbeth_TrainTrack_Draw(Scenery* this) { Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Pop(&gGfxMatrix); } else if (this->state == 2) { @@ -2687,7 +2687,7 @@ void Macbeth_TrainTrack_Draw(Scenery* this) { Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->vel.z, this->vel.z / 2, this->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_29); Matrix_Pop(&gGfxMatrix); } @@ -5625,6 +5625,7 @@ void Macbeth_LevelStart(Player* player) { break; case 4: + default: break; } @@ -5640,7 +5641,7 @@ void Macbeth_LevelStart(Player* player) { player->rockPhase += player->vel.z * 5.0f; player->rockAngle = SIN_DEG(player->rockPhase) * 0.7f; - Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); + Lib_Texture_Scroll(D_landmaster_3002E80, 32, 32, 0); if ((gCsFrameCount > 150) && ((-player->trueZpos - player->zPath) > 200.0f)) { if (D_i5_801BA768 < 11.5f) { @@ -6213,7 +6214,7 @@ void Macbeth_Effect379_Draw(Effect379* this) { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_64); } @@ -7151,7 +7152,7 @@ void Macbeth_LevelComplete2(Player* player) { break; case 1817: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1960: @@ -7160,7 +7161,7 @@ void Macbeth_LevelComplete2(Player* player) { break; case 2017: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 2040: @@ -7513,7 +7514,7 @@ void Macbeth_801B38E0(void) { s16 j; for (i = 0; i < ARRAY_COUNT(gRadarMarks); i++) { - gRadarMarks[i].status = 0; + gRadarMarks[i].enabled = false; } for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { @@ -7735,11 +7736,11 @@ void Macbeth_LevelComplete1(Player* player) { switch (gCsFrameCount) { case 755: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1025: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 50: diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 36838191..19212502 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -2570,7 +2570,7 @@ void Titania_8019002C(s32 limbIndex, Vec3f* rot, void* thisx) { RCP_SetupDL(&gMasterDisp, SETUPDL_72); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_30); Matrix_Pop(&gGfxMatrix); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &this->fwork[29]); @@ -3136,7 +3136,7 @@ void Titania_80191AE8(s32 limbIndex, Vec3f* rot, void* thisx) { RCP_SetupDL(&gMasterDisp, SETUPDL_72); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 255); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); RCP_SetupDL(&gMasterDisp, SETUPDL_30); Matrix_Pop(&gGfxMatrix); Matrix_MultVec3f(gCalcMatrix, &D_i5_801B8D3C, (Vec3f*) &this->fwork[29]); @@ -5281,7 +5281,7 @@ void Titania_TiGoras_Draw(TiGoras* boss) { Matrix_Scale(gGfxMatrix, boss->fwork[47] * 10.0f, boss->fwork[47] * 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); break; @@ -5304,7 +5304,7 @@ void Titania_TiGoras_Draw(TiGoras* boss) { Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); break; diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index ad1013fa..90678564 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -416,11 +416,11 @@ void Titania_LevelComplete(Player* player) { switch (gCsFrameCount) { case 831: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1031: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 50: diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 1e64785f..79e89930 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -1200,7 +1200,7 @@ void Andross_AndBrain_Update(AndBrain* this) { this->vel.z = sp64.z - gPathVelZ; if (this->state < 20) { - gRadarMarks[59].status = 1; + gRadarMarks[59].enabled = true; gRadarMarks[59].type = 102; gRadarMarks[59].pos.x = this->obj.pos.x; gRadarMarks[59].pos.y = this->obj.pos.y; @@ -1654,7 +1654,7 @@ void Andross_Effect396_Update(Effect396* this) { Gfx* D_i6_801A6790[10] = { D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, - D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, D_arwing_3016660, D_arwing_3015D80, + D_ANDROSS_C001880, D_ANDROSS_C001880, D_ANDROSS_C001880, aAwLeftWingDL, aAwRightWingDL, }; void Andross_Effect396_Draw(Effect396* this) { @@ -3517,7 +3517,7 @@ void Andross_AndAndross_Draw(AndAndross* this) { Matrix_Scale(gGfxMatrix, 1.1f, 1.1f, 1.1f, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Pop(&gGfxMatrix); } @@ -3643,7 +3643,7 @@ void Andross_AndLaserEmitter_Draw(AndLaserEmitter* this) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, alpha); gDPSetEnvColor(gMasterDisp++, 255, 128, 128, alpha); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } @@ -4308,10 +4308,10 @@ void Andross_80193C4C(Player* player) { } break; case 1050: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1250: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; } if (gCsFrameCount > 1300) { @@ -4333,10 +4333,10 @@ void Andross_80193C4C(Player* player) { gCsFrameCount += 230; break; case 1050: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1250: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; } } diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index c02074f0..13946c8c 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -1664,7 +1664,7 @@ void SectorY_SyShogun_Update(SyShogun* this) { if (this->index == 0) { radarMark = &gRadarMarks[this->index + 1]; - radarMark->status = 1; + radarMark->enabled = true; radarMark->type = 102; radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; @@ -1672,7 +1672,7 @@ void SectorY_SyShogun_Update(SyShogun* this) { radarMark->yRot = this->rot_078.y + 180.0f; } else { radarMark = &gRadarMarks[this->index + 4]; - radarMark->status = 1; + radarMark->enabled = true; radarMark->type = 10; radarMark->pos.x = this->obj.pos.x; radarMark->pos.y = this->obj.pos.y; @@ -1925,7 +1925,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_Translate(gGfxMatrix, this->fwork[1], this->fwork[2], this->fwork[3], MTXF_APPLY); Matrix_Scale(gGfxMatrix, sp9C, sp9C, sp9C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (this->fwork[34] != 0.0f) { @@ -1947,7 +1947,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_RotateY(gGfxMatrix, -sp8C, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -sp88, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (this->index == 0) { @@ -1963,7 +1963,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->fwork[41] * 2.0f, this->fwork[41], this->fwork[41] * 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (this->fwork[42] != 0.0f) { @@ -1978,7 +1978,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->fwork[42] * 2.0f, this->fwork[42], this->fwork[42] * 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } @@ -1992,7 +1992,7 @@ void SectorY_SyShogun_Draw(SyShogun* this) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); Matrix_Scale(gGfxMatrix, this->fwork[43], this->fwork[43], this->fwork[43], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } if (this->fwork[46] != 0.0f) { @@ -2006,10 +2006,10 @@ void SectorY_SyShogun_Draw(SyShogun* this) { MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.4f, 0.2f, 0.2f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); Matrix_Translate(gGfxMatrix, -46.0f, 0, 0, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } } @@ -2347,11 +2347,11 @@ void SectorY_LevelComplete(Player* player) { break; case 1163: - gShowLevelClearStatusScreen = 1; + gShowLevelClearStatusScreen = true; break; case 1363: - gShowLevelClearStatusScreen = 0; + gShowLevelClearStatusScreen = false; break; case 1440: @@ -3874,7 +3874,7 @@ void SectorY_SyRobot_Draw(SyRobot* this) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_1024AC0); + gSPDisplayList(gMasterDisp++, aOrbDL); } } diff --git a/src/overlays/ovl_menu/fox_i_menu.c b/src/overlays/ovl_menu/fox_i_menu.c index 75b53315..b45b5ce2 100644 --- a/src/overlays/ovl_menu/fox_i_menu.c +++ b/src/overlays/ovl_menu/fox_i_menu.c @@ -3,8 +3,8 @@ void Title_Main(void); void Title_Draw(void); void Option_Main(void); -void Option_DrawEntry(void); -void Map_8019E85C(void); +void Option_Entry_Draw(void); +void Map_GameOver(void); void Map_8019E8C8(void); void Map_Main(void); void Map_Draw(void); @@ -35,11 +35,11 @@ void OvlMenu_CallFunction(u32 mode, void* ptr) { break; case OVLCALL_OPTION_DRAW: - Option_DrawEntry(); + Option_Entry_Draw(); break; case OVLCALL_GAME_OVER_UPDATE: - Map_8019E85C(); + Map_GameOver(); break; case OVLCALL_UNKMAP_DRAW: diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index 4a81f05f..f44d5bce 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -8,34 +8,36 @@ #include "global.h" #include "fox_map.h" #include "fox_option.h" +#include "sf64save.h" #include "prevent_bss_reordering.h" #include "prevent_bss_reordering2.h" -#include "prevent_bss_reordering3.h" +// #include "prevent_bss_reordering3.h" #include "assets/ast_map.h" #include "assets/ast_text.h" #include "assets/ast_font_3d.h" // BSS STARTS HERE -u8 D_menu_801B9410[96 * 96]; -u8 D_menu_801BB810[96 * 96]; -u8 D_menu_801BDC10[96 * 96]; -u8 D_menu_801C0010[96 * 96]; -u8 D_menu_801C2410[96 * 96]; -u8 D_menu_801C4810[96 * 96]; -u8 D_menu_801C6C10[96 * 96]; -u8 D_menu_801C9010[96 * 96]; -u8 D_menu_801CB410[96 * 96]; +u8 gMapVenomCloudTex[96 * 96]; +u8 gMapCorneriaTex[96 * 96]; +u8 gMapFortunaTex[96 * 96]; +u8 gMapAquasTex[96 * 96]; +u8 gMapVenomTex[96 * 96]; +u8 gMapTitaniaTex[96 * 96]; +u8 gMapKatinaTex[96 * 96]; +u8 gMapMacbethTex[96 * 96]; +u8 gMapZonessTex[96 * 96]; + s32 D_menu_801CD810; f32 D_menu_801CD818[9]; s32 D_menu_801CD83C; -s32 D_menu_801CD840[24]; +s32 sUnusedPathIdx[24]; // Path index, set but not used s32 D_menu_801CD8A0[15]; s32 D_menu_801CD8E0[7]; -s32 D_menu_801CD900[15]; +s32 D_menu_801CD900[15]; // planet alpha used for something? MissionStatus sPrevMissionStatus; s32 D_menu_801CD940; -s32 D_menu_801CD944; // mapState -s32 D_menu_801CD948; +s32 sMapState; +s32 sMapSubState; // Another type of map state? Investigate s32 D_menu_801CD94C; PlanetId sPrevPlanetId; PlanetId sCurrentPlanetId; // sCurrentPlanetId @@ -44,12 +46,12 @@ s32 D_menu_801CD95C; s32 D_menu_801CD960; s32 D_menu_801CD964; s32 D_menu_801CD968; -s32 D_menu_801CD96C; +bool D_menu_801CD96C; s32 D_menu_801CD970; -s32 D_menu_801CD974; +bool D_menu_801CD974; s32 D_menu_801CD978; s32 D_menu_801CD97C; -s32 D_menu_801CD980; +bool D_menu_801CD980; s32 D_menu_801CD984; s32 D_menu_801CD988; s32 D_menu_801CD98C; @@ -57,62 +59,62 @@ s32 D_menu_801CD990; s32 D_menu_801CD994; s32 D_menu_801CD998; f32 D_menu_801CD99C; -s32 D_menu_801CD9A0; +bool D_menu_801CD9A0; s32 D_menu_801CD9A4; -s32 D_menu_801CD9A8; +s32 sLevelPlayed; s32 D_menu_801CD9AC; f32 D_menu_801CD9B0; f32 D_menu_801CD9B4; -s32 D_menu_801CD9B8; -s32 D_menu_801CD9BC; -s32 D_menu_801CD9C0; +s32 sMapTimer1; +s32 sMapTimer2; +s32 sMapTimer3; s32 D_menu_801CD9C4; s32 D_menu_801CD9C8; -s32 D_menu_801CD9CC; -s32 D_menu_801CD9D0; +s32 sRestartLevelStates; +s32 sExplosionAnimIdx; s32 D_menu_801CD9D4; s32 D_menu_801CD9D8; -f32 D_menu_801CD9DC; -f32 D_menu_801CD9E0; -f32 D_menu_801CD9E4; -f32 D_menu_801CD9E8; +f32 sPrologueTextXpos; +f32 sPrologueTextYpos; +f32 sPrologueNextTexAlpha; +f32 sPrologueCurrentTexAlpha; f32 D_menu_801CD9EC; -s32 D_menu_801CD9F0; -f32 D_menu_801CD9F4; // x -f32 D_menu_801CD9F8; // y -f32 D_menu_801CD9FC; // z -f32 D_menu_801CDA00; // x -f32 D_menu_801CDA04; // y -f32 D_menu_801CDA08; // z +s32 sPrologueTexIdx; +f32 sMapCamEyeX; // x +f32 sMapCamEyeY; // y +f32 sMapCamEyeZ; // z +f32 sMapCamAtX; // x +f32 sMapCamAtY; // y +f32 sMapCamAtZ; // z f32 D_menu_801CDA0C; // camera x f32 D_menu_801CDA10; // camera y f32 D_menu_801CDA14; f32 D_menu_801CDA18; f32 D_menu_801CDA1C; -f32 D_menu_801CDA20; -f32 D_menu_801CDA24; -f32 D_menu_801CDA28; -f32 D_menu_801CDA2C; -f32 D_menu_801CDA30; -f32 D_menu_801CDA34; -f32 D_menu_801CDA38; -Vec3f D_menu_801CDA40; -Vec3f D_menu_801CDA50; +f32 sMapCamUpX; +f32 sMapCamUpY; +f32 sMapCamUpZ; +f32 sPathFollowCamAtX; +f32 sPathFollowCamAtY; +f32 sPathFollowCamEyeX; +f32 sPathFollowCamEyeY; +Vec3f sZoomPlanetCamAt; +Vec3f sZoomPlanetCamEye; Matrix D_menu_801CDA60[15]; Matrix D_menu_801CDE20[15]; // planet related Matrix D_menu_801CE1E0[15]; Matrix D_menu_801CE5A0[15]; -Vec3f D_menu_801CE960[15]; // sPlanetsPositions +Vec3f sPlanetPositions[15]; f32 D_menu_801CEA18[15]; -f32 D_menu_801CEA54; +f32 sCurrentPlanetCamZDist; f32 D_menu_801CEA58; f32 D_menu_801CEA5C; f32 D_menu_801CEA60; f32 D_menu_801CEA64; f32 D_menu_801CEA68; -f32 D_menu_801CEA6C; -f32 D_menu_801CEA70; -s32 D_menu_801CEA74; +f32 sMapPlanetCardAlpha; +f32 sMapPlanetCardAlphaScale; +s32 sTeamStatusAlpha; f32 D_menu_801CEA78; f32 D_menu_801CEA7C; f32 D_menu_801CEA80; @@ -125,7 +127,7 @@ s32 D_menu_801CEA98; f32 D_menu_801CEA9C; f32 D_menu_801CEAA0; f32 D_menu_801CEAA4; -f32 D_menu_801CEAA8; +f32 sCursorYpos; f32 D_menu_801CEAAC; f32 D_menu_801CEAB0; s32 D_menu_801CEAB4; @@ -133,9 +135,9 @@ f32 D_menu_801CEAB8[15]; f32 D_menu_801CEAF8[15]; s32 D_menu_801CEB34; s32 D_menu_801CEB38; -f32 D_menu_801CEB3C; +f32 sMapCorneriaExplosionScale; f32 D_menu_801CEB40; -s32 D_menu_801CEB48[3]; +bool sPlanetExplosions[EXPLOSIONS_MAX]; s32 D_menu_801CEB58[3][10]; s32 D_menu_801CEBD0[3][10]; f32 D_menu_801CEC48[3][10]; @@ -176,12 +178,12 @@ s32 D_menu_801CF00C; s32 D_menu_801CF010; s32 D_menu_801CF014; s32 D_menu_801CF018; -f32 D_menu_801CF020[8]; -f32 D_menu_801CF040[8]; -f32 D_menu_801CF060[8]; -f32 D_menu_801CF080; -f32 D_menu_801CF088[8]; -f32 D_menu_801CF0A8[8]; +f32 s3DFontXpos[8]; +f32 s3DFontYpos[8]; +f32 s3DFontZpos[8]; +f32 s3DFontScale; +f32 s3DFontXrot[8]; +f32 s3DFontYrot[8]; f32* D_menu_801CF0C8; f32* D_menu_801CF0CC; f32* D_menu_801CF0D0; @@ -189,12 +191,12 @@ s32 D_menu_801CF0D8[8]; s32 D_menu_801CF0F8[8]; s32 D_menu_801CF118; s32 D_menu_801CF11C; -s32 D_menu_801CF120; +bool D_menu_801CF120; f32 D_menu_801CF124; s32 D_menu_801AF420[2] = { 10, 20 }; -u16* D_menu_801AF428[15][2] = { +u16* sBriefingMsg[15][2] = { { gMsg_ID_1220, gMsg_ID_1230 }, { gMsg_ID_1320, gMsg_ID_1330 }, { gMsg_ID_1300, gMsg_ID_1310 }, { gMsg_ID_1420, gMsg_ID_1430 }, { gMsg_ID_1260, gMsg_ID_1270 }, { gMsg_ID_1440, gMsg_ID_1450 }, @@ -395,9 +397,9 @@ PlanetId sPlanetList[] = { PLANET_SECTOR_Z, PLANET_ZONESS, PLANET_KATINA, PLANET_SECTOR_Y, PLANET_SOLAR, }; -Gfx* D_menu_801AF824[4] = { D_MAP_604A710, D_MAP_604A400, D_MAP_604A190, D_MAP_6049F80 }; +Gfx* sExplosionAnimDLs[4] = { aMapExplosion1DL, aMapExplosion2DL, aMapExplosion3DL, aMapExplosion4DL }; -TitleCard D_menu_801AF834[14] = { +TitleCard sPlanetNameCards[14] = { { D_MAP_6007B90, 128, 28, 95.0f }, { D_MAP_60030D0, 96, 28, 110.0f }, { D_MAP_60131A0, 176, 12, 73.0f }, { D_MAP_6009AD0, 168, 28, 77.0f }, { D_MAP_600B9B0, 168, 28, 74.0f }, { D_MAP_6001C80, 96, 13, 106.0f }, { D_MAP_6011660, 176, 12, 75.0f }, { D_MAP_6010010, 112, 13, 109.0f }, { D_MAP_6017640, 112, 28, 101.0f }, @@ -405,7 +407,7 @@ TitleCard D_menu_801AF834[14] = { { D_MAP_6004AC0, 168, 19, 72.0f }, { D_MAP_6006320, 104, 28, 105.0f }, }; -TitleCard D_menu_801AF914[] = { +TitleCard sPlanetTitleCards[] = { { D_MAP_6008990, 232, 19, 46.0f }, { D_MAP_6003B50, 208, 19, 56.0f }, { D_MAP_60139E0, 128, 19, 98.0f }, { D_MAP_600AD30, 168, 19, 77.0f }, { D_MAP_600CC10, 128, 19, 95.0f }, { D_MAP_6002160, 208, 19, 57.0f }, { D_MAP_6011EA0, 256, 19, 40.0f }, { D_MAP_60105C0, 224, 19, 49.0f }, { D_MAP_6018280, 184, 19, 70.0f }, @@ -417,12 +419,12 @@ char* sPlanetNames[] = { "ME", "A6", "BO", "SZ", "SX", "SY", "KA", "MA", "ZO", "CO", "TI", "AQ", "FO", "VE", "SO", }; -Gfx* D_menu_801AFA30[2] = { - D_MAP_6055F20, - D_MAP_6051D20, +Gfx* sMapGralPepperFaceDLs[2] = { + aMapGralPepperFace1DL, + aMapGralPepperFace2DL, }; -ObjPosition D_menu_801AFA38[] = { +ObjPosition sMapMeteors[] = { { -491.0f, 1170.0f, 20.0f, 0.71f }, { -488.0f, 1135.0f, 15.0f, 0.6f }, { -496.0f, 1090.0f, 0.0f, 0.50f }, { -489.0f, 1200.0f, 0.0f, 0.6f }, { -489.0f, 1150.0f, -15.0f, 0.80f }, { -487.0f, 1143.0f, -15.0f, 0.8f }, { -493.0f, 1182.0f, -20.0f, 0.90f }, { -491.0f, 1080.0f, -25.0f, 0.8f }, { -497.0f, 1114.0f, -25.0f, 0.70f }, @@ -439,7 +441,7 @@ ObjPosition D_menu_801AFA38[] = { { -512.0f, 1099.0f, -15.0f, 0.5f }, { -523.0f, 1179.0f, -30.0f, 0.70f }, { -519.0f, 1176.0f, -30.0f, 0.5f }, }; -ObjPosition D_menu_801AFCD8[4] = { +ObjPosition sMapArea6Ships[4] = { { 50.0f, 1410.0f, 40.0f, 0.10f }, { 35.0f, 1235.0f, 40.0f, 0.03f }, { 42.0f, 1270.0f, 60.0f, 0.05f }, @@ -489,7 +491,7 @@ s32 D_menu_801B0004[47] = { // Looks like a quarter of a circle s32 - D_menu_801B00C0[47][96] = { + sMapQuarterCircleTex[47][96] = { { 0, 2, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 11 }, { 0, 2, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 16, 17 }, { 0, 2, 3, 4, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, @@ -645,7 +647,7 @@ s32 48, 48, 49, 49, 50, 51, 51, 52, 52, 53, 54, 55, 55, 56, 57, 58, 59, 60, 61, 62, 64, 66 }, }; -Vtx D_menu_801B4740[] = { +Vtx gMapPlanetVTX[] = { VTX(30, 30, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 30, 0, 0, 0, 255, 255, 255, 255), VTX(-30, 25, 0, 0, 256, 255, 255, 255, 255), VTX(30, 25, 0, 3072, 256, 255, 255, 255, 255), VTX(30, 25, 0, 3072, 0, 255, 255, 255, 255), VTX(-30, 25, 0, 0, 0, 255, 255, 255, 255), @@ -672,44 +674,44 @@ Vtx D_menu_801B4740[] = { VTX(-30, -30, 0, 0, 256, 255, 255, 255, 255), VTX(30, -30, 0, 3072, 256, 255, 255, 255, 255), }; -Gfx D_menu_801B4A40[] = { - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801B9410, G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapVenomCloudDL[] = { + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapVenomCloudTex, G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 1], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 1], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 2], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 2], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 3], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 3], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 4], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 4], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 5], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 5], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 6], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 6], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 7], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 7], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 8], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 8], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 9], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 9], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 10], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 10], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801B9410[96 * 8 * 11], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomCloudTex[96 * 8 * 11], G_IM_FMT_IA, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -717,46 +719,46 @@ Gfx D_menu_801B4A40[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B4D70[] = { - gsDPLoadTLUT_pal256(D_MAP_6026C90), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801BB810, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapCorneriaDL[] = { + gsDPLoadTLUT_pal256(gMapCorneriaTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapCorneriaTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BB810[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapCorneriaTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -764,46 +766,46 @@ Gfx D_menu_801B4D70[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B50D8[] = { - gsDPLoadTLUT_pal256(D_MAP_6029170), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapFortunaDL[] = { + gsDPLoadTLUT_pal256(gMapFortunaTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(&gMapFortunaTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801BDC10[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapFortunaTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -811,46 +813,46 @@ Gfx D_menu_801B50D8[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B5440[] = { - gsDPLoadTLUT_pal256(D_MAP_6022340), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C0010, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapAquasDL[] = { + gsDPLoadTLUT_pal256(gMapAquasTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapAquasTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C0010[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapAquasTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -858,46 +860,46 @@ Gfx D_menu_801B5440[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B57A8[] = { - gsDPLoadTLUT_pal256(D_MAP_60247E0), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C2410, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapVenomDL[] = { + gsDPLoadTLUT_pal256(gMapVenomTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapVenomTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C2410[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapVenomTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -905,46 +907,46 @@ Gfx D_menu_801B57A8[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B5B10[] = { - gsDPLoadTLUT_pal256(D_MAP_602FF60), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C4810, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapTitaniaDL[] = { + gsDPLoadTLUT_pal256(gMapTitaniaTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapTitaniaTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C4810[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapTitaniaTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -952,46 +954,46 @@ Gfx D_menu_801B5B10[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B5E78[] = { - gsDPLoadTLUT_pal256(D_MAP_602B620), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C6C10, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapKatinaDL[] = { + gsDPLoadTLUT_pal256(gMapKatinaTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapKatinaTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C6C10[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapKatinaTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -999,46 +1001,46 @@ Gfx D_menu_801B5E78[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B61E0[] = { - gsDPLoadTLUT_pal256(D_MAP_602DAD0), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801C9010, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapMacbethDL[] = { + gsDPLoadTLUT_pal256(gMapMacbethTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapMacbethTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 1], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 2], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 3], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 4], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 5], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 6], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 7], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 8], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 9], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 10], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(&D_menu_801C9010[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(&gMapMacbethTex[96 * 8 * 11], G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -1046,46 +1048,46 @@ Gfx D_menu_801B61E0[] = { gsSPEndDisplayList(), }; -Gfx D_menu_801B6548[] = { - gsDPLoadTLUT_pal256(D_MAP_60323D0), - gsSPVertex(D_menu_801B4740, 16, 0), - gsDPLoadTextureBlock(D_menu_801CB410, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, +Gfx gMapZonessDL[] = { + gsDPLoadTLUT_pal256(gMapZonessTLUT), + gsSPVertex(gMapPlanetVTX, 16, 0), + gsDPLoadTextureBlock(gMapZonessTex, G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsDPSetTextureLUT(G_TT_RGBA16), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 1), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 1), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 2), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 2), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 3), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 3), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[16], 16, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 4), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[16], 16, 0), + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 4), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 5), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 5), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 6), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 6), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 7), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 7), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), - gsSPVertex(&D_menu_801B4740[32], 16, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 8), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsSPVertex(&gMapPlanetVTX[32], 16, 0), + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 8), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(1, 2, 3, 0, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 9), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 9), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(5, 6, 7, 4, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 10), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 10), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 9, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(9, 10, 11, 8, 0), - gsDPLoadTextureBlock(D_menu_801CB410 + (96 * 8 * 11), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, + gsDPLoadTextureBlock(gMapZonessTex + (96 * 8 * 11), G_IM_FMT_CI, G_IM_SIZ_8b, 96, 8, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD), gsSP1Quadrangle(13, 14, 15, 12, 0), gsDPPipeSync(), @@ -1093,116 +1095,118 @@ Gfx D_menu_801B6548[] = { gsSPEndDisplayList(), }; -u8* D_menu_801B68B0[] = { - D_menu_801C6C10, D_menu_801C9010, D_menu_801CB410, D_menu_801BB810, D_menu_801C4810, - D_menu_801C0010, D_menu_801BDC10, D_menu_801C2410, D_menu_801B9410, +// BSS +u8* gBSSMapPlanetTextures[9] = { + gMapKatinaTex, gMapMacbethTex, gMapZonessTex, gMapCorneriaTex, gMapTitaniaTex, + gMapAquasTex, gMapFortunaTex, gMapVenomTex, gMapVenomCloudTex, }; -u8* D_menu_801B68D4[] = { - D_MAP_6029220, D_MAP_602B6D0, D_MAP_602FFD0, D_MAP_6024890, D_MAP_602DB60, - D_MAP_601FF40, D_MAP_6026D70, D_MAP_60223E0, D_MAP_60190B0, +// AST_MAP +u8* gAssetMapPlanetTextures[9] = { + aMapKatinaTex, aMapMacbethTex, aMapZonessTex, aMapCorneriaTex, aMapTitaniaTex, + aMapAquasTex, aMapFortunaTex, aMapVenomTex, aMapVenomCloudTex, }; -Gfx* D_menu_801B68F8[] = { - D_MAP_6060610, D_MAP_601DE80, D_MAP_604B750, D_MAP_601F6B0, D_MAP_601C0D0, - D_MAP_601C960, D_menu_801B5E78, D_menu_801B61E0, D_menu_801B6548, D_menu_801B4D70, - D_menu_801B5B10, D_menu_801B5440, D_menu_801B50D8, D_menu_801B57A8, D_MAP_604DB10, +Gfx* sMapPlanets[PLANET_MAX] = { + aMapMeteorDL, aMapArea6DL, aMapBolseDL, aMapSectorZDL, aMapSectorXDL, + aMapSectorYDL, gMapKatinaDL, gMapMacbethDL, gMapZonessDL, gMapCorneriaDL, + gMapTitaniaDL, gMapAquasDL, gMapFortunaDL, gMapVenomDL, aMapSolarDL, }; void Map_8019E800(void); -void Map_8019E99C(void); -void Map_8019F164(void); -void Map_8019F42C(void); -void Map_8019F600(void); -void Map_8019F910(void); -void Map_8019F97C(void); -void Map_8019F83C(void); -void Map_8019FA1C(void); -void Map_8019FC04(void); -bool Map_8019FD1C(LevelId levelId, s32 arg1); -void Map_8019FF48(void); +void Map_Setup(void); +void Map_Setup_Play(void); +void Map_Setup_GameOver(void); +void Map_Setup_Menu(void); +void Map_TeamStatus_Refill(void); +void Map_Level_CamSetup(void); +void Map_PathStatus_Setup(void); +void Map_CurrentPlanet_SetAlpha(void); +void Map_PlanetExplosions_Setup(void); +bool Map_PlanetSaveSlot_Setup(LevelId, PlanetSaveSlotTypes); +void Map_Update(void); s32 Map_801A05B4(void); -void Map_801A0788(void); -void Map_801A0954(void); -void Map_801A0D14(void); -void Map_801A1528(void); -void Map_801A116C(void); -void Map_801A19A8(void); -void Map_801A1C14(void); -bool Map_801A2304(void); -f32 Map_801A25C8(PlanetId); +void Map_Starfield_Setup(void); +void Map_Prologue_Update(void); +void Map_Prologue_Draw(void); +void Map_LylatCard_Update(void); +void Map_PrologueArwing_Draw(void); +void Map_LylatCard_Draw(void); +void Map_ZoomPlanet_Update(void); +bool Map_GralPepper_Talk(void); +f32 Map_GetPlanetCamZDist(PlanetId); void Map_801A2674(void); void Map_801A281C(void); -void Map_801A2B8C(void); +void Map_ZoomPlanetPath_Update(void); void Map_801A2EB8(void); void Map_801A3440(f32); void Map_801A3550(Vec3f*, Vec3f*, Vec3f*, f32); -void Map_801A36A8(void); -void Map_801A3A00(void); +void Map_GameOver_Update(void); +void Map_GameOver_3DFont(void); void Map_801A4394(void); -void Map_801A4650(void); +void Map_GameOver_Draw(void); void Map_801A48C0(f32 speed); void Map_801A4A38(f32 arg0); -void Map_801A4AE8(void); -void Map_801A4D0C(u32); -void Map_801A4D7C(void); -void Map_801A4F8C(void); -void Map_801A4FC4(void); -void Map_801A53C8(void); -void Map_801A5834(void); -void Map_801A5C90(void); -bool Map_801A5770(void); -void Map_801A5E80(void); -void Map_801A6368(void); -void Map_801A61B4(LevelId level); -bool Map_801A62FC(PlanetId planet); +void Map_PathChange_Update(void); +void Map_PathChange_UpdateEntry(u32); +void Map_PathChange_Input(void); +void Map_GoToGameOver(void); +void Map_RetryCourse(void); +void Map_ChangePath(void); +void Map_PathChange_DrawOptions(void); +void Map_RestartLevelLifeDown_Draw(void); +bool Map_Input_CursorY(void); +void Map_LevelStart_Update(void); +void Map_CurrentLevel_Setup(void); +void Map_LevelStart_AudioSpecSetup(LevelId level); +bool Map_LevelPlayedStatus_Check(PlanetId planet); s32 Map_GetPathId(PlanetId start, PlanetId end); -void Map_801A6628(void); -void Map_801A6694(void); -void Map_801A68E4(void); -void Map_801A6A24(void); -void Map_801A6A98(PlanetId); -s32 Map_801A6DAC(PlanetId planetId); -void Map_801A6EC0(PlanetId planetId); -void Map_801A7230(PlanetId planetId); -void Map_801A74F4(PlanetId); -void Map_801A7684(PlanetId planetId); -void Map_801A77B0(PlanetId planetId); -void Map_801A791C(PlanetId planetId); -void Map_801A7A84(PlanetId planetId); -void Map_801A7BEC(f32* zAngle, f32 next, f32 scale); -void Map_801A7D3C(PlanetId planetId); -void Map_801A7F1C(PlanetId planetId); -void Map_801A914C(void); -void Map_801A9EE4(void); -void Map_801AD11C(void); -void Map_801AD718(f32, f32, f32, f32*, f32*, f32*, f32, f32, f32); +void Map_PlayLevel(void); +void Map_PositionPlanets(void); +void Map_PlanetOrderZpos(void); +void Map_Fade_Update(void); +void Map_Planet_Draw(PlanetId); +s32 Map_CheckPlanetMedal(PlanetId planetId); +void Map_PlanetAnim2(PlanetId planetId); +void Map_PlanetAnim(PlanetId planetId); +void Map_SolarRays_Draw(PlanetId); +void Map_VenomCloud2_Draw(PlanetId planetId); +void Map_PlanetShadow_Draw(PlanetId planetId); +void Map_Titania_DrawRings1(PlanetId planetId); +void Map_Titania_DrawRings2(PlanetId planetId); +void Map_VenomCloud_Draw(f32* zAngle, f32 next, f32 scale); +void Map_PlanetCleared2_Draw(PlanetId planetId); +void Map_PlanetCleared_Draw(PlanetId planetId); +void Map_PositionCursor(void); +void Map_TotalHits_Draw(void); +void Map_Idle_Update(void); +void Map_SetCamRot(f32, f32, f32, f32*, f32*, f32*, f32, f32, f32); PlanetId Map_GetPlanetId(LevelId level); -void Map_801A809C(PlanetId planetId); -void Map_801A8738(void); -void Map_801A89BC(PlanetId, s32); -void Map_801A8F40(void); -void Map_801A9224(void); -void Map_801A9448(void); -void Map_801A9814(void); -void Map_801A9910(void); +void Map_PlanetMedal_Draw(PlanetId planetId); +void Map_CorneriaExplosion_Draw(void); +void Map_PlanetExplosions_Draw(PlanetId, PlanetExplosions); +void Map_Cursor_draw(void); +void Map_MeteoMeteors_Draw(void); +void Map_Area6Ships_Draw(void); +void Map_Wipe_Draw(void); +void Map_TitleCards_Draw(void); void Map_801A9A8C(void); void Map_801A9DE8(void); -void Map_801AA1CC(s32); -void Map_801AA434(s32, f32, f32, s32); -void Map_801AA778(s32, f32, f32, PlanetId); -void Map_801AB17C(f32 x, f32 y, f32 z); -void Map_801AB284(void); -void Map_801AB300(void); -void Map_801AB978(s32); -void Map_801ABCDC(s32 arg0, s32 alpha); -void Map_801ABF1C(void); -void Map_801AC200(s32); -void Map_801AC530(s32 index); -void Map_801AC80C(PathType); -void Map_801AC9A0(s32); -void Map_801ACD90(s32 index, Vec3f* src, Vec3f* dest); -void Map_801AD048(void); +void Map_PathLineBox_Draw(s32); +void Map_PathInfo_Draw(s32, f32, f32, s32); +void Map_PathPlanet_Draw(s32, f32, f32, PlanetId); +void Map_PathPlanetMedal_Draw(f32 x, f32 y, f32 z); +void Map_BriefingRadio_Setup(void); +void Map_BriefingRadio_Update(void); +void Map_BriefingRadio_Draw(s32); +void Map_TeamDownWrench_Draw(s32 teamIdx, s32 alpha); +void Map_GralPepperFace_Draw(void); +void Map_Path_Draw(s32); +void Map_Arwing_Draw(s32 index); +void Map_PathLine_Draw(PathType); +void Map_PathLines_Draw(s32); +void Map_PathLinePos(s32 index, Vec3f* src, Vec3f* dest); +void Map_CamMatrixRot(void); void Map_8019E800(void) { Memory_FreeAll(); @@ -1214,7 +1218,7 @@ void Map_8019E800(void) { gDrawMode = DRAW_NONE; } -void Map_8019E85C(void) { +void Map_GameOver(void) { switch (D_ctx_80177868) { case 0: if (gNextGameStateTimer == 0) { @@ -1235,14 +1239,14 @@ void Map_8019E8C8(void) { } void Map_Main(void) { - if (D_menu_801CD9B8 > 0) { - D_menu_801CD9B8--; + if (sMapTimer1 > 0) { + sMapTimer1--; } - if (D_menu_801CD9BC > 0) { - D_menu_801CD9BC--; + if (sMapTimer2 > 0) { + sMapTimer2--; } - if (D_menu_801CD9C0 > 0) { - D_menu_801CD9C0--; + if (sMapTimer3 > 0) { + sMapTimer3--; } switch (gMapState) { @@ -1254,17 +1258,17 @@ void Map_Main(void) { case 1: gDrawMode = DRAW_NONE; - Map_8019E99C(); + Map_Setup(); break; case 2: gDrawMode = DRAW_MAP; - Map_8019FF48(); + Map_Update(); break; } } -void Map_8019E99C(void) { +void Map_Setup(void) { s32 i; s32 j; @@ -1273,20 +1277,20 @@ void Map_8019E99C(void) { gVIsPerFrame = 2; gGameFrameCount = 0; - Title_80188010(); + Title_GetRankTotalHits(); D_menu_801CD83C = Map_801A05B4(); - D_menu_801CD980 = 0; + D_menu_801CD980 = false; D_menu_801CD984 = 0; D_menu_801CD98C = 0; D_menu_801CD990 = 0; D_menu_801CD994 = 0; - D_menu_801CD9CC = 0; + sRestartLevelStates = 0; - D_menu_801CEB48[0] = false; - D_menu_801CEB48[1] = false; - D_menu_801CEB48[2] = false; + sPlanetExplosions[EXPLOSIONS_CORNERIA] = false; + sPlanetExplosions[EXPLOSIONS_KATINA] = false; + sPlanetExplosions[EXPLOSIONS_SECTOR_Y] = false; for (i = 0; i < 10; i++) { D_menu_801CEB58[1][i] = 0; @@ -1316,21 +1320,20 @@ void Map_8019E99C(void) { D_menu_801CEAF8[j] = -90.0f; } - D_menu_801CDA20 = 0.0f; - D_menu_801CDA24 = 1.0f; - D_menu_801CDA28 = 0.0f; - D_menu_801CDA00 = -150.55215f; - D_menu_801CDA04 = -489.68f; - D_menu_801CDA08 = 0.0f; + sMapCamUpX = 0.0f; + sMapCamUpY = 1.0f; + sMapCamUpZ = 0.0f; + sMapCamAtX = -150.55215f; + sMapCamAtY = -489.68f; + sMapCamAtZ = 0.0f; D_menu_801CDA0C = -42.750008f; D_menu_801CDA10 = -9.849999f; D_menu_801CDA14 = 3375.0f; // 15^3 D_menu_801CDA18 = 0.0f; D_menu_801CDA1C = 0.0f; - Map_801AD718(D_menu_801CDA00, D_menu_801CDA04, D_menu_801CDA08, &D_menu_801CD9F4, &D_menu_801CD9F8, - &D_menu_801CD9FC, D_menu_801CDA14, D_menu_801CDA0C + D_menu_801CDA18, - D_menu_801CDA10 + D_menu_801CDA1C); + Map_SetCamRot(sMapCamAtX, sMapCamAtY, sMapCamAtZ, &sMapCamEyeX, &sMapCamEyeY, &sMapCamEyeZ, D_menu_801CDA14, + D_menu_801CDA0C + D_menu_801CDA18, D_menu_801CDA10 + D_menu_801CDA1C); for (i = 0; i < 15; i++) { D_menu_801CD8A0[i] = i; @@ -1352,72 +1355,73 @@ void Map_8019E99C(void) { D_menu_801CEA5C = 0.0f; D_menu_801CEA60 = 0.0f; - Map_801A0788(); + Map_Starfield_Setup(); - D_menu_801B8280 = 0; - D_menu_801B8284 = 0; - D_menu_801CD9B8 = 0; - D_menu_801CD9BC = 0; - D_menu_801CD9C0 = 0; + sLevelStartState = 0; + sWipeHeight = 0; + sMapTimer1 = 0; + sMapTimer2 = 0; + sMapTimer3 = 0; D_menu_801CD964 = 0; D_menu_801CD968 = 0; - D_menu_801CD96C = 0; - D_menu_801CEA6C = 0.0f; - D_menu_801CEA70 = 0.002f; + D_menu_801CD96C = false; + sMapPlanetCardAlpha = 0.0f; + sMapPlanetCardAlphaScale = 0.002f; AUDIO_PLAY_BGM(NA_BGM_MAP); D_menu_801CEFC4 = 0; D_menu_801CEFC8 = 0; - D_menu_801CEFD0 = 0; + D_menu_801CEFD0 = false; D_menu_801CD974 = 0; - for (i = 0; i < 24; i++) { - D_menu_801CD840[i] = i; + for (i = 0; i < ARRAY_COUNT(sPaths); i++) { + sUnusedPathIdx[i] = i; sPaths[i].unk_14 = 0; } - Map_801A6694(); + Map_PositionPlanets(); switch (gLastGameState) { default: - case 0: - Map_8019F600(); + case GSTATE_NONE: + Map_Setup_Menu(); break; - case 7: - Map_8019F164(); + case GSTATE_PLAY: + Map_Setup_Play(); break; - case 5: - Map_8019F42C(); + case GSTATE_GAME_OVER: + Map_Setup_GameOver(); break; } - Map_801A914C(); + Map_PositionCursor(); for (i = 0; i < 96 * 96; i++) { - D_menu_801BB810[i] = 106; - D_menu_801BDC10[i] = 84; - D_menu_801C0010[i] = 75; - D_menu_801C2410[i] = 81; - D_menu_801C4810[i] = 55; - D_menu_801C6C10[i] = 82; - D_menu_801C9010[i] = 68; - D_menu_801CB410[i] = 52; - D_menu_801B9410[i] = 0; + gMapCorneriaTex[i] = 106; + gMapFortunaTex[i] = 84; + gMapAquasTex[i] = 75; + gMapVenomTex[i] = 81; + gMapTitaniaTex[i] = 55; + gMapKatinaTex[i] = 82; + gMapMacbethTex[i] = 68; + gMapZonessTex[i] = 52; + gMapVenomCloudTex[i] = 0; } - for (i = 0; i < 9; i++) { + for (i = 0; i < ARRAY_COUNT(gBSSMapPlanetTextures); i++) { D_menu_801CD818[i] = 0.0f; - Map_801A07E8(D_menu_801B68B0[i], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[i]), &D_menu_801CD818[i]); + Map_Texture_Sphere(gBSSMapPlanetTextures[i], SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[i]), + &D_menu_801CD818[i]); } D_menu_801CD810 = 0; gMapState = 2; - D_menu_801CD948 = 0; + sMapSubState = 0; D_menu_801CEEC4 = 0; D_menu_801CEEC8 = 5; D_menu_801CEFF4 = 255.0f; @@ -1431,7 +1435,7 @@ void Map_8019E99C(void) { D_menu_801CEB34 = -1; } -void Map_8019F164(void) { +void Map_Setup_Play(void) { s32 i; D_menu_801CD974 = 1; @@ -1458,23 +1462,23 @@ void Map_8019F164(void) { sPrevPlanetId = sCurrentPlanetId; - D_menu_801CD980 = Map_8019FD1C(gCurrentLevel, 0); + D_menu_801CD980 = Map_PlanetSaveSlot_Setup(gCurrentLevel, SAVETYPE_PLAYED); - Map_8019FD1C(gCurrentLevel, 2); + Map_PlanetSaveSlot_Setup(gCurrentLevel, SAVETYPE_CLEAR); if (gLeveLClearStatus[gCurrentLevel] == 2) { D_menu_801CD98C = 1; gMissionMedal[gMissionNumber] = 1; - Map_8019FD1C(gCurrentLevel, 1); + Map_PlanetSaveSlot_Setup(gCurrentLevel, SAVETYPE_MEDAL); } Save_Write(); - Map_8019F97C(); + Map_Level_CamSetup(); - Map_8019F83C(); + Map_PathStatus_Setup(); - Map_8019FA1C(); + Map_CurrentPlanet_SetAlpha(); switch (sPrevMissionStatus) { case MISSION_COMPLETE: @@ -1492,10 +1496,10 @@ void Map_8019F164(void) { gMissionNumber++; - Map_8019FC04(); + Map_PlanetExplosions_Setup(); D_menu_801CEFC4 = 0; - D_menu_801CEFD0 = 0; + D_menu_801CEFD0 = false; D_menu_801CEFE0 = 32.0f; D_menu_801CEFE8[0] = 255.0f; @@ -1511,10 +1515,10 @@ void Map_8019F164(void) { gHitCount = 0; D_menu_801CD94C = 0; - D_menu_801CD944 = 5; + sMapState = MAP_ZOOM_PLANET_PATH; } -void Map_8019F42C(void) { +void Map_Setup_GameOver(void) { s32 i; gTotalHits += gHitCount; @@ -1525,10 +1529,10 @@ void Map_8019F42C(void) { gMissionHitCount[gMissionNumber] = gHitCount; - Map_8019F910(); - Map_8019FD1C(gCurrentLevel, 0); + Map_TeamStatus_Refill(); + Map_PlanetSaveSlot_Setup(gCurrentLevel, SAVETYPE_PLAYED); Save_Write(); - Map_8019F83C(); + Map_PathStatus_Setup(); for (i = 0; i < 7; i++) { D_menu_801CD8E0[i] = 0; @@ -1548,18 +1552,18 @@ void Map_8019F42C(void) { sPlanets[i].alpha = 0; } - Map_8019FC04(); + Map_PlanetExplosions_Setup(); D_menu_801CD9AC = 0; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_25); - D_menu_801CD948 = 0; + sMapSubState = 0; D_menu_801CD94C = 0; - D_menu_801CD944 = 7; + sMapState = MAP_GAME_OVER; } -void Map_8019F600(void) { +void Map_Setup_Menu(void) { s32 i; s32 path1; s32 path2; @@ -1582,7 +1586,7 @@ void Map_8019F600(void) { sPrevPlanetId = PLANET_NONE; - for (i = 0; i < ARRAY_COUNT(sPlanets); i++) { + for (i = 0; i < PLANET_MAX; i++) { sPlanets[i].alpha = 0; } @@ -1598,6 +1602,7 @@ void Map_8019F600(void) { gMissionHitCount[i] = 0; gMissionTeamStatus[i] = 0x00FFFFFF; } + gMissionPlanet[0] = PLANET_CORNERIA; gMissionPlanet[1] = PLANET_NONE; gMissionPlanet[2] = PLANET_NONE; @@ -1617,7 +1622,7 @@ void Map_8019F600(void) { D_menu_801CEA9C = 0.0f; D_menu_801CD9B0 = 0.002f; D_menu_801CD9B4 = 0.01f; - D_menu_801CD944 = 0; + sMapState = MAP_PROLOGUE; path1 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest1); path2 = Map_GetPathId(sCurrentPlanetId, sPlanets[sCurrentPlanetId].dest2); @@ -1625,12 +1630,13 @@ void Map_8019F600(void) { gPlanetPathStatus[path2] = 1; } -void Map_8019F83C(void) { +void Map_PathStatus_Setup(void) { s32 i; D_menu_801CD970 = 0; - for (i = 0; i < 24; i++) { + //! @bug gPlanetPathStatus is 2 shorter than sPaths + for (i = 0; i < ARRAY_COUNT(sPaths); i++) { if ((gPlanetPathStatus[i] == 4) || (gPlanetPathStatus[i] == 5) || (gPlanetPathStatus[i] == 1) || (gPlanetPathStatus[i] == 11)) { gPlanetPathStatus[i] = 0; @@ -1645,7 +1651,7 @@ void Map_8019F83C(void) { } } -void Map_8019F910(void) { +void Map_TeamStatus_Refill(void) { s32 i; s32 mask = 0x00FF0000; @@ -1659,16 +1665,16 @@ void Map_8019F910(void) { } } -void Map_8019F97C(void) { - D_menu_801CEA54 = Map_801A25C8(sCurrentPlanetId); +void Map_Level_CamSetup(void) { + sCurrentPlanetCamZDist = Map_GetPlanetCamZDist(sCurrentPlanetId); - D_menu_801CD9F4 = D_menu_801CDA00 = sPlanets[sCurrentPlanetId].pos.x; - D_menu_801CD9F8 = D_menu_801CDA04 = sPlanets[sCurrentPlanetId].pos.y; - D_menu_801CDA08 = sPlanets[sCurrentPlanetId].pos.z; - D_menu_801CD9FC = sPlanets[sCurrentPlanetId].pos.z + D_menu_801CEA54; + sMapCamEyeX = sMapCamAtX = sPlanets[sCurrentPlanetId].pos.x; + sMapCamEyeY = sMapCamAtY = sPlanets[sCurrentPlanetId].pos.y; + sMapCamAtZ = sPlanets[sCurrentPlanetId].pos.z; + sMapCamEyeZ = sPlanets[sCurrentPlanetId].pos.z + sCurrentPlanetCamZDist; } -void Map_8019FA1C(void) { +void Map_CurrentPlanet_SetAlpha(void) { PlanetId planetId; for (planetId = 0; planetId < PLANET_MAX; planetId++) { @@ -1684,25 +1690,26 @@ void Map_8019FA1C(void) { } } -void Map_8019FC04(void) { +// For Katina and Sector Y +void Map_PlanetExplosions_Setup(void) { s32 i; if (gMissionNumber != PLANET_METEO) { - D_menu_801CEB48[1] = true; - D_menu_801CEB48[2] = true; + sPlanetExplosions[EXPLOSIONS_KATINA] = true; + sPlanetExplosions[EXPLOSIONS_SECTOR_Y] = true; } - for (i = 0; i < 7; i++) { + for (i = 0; i < ARRAY_COUNT(gMissionPlanet); i++) { if (gMissionPlanet[i] == PLANET_KATINA) { - D_menu_801CEB48[1] = false; + sPlanetExplosions[EXPLOSIONS_KATINA] = false; } if (gMissionPlanet[i] == PLANET_SECTOR_Y) { - D_menu_801CEB48[2] = false; + sPlanetExplosions[EXPLOSIONS_SECTOR_Y] = false; } } } -bool Map_8019FD1C(LevelId levelId, s32 arg1) { +bool Map_PlanetSaveSlot_Setup(LevelId levelId, PlanetSaveSlotTypes type) { s32 ret; s32 planetSaveSlot; @@ -1786,15 +1793,15 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { ret = false; - switch (arg1) { - case 0: + switch (type) { + case SAVETYPE_PLAYED: if (!(gSaveFile.save.data.planet[planetSaveSlot].played & 1)) { gSaveFile.save.data.planet[planetSaveSlot].played = 1; ret = true; } break; - case 1: + case SAVETYPE_MEDAL: if (gExpertMode) { if (!(gSaveFile.save.data.planet[planetSaveSlot].expertMedal & 1)) { gSaveFile.save.data.planet[planetSaveSlot].expertMedal = 1; @@ -1808,7 +1815,7 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { } break; - case 2: + case SAVETYPE_CLEAR: if (gExpertMode) { if (!(gSaveFile.save.data.planet[planetSaveSlot].expertClear & 1)) { gSaveFile.save.data.planet[planetSaveSlot].expertClear = 1; @@ -1826,59 +1833,59 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { return ret; } -void Map_8019FF48(void) { - Map_801A6694(); - Map_801A68E4(); - Map_801A6A24(); +void Map_Update(void) { + Map_PositionPlanets(); + Map_PlanetOrderZpos(); + Map_Fade_Update(); - switch (D_menu_801CD944) { - case 0: - Map_801A0954(); + switch (sMapState) { + case MAP_PROLOGUE: + Map_Prologue_Update(); gStarfieldScrollX += 0.09f; break; - case 1: - Map_801A1528(); + case MAP_LYLAT_CARD: + Map_LylatCard_Update(); D_menu_801CDA1C += 0.03f; break; - case 3: - Map_801AD11C(); + case MAP_IDLE: + Map_Idle_Update(); D_menu_801CDA1C += 0.03f; break; - case 2: - Map_801A1C14(); + case MAP_ZOOM_PLANET: + Map_ZoomPlanet_Update(); break; - case 4: - Map_801A5E80(); + case MAP_LEVEL_START: + Map_LevelStart_Update(); break; - case 5: - Map_801A2B8C(); + case MAP_ZOOM_PLANET_PATH: + Map_ZoomPlanetPath_Update(); break; - case 6: - Map_801A4AE8(); + case MAP_PATH_CHANGE: + Map_PathChange_Update(); break; - case 7: - Map_801A36A8(); + case MAP_GAME_OVER: + Map_GameOver_Update(); break; default: break; } - if ((D_menu_801CD944 == 0) || (D_menu_801CD944 == 1) || (D_menu_801CD944 == 7) || (D_menu_801CD944 == 3)) { - Map_801AD718(D_menu_801CDA00, D_menu_801CDA04, D_menu_801CDA08, &D_menu_801CD9F4, &D_menu_801CD9F8, - &D_menu_801CD9FC, D_menu_801CDA14, D_menu_801CDA0C + D_menu_801CDA18, - D_menu_801CDA10 + D_menu_801CDA1C); - Camera_SetStarfieldPos(D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08); + if ((sMapState == MAP_PROLOGUE) || (sMapState == MAP_LYLAT_CARD) || (sMapState == MAP_GAME_OVER) || + (sMapState == MAP_IDLE)) { + Map_SetCamRot(sMapCamAtX, sMapCamAtY, sMapCamAtZ, &sMapCamEyeX, &sMapCamEyeY, &sMapCamEyeZ, D_menu_801CDA14, + D_menu_801CDA0C + D_menu_801CDA18, D_menu_801CDA10 + D_menu_801CDA1C); + Camera_SetStarfieldPos(sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ); } gGameFrameCount++; + #if MODS_LEVEL_SELECT == true Map_LevelSelect(); #endif @@ -1889,12 +1896,12 @@ void Map_Draw(void) { s32* ptr; Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_LookAt(gGfxMatrix, sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ, sMapCamUpX, + sMapCamUpY, sMapCamUpZ, MTXF_APPLY); Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (D_menu_801CD974 && D_menu_801CD944 != 0) { + if (D_menu_801CD974 && (sMapState != MAP_PROLOGUE)) { for (i = 0; i < 24; i++) { if (gPlanetPathStatus[i] == 0) { continue; @@ -1903,45 +1910,45 @@ void Map_Draw(void) { continue; } - Map_801AC9A0(i); + Map_PathLines_Draw(i); if (sPaths[i].unk_14 != 0) { - Map_801AC200(i); + Map_Path_Draw(i); } TexturedLine_DrawPath(i); } } - Map_801A8F40(); + Map_Cursor_draw(); - Map_801A9224(); + Map_MeteoMeteors_Draw(); - Map_801A9448(); + Map_Area6Ships_Draw(); for (ptr = D_menu_801CD8A0, i = 0; i < 15; i++, ptr++) { - Map_801A6A98(*ptr); + Map_Planet_Draw(*ptr); } - Map_801A8738(); + Map_CorneriaExplosion_Draw(); Matrix_Pop(&gGfxMatrix); if (D_menu_801CD96C) { - Map_801ABF1C(); + Map_GralPepperFace_Draw(); } - Map_801AB300(); + Map_BriefingRadio_Update(); if (D_menu_801CEFC4) { - Map_801A5834(); + Map_PathChange_DrawOptions(); } if (D_menu_801CD964) { - Map_801A9910(); + Map_TitleCards_Draw(); } - Map_801A9814(); + Map_Wipe_Draw(); if (D_menu_801CD968) { Map_801A9A8C(); @@ -1949,36 +1956,39 @@ void Map_Draw(void) { Map_801A9DE8(); - Map_801A5C90(); + Map_RestartLevelLifeDown_Draw(); - if ((D_menu_801CD944 == 7) && (D_menu_801CD948 == 1)) { - Map_801A4650(); + if ((sMapState == MAP_GAME_OVER) && (sMapSubState == 1)) { + Map_GameOver_Draw(); } - if (D_menu_801CD944 == 0) { - Map_801A0D14(); + if (sMapState == MAP_PROLOGUE) { + Map_Prologue_Draw(); } - if (D_menu_801CD944 == 1) { - Map_801A19A8(); + if (sMapState == MAP_LYLAT_CARD) { + Map_LylatCard_Draw(); } if (D_menu_801CEEC8 == 0) { - Map_801A07E8(D_menu_801B68B0[8], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[8]), &D_menu_801CD818[8]); + Map_Texture_Sphere(gBSSMapPlanetTextures[8], SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[8]), + &D_menu_801CD818[8]); D_menu_801CEEC8 = 5; } else { D_menu_801CEEC8--; } - Map_801A07E8(D_menu_801B68B0[D_menu_801CEEC4 * 2], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[D_menu_801CEEC4 * 2]), - &D_menu_801CD818[D_menu_801CEEC4 * 2]); - Map_801A07E8(D_menu_801B68B0[(D_menu_801CEEC4 * 2) + 1], - SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[(D_menu_801CEEC4 * 2) + 1]), - &D_menu_801CD818[(D_menu_801CEEC4 * 2) + 1]); + Map_Texture_Sphere(gBSSMapPlanetTextures[D_menu_801CEEC4 * 2], + SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[D_menu_801CEEC4 * 2]), + &D_menu_801CD818[D_menu_801CEEC4 * 2]); + Map_Texture_Sphere(gBSSMapPlanetTextures[(D_menu_801CEEC4 * 2) + 1], + SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[(D_menu_801CEEC4 * 2) + 1]), + &D_menu_801CD818[(D_menu_801CEEC4 * 2) + 1]); + D_menu_801CEEC4++; if (D_menu_801CEEC4 > 3) { D_menu_801CEEC4 = 0; } - Texture_Mottle((u16*) D_MAP_6047F80, (u16*) D_MAP_6048F80, 5); + Lib_Texture_Mottle((u16*) aMapVenomCloud1Tex, (u16*) D_MAP_6048F80, 5); } s32 Map_801A05B4(void) { @@ -1989,15 +1999,15 @@ s32 Map_801A05B4(void) { s32 var_a3; s32 temp_a0; - for (i = 0; i < 10; i++) { + for (i = 0; i < RANKING_MAX; i++) { sp30[i] = 0; } - for (i = 0; i < 10; i++) { - temp_a0 = gSaveFile.save.data.unk_36[i]; + for (i = 0; i < RANKING_MAX; i++) { + temp_a0 = gSaveFile.save.data.rankingRoute[i]; for (j = 0; j < temp_a0; j++) { - var_a3 = gSaveFile.save.data.unk_5E[i][j].unk_0; - if (gSaveFile.save.data.unk_5E[i][j].unk_C != 0) { + var_a3 = gSaveFile.save.data.stats[i][j].hitCount; + if (gSaveFile.save.data.stats[i][j].unk_C != 0) { var_a3 += 256; } sp30[i] += var_a3; @@ -2006,7 +2016,7 @@ s32 Map_801A05B4(void) { ret = sp30[0]; - for (i = 1; i < 10; i++) { + for (i = 1; i < RANKING_MAX; i++) { if (ret < sp30[i]) { ret = sp30[i]; } @@ -2015,7 +2025,7 @@ s32 Map_801A05B4(void) { return ret; } -void Map_801A0788(void) { +void Map_Starfield_Setup(void) { gStarCount = 800; Memory_FreeAll(); @@ -2027,7 +2037,7 @@ void Map_801A0788(void) { gStarfieldScrollY = 0.0f; } -void Map_801A07E8(u8* arg0, u8* arg1, f32* arg2) { +void Map_Texture_Sphere(u8* textureDest, u8* textureSrc, f32* offset) { s32* var_v0 = D_menu_801B0004; s32 temp; s32 i; @@ -2036,7 +2046,7 @@ void Map_801A07E8(u8* arg0, u8* arg1, f32* arg2) { for (i = 1; i < 48; i++, var_v0++) { for (k = 0, j = *var_v0; j < (95 - *var_v0); j++, k++) { - temp = D_menu_801B00C0[i - 1][k] + (s32) *arg2; + temp = sMapQuarterCircleTex[i - 1][k] + (s32) *offset; if (temp > 95) { temp -= 95; @@ -2045,101 +2055,93 @@ void Map_801A07E8(u8* arg0, u8* arg1, f32* arg2) { temp += 95; } - *(arg0 + ((i * 96) + j)) = *(arg1 + ((i * 96) + temp)); - *(arg0 + ((95 - i) * 96) + j) = *(arg1 + ((95 - i) * 96) + temp); + *(textureDest + ((i * 96) + j)) = *(textureSrc + ((i * 96) + temp)); + *(textureDest + ((95 - i) * 96) + j) = *(textureSrc + ((95 - i) * 96) + temp); } } - *arg2 -= 1.0f; + *offset -= 1.0f; - if (*arg2 <= 0.0f) { - *arg2 = 95.0f; + if (*offset <= 0.0f) { + *offset = 95.0f; } - if (*arg2 > 95.0f) { - *arg2 = 0.0f; + if (*offset > 95.0f) { + *offset = 0.0f; } } -void Map_801A0954(void) { +void Map_Prologue_Update(void) { PlanetId planetId; static f32 D_menu_801B6934[] = { 99.0f, 24, -90.0f, -150.0f, -208.0f, -276.0f, }; - switch (D_menu_801CD948) { + switch (sMapSubState) { case 100: break; case 0: - D_menu_801CD9F0 = 0; - D_menu_801CD9DC = 30.0f; - D_menu_801CD9E0 = 230.0f; - D_menu_801CD9E8 = 0; - D_menu_801CD9E4 = 0; + sPrologueTexIdx = 0; + sPrologueTextXpos = 30.0f; + sPrologueTextYpos = 230.0f; + sPrologueCurrentTexAlpha = 0; + sPrologueNextTexAlpha = 0; D_menu_801CD9EC = 0.29f; gStarCount = 800; - D_menu_801CD9C0 = 5; - D_menu_801CD948++; + sMapTimer3 = 5; + sMapSubState++; break; case 1: - if ((D_menu_801CD9C0 == 0) && (gFillScreenAlpha == 0)) { - // break; - // } - - // if (gFillScreenAlpha != 0) { - // break; - // } - - if ((s32) D_menu_801CD9E0 == 205) { + if ((sMapTimer3 == 0) && (gFillScreenAlpha == 0)) { + if ((s32) sPrologueTextYpos == 205) { Audio_PlayVoiceWithoutBGM(1000); } - if (D_menu_801CD9E0 > -355.0f) { - D_menu_801CD9E0 -= D_menu_801CD9EC; + if (sPrologueTextYpos > -355.0f) { + sPrologueTextYpos -= D_menu_801CD9EC; } - if ((D_menu_801CD9E0 < 200.0f) && (D_menu_801CD9E8 != 255)) { - D_menu_801CD9E8 += 8; - if (D_menu_801CD9E8 > 255) { - D_menu_801CD9E8 = 255; + if ((sPrologueTextYpos < 200.0f) && (sPrologueCurrentTexAlpha != 255)) { + sPrologueCurrentTexAlpha += 8; + if (sPrologueCurrentTexAlpha > 255) { + sPrologueCurrentTexAlpha = 255; } } - if (D_menu_801CD9E0 < D_menu_801B6934[D_menu_801CD9F0]) { - D_menu_801CD9E4 += 8; - if (D_menu_801CD9E4 > 255) { - D_menu_801CD9E4 = 255; + if (sPrologueTextYpos < D_menu_801B6934[sPrologueTexIdx]) { + sPrologueNextTexAlpha += 8; + if (sPrologueNextTexAlpha > 255) { + sPrologueNextTexAlpha = 255; } } - if (D_menu_801CD9E0 <= -355.0f) { - D_menu_801CD948++; + if (sPrologueTextYpos <= -355.0f) { + sMapSubState++; } } break; case 2: - D_menu_801CD9E8 -= 16; - if (D_menu_801CD9E8 < 0) { - D_menu_801CD9E8 = 0; - D_menu_801CD948++; - D_menu_801CD9C0 = 20; + sPrologueCurrentTexAlpha -= 16; + if (sPrologueCurrentTexAlpha < 0) { + sPrologueCurrentTexAlpha = 0; + sMapSubState++; + sMapTimer3 = 20; } break; case 3: - if (D_menu_801CD9C0 == 0) { - D_menu_801CD948 = 0; - D_menu_801CD944 = 1; + if (sMapTimer3 == 0) { + sMapSubState = 0; + sMapState = MAP_LYLAT_CARD; } break; } if (gControllerPress[gMainController].button & START_BUTTON) { AUDIO_PLAY_BGM(NA_BGM_MAP); - AUDIO_PLAY_SFX(NA_SE_MAP_MOVE_STOP, gDefaultSfxSource, 4); for (planetId = 0; planetId < PLANET_MAX; planetId++) { @@ -2157,64 +2159,68 @@ void Map_801A0954(void) { D_menu_801CD974 = 1; D_menu_801CD97C = 1; - D_menu_801CD948 = 0; - D_menu_801CD944 = 3; + sMapSubState = 0; + sMapState = MAP_IDLE; } } -void Map_801A0D14(void) { +void Map_Prologue_Draw(void) { s32 i; - static f32 D_menu_801B694C = 71.0f; - static f32 D_menu_801B6950 = 205.0f; - static u16* D_menu_801B6954[] = { - D_MAP_6041A80, D_MAP_6035780, D_MAP_6033080, D_MAP_603A580, D_MAP_603F380, D_MAP_6037E80, D_MAP_603CC80, + static f32 sPrologueTextFadeTexUpperYpos = 71.0f; + static f32 sPrologueTextFadeTexBottomYpos = 205.0f; + static u16* sPrologueTextures[] = { + aMapPrologue1Tex, aMapPrologue2Tex, aMapPrologue3Tex, aMapPrologue4Tex, + aMapPrologue5Tex, aMapPrologue6Tex, aMapPrologue7Tex, }; - Map_801A116C(); + Map_PrologueArwing_Draw(); RCP_SetupDL(&gMasterDisp, SETUPDL_81); - gDPSetPrimColor(gMasterDisp++, 0, 0, 180, 180, 180, 255); - Message_DisplayScrollingText(&gMasterDisp, gMsg_ID_1, D_menu_801CD9DC, D_menu_801CD9E0, 218, 70, + // Prologue text + Message_DisplayScrollingText(&gMasterDisp, gMsg_ID_1, sPrologueTextXpos, sPrologueTextYpos, 218, 70, Message_GetCharCount(gMsg_ID_1)); RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B694C, 40.0f, 1.66f); - TextureRect_IA8_MirY(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B6950, 40.0f, 1.68f); + // Vertical Fade Margins for prologue text + Lib_TextureRect_IA8(&gMasterDisp, aMapPrologueTextFadeTex, 8, 16, 0.0f, sPrologueTextFadeTexUpperYpos, 40.0f, + 1.66f); + Lib_TextureRect_IA8_MirY(&gMasterDisp, aMapPrologueTextFadeTex, 8, 16, 0.0f, sPrologueTextFadeTexBottomYpos, 40.0f, + 1.68f); Background_DrawPartialStarfield(71, 118); Background_DrawPartialStarfield(205, 239); RCP_SetupDL(&gMasterDisp, SETUPDL_76); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPrologueCurrentTexAlpha); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E8); - + // Current Prologue texture for (i = 0; i < 13; i++) { - TextureRect_RGBA16(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0] + (96 * 4 * i), 96, 4, 109.0f, - 24.0f + (4.0f * i), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, sPrologueTextures[sPrologueTexIdx] + (96 * 4 * i), 96, 4, 109.0f, + 24.0f + (4.0f * i), 1.0f, 1.0f); } - if ((D_menu_801CD9E4 != 0) && (D_menu_801CD9F0 + 1 < 7)) { - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E4); + // Next Prologue texture + if ((sPrologueNextTexAlpha != 0) && ((sPrologueTexIdx + 1) < 7)) { + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPrologueNextTexAlpha); for (i = 0; i < 13; i++) { - TextureRect_RGBA16(&gMasterDisp, D_menu_801B6954[D_menu_801CD9F0 + 1] + (96 * 4 * i), 96, 4, 109.0f, - 24.0f + (i * 4.0f), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, sPrologueTextures[sPrologueTexIdx + 1] + (96 * 4 * i), 96, 4, 109.0f, + 24.0f + (i * 4.0f), 1.0f, 1.0f); } - if (D_menu_801CD9E4 == 255) { - D_menu_801CD9E4 = 0; - D_menu_801CD9F0++; + if (sPrologueNextTexAlpha == 255) { + sPrologueNextTexAlpha = 0; + sPrologueTexIdx++; } } } -void Map_801A116C(void) { - static f32 D_menu_801B6970 = 35.0f; +void Map_PrologueArwing_Draw(void) { + static f32 sMapArwingXrot = 35.0f; ArwingInfo arwing; Vec3f dest; Vec3f src; @@ -2229,7 +2235,7 @@ void Map_801A116C(void) { Matrix_RotateX(gCalcMatrix, M_DTOR * -70.0f, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - if (D_menu_801CD948 >= 2) { + if (sMapSubState >= 2) { colR -= 10; if (colR < 0) { colR = 0; @@ -2246,12 +2252,12 @@ void Map_801A116C(void) { } RCP_SetupDL(&gMasterDisp, SETUPDL_46); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CD9E8); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPrologueCurrentTexAlpha); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_23); } - if ((D_menu_801CD948 < 2) || (D_menu_801CD9E8 != 0)) { + if ((sMapSubState < 2) || (sPrologueCurrentTexAlpha != 0)) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 430.0f, 0.0f, 180.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2264,7 +2270,7 @@ void Map_801A116C(void) { Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * -15.0f, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B6970, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sMapArwingXrot, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * -90.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2279,14 +2285,14 @@ void Map_801A116C(void) { arwing.drawFace = true; arwing.teamFaceXrot = 0.0f; arwing.teamFaceYrot = 0.0f; - arwing.windshieldXrot = 0.0f; + arwing.cockpitGlassXrot = 0.0f; Display_ArwingWings(&arwing); Matrix_Pop(&gGfxMatrix); Matrix_Pop(&gGfxMatrix); } - D_menu_801B6970 += 0.6f; + sMapArwingXrot += 0.6f; } f32 D_menu_801B6974[8] = { -248.0f, -76.0f, 84.0f, 248.0f, -242.0f, -79.0f, 82.0f, 245.0f }; @@ -2301,11 +2307,11 @@ f32* D_menu_801B6A34[2] = { D_menu_801B69D4, D_menu_801B6974 }; f32* D_menu_801B6A3C[2] = { D_menu_801B69F4, D_menu_801B6994 }; f32* D_menu_801B6A44[2] = { D_menu_801B6A14, D_menu_801B69B4 }; -void Map_801A1528(void) { +void Map_LylatCard_Update(void) { PlanetId planetId; f32 temp; - switch (D_menu_801CD948) { + switch (sMapSubState) { case 0: temp = Math_SmoothStepToF(&D_menu_801CEA9C, 255.0f, D_menu_801CD9B0, 10.0f, 1.0f); @@ -2315,21 +2321,21 @@ void Map_801A1528(void) { D_menu_801CEAA0 = 0.0f; D_menu_801CEAA4 = 0.0f; D_menu_801CD9B0 = 0.002f; - D_menu_801CD9B8 = 10; - D_menu_801CD9BC = 45; - D_menu_801CD948++; + sMapTimer1 = 10; + sMapTimer2 = 45; + sMapSubState++; } break; case 1: - if (D_menu_801CD9B8 != 0) { + if (sMapTimer1 != 0) { break; } Math_SmoothStepToF(&D_menu_801CEA9C, 0.0f, D_menu_801CD9B4, 50.0f, 0.1f); D_menu_801CD9B4 *= 1.06f; - if (D_menu_801CD9BC != 0) { + if (sMapTimer2 != 0) { break; } @@ -2353,9 +2359,9 @@ void Map_801A1528(void) { if (temp == 0.0f) { AUDIO_PLAY_SFX(NA_SE_MAP_MOVE_STOP, gDefaultSfxSource, 4); - D_menu_801CD948 = 0; + sMapSubState = 0; D_menu_801CD97C = 1; - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; } break; } @@ -2372,12 +2378,12 @@ void Map_801A1528(void) { D_menu_801CD900[planetId] = 255; } D_menu_801CD970 = 255; - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; D_menu_801CD97C = 1; } } -void Map_801A19A8(void) { +void Map_LylatCard_Draw(void) { s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); @@ -2385,47 +2391,49 @@ void Map_801A19A8(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801CEA9C); for (i = 0; i < 4; i++) { - TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * i), 168, 4, 72.0f, 104.0f + (4.0f * i), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * i), 168, 4, 72.0f, 104.0f + (4.0f * i), 1.0f, + 1.0f); } - TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * 4), 168, 3, 72.0f, 104.0f + 16.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_MAP_600D590 + (168 * 4 * 4), 168, 3, 72.0f, 104.0f + 16.0f, 1.0f, 1.0f); } -void Map_801A1AE8(void) { +void Map_ZoomPlanet_Setup(void) { f32 x; f32 y; f32 z; D_menu_801CEA64 = 0.04f; - D_menu_801CEA54 = Map_801A25C8(sCurrentPlanetId); + sCurrentPlanetCamZDist = Map_GetPlanetCamZDist(sCurrentPlanetId); - D_menu_801CDA40.x = sPlanets[sCurrentPlanetId].pos.x; - D_menu_801CDA40.y = sPlanets[sCurrentPlanetId].pos.y; - D_menu_801CDA40.z = sPlanets[sCurrentPlanetId].pos.z; + sZoomPlanetCamAt.x = sPlanets[sCurrentPlanetId].pos.x; + sZoomPlanetCamAt.y = sPlanets[sCurrentPlanetId].pos.y; + sZoomPlanetCamAt.z = sPlanets[sCurrentPlanetId].pos.z; - D_menu_801CDA50.x = sPlanets[sCurrentPlanetId].pos.x; - D_menu_801CDA50.y = sPlanets[sCurrentPlanetId].pos.y; - D_menu_801CDA50.z = D_menu_801CDA40.z + D_menu_801CEA54; + sZoomPlanetCamEye.x = sPlanets[sCurrentPlanetId].pos.x; + sZoomPlanetCamEye.y = sPlanets[sCurrentPlanetId].pos.y; + sZoomPlanetCamEye.z = sZoomPlanetCamAt.z + sCurrentPlanetCamZDist; - D_menu_801CDA2C = D_menu_801CDA00; - D_menu_801CDA30 = D_menu_801CDA04; + sPathFollowCamAtX = sMapCamAtX; + sPathFollowCamAtY = sMapCamAtY; - D_menu_801CDA34 = D_menu_801CD9F4; - D_menu_801CDA38 = D_menu_801CD9F8; + sPathFollowCamEyeX = sMapCamEyeX; + sPathFollowCamEyeY = sMapCamEyeY; - x = D_menu_801CDA50.x - D_menu_801CD9F4; - y = D_menu_801CDA50.y - D_menu_801CD9F8; - z = D_menu_801CDA50.z - D_menu_801CD9FC; + x = sZoomPlanetCamEye.x - sMapCamEyeX; + y = sZoomPlanetCamEye.y - sMapCamEyeY; + z = sZoomPlanetCamEye.z - sMapCamEyeZ; D_menu_801CEA68 = sqrtf(SQ(x) + SQ(y) + SQ(z)); } -void Map_801A1C14(void) { +// Camera zooms into planet before briefing starts +void Map_ZoomPlanet_Update(void) { s32 i; - switch (D_menu_801CD948) { + switch (sMapSubState) { case 0: - Map_801A1AE8(); + Map_ZoomPlanet_Setup(); D_menu_801CD94C = 0; D_menu_801CD9C4 = 0; @@ -2458,21 +2466,21 @@ void Map_801A1C14(void) { gFillScreenBlue = 255; gFillScreenAlpha = 0; - D_menu_801CEB3C = 0.0f; + sMapCorneriaExplosionScale = 0.0f; D_menu_801CEB38 = 255; - D_menu_801CD948++; + sMapSubState++; break; case 1: if (D_menu_801CD95C == 0) { if (sCurrentPlanetId == PLANET_CORNERIA) { gFillScreenAlpha = 0; - D_menu_801CD948 = 10; + sMapSubState = 10; AUDIO_PLAY_SFX(NA_SE_BACKUP_CLEAR, gDefaultSfxSource, 4); } else { AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_START, gDefaultSfxSource, 4); - D_menu_801CD948++; + sMapSubState++; } } else { if (sCurrentPlanetId == PLANET_CORNERIA) { @@ -2488,17 +2496,17 @@ void Map_801A1C14(void) { case 10: if (D_menu_801CEB34 == 4) { AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_START, gDefaultSfxSource, 4); - D_menu_801CD948 = 2; + sMapSubState = 2; } break; case 2: Map_801A2674(); - if ((D_menu_801CD9FC == D_menu_801CDA50.z) && (D_menu_801CD9D8 == 0)) { + if ((sMapCamEyeZ == sZoomPlanetCamEye.z) && (D_menu_801CD9D8 == 0)) { AUDIO_PLAY_SFX(NA_SE_MAP_ZOOM_END, gDefaultSfxSource, 4); D_menu_801CD9D8 = 1; if (sCurrentPlanetId == PLANET_CORNERIA) { - D_menu_801CEB48[0] = true; + sPlanetExplosions[EXPLOSIONS_CORNERIA] = true; for (i = 0; i < 10; i++) { D_menu_801CEB58[0][i] = RAND_INT(3.0f); D_menu_801CEBD0[0][i] = 255; @@ -2510,60 +2518,60 @@ void Map_801A1C14(void) { } } } - if ((D_menu_801CDA34 == D_menu_801CDA50.x) && (D_menu_801CDA38 == D_menu_801CDA50.y) && - (D_menu_801CD9FC == D_menu_801CDA50.z) && (D_menu_801CDA08 == D_menu_801CDA40.z)) { + if ((sPathFollowCamEyeX == sZoomPlanetCamEye.x) && (sPathFollowCamEyeY == sZoomPlanetCamEye.y) && + (sMapCamEyeZ == sZoomPlanetCamEye.z) && (sMapCamAtZ == sZoomPlanetCamAt.z)) { D_menu_801CD964 = 1; - D_menu_801CD96C = 1; + D_menu_801CD96C = true; // clang-format off for (i = 0; i < 15; i++) {D_menu_801CD900[i] = 0;} // clang-format on D_menu_801CD970 = 0; - if (Map_801A2304()) { - D_menu_801CD948 = 3; + if (Map_GralPepper_Talk()) { + sMapSubState = 3; } } break; case 20: if (gControllerPress[gMainController].button & START_BUTTON) { - D_menu_801CD948 = 21; + sMapSubState = 21; } if (gControllerHold[gMainController].button & R_TRIG) { - D_menu_801CD9FC += 10.0f; + sMapCamEyeZ += 10.0f; } if (gControllerHold[gMainController].button & Z_TRIG) { - if (D_menu_801CD9FC - 10.0f > D_menu_801CDA08) { - D_menu_801CD9FC -= 10.0f; + if (sMapCamEyeZ - 10.0f > sMapCamAtZ) { + sMapCamEyeZ -= 10.0f; } } break; case 21: D_menu_801CD964 = 1; - D_menu_801CD96C = 1; + D_menu_801CD96C = true; // clang-format off for (i = 0; i < 15; i++) { D_menu_801CD900[i] = 0; } // clang-format on D_menu_801CD970 = 0; - if (Map_801A2304()) { - D_menu_801CD948 = 3; + if (Map_GralPepper_Talk()) { + sMapSubState = 3; } break; case 3: - D_menu_801CD948 = 0; - D_menu_801CD944 = 4; + sMapSubState = 0; + sMapState = MAP_LEVEL_START; break; } D_menu_801CD9C4++; } -bool Map_801A2304(void) { +bool Map_GralPepper_Talk(void) { bool ret = false; f32 sp28; f32 sp24; @@ -2579,7 +2587,7 @@ bool Map_801A2304(void) { D_menu_801CEA78 = 5.5f; D_menu_801CEA80 = 4.6f; D_menu_801CD94C++; - D_menu_801CD9B8 = 13; + sMapTimer1 = 13; } break; @@ -2607,7 +2615,7 @@ bool Map_801A2304(void) { D_menu_801CEA84 = 3.9f; } - if (D_menu_801CD9B8 == 0) { + if (sMapTimer1 == 0) { D_menu_801CEA98 = 255; D_menu_801CD94C = 100; } @@ -2627,20 +2635,20 @@ bool Map_801A2304(void) { return ret; } -f32 Map_801A25C8(PlanetId planetId) { - f32 sp4; +f32 Map_GetPlanetCamZDist(PlanetId planetId) { + f32 camZdist; switch (planetId) { case PLANET_AREA_6: - sp4 = 900.0f; + camZdist = 900.0f; break; case PLANET_BOLSE: - sp4 = 800.0f; + camZdist = 800.0f; break; case PLANET_METEO: - sp4 = 650.0f; + camZdist = 650.0f; break; case PLANET_KATINA: @@ -2649,32 +2657,32 @@ f32 Map_801A25C8(PlanetId planetId) { case PLANET_TITANIA: case PLANET_AQUAS: case PLANET_FORTUNA: - sp4 = 550.0f; + camZdist = 550.0f; break; case PLANET_CORNERIA: - sp4 = 1100.0f; + camZdist = 1100.0f; break; case PLANET_VENOM: - sp4 = 2100.0f; + camZdist = 2100.0f; break; case PLANET_SOLAR: - sp4 = 850.0f; + camZdist = 850.0f; break; case PLANET_SECTOR_Z: case PLANET_SECTOR_X: case PLANET_SECTOR_Y: - sp4 = 650.0f; + camZdist = 650.0f; break; default: break; } - return sp4; + return camZdist; } void Map_801A2674(void) { @@ -2744,13 +2752,13 @@ void Map_801A281C(void) { D_menu_801CEEDC = 0.0f; D_menu_801CEEE0 = 0.04f; - D_menu_801CEEE8[0].x = D_menu_801CEEE8[1].x = D_menu_801CD9F4; - D_menu_801CEEE8[0].y = D_menu_801CEEE8[1].y = D_menu_801CD9F8; - D_menu_801CEEE8[0].z = D_menu_801CEEE8[1].z = D_menu_801CD9FC; + D_menu_801CEEE8[0].x = D_menu_801CEEE8[1].x = sMapCamEyeX; + D_menu_801CEEE8[0].y = D_menu_801CEEE8[1].y = sMapCamEyeY; + D_menu_801CEEE8[0].z = D_menu_801CEEE8[1].z = sMapCamEyeZ; - D_menu_801CEF58[0].x = D_menu_801CEF58[1].x = D_menu_801CDA00; - D_menu_801CEF58[0].y = D_menu_801CEF58[1].y = D_menu_801CDA04; - D_menu_801CEF58[0].z = D_menu_801CEF58[1].z = D_menu_801CDA08; + D_menu_801CEF58[0].x = D_menu_801CEF58[1].x = sMapCamAtX; + D_menu_801CEF58[0].y = D_menu_801CEF58[1].y = sMapCamAtY; + D_menu_801CEF58[0].z = D_menu_801CEF58[1].z = sMapCamAtZ; D_menu_801CEF58[5].x = D_menu_801CEF58[4].x = D_menu_801CEF58[3].x = D_menu_801CEF58[2].x = sPlanets[sNextPlanetId].pos.x; @@ -2763,8 +2771,8 @@ void Map_801A281C(void) { D_menu_801CDA10 = 0.0f; D_menu_801CDA14 = 500.0f; - Map_801AD718(D_menu_801CEF58[2].x, D_menu_801CEF58[2].y, D_menu_801CEF58[2].z, &D_menu_801CEEE8[2].x, - &D_menu_801CEEE8[2].y, &D_menu_801CEEE8[2].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); + Map_SetCamRot(D_menu_801CEF58[2].x, D_menu_801CEF58[2].y, D_menu_801CEF58[2].z, &D_menu_801CEEE8[2].x, + &D_menu_801CEEE8[2].y, &D_menu_801CEEE8[2].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); D_menu_801CEEE8[5].x = D_menu_801CEEE8[4].x = D_menu_801CEEE8[3].x = D_menu_801CEEE8[2].x; D_menu_801CEEE8[5].y = D_menu_801CEEE8[4].y = D_menu_801CEEE8[3].y = D_menu_801CEEE8[2].y; @@ -2778,8 +2786,8 @@ void Map_801A281C(void) { D_menu_801CDA10 = -9.849999f; D_menu_801CDA14 = 3375.0f; // 15^3 - Map_801AD718(D_menu_801CEF58[6].x, D_menu_801CEF58[6].y, D_menu_801CEF58[6].z, &D_menu_801CEEE8[6].x, - &D_menu_801CEEE8[6].y, &D_menu_801CEEE8[6].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); + Map_SetCamRot(D_menu_801CEF58[6].x, D_menu_801CEF58[6].y, D_menu_801CEF58[6].z, &D_menu_801CEEE8[6].x, + &D_menu_801CEEE8[6].y, &D_menu_801CEEE8[6].z, D_menu_801CDA14, D_menu_801CDA0C, D_menu_801CDA10); D_menu_801CEEE8[7].x = D_menu_801CEEE8[6].x; D_menu_801CEEE8[7].y = D_menu_801CEEE8[6].y; @@ -2796,7 +2804,7 @@ void Map_801A281C(void) { } } -void Map_801A2B8C(void) { +void Map_ZoomPlanetPath_Update(void) { s32 i; switch (D_menu_801CD94C) { @@ -2812,9 +2820,9 @@ void Map_801A2B8C(void) { gFillScreenAlpha = 0; } } else { - D_menu_801CD9C0 = 30; + sMapTimer3 = 30; - if ((D_menu_801CD98C == 1) || (D_menu_801CD980 == 1)) { + if ((D_menu_801CD98C == true) || (D_menu_801CD980 == true)) { gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; @@ -2829,13 +2837,13 @@ void Map_801A2B8C(void) { break; case 10: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } if ((D_menu_801CD984 == 255) && (gFillScreenAlpha == 0)) { - D_menu_801CD980 = 0; - D_menu_801CD9C0 = 30; + D_menu_801CD980 = false; + sMapTimer3 = 30; D_menu_801CD94C = 20; } else if (D_menu_801CD988 != 0) { gFillScreenAlpha ^= 255; @@ -2861,49 +2869,48 @@ void Map_801A2B8C(void) { break; case 20: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } - if ((D_menu_801CD98C == 1) || (D_menu_801CD980 == 1)) { + if ((D_menu_801CD98C == true) || (D_menu_801CD980 == true)) { break; } D_menu_801CD9C4 = 0; - D_menu_801CD9C0 = 30; + sMapTimer3 = 30; D_menu_801CD94C = 1; break; case 1: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } Map_801A2EB8(); break; case 2: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } for (i = 0; i < 15; i++) { D_menu_801CD900[i] = 255; } - D_menu_801CD9C0 = 0; + sMapTimer3 = 0; D_menu_801CD94C++; break; case 3: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } D_menu_801CEFC8 = 1; D_menu_801CD97C = 1; D_menu_801CD94C = 0; - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; break; } - Camera_SetStarfieldPos(D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08); + Camera_SetStarfieldPos(sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ); D_menu_801CD9C4++; } @@ -2926,7 +2933,7 @@ void Map_801A2EB8(void) { if (D_menu_801CD9C4 == 80) { sCurrentPlanetId = sNextPlanetId; gMissionPlanet[gMissionNumber] = sCurrentPlanetId; - Map_801A6368(); + Map_CurrentLevel_Setup(); } if (D_menu_801CD9C4 < 80) { @@ -3015,7 +3022,7 @@ void Map_801A2EB8(void) { sPaths[temp2].alpha = 255; D_menu_801CEED0 = temp2; } - D_menu_801CD9C0 = 50; + sMapTimer3 = 50; D_menu_801CD94C++; } } @@ -3025,12 +3032,12 @@ void Map_801A3440(f32 arg0) { if (D_menu_801CEED8 != -1) { Map_801A3550(vec, &D_menu_801CEEE8[D_menu_801CEED8], &D_menu_801CEF58[D_menu_801CEED8], D_menu_801CEEDC); - D_menu_801CD9F4 = vec[0].x; - D_menu_801CD9F8 = vec[0].y; - D_menu_801CD9FC = vec[0].z; - D_menu_801CDA00 = vec[1].x; - D_menu_801CDA04 = vec[1].y; - D_menu_801CDA08 = vec[1].z; + sMapCamEyeX = vec[0].x; + sMapCamEyeY = vec[0].y; + sMapCamEyeZ = vec[0].z; + sMapCamAtX = vec[1].x; + sMapCamAtY = vec[1].y; + sMapCamAtZ = vec[1].z; D_menu_801CEEDC += arg0; if (D_menu_801CEEDC > 1.0f) { @@ -3043,6 +3050,7 @@ void Map_801A3440(f32 arg0) { } } +// Camera related void Map_801A3550(Vec3f* arg0, Vec3f* arg1, Vec3f* arg2, f32 arg3) { f32 temp_fa1; f32 temp_fs0; @@ -3061,11 +3069,11 @@ void Map_801A3550(Vec3f* arg0, Vec3f* arg1, Vec3f* arg2, f32 arg3) { (arg0 + 1)->z = (temp_fa1 * arg2->z) + (temp_fs0 * (arg2 + 1)->z) + (temp_ft5 * (arg2 + 2)->z); } -void Map_801A36A8(void) { +void Map_GameOver_Update(void) { s32 i; f32 temp; - switch (D_menu_801CD948) { + switch (sMapSubState) { case 0: gFillScreenRed = 0; gFillScreenGreen = 0; @@ -3073,19 +3081,19 @@ void Map_801A36A8(void) { gFillScreenAlpha = 255; for (i = 0; i < 8; i++) { - D_menu_801CF020[i] = D_menu_801B69D4[i]; - D_menu_801CF040[i] = D_menu_801B69F4[i]; - D_menu_801CF060[i] = D_menu_801B6A14[i]; + s3DFontXpos[i] = D_menu_801B69D4[i]; + s3DFontYpos[i] = D_menu_801B69F4[i]; + s3DFontZpos[i] = D_menu_801B6A14[i]; } D_menu_801CF0C8 = D_menu_801B6A34[1]; D_menu_801CF0CC = D_menu_801B6A3C[1]; D_menu_801CF0D0 = D_menu_801B6A44[1]; - D_menu_801CF120 = 0; + D_menu_801CF120 = false; D_menu_801CEA9C = 255.0f; - D_menu_801CF080 = 1.0f; - D_menu_801CD948 = 10; + s3DFontScale = 1.0f; + sMapSubState = 10; AUDIO_PLAY_BGM(NA_BGM_GAME_OVER); break; @@ -3097,28 +3105,27 @@ void Map_801A36A8(void) { if (temp == 0.0f) { gFillScreenAlpha = 0; - D_menu_801CD9C0 = 0; - D_menu_801CD948 = 20; + sMapTimer3 = 0; + sMapSubState = 20; } break; case 20: - if (D_menu_801CD9C0 != 0) { - break; // investigate + if (sMapTimer3 != 0) { + break; } D_menu_801CD94C = 0; - D_menu_801CD9C0 = 0; - D_menu_801CD948 = 1; + sMapTimer3 = 0; + sMapSubState = 1; break; case 1: if (D_menu_801CF120) { D_menu_801CDA1C += 0.03f; } - if (D_menu_801CD9C0 == 0) { - Map_801A3A00(); + if (sMapTimer3 == 0) { + Map_GameOver_3DFont(); } - break; case 2: @@ -3129,7 +3136,7 @@ void Map_801A36A8(void) { gFillScreenAlpha += 32; if (gFillScreenAlpha > 255) { gFillScreenAlpha = 255; - D_menu_801CD948++; + sMapSubState++; } break; @@ -3144,11 +3151,11 @@ void Map_801A36A8(void) { if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801CD948 = 3; + sMapSubState = 3; } } -void Map_801A3A00(void) { +void Map_GameOver_3DFont(void) { s32 i; bool boolTemp; f32 temp1[8]; @@ -3163,8 +3170,8 @@ void Map_801A3A00(void) { } else { D_menu_801CF0D8[i] = i * 3; } - D_menu_801CF088[i] = 0.0f; - D_menu_801CF0A8[i] = 0.0f; + s3DFontXrot[i] = 0.0f; + s3DFontYrot[i] = 0.0f; D_menu_801CF0F8[i] = 0; } D_menu_801CD94C++; @@ -3177,17 +3184,17 @@ void Map_801A3A00(void) { continue; } - temp1[i] = Math_SmoothStepToF(&D_menu_801CF020[i], *(D_menu_801CF0C8 + i), 0.05f, 100.0f, 10.0f); - temp2[i] = Math_SmoothStepToF(&D_menu_801CF040[i], *(D_menu_801CF0CC + i), 0.05f, 100.0f, 10.0f); - temp3[i] = Math_SmoothStepToF(&D_menu_801CF060[i], *(D_menu_801CF0D0 + i), 0.1f, 100.0f, 0.1f); + temp1[i] = Math_SmoothStepToF(&s3DFontXpos[i], D_menu_801CF0C8[i], 0.05f, 100.0f, 10.0f); + temp2[i] = Math_SmoothStepToF(&s3DFontYpos[i], D_menu_801CF0CC[i], 0.05f, 100.0f, 10.0f); + temp3[i] = Math_SmoothStepToF(&s3DFontZpos[i], D_menu_801CF0D0[i], 0.1f, 100.0f, 0.1f); if (temp1[i] == 0.0f && temp2[i] == 0.0f && temp3[i] == 0.0f) { - D_menu_801CF088[i] = 0.0f; + s3DFontXrot[i] = 0.0f; if (temp3[i] == 0.0f) { D_menu_801CF0F8[i] = 1; } } else { - D_menu_801CF088[i] += 10.0f; + s3DFontXrot[i] += 10.0f; } } @@ -3202,23 +3209,22 @@ void Map_801A3A00(void) { if (boolTemp == true) { D_menu_801CF118 = 0; for (i = 0; i < 8; i++) { - D_menu_801CF088[i] = 0.0f; + s3DFontXrot[i] = 0.0f; D_menu_801CF0D8[i] = i * 10; D_menu_801CF0F8[i] = 0; } - D_menu_801CD9C0 = 60; - D_menu_801CD9BC = 85; + sMapTimer3 = 60; + sMapTimer2 = 85; D_menu_801CD94C = 11; } break; case 11: - if (D_menu_801CD9C0 == 0) { - - if (D_menu_801CD9BC) { + if (sMapTimer3 == 0) { + if (sMapTimer2) { for (i = 0; i < 8; i++) { - Math_SmoothStepToF(&D_menu_801CF088[i], 360.0f, 0.3f, 100.0f, 1.0f); - Math_SmoothStepToF(&D_menu_801CF0A8[i], 360.0f, 0.3f, 100.0f, 1.0f); + Math_SmoothStepToF(&s3DFontXrot[i], 360.0f, 0.3f, 100.0f, 1.0f); + Math_SmoothStepToF(&s3DFontYrot[i], 360.0f, 0.3f, 100.0f, 1.0f); } } else { D_menu_801CD94C = 10; @@ -3227,15 +3233,15 @@ void Map_801A3A00(void) { break; case 10: - if (!D_menu_801CD9B8) { + if (!sMapTimer1) { if (!D_menu_801CF120) { D_menu_801CEAA0 = 0.0f; - D_menu_801CD9B8 = 25; + sMapTimer1 = 25; D_menu_801CD94C = 3; } else { for (i = 0; i < 8; i++) { - D_menu_801CF088[i] = 0.0f; - D_menu_801CF0A8[i] = 0.0f; + s3DFontXrot[i] = 0.0f; + s3DFontYrot[i] = 0.0f; D_menu_801CF0F8[i] = 0; } D_menu_801CEFCC = 0; @@ -3268,9 +3274,9 @@ void Map_801A3A00(void) { D_menu_801CF0CC = D_menu_801B6A3C[D_menu_801CF11C]; D_menu_801CF0D0 = D_menu_801B6A44[D_menu_801CF11C]; - D_menu_801CD9C0 = 15; + sMapTimer3 = 15; if (D_menu_801CF11C) { - D_menu_801CD9C0 = 240; + sMapTimer3 = 240; } D_menu_801CD94C = 0; } @@ -3284,29 +3290,29 @@ void Map_801A3A00(void) { continue; } - if (D_menu_801CF0A8[i] > 360.0f) { - D_menu_801CF0A8[i] = 0.0f; + if (s3DFontYrot[i] > 360.0f) { + s3DFontYrot[i] = 0.0f; D_menu_801CF0F8[i] = 1; } else { - D_menu_801CF0A8[i] += 10.0f; + s3DFontYrot[i] += 10.0f; } } break; case 3: - if (D_menu_801CD9B8 != 0) { + if (sMapTimer1 != 0) { break; } for (i = 0; i < 8; i++) { - D_menu_801CF088[i] += 30.0f; - D_menu_801CF060[i] += -300.0f; - if (D_menu_801CF060[i] <= -120000.0f) { - D_menu_801CF060[i] = -12000.0f; + s3DFontXrot[i] += 30.0f; + s3DFontZpos[i] += -300.0f; + if (s3DFontZpos[i] <= -120000.0f) { + s3DFontZpos[i] = -12000.0f; } } - if (D_menu_801CF060[0] <= -11000.0f) { + if (s3DFontZpos[0] <= -11000.0f) { D_menu_801CEAA0 += 32.0f; if (D_menu_801CEAA0 > 255.0f) { @@ -3328,8 +3334,8 @@ void Map_801A3A00(void) { } if (D_menu_801CEAA0 == 255.0f) { - D_menu_801CF080 = 0.0f; - D_menu_801CD948 = 2; + s3DFontScale = 0.0f; + sMapSubState = 2; D_menu_801CD94C = 0; } break; @@ -3342,7 +3348,7 @@ void Map_801A4394(void) { switch (D_menu_801CD94C) { case 0: if (gMissionNumber == 0) { - D_menu_801CD9C0 = 45; + sMapTimer3 = 45; D_menu_801CD94C = 3; } else { D_menu_801CD94C++; @@ -3352,7 +3358,7 @@ void Map_801A4394(void) { case 1: if (gMissionNumber == D_menu_801CD9AC) { D_menu_801CD94C = 3; - D_menu_801CD9C0 = 45; + sMapTimer3 = 45; break; } @@ -3380,63 +3386,59 @@ void Map_801A4394(void) { break; case 3: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } for (i = 0; i < 8; i++) { - D_menu_801CF020[i] = D_menu_801B69D4[i]; - D_menu_801CF040[i] = D_menu_801B69F4[i]; - D_menu_801CF060[i] = D_menu_801B6A14[i]; + s3DFontXpos[i] = D_menu_801B69D4[i]; + s3DFontYpos[i] = D_menu_801B69F4[i]; + s3DFontZpos[i] = D_menu_801B6A14[i]; } D_menu_801CD978 = 1; - D_menu_801CF120 = 1; + D_menu_801CF120 = true; D_menu_801CF11C = 1; D_menu_801CF0C8 = D_menu_801B6A34[1]; D_menu_801CF0CC = D_menu_801B6A3C[1]; D_menu_801CF0D0 = D_menu_801B6A44[1]; - D_menu_801CF080 = 1.0f; - D_menu_801CD9C0 = 450; + s3DFontScale = 1.0f; + sMapTimer3 = 450; D_menu_801CD94C = 0; - D_menu_801CD948 = 1; + sMapSubState = 1; break; } } -void Map_801A4650(void) { +void Map_GameOver_Draw(void) { s32 i; - static Gfx* D_menu_801B6A4C[] = { - D_FONT3D_9006AE0, D_FONT3D_90086F0, D_FONT3D_9005380, D_FONT3D_90075A0, - D_FONT3D_9000570, D_FONT3D_9002EA0, D_FONT3D_90075A0, D_FONT3D_9004230, + static Gfx* sMap3DFontDLs[] = { + aFont3D_G, aFont3D_A, aFont3D_M, aFont3D_E, aFont3D_O, aFont3D_V, aFont3D_E, aFont3D_R, }; Lights_SetOneLight(&gMasterDisp, 0, 0, 127, 28, 58, 105, 65, 70, 48); RCP_SetupDL(&gMasterDisp, SETUPDL_23); - gSPTexture(gMasterDisp++, 2500, 200, 0, G_TX_RENDERTILE, G_ON); gSPSetGeometryMode(gMasterDisp++, G_TEXTURE_GEN); Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 500.0f, 0.0f, 0.0f, -500.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); - Matrix_SetGfxMtx(&gMasterDisp); - for (i = 0; i < 8; i++) { + for (i = 0; i < ARRAY_COUNT(sMap3DFontDLs); i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801CF020[i], D_menu_801CF040[i], D_menu_801CF060[i], MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CF0A8[i], MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801CF088[i], MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801CF080, D_menu_801CF080, D_menu_801CF080, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, s3DFontXpos[i], s3DFontYpos[i], s3DFontZpos[i], MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * s3DFontYrot[i], MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * s3DFontXrot[i], MTXF_APPLY); + Matrix_Scale(gGfxMatrix, s3DFontScale, s3DFontScale, s3DFontScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B6A4C[i]); + gSPDisplayList(gMasterDisp++, sMap3DFontDLs[i]); Matrix_Pop(&gGfxMatrix); } @@ -3451,54 +3453,54 @@ void Map_801A48C0(f32 speed) { f32 temp; f32 angle; - Math_SmoothStepToF(&D_menu_801CDA34, D_menu_801CDA50.x, speed, 100.0f, 0.1f); - Math_SmoothStepToF(&D_menu_801CDA38, D_menu_801CDA50.y, speed, 100.0f, 0.1f); - Math_SmoothStepToF(&D_menu_801CD9FC, D_menu_801CDA50.z, speed, 100.0f, 0.1f); + Math_SmoothStepToF(&sPathFollowCamEyeX, sZoomPlanetCamEye.x, speed, 100.0f, 0.1f); + Math_SmoothStepToF(&sPathFollowCamEyeY, sZoomPlanetCamEye.y, speed, 100.0f, 0.1f); + Math_SmoothStepToF(&sMapCamEyeZ, sZoomPlanetCamEye.z, speed, 100.0f, 0.1f); - x = D_menu_801CDA50.x - D_menu_801CDA34; - y = D_menu_801CDA50.y - D_menu_801CDA38; - z = D_menu_801CDA50.z - D_menu_801CD9FC; + x = sZoomPlanetCamEye.x - sPathFollowCamEyeX; + y = sZoomPlanetCamEye.y - sPathFollowCamEyeY; + z = sZoomPlanetCamEye.z - sMapCamEyeZ; temp = sqrtf(SQ(x) + SQ(y) + SQ(z)); angle = M_DTOR * ((1 - (temp / D_menu_801CEA68)) * 180.0f); - D_menu_801CD9F4 = D_menu_801CDA34 * (1 + __sinf(angle) * 1.1f); - D_menu_801CD9F8 = D_menu_801CDA38 * (1 + __sinf(angle) * 1.3f); + sMapCamEyeX = sPathFollowCamEyeX * (1 + __sinf(angle) * 1.1f); + sMapCamEyeY = sPathFollowCamEyeY * (1 + __sinf(angle) * 1.3f); } void Map_801A4A38(f32 arg0) { - Math_SmoothStepToF(&D_menu_801CDA2C, D_menu_801CDA40.x, arg0, 100.0f, 0.1f); - Math_SmoothStepToF(&D_menu_801CDA30, D_menu_801CDA40.y, arg0, 100.0f, 0.1f); - Math_SmoothStepToF(&D_menu_801CDA08, D_menu_801CDA40.z, arg0, 100.0f, 0.1f); - D_menu_801CDA00 = D_menu_801CDA2C; - D_menu_801CDA04 = D_menu_801CDA30; + Math_SmoothStepToF(&sPathFollowCamAtX, sZoomPlanetCamAt.x, arg0, 100.0f, 0.1f); + Math_SmoothStepToF(&sPathFollowCamAtY, sZoomPlanetCamAt.y, arg0, 100.0f, 0.1f); + Math_SmoothStepToF(&sMapCamAtZ, sZoomPlanetCamAt.z, arg0, 100.0f, 0.1f); + sMapCamAtX = sPathFollowCamAtX; + sMapCamAtY = sPathFollowCamAtY; } -void Map_801A4AE8(void) { +// Player selecting the next destination after Mission Accomplised +void Map_PathChange_Update(void) { s32 var_a0; s32 i; switch (D_menu_801CD94C) { case 0: - Map_801A4D7C(); + Map_PathChange_Input(); break; case 1: if (D_menu_801CF000[D_menu_801CEFDC] == 0) { - if (D_menu_801CEFD0 != 0) { + if (D_menu_801CEFD0) { if (gLifeCount[gPlayerNum] != 0) { Audio_PlayDeathSequence(); - D_menu_801CD9CC = 1; - D_menu_801CD9D0 = 0; - D_menu_801CD9B8 = 120; + sRestartLevelStates = 1; + sExplosionAnimIdx = 0; + sMapTimer1 = 120; } else { D_menu_801CD9D4 = 1; - D_menu_801CD9B8 = 0; + sMapTimer1 = 0; } } else { - - D_menu_801CD9B8 = 0; + sMapTimer1 = 0; } D_menu_801CEFC4 = 0; D_menu_801CD94C = 2; @@ -3506,29 +3508,29 @@ void Map_801A4AE8(void) { break; case 2: - if ((D_menu_801CD9CC != 0) && (D_menu_801CD9B8 == 110)) { + if ((sRestartLevelStates != 0) && (sMapTimer1 == 110)) { gLifeCount[gPlayerNum]--; } - if (D_menu_801CD9B8 == 0) { - D_menu_801CD9CC = 0; + if (sMapTimer1 == 0) { + sRestartLevelStates = 0; var_a0 = D_menu_801CEFDC; if (sPrevMissionStatus != MISSION_COMPLETE) { var_a0 += 2; } - Map_801A4D0C(var_a0); + Map_PathChange_UpdateEntry(var_a0); if (D_menu_801CEFDC == 0) { for (i = 0; i < TEAM_ID_MAX; i++) { D_ctx_80177C58[i] = gTeamShields[i]; } D_menu_801CEFC8 = 0; - D_menu_801CD948 = 0; - D_menu_801CD944 = 2; + sMapSubState = 0; + sMapState = MAP_ZOOM_PLANET; } else { - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; } D_menu_801CD94C = 0; } @@ -3536,19 +3538,19 @@ void Map_801A4AE8(void) { } } -void Map_801A4D0C(u32 arg0) { +void Map_PathChange_UpdateEntry(u32 arg0) { switch (arg0) { case 1: case 4: if (D_menu_801CD9D4 != 0) { - Map_801A4F8C(); + Map_GoToGameOver(); } else { - Map_801A4FC4(); + Map_RetryCourse(); } break; case 3: - Map_801A53C8(); + Map_ChangePath(); case 0: case 2: @@ -3556,10 +3558,10 @@ void Map_801A4D0C(u32 arg0) { } } -void Map_801A4D7C(void) { +void Map_PathChange_Input(void) { f32 temp; - if (Map_801A5770() != 0) { + if (Map_Input_CursorY() != 0) { D_menu_801CEFE8[D_menu_801CEFDC] = 255.0f; if (sPrevMissionStatus != MISSION_COMPLETE) { if (D_menu_801CEFD4 < 0) { @@ -3591,7 +3593,7 @@ void Map_801A4D7C(void) { if (gControllerPress[gMainController].button & (B_BUTTON | START_BUTTON)) { Audio_PlayMapMenuSfx(0); D_menu_801CEFC4 = 0; - D_menu_801CD944 = 3; + sMapState = MAP_IDLE; } else if (gControllerPress[gMainController].button & A_BUTTON) { Audio_PlayMapMenuSfx(0); AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); @@ -3599,14 +3601,14 @@ void Map_801A4D7C(void) { if (((sPrevMissionStatus != MISSION_COMPLETE) && (D_menu_801CEFDC == 2)) || ((sPrevMissionStatus == MISSION_COMPLETE) && (D_menu_801CEFDC == 1))) { - D_menu_801CEFD0 = 1; + D_menu_801CEFD0 = true; D_menu_801CF00C = 10; } D_menu_801CD94C = 1; } } -void Map_801A4F8C(void) { +void Map_GoToGameOver(void) { gStarCount = 0; gGameState = GSTATE_GAME_OVER; D_ctx_80177868 = 0; @@ -3614,7 +3616,7 @@ void Map_801A4F8C(void) { gDrawMode = DRAW_NONE; } -void Map_801A4FC4(void) { +void Map_RetryCourse(void) { s32 i; s32 temp; s32 temp2; @@ -3664,7 +3666,7 @@ void Map_801A4FC4(void) { gMissionPlanet[gMissionNumber] = PLANET_NONE; gMissionHitCount[gMissionNumber - 1] = 0; gMissionMedal[gMissionNumber - 1] = 0; - gMissionTeamStatus[gMissionNumber - 1] = 0x00FFFFFF; + gMissionTeamStatus[gMissionNumber - 1] = TEAMSTATUS_ALIVE; gHitCount = 0; gMissionNumber--; @@ -3690,10 +3692,10 @@ void Map_801A4FC4(void) { sPaths[temp].alpha = 0; } - Map_801A6368(); + Map_CurrentLevel_Setup(); } -void Map_801A53C8(void) { +void Map_ChangePath(void) { s32 temp; s32 temp2; @@ -3753,7 +3755,7 @@ void Map_801A53C8(void) { sCurrentPlanetId = sNextPlanetId; gMissionPlanet[gMissionNumber] = sCurrentPlanetId; - Map_801A6368(); + Map_CurrentLevel_Setup(); if (sPlanets[sNextPlanetId].dest1 != PLANET_NONE) { temp2 = Map_GetPathId(sNextPlanetId, sPlanets[sNextPlanetId].dest1); @@ -3768,19 +3770,19 @@ void Map_801A53C8(void) { } } -bool Map_801A5770(void) { +bool Map_Input_CursorY(void) { bool ret = false; - s8 y = gControllerPress[gMainController].stick_y; + s8 stickY = gControllerPress[gMainController].stick_y; - if ((y > -40) && (y < 40)) { - y = 0; + if ((stickY > -40) && (stickY < 40)) { + stickY = 0; } - if (y != 0) { + if (stickY != 0) { if (D_menu_801CEFD4 == 0) { ret = true; } - D_menu_801CEFD4 = y; + D_menu_801CEFD4 = stickY; } else { D_menu_801CEFD4 = 0; } @@ -3792,19 +3794,19 @@ bool Map_801A5770(void) { return ret; } -void Map_801A5834(void) { +void Map_PathChange_DrawOptions(void) { s32 i; f32 x; f32 y; f32 z; u8* texture; s32 colorIndex; - s32 var_t0; + s32 optionBgScaleIdx; s32 mask; s32 r[3]; s32 g[3]; s32 b[3]; - static f32 D_menu_801B6A6C[] = { 3.05f, 4.15f }; + static f32 sMapOptionBgTexScales[] = { 3.05f, 4.15f }; x = 101.0f; y = 92.0f; @@ -3823,22 +3825,22 @@ void Map_801A5834(void) { } } - var_t0 = 1; + optionBgScaleIdx = 1; if (sPrevMissionStatus == MISSION_COMPLETE) { - var_t0 = 0; + optionBgScaleIdx = 0; } if (gLifeCount[gPlayerNum] != 0) { - texture = D_MAP_6001080; + texture = aMapRetryCourseLose1UPTex; } else { - texture = D_MAP_6000000; + texture = aMapRetryCourseGameOverTex; } RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); - TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, x, y, 4.6f, D_menu_801B6A6C[var_t0]); + Lib_TextureRect_IA8(&gMasterDisp, aMapOptionBgTex, 24, 17, x, y, 4.6f, sMapOptionBgTexScales[optionBgScaleIdx]); mask = 0xFFFFFFFF; if (D_menu_801CF000[colorIndex] != 0) { @@ -3849,7 +3851,7 @@ void Map_801A5834(void) { if (gGameFrameCount & mask) { // can't be != 0? RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_IA8(&gMasterDisp, D_MAP_6000840, 96, 22, x + 11.0f, y + 3.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aMapProceedNextCourseTex, 96, 22, x + 11.0f, y + 3.0f, 1.0f, 1.0f); } z = 24.0f; colorIndex++; @@ -3863,7 +3865,7 @@ void Map_801A5834(void) { if (gGameFrameCount & mask) { // can't be != 0? gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_IA8(&gMasterDisp, D_MAP_60018C0, 96, 10, x + 10.0f, y + z + 8.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aMapChangeCourseTex, 96, 10, x + 10.0f, y + z + 8.0f, 1.0f, 1.0f); } z += 18.0f; colorIndex++; @@ -3877,38 +3879,38 @@ void Map_801A5834(void) { if ((gGameFrameCount & mask) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, r[colorIndex], g[colorIndex], b[colorIndex], 255); - TextureRect_IA8(&gMasterDisp, texture, 96, 22, x + 9.0f, y + z + 5.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, texture, 96, 22, x + 9.0f, y + z + 5.0f, 1.0f, 1.0f); } } -void Map_801A5C90(void) { +void Map_RestartLevelLifeDown_Draw(void) { s32 pad[3]; f32 scale; - if (D_menu_801CD9CC != 0) { + if (sRestartLevelStates != 0) { if (gLifeCount[gPlayerNum] < 10) { scale = 0.13f; } else { scale = 0.18f; } - switch (D_menu_801CD9CC) { + switch (sRestartLevelStates) { case 1: - D_menu_801CD9C0 = 2; - D_menu_801CD9CC = 2; + sMapTimer3 = 2; + sRestartLevelStates = 2; break; case 2: - if (D_menu_801CD9C0 != 0) { + if (sMapTimer3 != 0) { break; } - if ((D_menu_801CD9D0 + 1) > 3) { - D_menu_801CD9D0 = 0; - D_menu_801CD9CC = 0; + if ((sExplosionAnimIdx + 1) > 3) { + sExplosionAnimIdx = 0; + sRestartLevelStates = 0; } else { - D_menu_801CD9D0++; - D_menu_801CD9CC = 1; + sExplosionAnimIdx++; + sRestartLevelStates = 1; } break; } @@ -3928,156 +3930,156 @@ void Map_801A5C90(void) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AF824[D_menu_801CD9D0]); + gSPDisplayList(gMasterDisp++, sExplosionAnimDLs[sExplosionAnimIdx]); Matrix_Pop(&gGfxMatrix); } } -void Map_801A5E80(void) { - switch (D_menu_801B8280) { +void Map_LevelStart_Update(void) { + switch (sLevelStartState) { case 0: - D_menu_801B8284 = 0; - D_menu_801CD9A0 = 1; - Map_801A6368(); - D_menu_801CD9A8 = Map_801A62FC(sCurrentPlanetId); - Map_801AB284(); - D_menu_801B8280++; + sWipeHeight = 0; + D_menu_801CD9A0 = true; + Map_CurrentLevel_Setup(); + sLevelPlayed = Map_LevelPlayedStatus_Check(sCurrentPlanetId); + Map_BriefingRadio_Setup(); + sLevelStartState++; break; case 1: - if ((gControllerPress[gMainController].button & START_BUTTON) && !(D_menu_801CD9A8)) { + if ((gControllerPress[gMainController].button & START_BUTTON) && !sLevelPlayed) { Audio_KillSfxById(NA_SE_COMPUTER_NOISE); Audio_ClearVoice(); D_menu_801CF018 = 0; - D_menu_801B8280 = 2; - D_menu_801CD9B8 = 0; + sLevelStartState = 2; + sMapTimer1 = 0; } - if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == 0) && !(D_menu_801CD9A8)) { + if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == false) && !sLevelPlayed) { Audio_ClearVoice(); gRadioStateTimer = 0; } - if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == 1) && !(D_menu_801CD9A8)) { - D_menu_801CD9A0 = 0; + if ((gControllerPress[gMainController].button & A_BUTTON) && (D_menu_801CD9A0 == true) && !sLevelPlayed) { + D_menu_801CD9A0 = false; } if (D_menu_801CF018 == 7) { - D_menu_801CD9B8 = 5; - D_menu_801B8280++; + sMapTimer1 = 5; + sLevelStartState++; } break; case 2: - if (D_menu_801CD9B8 != 0) { + if (sMapTimer1 != 0) { break; } - if (D_menu_801B8284 < 120) { - D_menu_801B8284 += 15; + if (sWipeHeight < 120) { + sWipeHeight += 15; if (sCurrentPlanetId == PLANET_CORNERIA) { - D_menu_801CEB48[0] = false; + sPlanetExplosions[EXPLOSIONS_CORNERIA] = false; } } else { - D_menu_801CD9B8 = 5; + sMapTimer1 = 5; D_menu_801CF018 = 0; - D_menu_801B8280++; + sLevelStartState++; } break; case 3: - if (D_menu_801CD9B8 == 0) { - D_menu_801CD9B8 = 5; + if (sMapTimer1 == 0) { + sMapTimer1 = 5; D_menu_801CD968 = 1; - D_menu_801B8280++; + sLevelStartState++; } break; case 4: - if (D_menu_801CD9B8 == 0) { + if (sMapTimer1 == 0) { AUDIO_PLAY_SFX(NA_SE_GOOD_LUCK, gDefaultSfxSource, 4); - D_menu_801CD9B8 = 75; - D_menu_801B8280++; + sMapTimer1 = 75; + sLevelStartState++; } break; case 5: - if (D_menu_801CD9B8 == 0) { - Map_801A61B4(gCurrentLevel); - D_menu_801B8280 = 0; + if (sMapTimer1 == 0) { + Map_LevelStart_AudioSpecSetup(gCurrentLevel); + sLevelStartState = 0; D_menu_801CD968 = 0; - Map_801A6628(); + Map_PlayLevel(); } break; } } -void Map_801A61B4(LevelId level) { +void Map_LevelStart_AudioSpecSetup(LevelId level) { switch (level) { case LEVEL_CORNERIA: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_0); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_CO); break; case LEVEL_METEO: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_1); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_ME); break; case LEVEL_TITANIA: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_2); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_TI); break; case LEVEL_AQUAS: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_12); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_AQ); break; case LEVEL_BOLSE: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_10); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_BO); break; case LEVEL_KATINA: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_11); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_KA); break; case LEVEL_AREA_6: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_5); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_A6); break; case LEVEL_SECTOR_Z: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_13); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_SZ); break; case LEVEL_FORTUNA: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_8); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_FO); break; case LEVEL_SECTOR_X: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_3); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_SX); break; case LEVEL_MACBETH: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_14); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_MA); break; case LEVEL_ZONESS: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_4); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_ZO); break; case LEVEL_SECTOR_Y: - AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_7); + AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_SY); break; case LEVEL_SOLAR: - AUDIO_SET_SPEC(SFXCHAN_2, AUDIOSPEC_9); + AUDIO_SET_SPEC(SFXCHAN_2, AUDIOSPEC_SO); default: break; } } -bool Map_801A62FC(PlanetId planet) { +bool Map_LevelPlayedStatus_Check(PlanetId planet) { u32 planetSaveSlot; - s32 ret = true; + s32 played = true; switch (planet) { case PLANET_METEO: @@ -4108,13 +4110,13 @@ bool Map_801A62FC(PlanetId planet) { #endif if (gSaveFile.save.data.planet[planetSaveSlot].played & 1) { - ret = false; + played = false; } - return ret; + return played; } -void Map_801A6368(void) { +void Map_CurrentLevel_Setup(void) { switch (sCurrentPlanetId) { case PLANET_CORNERIA: gCurrentLevel = LEVEL_CORNERIA; @@ -4261,7 +4263,7 @@ s32 Map_GetPathId(PlanetId start, PlanetId end) { return i; } -void Map_801A659C(void) { +void Map_SetState_ZoomPlanet(void) { Audio_KillSfxById(NA_SE_MAP_MOVE); Audio_KillSfxById(NA_SE_MAP_ROLL); @@ -4270,11 +4272,11 @@ void Map_801A659C(void) { } D_menu_801CEFC8 = 0; - D_menu_801CD944 = 2; - D_menu_801CD948 = 0; + sMapState = MAP_ZOOM_PLANET; + sMapSubState = 0; } -void Map_801A6628(void) { +void Map_PlayLevel(void) { gGameState = GSTATE_PLAY; gNextGameStateTimer = 2; gPlayState = PLAY_STANDBY; @@ -4288,7 +4290,7 @@ void Map_801A6628(void) { D_ctx_8017782C = true; } -void Map_801A6694(void) { +void Map_PositionPlanets(void) { PlanetId planetId; Vec3f dest; Vec3f src; @@ -4305,7 +4307,7 @@ void Map_801A6694(void) { Matrix_RotateY(gGfxMatrix, M_DTOR * -sPlanets[planetId].longitude, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_SetGfxMtx(&gMasterDisp); @@ -4321,27 +4323,27 @@ void Map_801A6694(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_LookAt(gGfxMatrix, sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ, sMapCamUpX, + sMapCamUpY, sMapCamUpZ, MTXF_APPLY); Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Matrix_MultVec3f(gGfxMatrix, &src, &D_menu_801CE960[planetId]); + Matrix_MultVec3f(gGfxMatrix, &src, &sPlanetPositions[planetId]); Matrix_Pop(&gGfxMatrix); } } -void Map_801A68E4(void) { +void Map_PlanetOrderZpos(void) { s32 i; s32 j; s32 var_a0; for (i = 0; i < 14; i++) { for (j = i; j < 15; j++) { - if (D_menu_801CE960[D_menu_801CD8A0[i]].z > D_menu_801CE960[D_menu_801CD8A0[j]].z) { + if (sPlanetPositions[D_menu_801CD8A0[i]].z > sPlanetPositions[D_menu_801CD8A0[j]].z) { var_a0 = D_menu_801CD8A0[i]; D_menu_801CD8A0[i] = D_menu_801CD8A0[j]; D_menu_801CD8A0[j] = var_a0; @@ -4350,7 +4352,7 @@ void Map_801A68E4(void) { } } -void Map_801A6A24(void) { +void Map_Fade_Update(void) { switch (D_menu_801CD960) { case 0: if (gFillScreenAlpha != 0) { @@ -4370,107 +4372,102 @@ void Map_801A6A24(void) { } } -void Map_801A6A98(PlanetId planetId) { +void Map_Planet_Draw(PlanetId planetId) { s32 mask; - s32 temp; + PlanetStatus planetStatus; if ((sPlanets[planetId].alpha == 0) && (planetId != sCurrentPlanetId)) { return; } - if ((planetId == sCurrentPlanetId) && (D_menu_801CD944 == 2) && (D_menu_801CD95C != 0)) { + if ((planetId == sCurrentPlanetId) && (sMapState == MAP_ZOOM_PLANET) && (D_menu_801CD95C != 0)) { mask = 0x00000001; } else { mask = 0xFFFFFFFF; } - temp = Map_801A6DAC(planetId); + planetStatus = Map_CheckPlanetMedal(planetId); - Map_801A6EC0(planetId); - Map_801A7D3C(planetId); + Map_PlanetAnim2(planetId); + Map_PlanetCleared2_Draw(planetId); Matrix_Push(&gGfxMatrix); if ((gGameFrameCount & mask) != 0) { if (planetId == PLANET_TITANIA) { - Map_801A791C(planetId); + Map_Titania_DrawRings1(planetId); } - if ((temp == 1) && (D_menu_801CE960[planetId].z > D_menu_801CEA18[planetId]) && (planetId != PLANET_AREA_6) && - (planetId != PLANET_BOLSE)) { - - Map_801A7F1C(planetId); + if ((planetStatus == PLANET_CLEARED) && (sPlanetPositions[planetId].z > D_menu_801CEA18[planetId]) && + (planetId != PLANET_AREA_6) && (planetId != PLANET_BOLSE)) { + Map_PlanetCleared_Draw(planetId); } - Map_801A7230(planetId); + Map_PlanetAnim(planetId); if (planetId == PLANET_SOLAR) { - Map_801A74F4(planetId); + Map_SolarRays_Draw(planetId); } if (sPlanets[planetId].anim == PL_ANIM_SPIN) { if (planetId != PLANET_VENOM) { - if ((planetId != PLANET_AQUAS) && (planetId != PLANET_TITANIA)) { - Map_801A7684(planetId); + Map_VenomCloud2_Draw(planetId); } - - Map_801A77B0(planetId); + Map_PlanetShadow_Draw(planetId); } if (planetId == PLANET_VENOM) { - Map_801A7BEC(&D_menu_801CEEBC, 0.1f, 3.1f); - Map_801A7BEC(&D_menu_801CEEC0, -0.1f, 2.9f); + Map_VenomCloud_Draw(&D_menu_801CEEBC, +0.1f, 3.1f); + Map_VenomCloud_Draw(&D_menu_801CEEC0, -0.1f, 2.9f); } } if (planetId == PLANET_TITANIA) { - Map_801A7A84(planetId); + Map_Titania_DrawRings2(planetId); } - if ((planetId == PLANET_CORNERIA) && D_menu_801CEB48[0]) { - Map_801A89BC(PLANET_CORNERIA, 0); + if ((planetId == PLANET_CORNERIA) && sPlanetExplosions[EXPLOSIONS_CORNERIA]) { + Map_PlanetExplosions_Draw(PLANET_CORNERIA, EXPLOSIONS_CORNERIA); } - if ((planetId == PLANET_KATINA) && D_menu_801CEB48[1]) { - Map_801A89BC(PLANET_KATINA, 1); + if ((planetId == PLANET_KATINA) && sPlanetExplosions[EXPLOSIONS_KATINA]) { + Map_PlanetExplosions_Draw(PLANET_KATINA, EXPLOSIONS_KATINA); } - if ((planetId == PLANET_SECTOR_Y) && D_menu_801CEB48[2]) { - Map_801A89BC(PLANET_SECTOR_Y, 2); + if ((planetId == PLANET_SECTOR_Y) && sPlanetExplosions[EXPLOSIONS_SECTOR_Y]) { + Map_PlanetExplosions_Draw(PLANET_SECTOR_Y, EXPLOSIONS_SECTOR_Y); } - if ((temp == 1) && (D_menu_801CE960[planetId].z <= D_menu_801CEA18[planetId]) && (planetId != PLANET_AREA_6) && - (planetId != PLANET_BOLSE)) { - - Map_801A7F1C(planetId); + if ((planetStatus == PLANET_CLEARED) && (sPlanetPositions[planetId].z <= D_menu_801CEA18[planetId]) && + (planetId != PLANET_AREA_6) && (planetId != PLANET_BOLSE)) { + Map_PlanetCleared_Draw(planetId); } - if ((temp == 1) && ((planetId == PLANET_AREA_6) || (planetId == PLANET_BOLSE))) { - - Map_801A7F1C(planetId); + if ((planetStatus == PLANET_CLEARED) && ((planetId == PLANET_AREA_6) || (planetId == PLANET_BOLSE))) { + Map_PlanetCleared_Draw(planetId); } - if (temp == 2) { - Map_801A809C(planetId); + if (planetStatus == PLANET_MEDAL) { + Map_PlanetMedal_Draw(planetId); } } Matrix_Pop(&gGfxMatrix); } -s32 Map_801A6DAC(PlanetId planetId) { +s32 Map_CheckPlanetMedal(PlanetId planetId) { s32 ret; s32 planetSaveSlot; - s32 var_v0; - s32 var_a0; + bool medal; + bool clear; if (planetId == PLANET_VENOM) { if (gExpertMode) { - var_v0 = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertMedal & 1; - var_a0 = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].expertClear & 1 | - gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertClear & 1; + medal = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertMedal & 1; + clear = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].expertClear & 1 | + gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertClear & 1; } else { - var_v0 = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalMedal & 1; - var_a0 = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].normalClear & 1 | - gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalClear & 1; + medal = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalMedal & 1; + clear = gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].normalClear & 1 | + gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].normalClear & 1; } } else { planetSaveSlot = planetId; @@ -4480,26 +4477,25 @@ s32 Map_801A6DAC(PlanetId planetId) { } if (gExpertMode) { - var_v0 = gSaveFile.save.data.planet[planetSaveSlot].expertMedal & 1; - var_a0 = gSaveFile.save.data.planet[planetSaveSlot].expertClear & 1; + medal = gSaveFile.save.data.planet[planetSaveSlot].expertMedal & 1; + clear = gSaveFile.save.data.planet[planetSaveSlot].expertClear & 1; } else { - var_v0 = gSaveFile.save.data.planet[planetSaveSlot].normalMedal & 1; - var_a0 = gSaveFile.save.data.planet[planetSaveSlot].normalClear & 1; + medal = gSaveFile.save.data.planet[planetSaveSlot].normalMedal & 1; + clear = gSaveFile.save.data.planet[planetSaveSlot].normalClear & 1; } } - ret = 0; - - if (var_v0) { - ret = 2; - } else if (var_a0) { - ret = 1; + ret = 0; // Has no medal or hasn't been cleared + if (medal) { + ret = 2; // Has medal + } else if (clear) { + ret = 1; // Has been cleared } return ret; } -void Map_801A6EC0(PlanetId planetId) { +void Map_PlanetAnim2(PlanetId planetId) { f32 dirX; f32 dirY; f32 dirZ; @@ -4536,9 +4532,9 @@ void Map_801A6EC0(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); if (sPlanets[planetId].anim == PL_ANIM_ROTATE_Y) { - x2 = D_menu_801CE960[PLANET_SOLAR].x - D_menu_801CE960[planetId].x; - y2 = D_menu_801CE960[PLANET_SOLAR].y - D_menu_801CE960[planetId].y; - z2 = D_menu_801CE960[PLANET_SOLAR].z - D_menu_801CE960[planetId].z; + x2 = sPlanetPositions[PLANET_SOLAR].x - sPlanetPositions[planetId].x; + y2 = sPlanetPositions[PLANET_SOLAR].y - sPlanetPositions[planetId].y; + z2 = sPlanetPositions[PLANET_SOLAR].z - sPlanetPositions[planetId].z; x1 = Math_Atan2F(y2, sqrtf(SQ(x2) + SQ(z2))); y1 = -Math_Atan2F(x2, z2); @@ -4566,11 +4562,11 @@ void Map_801A6EC0(PlanetId planetId) { D_menu_801AFFFC -= 0.09f; } -void Map_801A7230(PlanetId planetId) { +void Map_PlanetAnim(PlanetId planetId) { switch (sPlanets[planetId].anim) { case PL_ANIM_STATIC: - if (((D_menu_801CD944 == 3) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && - D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { + if (((sMapState == MAP_IDLE) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && + (sMapState != MAP_LYLAT_CARD) && sMapState != MAP_GAME_OVER) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_41); @@ -4579,8 +4575,8 @@ void Map_801A7230(PlanetId planetId) { break; case PL_ANIM_ROTATE_Y: - if (((D_menu_801CD944 == 3) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && - D_menu_801CD944 != 1 && D_menu_801CD944 != 7) { + if (((sMapState == MAP_IDLE) || (planetId == sCurrentPlanetId) || (planetId == sNextPlanetId)) && + (sMapState != MAP_LYLAT_CARD) && (sMapState != MAP_GAME_OVER)) { RCP_SetupDL(&gMasterDisp, SETUPDL_23); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_46); @@ -4591,7 +4587,6 @@ void Map_801A7230(PlanetId planetId) { case PL_ANIM_BILLBOARD: case PL_ANIM_SPIN: RCP_SetupDL(&gMasterDisp, SETUPDL_64); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); break; @@ -4610,12 +4605,12 @@ void Map_801A7230(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } -void Map_801A74F4(PlanetId planetId) { +void Map_SolarRays_Draw(PlanetId planetId) { static f32 D_menu_801B6A74 = 0.0f; s32 alpha = sPlanets[PLANET_VENOM].alpha; @@ -4636,14 +4631,14 @@ void Map_801A74F4(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); D_menu_801B6A74 -= 0.2f; } -void Map_801A7684(PlanetId planetId) { +void Map_VenomCloud2_Draw(PlanetId planetId) { s32 r; s32 g; s32 b; @@ -4662,12 +4657,12 @@ void Map_801A7684(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B4A40); + gSPDisplayList(gMasterDisp++, gMapVenomCloudDL); Matrix_Pop(&gGfxMatrix); } -void Map_801A77B0(PlanetId planetId) { +void Map_PlanetShadow_Draw(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, SETUPDL_64); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sPlanets[planetId].alpha); @@ -4676,7 +4671,7 @@ void Map_801A77B0(PlanetId planetId) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[planetId]); - if ((planetId == 10) || (planetId == 7) || (planetId == 8)) { + if ((planetId == PLANET_TITANIA) || (planetId == PLANET_MACBETH) || (planetId == PLANET_ZONESS)) { Matrix_RotateY(gGfxMatrix, M_DTOR * 180.0f, MTXF_APPLY); } @@ -4690,7 +4685,7 @@ void Map_801A77B0(PlanetId planetId) { Matrix_Pop(&gGfxMatrix); } -void Map_801A791C(PlanetId planetId) { +void Map_Titania_DrawRings1(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, sPlanets[planetId].alpha); @@ -4707,12 +4702,12 @@ void Map_801A791C(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_604C540); + gSPDisplayList(gMasterDisp++, aMapTitaniaRings1DL); Matrix_Pop(&gGfxMatrix); } -void Map_801A7A84(PlanetId planetId) { +void Map_Titania_DrawRings2(PlanetId planetId) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 175, 175, sPlanets[planetId].alpha); @@ -4727,12 +4722,12 @@ void Map_801A7A84(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_604CDE0); + gSPDisplayList(gMasterDisp++, aMapTitaniaRings2DL); Matrix_Pop(&gGfxMatrix); } -void Map_801A7BEC(f32* zAngle, f32 next, f32 scale) { +void Map_VenomCloud_Draw(f32* zAngle, f32 next, f32 scale) { s32 alpha = sPlanets[PLANET_VENOM].alpha; if (sPlanets[PLANET_VENOM].alpha > 128) { @@ -4752,14 +4747,14 @@ void Map_801A7BEC(f32* zAngle, f32 next, f32 scale) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_6047E70); + gSPDisplayList(gMasterDisp++, aMapVenomCloudDL); Matrix_Pop(&gGfxMatrix); *zAngle += next; } -void Map_801A7D3C(PlanetId planetId) { +void Map_PlanetCleared2_Draw(PlanetId planetId) { Vec3f src; Vec3f dest; f32 scale; @@ -4793,10 +4788,10 @@ void Map_801A7D3C(PlanetId planetId) { Matrix_Pop(&gGfxMatrix); } -void Map_801A7F1C(PlanetId planetId) { +void Map_PlanetCleared_Draw(PlanetId planetId) { s32 alpha; - if (D_menu_801CD980 != 1) { + if (D_menu_801CD980 != true) { alpha = D_menu_801CD900[planetId]; } else { alpha = D_menu_801CD984; @@ -4819,13 +4814,13 @@ void Map_801A7F1C(PlanetId planetId) { Matrix_Pop(&gGfxMatrix); D_menu_801CEAB8[planetId] += 45.0f; - if (D_menu_801CD980 == 0) { + if (D_menu_801CD980 == false) { D_menu_801CEAF8[planetId] += 5.0f; } } } -void Map_801A809C(PlanetId planetId) { +void Map_PlanetMedal_Draw(PlanetId planetId) { static f32 D_menu_801B6A78 = 0.0f; s32 i; s32 alpha; @@ -4918,7 +4913,7 @@ void Map_801A809C(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); + gSPDisplayList(gMasterDisp++, aMapMedalDL); Matrix_Pop(&gGfxMatrix); @@ -4956,7 +4951,7 @@ void Map_801A809C(PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); + gSPDisplayList(gMasterDisp++, aMapMedalDL); Matrix_Pop(&gGfxMatrix); @@ -4964,7 +4959,7 @@ void Map_801A809C(PlanetId planetId) { } } -void Map_801A8738(void) { +void Map_CorneriaExplosion_Draw(void) { if (D_menu_801CEB34 >= 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); @@ -4972,9 +4967,9 @@ void Map_801A8738(void) { switch (D_menu_801CEB34) { case 0: - D_menu_801CEB3C += 0.15f; - if (D_menu_801CEB3C >= 0.7f) { - D_menu_801CEB3C = 0.8f; + sMapCorneriaExplosionScale += 0.15f; + if (sMapCorneriaExplosionScale >= 0.7f) { + sMapCorneriaExplosionScale = 0.8f; D_menu_801CEB34 = 2; D_menu_801CEB40 = 2.0f; } @@ -4984,13 +4979,13 @@ void Map_801A8738(void) { D_menu_801CEB40--; if (D_menu_801CEB40 <= 0.0f) { D_menu_801CEB34 = 3; - D_menu_801CEB3C = 0.7f; + sMapCorneriaExplosionScale = 0.7f; } break; case 3: D_menu_801CEB38 -= 8; - D_menu_801CEB3C -= 0.001f; + sMapCorneriaExplosionScale -= 0.001f; if (D_menu_801CEB38 < 0) { D_menu_801CEB38 = 0; @@ -5009,17 +5004,18 @@ void Map_801A8738(void) { Matrix_Copy(gGfxMatrix, &D_menu_801CDE20[PLANET_CORNERIA]); Matrix_RotateZ(gGfxMatrix, M_DTOR * -50.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 25.0f, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801CEB3C, D_menu_801CEB3C, D_menu_801CEB3C, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sMapCorneriaExplosionScale, sMapCorneriaExplosionScale, sMapCorneriaExplosionScale, + MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_60479D0); + gSPDisplayList(gMasterDisp++, aMapPlanetExplosionDL); Matrix_Pop(&gGfxMatrix); } } -void Map_801A89BC(PlanetId planetId, s32 arg1) { +void Map_PlanetExplosions_Draw(PlanetId planetId, PlanetExplosions explosionIdx) { s32 i; s32 temp2; f32 temp; @@ -5028,7 +5024,7 @@ void Map_801A89BC(PlanetId planetId, s32 arg1) { return; } - if (!D_menu_801CEB48[arg1]) { + if (!sPlanetExplosions[explosionIdx]) { return; } @@ -5042,70 +5038,70 @@ void Map_801A89BC(PlanetId planetId, s32 arg1) { gDPSetEnvColor(gMasterDisp++, 255, 0, 0, 0); for (i = 0; i < temp2; i++) { - switch (D_menu_801CEB58[arg1][i]) { + switch (D_menu_801CEB58[explosionIdx][i]) { case 0: - D_menu_801CEC48[arg1][i] += 0.1f; - if (D_menu_801CEC48[arg1][i] >= D_menu_801CECC0[arg1][i]) { - D_menu_801CEC48[arg1][i] = D_menu_801CECC0[arg1][i]; - D_menu_801CEB58[arg1][i] = 1; + D_menu_801CEC48[explosionIdx][i] += 0.1f; + if (D_menu_801CEC48[explosionIdx][i] >= D_menu_801CECC0[explosionIdx][i]) { + D_menu_801CEC48[explosionIdx][i] = D_menu_801CECC0[explosionIdx][i]; + D_menu_801CEB58[explosionIdx][i] = 1; } break; case 1: - D_menu_801CEE28[arg1][i]--; - if (D_menu_801CEE28[arg1][i] <= 0) { - D_menu_801CEB58[arg1][i] = 2; + D_menu_801CEE28[explosionIdx][i]--; + if (D_menu_801CEE28[explosionIdx][i] <= 0) { + D_menu_801CEB58[explosionIdx][i] = 2; } break; case 2: - D_menu_801CEBD0[arg1][i] -= 48; - if (D_menu_801CEBD0[arg1][i] < 0) { - D_menu_801CEBD0[arg1][i] = 0; - D_menu_801CEB58[arg1][i] = 3; + D_menu_801CEBD0[explosionIdx][i] -= 48; + if (D_menu_801CEBD0[explosionIdx][i] < 0) { + D_menu_801CEBD0[explosionIdx][i] = 0; + D_menu_801CEB58[explosionIdx][i] = 3; } break; case 3: - D_menu_801CEB58[arg1][i] = RAND_INT(3.0f); - D_menu_801CEBD0[arg1][i] = 255; - D_menu_801CEC48[arg1][i] = 0.0f; - D_menu_801CECC0[arg1][i] = 0.5f + RAND_FLOAT(0.3f); - D_menu_801CEE28[arg1][i] = 1 + RAND_INT(4.0f); + D_menu_801CEB58[explosionIdx][i] = RAND_INT(3.0f); + D_menu_801CEBD0[explosionIdx][i] = 255; + D_menu_801CEC48[explosionIdx][i] = 0.0f; + D_menu_801CECC0[explosionIdx][i] = 0.5f + RAND_FLOAT(0.3f); + D_menu_801CEE28[explosionIdx][i] = 1 + RAND_INT(4.0f); temp = 110.0f; - if (arg1 == 1) { + if (explosionIdx == EXPLOSIONS_KATINA) { temp = 50.0f; } - D_menu_801CED38[arg1][i] = temp + RAND_INT(30.0f); - D_menu_801CEDB0[arg1][i] = -10.0f + RAND_FLOAT(-60.0f); + D_menu_801CED38[explosionIdx][i] = temp + RAND_INT(30.0f); + D_menu_801CEDB0[explosionIdx][i] = -10.0f + RAND_FLOAT(-60.0f); break; } - if ((D_menu_801CECC0[arg1][i] == 0.0f) || (D_menu_801CEBD0[arg1][i] == 0)) { + if ((D_menu_801CECC0[explosionIdx][i] == 0.0f) || (D_menu_801CEBD0[explosionIdx][i] == 0)) { continue; } - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 200, 200, D_menu_801CEBD0[arg1][i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 200, 200, D_menu_801CEBD0[explosionIdx][i]); Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[planetId], MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801CEDB0[arg1][i], MTXF_APPLY); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CED38[arg1][i], 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801CEC48[arg1][i], D_menu_801CEC48[arg1][i], D_menu_801CEC48[arg1][i], - MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801CEDB0[explosionIdx][i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CED38[explosionIdx][i], 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, D_menu_801CEC48[explosionIdx][i], D_menu_801CEC48[explosionIdx][i], + D_menu_801CEC48[explosionIdx][i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_60479D0); + gSPDisplayList(gMasterDisp++, aMapPlanetExplosionDL); Matrix_Pop(&gGfxMatrix); } } -void Map_801A8F40(void) { +void Map_Cursor_draw(void) { static f32 D_menu_801B6A7C = 0.0f; s32 temp; @@ -5114,24 +5110,23 @@ void Map_801A8F40(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_23); - temp = Math_SmoothStepToF(&D_menu_801CEAA8, D_menu_801CEAB0, 0.1f, 100.0f, 1.0f); - + temp = Math_SmoothStepToF(&sCursorYpos, D_menu_801CEAB0, 0.1f, 100.0f, 1.0f); if (temp == 0.0f) { if (D_menu_801CEAB0 == D_menu_801CEAAC) { - D_menu_801CEAA8 = D_menu_801CEAAC + 50.0f; + sCursorYpos = D_menu_801CEAAC + 50.0f; } } Matrix_Push(&gGfxMatrix); Matrix_Mult(gGfxMatrix, &D_menu_801CDA60[sCurrentPlanetId], MTXF_APPLY); - Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801CEAA8, 0.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, sCursorYpos, 0.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B6A7C, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 3.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601DCF0); + gSPDisplayList(gMasterDisp++, aMapCursorDL); Matrix_Pop(&gGfxMatrix); @@ -5139,53 +5134,53 @@ void Map_801A8F40(void) { } } -void Map_801A914C(void) { - D_menu_801CEAA8 = 140.0f; +void Map_PositionCursor(void) { + sCursorYpos = 140.0f; if (sCurrentPlanetId == PLANET_CORNERIA) { - D_menu_801CEAA8 = 230.0f; + sCursorYpos = 230.0f; } if (sCurrentPlanetId == PLANET_AREA_6) { - D_menu_801CEAA8 = 210.0f; + sCursorYpos = 210.0f; } if (sCurrentPlanetId == PLANET_SOLAR) { - D_menu_801CEAA8 = 250.0f; + sCursorYpos = 250.0f; } if (sCurrentPlanetId == PLANET_SECTOR_X) { - D_menu_801CEAA8 = 150.0f; + sCursorYpos = 150.0f; } if (sCurrentPlanetId == PLANET_SECTOR_Y) { - D_menu_801CEAA8 = 150.0f; + sCursorYpos = 150.0f; } if (sCurrentPlanetId == PLANET_SECTOR_Z) { - D_menu_801CEAA8 = 150.0f; + sCursorYpos = 150.0f; } if (sCurrentPlanetId == PLANET_VENOM) { - D_menu_801CEAA8 = 300.0f; + sCursorYpos = 300.0f; } - D_menu_801CEAAC = D_menu_801CEAA8; - D_menu_801CEAB0 = D_menu_801CEAA8; + D_menu_801CEAAC = sCursorYpos; + D_menu_801CEAB0 = sCursorYpos; } -void Map_801A9224(void) { +void Map_MeteoMeteors_Draw(void) { s32 i; s32 mask; if ((sPlanets[PLANET_METEO].alpha != 0) || (sCurrentPlanetId == PLANET_METEO)) { - if ((sCurrentPlanetId == PLANET_METEO) && (D_menu_801CD944 == 2) && (D_menu_801CD95C != 0)) { + if ((sCurrentPlanetId == PLANET_METEO) && (sMapState == MAP_ZOOM_PLANET) && (D_menu_801CD95C != 0)) { mask = 0x00000001; } else { mask = 0xFFFFFFFF; } - if ((D_menu_801CD944 == 3) || ((sCurrentPlanetId == PLANET_METEO) && (D_menu_801CD944 != 7))) { + if ((sMapState == MAP_IDLE) || ((sCurrentPlanetId == PLANET_METEO) && (sMapState != MAP_GAME_OVER))) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_64); @@ -5193,21 +5188,20 @@ void Map_801A9224(void) { } if ((gGameFrameCount & mask) != 0) { - for (i = 0; i < 42; i++) { + for (i = 0; i < ARRAY_COUNT(sMapMeteors); i++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFA38[i].angle, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_menu_801AFA38[i].x, D_menu_801AFA38[i].y, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * -D_menu_801AFA38[i].angle, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sMapMeteors[i].angle, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sMapMeteors[i].x, sMapMeteors[i].y, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -sMapMeteors[i].angle, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); - Matrix_Scale(gGfxMatrix, D_menu_801AFA38[i].scale, D_menu_801AFA38[i].scale, D_menu_801AFA38[i].scale, - MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sMapMeteors[i].scale, sMapMeteors[i].scale, sMapMeteors[i].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[PLANET_METEO]); + gSPDisplayList(gMasterDisp++, sMapPlanets[PLANET_METEO]); Matrix_Pop(&gGfxMatrix); } @@ -5215,7 +5209,7 @@ void Map_801A9224(void) { } } -void Map_801A9448(void) { +void Map_Area6Ships_Draw(void) { Vec3f src; Vec3f dest; f32 x1; @@ -5231,13 +5225,13 @@ void Map_801A9448(void) { return; } - if ((sCurrentPlanetId == PLANET_AREA_6) && (D_menu_801CD944 == 2) && (D_menu_801CD95C != 0)) { + if ((sCurrentPlanetId == PLANET_AREA_6) && (sMapState == MAP_ZOOM_PLANET) && (D_menu_801CD95C != 0)) { mask = 0x00000001; } else { mask = 0xFFFFFFFF; } - if ((D_menu_801CD944 == 3) || (sCurrentPlanetId == PLANET_AREA_6)) { + if ((sMapState == MAP_IDLE) || (sCurrentPlanetId == PLANET_AREA_6)) { RCP_SetupDL(&gMasterDisp, SETUPDL_23); } else { RCP_SetupDL(&gMasterDisp, SETUPDL_46); @@ -5249,26 +5243,26 @@ void Map_801A9448(void) { dest.z = 0.0f; if ((gGameFrameCount & mask) != 0) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(sMapArea6Ships); i++) { Matrix_Push(&gGfxMatrix); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801AFCD8[i].angle, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_menu_801AFCD8[i].x, D_menu_801AFCD8[i].y, 0.0f, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * -(D_menu_801AFCD8[i].angle), MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sMapArea6Ships[i].angle, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sMapArea6Ships[i].x, sMapArea6Ships[i].y, 0.0f, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * -(sMapArea6Ships[i].angle), MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B6A80, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801AFCD8[i].scale, D_menu_801AFCD8[i].scale, D_menu_801AFCD8[i].scale, + Matrix_Scale(gGfxMatrix, sMapArea6Ships[i].scale, sMapArea6Ships[i].scale, sMapArea6Ships[i].scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); Matrix_MultVec3f(gGfxMatrix, &dest, &src); - x = D_menu_801CE960[PLANET_SOLAR].x - src.x; - y = D_menu_801CE960[PLANET_SOLAR].y - src.y; - z = D_menu_801CE960[PLANET_SOLAR].z - src.z; + x = sPlanetPositions[PLANET_SOLAR].x - src.x; + y = sPlanetPositions[PLANET_SOLAR].y - src.y; + z = sPlanetPositions[PLANET_SOLAR].z - src.z; x1 = Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); y1 = -Math_Atan2F(x, z); @@ -5283,120 +5277,122 @@ void Map_801A9448(void) { Matrix_MultVec3f(gCalcMatrix, &dest, &src); Lights_SetOneLight(&gMasterDisp, src.x, src.y, src.z, 80, 80, 60, 0, 0, 0); - gSPDisplayList(gMasterDisp++, D_MAP_601E9A0); + gSPDisplayList(gMasterDisp++, aMapArea6ShipDL); Matrix_Pop(&gGfxMatrix); } } } -void Map_801A9814(void) { - if (D_menu_801B8280 != 0) { +void Map_Wipe_Draw(void) { + if (sLevelStartState != 0) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, D_menu_801CD9F4, D_menu_801CD9F8, D_menu_801CD9FC, D_menu_801CDA00, D_menu_801CDA04, - D_menu_801CDA08, D_menu_801CDA20, D_menu_801CDA24, D_menu_801CDA28, MTXF_APPLY); + Matrix_LookAt(gGfxMatrix, sMapCamEyeX, sMapCamEyeY, sMapCamEyeZ, sMapCamAtX, sMapCamAtY, sMapCamAtZ, sMapCamUpX, + sMapCamUpY, sMapCamUpZ, MTXF_APPLY); Matrix_Translate(gGfxMatrix, D_menu_801CEA58, D_menu_801CEA5C, D_menu_801CEA60, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); + Wipe_Draw(WIPE_VERTICAL, sWipeHeight); Matrix_Pop(&gGfxMatrix); } } -void Map_801A9910(void) { - static s32 D_menu_801B6A84[] = { 1, 13, 12, 11, 6, 2, 4, 10, 8, 0, 9, 5, 3, 7, 7 }; +void Map_TitleCards_Draw(void) { + static s32 sMapCurPlanetCards[] = { 1, 13, 12, 11, 6, 2, 4, 10, 8, 0, 9, 5, 3, 7, 7 }; s32 i; - s32 var_s0 = D_menu_801B6A84[sCurrentPlanetId]; + s32 planetCardIdx = sMapCurPlanetCards[sCurrentPlanetId]; RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801CEA6C); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) sMapPlanetCardAlpha); - for (i = 0; i < D_menu_801AF834[var_s0].height; i++) { - TextureRect_IA8(&gMasterDisp, D_menu_801AF834[var_s0].texture + (D_menu_801AF834[var_s0].width * i), - D_menu_801AF834[var_s0].width, 1, D_menu_801AF834[var_s0].xPos, 20.0f + (1.0f * i), 1.0f, 1.0f); + for (i = 0; i < sPlanetNameCards[planetCardIdx].height; i++) { + Lib_TextureRect_IA8(&gMasterDisp, + sPlanetNameCards[planetCardIdx].texture + (sPlanetNameCards[planetCardIdx].width * i), + sPlanetNameCards[planetCardIdx].width, 1, sPlanetNameCards[planetCardIdx].xPos, + 20.0f + (1.0f * i), 1.0f, 1.0f); } - Math_SmoothStepToF(&D_menu_801CEA6C, 255.0f, D_menu_801CEA70, 10.0f, 1.0f); + Math_SmoothStepToF(&sMapPlanetCardAlpha, 255.0f, sMapPlanetCardAlphaScale, 10.0f, 1.0f); - D_menu_801CEA70 *= 1.08; + sMapPlanetCardAlphaScale *= 1.08; } void Map_801A9A8C(void) { s32 i; - s32 sp58; + s32 planetIdx; u8* missionNoTex; - static f32 D_menu_801B6AC0[2] = { 91.0f, 207.0f }; - static f32 D_menu_801B6AC8[2] = { 61.0f, 61.0f }; + static f32 sCardXpos[2] = { 91.0f, 207.0f }; + static f32 sCardYpos[2] = { 61.0f, 61.0f }; switch (gCurrentLevel) { case LEVEL_CORNERIA: missionNoTex = aLargeText_1; - sp58 = 0; + planetIdx = 0; break; case LEVEL_METEO: missionNoTex = aLargeText_2; - sp58 = 1; + planetIdx = 1; break; case LEVEL_SECTOR_Y: missionNoTex = aLargeText_2; - sp58 = 2; + planetIdx = 2; break; case LEVEL_FORTUNA: missionNoTex = aLargeText_3; - sp58 = 3; + planetIdx = 3; break; case LEVEL_KATINA: missionNoTex = aLargeText_3; - sp58 = 4; + planetIdx = 4; break; case LEVEL_AQUAS: missionNoTex = aLargeText_3; - sp58 = 5; + planetIdx = 5; break; case LEVEL_SECTOR_X: missionNoTex = aLargeText_4; - sp58 = 6; + planetIdx = 6; break; case LEVEL_SOLAR: missionNoTex = aLargeText_4; - sp58 = 7; + planetIdx = 7; break; case LEVEL_ZONESS: missionNoTex = aLargeText_4; - sp58 = 8; + planetIdx = 8; break; case LEVEL_TITANIA: missionNoTex = aLargeText_5; - sp58 = 9; + planetIdx = 9; break; case LEVEL_MACBETH: missionNoTex = aLargeText_5; - sp58 = 10; + planetIdx = 10; break; case LEVEL_SECTOR_Z: missionNoTex = aLargeText_5; - sp58 = 11; + planetIdx = 11; break; case LEVEL_BOLSE: missionNoTex = aLargeText_6; - sp58 = 12; + planetIdx = 12; break; case LEVEL_AREA_6: missionNoTex = aLargeText_6; - sp58 = 13; + planetIdx = 13; break; } @@ -5409,25 +5405,27 @@ void Map_801A9A8C(void) { } #endif - TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, D_menu_801B6AC0[0], D_menu_801B6AC8[0], 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, missionNoTex, 16, 15, D_menu_801B6AC0[1], D_menu_801B6AC8[1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextMissionNo, 112, 19, sCardXpos[0], sCardYpos[0], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, missionNoTex, 16, 15, sCardXpos[1], sCardYpos[1], 1.0f, 1.0f); - for (i = 0; i < D_menu_801AF834[sp58].height; i++) { - TextureRect_IA8(&gMasterDisp, D_menu_801AF834[sp58].texture + (D_menu_801AF834[sp58].width * i), - D_menu_801AF834[sp58].width, 1, D_menu_801AF834[sp58].xPos, 94.0f + (1.0f * i), 1.0f, 1.0f); + for (i = 0; i < sPlanetNameCards[planetIdx].height; i++) { + Lib_TextureRect_IA8(&gMasterDisp, sPlanetNameCards[planetIdx].texture + (sPlanetNameCards[planetIdx].width * i), + sPlanetNameCards[planetIdx].width, 1, sPlanetNameCards[planetIdx].xPos, 94.0f + (1.0f * i), + 1.0f, 1.0f); } - for (i = 0; i < D_menu_801AF914[sp58].height; i++) { - TextureRect_IA8(&gMasterDisp, D_menu_801AF914[sp58].texture + (D_menu_801AF914[sp58].width * i), - D_menu_801AF914[sp58].width, 1, D_menu_801AF914[sp58].xPos, 140.0f + (1.0f * i), 1.0f, 1.0f); + for (i = 0; i < sPlanetTitleCards[planetIdx].height; i++) { + Lib_TextureRect_IA8( + &gMasterDisp, sPlanetTitleCards[planetIdx].texture + (sPlanetTitleCards[planetIdx].width * i), + sPlanetTitleCards[planetIdx].width, 1, sPlanetTitleCards[planetIdx].xPos, 140.0f + (1.0f * i), 1.0f, 1.0f); } } void Map_801A9DE8(void) { s32 mask; - if ((D_menu_801CD978 == 0) && - !((D_menu_801CD944 == 3) || (D_menu_801CD944 == 6) || ((D_menu_801CD944 == 7) && (D_menu_801CD948 == 2)))) { + if ((D_menu_801CD978 == 0) && !((sMapState == MAP_IDLE) || (sMapState == MAP_PATH_CHANGE) || + ((sMapState == MAP_GAME_OVER) && (sMapSubState == 2)))) { return; } @@ -5438,55 +5436,55 @@ void Map_801A9DE8(void) { } if ((gGameFrameCount & mask) != 0) { - Map_801AD7EC(254, 16, gLifeCount[gPlayerNum]); + Map_RemainingLives_Draw(254, 16, gLifeCount[gPlayerNum]); } if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_GAME_OVER)) { if (D_menu_801CD83C < gTotalHits) { D_menu_801CD83C = gTotalHits; } - Map_801A9EE4(); - Map_801A9FD4(0); + Map_TotalHits_Draw(); + Map_801A9FD4(false); } } -void Map_801A9EE4(void) { +void Map_TotalHits_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(24, 14, 1.0f, 1.0f, "TOTAL HITS"); - Graphics_DisplaySmallNumber(71 - (func_hud_8008BCBC(gTotalHits) * 8), 24, gTotalHits); + Graphics_DisplaySmallNumber(71 - (HUD_CountDigits(gTotalHits) * 8), 24, gTotalHits); Graphics_DisplaySmallText(143, 14, 1.0f, 1.0f, "TOP"); - Graphics_DisplaySmallNumber(167 - (func_hud_8008BCBC(D_menu_801CD83C) * 8), 24, D_menu_801CD83C); + Graphics_DisplaySmallNumber(167 - (HUD_CountDigits(D_menu_801CD83C) * 8), 24, D_menu_801CD83C); } -void Map_801A9FD4(s32 arg0) { +void Map_801A9FD4(bool arg0) { s32 i; - s32 var_s3; + s32 curMission; f32 var_fs0, var_fs1; s32 pad[2]; f32 temp = 16.0f; if (arg0) { - var_s3 = gMissionNumber; + curMission = gMissionNumber; } else { if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_ENDING)) { - var_s3 = gMissionNumber; + curMission = gMissionNumber; } if (gLastGameState == GSTATE_GAME_OVER) { - var_s3 = D_menu_801CD9AC; + curMission = D_menu_801CD9AC; } } - Map_801AA1CC(var_s3); + Map_PathLineBox_Draw(curMission); if ((gLastGameState == GSTATE_PLAY) || (gLastGameState == GSTATE_ENDING)) { - var_s3 = 7; + curMission = 7; } if (gLastGameState == GSTATE_GAME_OVER) { - var_s3++; + curMission++; } Matrix_Push(&gGfxMatrix); @@ -5495,23 +5493,23 @@ void Map_801A9FD4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); - for (var_fs0 = 0.0f, var_fs1 = -41.5f, i = 0; i < var_s3; i++, var_fs0 += 24.0f + temp, var_fs1 += 13.8f) { + for (var_fs0 = 0.0f, var_fs1 = -41.5f, i = 0; i < curMission; i++, var_fs0 += 24.0f + temp, var_fs1 += 13.8f) { if (gMissionPlanet[i] != PLANET_NONE) { - Map_801AA434(i, 28.0f + var_fs0, 182.0f, gMissionPlanet[i]); - Map_801AA778(i, var_fs1, -25.4f, gMissionPlanet[i]); + Map_PathInfo_Draw(i, 28.0f + var_fs0, 182.0f, gMissionPlanet[i]); + Map_PathPlanet_Draw(i, var_fs1, -25.4f, gMissionPlanet[i]); } } Matrix_Pop(&gGfxMatrix); } -void Map_801AA1CC(s32 arg0) { +void Map_PathLineBox_Draw(s32 curMission) { s32 i; f32 x; s32 r; s32 g; s32 b; - s32 temp; + s32 pathId; f32 y = 182.0f; f32 x2 = 16.0f; PlanetId* ptr = &gMissionPlanet[0]; @@ -5521,9 +5519,9 @@ void Map_801AA1CC(s32 arg0) { if (i < 6) { r = g = b = 255; - if (i < arg0) { - temp = Map_GetPathId(*ptr, *(ptr + 1)); - switch (sPaths[temp].type) { + if (i < curMission) { + pathId = Map_GetPathId(*ptr, *(ptr + 1)); + switch (sPaths[pathId].type) { case 0: r = 16; g = 64; @@ -5546,19 +5544,19 @@ void Map_801AA1CC(s32 arg0) { } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } - TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, 28.0f + x + 24.0f, y + 11.0f, 2.0f, 0.2f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapWhiteSquareTex, 8, 8, 28.0f + x + 24.0f, y + 11.0f, 2.0f, 0.2f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_RGBA16(&gMasterDisp, D_MAP_6047550, 24, 24, 28.0f + x, y, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapPathBoxTex, 24, 24, 28.0f + x, y, 1.0f, 1.0f); } } -void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { +void Map_PathInfo_Draw(s32 missionIdx, f32 x, f32 y, s32 idx) { s32 i; f32 x2; s32 pad; s32 mask; - s32 temp; + s32 curMission; static char* D_menu_801B6AD0[] = { "P", "S", "F" }; static s32 D_menu_801B6ADC[] = { 255, 0, 30 }; static s32 D_menu_801B6AE8[] = { 30, 179, 30 }; @@ -5570,21 +5568,22 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { Graphics_DisplaySmallText(x + 12.0f - Graphics_GetSmallTextWidth(sPlanetNames[idx]) * 0.5f, y - 8.0f, 1.0f, 1.0f, sPlanetNames[idx]); - Graphics_DisplaySmallNumber(x + 15.0f - ((func_hud_8008BCBC(gMissionHitCount[arg0]) - 1) * 8), y + 24.0f + 1.0f, - gMissionHitCount[arg0]); + Graphics_DisplaySmallNumber(x + 15.0f - ((HUD_CountDigits(gMissionHitCount[missionIdx]) - 1) * 8), y + 24.0f + 1.0f, + gMissionHitCount[missionIdx]); if (gLastGameState == GSTATE_PLAY) { - temp = gMissionNumber; - } - if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) { - temp = gMissionNumber + 1; + curMission = gMissionNumber; } - if (arg0 < temp) { + if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) { + curMission = gMissionNumber + 1; + } + + if (missionIdx < curMission) { mask = 0x00FF0000; x2 = 0.0f; for (i = 0; i < 3; i++, x2 += 9.0f) { - if ((gMissionTeamStatus[arg0] & mask)) { + if ((gMissionTeamStatus[missionIdx] & mask) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801B6ADC[i], D_menu_801B6AE8[i], D_menu_801B6AF4[i], 255); Graphics_DisplaySmallText((s32) x + x2 - 1.0f, (s32) y + 24.0f + 8.0f + 2.0f, 1.0f, 1.0f, @@ -5595,7 +5594,7 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { } } -void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { +void Map_PathPlanet_Draw(s32 missionIdx, f32 x, f32 y, PlanetId planetId) { s32 mask = 0xFFFFFFFF; if ((gGameState == GSTATE_MAP) && (planetId == sCurrentPlanetId)) { @@ -5616,7 +5615,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Scale(gGfxMatrix, 0.11f, 0.11f, 0.11f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); @@ -5624,7 +5623,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5644,13 +5643,13 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } break; @@ -5671,7 +5670,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5693,7 +5692,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5715,7 +5714,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); Matrix_Pop(&gGfxMatrix); } @@ -5735,7 +5734,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B68F8[sPlanets[planetId].id]); + gSPDisplayList(gMasterDisp++, sMapPlanets[sPlanets[planetId].id]); if (sPlanets[planetId].anim == PL_ANIM_SPIN) { if (planetId != PLANET_VENOM && planetId != PLANET_AQUAS) { @@ -5745,7 +5744,7 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } - gSPDisplayList(gMasterDisp++, D_menu_801B4A40); + gSPDisplayList(gMasterDisp++, gMapVenomCloudDL); } Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -5756,12 +5755,12 @@ void Map_801AA778(s32 arg0, f32 x, f32 y, PlanetId planetId) { break; } - if (gMissionMedal[arg0] != 0) { - Map_801AB17C(x, y, 0.0f); + if (gMissionMedal[missionIdx] != 0) { + Map_PathPlanetMedal_Draw(x, y, 0.0f); } } -void Map_801AB17C(f32 x, f32 y, f32 z) { +void Map_PathPlanetMedal_Draw(f32 x, f32 y, f32 z) { static f32 scale = 0.23f; static f32 xPos = 4.4f; static f32 yPos = 1.0f; @@ -5775,21 +5774,21 @@ void Map_801AB17C(f32 x, f32 y, f32 z) { Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); + gSPDisplayList(gMasterDisp++, aMapMedalDL); Matrix_Pop(&gGfxMatrix); } -void Map_801AB284(void) { +void Map_BriefingRadio_Setup(void) { D_menu_801CD940 = 0; - gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + gRadioMsg = sBriefingMsg[sCurrentPlanetId][D_menu_801CD940]; gRadioMsgRadioId = D_menu_801AF420[D_menu_801CD940]; D_menu_801CF018 = 100; gRadioPrintPosX = 78; gRadioPrintPosY = 166; } -void Map_801AB300(void) { +void Map_BriefingRadio_Update(void) { if (gRadioStateTimer > 0) { gRadioStateTimer--; } @@ -5802,7 +5801,7 @@ void Map_801AB300(void) { break; case 100: - D_menu_801CEA74 = 0; + sTeamStatusAlpha = 0; gCurrentRadioPortrait = 0 + gRadioMsgRadioId; D_menu_801CF018 = 1; gRadioTextBoxScaleY = 0.0f; @@ -5822,7 +5821,7 @@ void Map_801AB300(void) { } D_menu_801CD940 = 1; - gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + gRadioMsg = sBriefingMsg[sCurrentPlanetId][D_menu_801CD940]; Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); @@ -5830,13 +5829,13 @@ void Map_801AB300(void) { gRadioStateTimer = Message_GetCharCount(gRadioMsg) * 2; gCurrentRadioPortrait = gRadioMsgRadioId; D_menu_801CF018 = 4; - D_menu_801CD9A0 = 1; + D_menu_801CD9A0 = true; break; case 1: - D_menu_801CEA74 += 8; - if (D_menu_801CEA74 > 255) { - D_menu_801CEA74 = 255; + sTeamStatusAlpha += 8; + if (sTeamStatusAlpha > 255) { + sTeamStatusAlpha = 255; gRadioTextBoxScaleY = 1.3f; AUDIO_PLAY_SFX(NA_SE_COMPUTER_NOISE, gDefaultSfxSource, 4); @@ -5872,7 +5871,7 @@ void Map_801AB300(void) { D_menu_801CD9A4 = 1; } - if (D_menu_801CD9A0 == 1) { + if (D_menu_801CD9A0 == true) { D_menu_801CF124 += 0.7f; gRadioMsgCharIndex = D_menu_801CF124; } else { @@ -5900,14 +5899,14 @@ void Map_801AB300(void) { break; } else { D_menu_801CD940 = 1; - gRadioMsg = D_menu_801AF428[sCurrentPlanetId][D_menu_801CD940]; + gRadioMsg = sBriefingMsg[sCurrentPlanetId][D_menu_801CD940]; Audio_PlayVoice(Message_IdFromPtr(gRadioMsg)); gRadioMsgRadioId = D_menu_801AF420[D_menu_801CD940]; gCurrentRadioPortrait = gRadioMsgRadioId; gRadioMsgCharIndex = 0; D_menu_801CF124 = 0.0f; gRadioStateTimer = Message_GetCharCount(gRadioMsg) * 2; - D_menu_801CD9A0 = 1; + D_menu_801CD9A0 = true; D_menu_801CD9A4 = 0; D_menu_801CF018 = 4; } @@ -5935,24 +5934,24 @@ void Map_801AB300(void) { case 8: gCurrentRadioPortrait = gRadioMsgRadioId; gRadioTextBoxScaleY = 1.3f; - D_menu_801CEA74 = 255; + sTeamStatusAlpha = 255; break; } if ((D_menu_801CF018 > 0) && (D_menu_801CF018 != 100)) { - Map_801AB978(gCurrentRadioPortrait); - Map_801AB978(D_menu_801AF420[!D_menu_801CD940]); + Map_BriefingRadio_Draw(gCurrentRadioPortrait); + Map_BriefingRadio_Draw(D_menu_801AF420[!D_menu_801CD940]); func_radio_800BB388(); } } -void Map_801AB978(s32 arg0) { +void Map_BriefingRadio_Draw(s32 arg0) { s32 i; f32 xPos; f32 yPos; - s32 sp90[3]; - static f32 D_menu_801B6B0C[3] = { 205.0f, 237.0f, 269.0f }; - static u16* D_menu_801B6B18[3] = { D_MAP_6032A60, D_MAP_6044180, D_MAP_6032440 }; + s32 alpha[3]; + static f32 sTeamStatusPos[3] = { 205.0f, 237.0f, 269.0f }; + static u16* sRadioCharacterFaces[3] = { aMapRadioCharPeppyTex, aMapRadioCharSlippyTex, aMapRadioCharFalcoTex }; switch (arg0) { case 10: @@ -5962,30 +5961,31 @@ void Map_801AB978(s32 arg0) { case 20: case 21: - if (D_menu_801CEA74 != 0) { + if (sTeamStatusAlpha != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801CEA74); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sTeamStatusAlpha); xPos = 205.0f; yPos = 77.0f; for (i = 0; i < 12; i++) { - TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * i), 92, 4, xPos, yPos + (i * 4.0f), 1.0f, - 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * i), 92, 4, xPos, yPos + (i * 4.0f), + 1.0f, 1.0f); } - TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * 12), 92, 3, xPos, yPos + 48.0f, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, D_MAP_6044820 + (92 * 4 * 12), 92, 3, xPos, yPos + 48.0f, 1.0f, + 1.0f); if (arg0 == 21) { - TextureRect_RGBA16(&gMasterDisp, D_MAP_6046CD0, 32, 34, xPos + 47.0, yPos, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, D_MAP_6046CD0, 32, 34, xPos + 47.0, yPos, 1.0f, 1.0f); } for (i = 0; i < 3; i++) { switch (gSavedTeamShields[3 - i]) { case -1: case -2: - if (D_menu_801CEA74 > 32) { - sp90[i] = 32; + if (sTeamStatusAlpha > 32) { + alpha[i] = 32; } else { - sp90[i] = D_menu_801CEA74; + alpha[i] = sTeamStatusAlpha; } break; @@ -5993,31 +5993,31 @@ void Map_801AB978(s32 arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((gGameFrameCount & 0x10) != 0) { - Graphics_DisplaySmallText(D_menu_801B6B0C[i], 131 + 28, 1.0f, 1.0f, "OK !"); + Graphics_DisplaySmallText(sTeamStatusPos[i], 131 + 28, 1.0f, 1.0f, "OK !"); } - sp90[i] = D_menu_801CEA74; + alpha[i] = sTeamStatusAlpha; break; default: - sp90[i] = D_menu_801CEA74; + alpha[i] = sTeamStatusAlpha; break; } RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp90[i]); - TextureRect_RGBA16(&gMasterDisp, D_menu_801B6B18[i], 28, 28, D_menu_801B6B0C[i], 131.0f, 1.0f, - 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); + Lib_TextureRect_RGBA16(&gMasterDisp, sRadioCharacterFaces[i], 28, 28, sTeamStatusPos[i], 131.0f, + 1.0f, 1.0f); if ((gSavedTeamShields[3 - i] < 0) && (gSavedTeamShields[3 - i] != -2)) { - Map_801ABCDC(i, D_menu_801CEA74); + Map_TeamDownWrench_Draw(i, sTeamStatusAlpha); } } } } } -void Map_801ABCDC(s32 arg0, s32 alpha) { - static s32 D_menu_801B6B24[] = { 81.0f, 125.0f, 170.0f }; +void Map_TeamDownWrench_Draw(s32 teamIdx, s32 alpha) { + static s32 sTeamDownXpos[] = { 81.0f, 125.0f, 170.0f }; Matrix_Push(&gGfxMatrix); @@ -6032,7 +6032,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B6B24[arg0], -35.0f, -400.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTeamDownXpos[teamIdx], -35.0f, -400.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * -40.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 1.0f, MTXF_APPLY); @@ -6043,7 +6043,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B6B24[arg0], -35.0f, -400.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTeamDownXpos[teamIdx], -35.0f, -400.0f, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, M_DTOR * 40.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 1.0f, MTXF_APPLY); @@ -6055,7 +6055,7 @@ void Map_801ABCDC(s32 arg0, s32 alpha) { Matrix_Pop(&gGfxMatrix); } -void Map_801ABF1C(void) { +void Map_GralPepperFace_Draw(void) { Matrix_Push(&gGfxMatrix); { Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, -400.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); @@ -6069,13 +6069,13 @@ void Map_801ABF1C(void) { Matrix_Translate(gGfxMatrix, D_menu_801CEA88, D_menu_801CEA8C, D_menu_801CEA90, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEA94, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_Scale(gGfxMatrix, D_menu_801CEA78, D_menu_801CEA7C, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AFA30[D_menu_801CD810]); + gSPDisplayList(gMasterDisp++, sMapGralPepperFaceDLs[D_menu_801CD810]); Matrix_SetGfxMtx(&gMasterDisp); @@ -6093,14 +6093,14 @@ void Map_801ABF1C(void) { Matrix_Translate(gGfxMatrix, D_menu_801CEA88, D_menu_801CEA8C - 1.5f, D_menu_801CEA90, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801CEA94, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_Scale(gGfxMatrix, D_menu_801CEA80, D_menu_801CEA84, 3.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_MAP_604C350); + gSPDisplayList(gMasterDisp++, aMapTvScreenGlowDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } Matrix_Pop(&gGfxMatrix); @@ -6108,7 +6108,7 @@ void Map_801ABF1C(void) { Matrix_Pop(&gGfxMatrix); } -void Map_801AC200(s32 index) { +void Map_Path_Draw(s32 index) { Vec3f v; f32 r; f32 r2; @@ -6138,21 +6138,21 @@ void Map_801AC200(s32 index) { break; case 100: - D_menu_801CD9BC = 5; + sMapTimer2 = 5; D_menu_801CEEA4 = 10; break; case 10: - if (D_menu_801CD9BC != 0) { - break; // investigate + if (sMapTimer2 != 0) { + break; } - D_menu_801CD9BC = 5; + sMapTimer2 = 5; D_menu_801CEEA4 = 20; break; case 20: - if (D_menu_801CD9BC != 0) { - break; // investigate + if (sMapTimer2 != 0) { + break; } D_menu_801CEEA0++; @@ -6190,13 +6190,13 @@ void Map_801AC200(s32 index) { } if (sPaths[index].unk_14 == 5) { - Map_801AC80C(sPaths[index].type); + Map_PathLine_Draw(sPaths[index].type); } else { - Map_801AC530(index); + Map_Arwing_Draw(index); } } -void Map_801AC530(s32 index) { +void Map_Arwing_Draw(s32 index) { f32 dirX; f32 dirY; f32 dirZ; @@ -6233,9 +6233,9 @@ void Map_801AC530(s32 index) { Matrix_MultVec3f(gGfxMatrix, &src, &dest); - x = D_menu_801CE960[PLANET_SOLAR].x - dest.x; - y = D_menu_801CE960[PLANET_SOLAR].y - dest.y; - z = D_menu_801CE960[PLANET_SOLAR].z - dest.z; + x = sPlanetPositions[PLANET_SOLAR].x - dest.x; + y = sPlanetPositions[PLANET_SOLAR].y - dest.y; + z = sPlanetPositions[PLANET_SOLAR].z - dest.z; x1 = Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))); y1 = -Math_Atan2F(x, z); @@ -6259,7 +6259,7 @@ void Map_801AC530(s32 index) { Matrix_Pop(&gGfxMatrix); } -void Map_801AC80C(PathType pathType) { +void Map_PathLine_Draw(PathType pathType) { static f32 D_menu_801B6B30 = 0.0f; s32 r; s32 g; @@ -6284,7 +6284,7 @@ void Map_801AC80C(PathType pathType) { Matrix_Translate(gGfxMatrix, D_menu_801CEEB0.x, D_menu_801CEEB0.y, D_menu_801CEEB0.z, MTXF_APPLY); - Map_801AD048(); + Map_CamMatrixRot(); Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B6B30, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 10.0f, 10.0f, 10.0f, MTXF_APPLY); @@ -6298,37 +6298,7 @@ void Map_801AC80C(PathType pathType) { D_menu_801B6B30 -= 45.0f; } -u32 padding_801B6B34[3] = { 0, 0, 0 }; - -CameraPoint D_menu_801B6B40[] = { - { { 0.0f, 260.47226f, 1477.2115f }, { 0.0f, -17.364819f, -98.480774f } }, - { { 0.0f, 20.159666f, 759.7326f }, { 0.0f, -2.652588f, -99.96481f } }, - { { -45.790363f, 0.712088f, 336.90164f }, { 13.467754f, -0.209438f, -99.08872f } }, - { { -59.033607f, -7.952868f, 104.171906f }, { 49.19467f, 6.62739f, -86.80992f } }, - { { -39.374687f, 50.69824f, 40.264343f }, { 65.62447f, -4.497063f, -67.10724f } }, - { { -57.28257f, 48.529156f, -34.806377f }, { 95.470955f, 7.118073f, -11.322705f } }, - { { -64.80925f, 53.131527f, -77.35162f }, { 81.011566f, 3.335592f, 15.689522f } }, - { { -32.061317f, 30.244366f, -127.72071f }, { 32.061317f, 29.755634f, 61.72071f } }, - { { -62.32031f, 25.741756f, -222.99486f }, { 31.160154f, 32.12912f, 61.99743f } }, - { { -105.85609f, 14.339533f, -355.72162f }, { 31.134144f, 34.606018f, 61.91813f } }, - { { -136.99023f, 9.733513f, -450.63974f }, { 31.134144f, 34.606018f, 61.91813f } }, - { { -189.91827f, 1.90328f, -612.00055f }, { 31.134144f, 34.606018f, 61.91813f } }, -}; - -CameraPoint D_menu_801B6C60[] = { - { { 230.0f, -20.0f, -0.000004f }, { 90.0f, -20.0f, 0.000002f } }, - { { 217.92657f, 45.0272f, -0.006961f }, { 96.70746f, -25.01511f, 0.003867f } }, - { { 161.75992f, 66.4626f, 50.403748f }, { 73.1124f, -6.102585f, -28.316711f } }, - { { 117.362366f, 2.619884f, 27.208603f }, { 84.39606f, -4.366472f, -45.34767f } }, - { { 19.168537f, 2.445203f, 27.57978f }, { 7.556181f, -4.366434f, -49.249607f } }, - { { -116.45978f, 1.270139f, 27.862812f }, { -109.60754f, -2.268106f, -49.75502f } }, - { { -117.43788f, 1.272571f, 27.864624f }, { -110.646645f, -2.272449f, -49.758255f } }, - { { -118.43771f, 1.314066f, 27.862713f }, { -111.646935f, -2.346546f, -49.754845f } }, - { { -118.44501f, 1.314066f, 27.862074f }, { -111.63391f, -2.346546f, -49.753704f } }, - { { -118.46446f, 1.314066f, 27.860361f }, { -111.59918f, -2.346546f, -49.750645f } }, -}; - -void Map_801AC9A0(s32 index) { +void Map_PathLines_Draw(s32 index) { Vec3f srcPos; Vec3f destPos; f32 x; @@ -6337,7 +6307,7 @@ void Map_801AC9A0(s32 index) { f32 target; f32 temp; - Map_801ACD90(index, &srcPos, &destPos); + Map_PathLinePos(index, &srcPos, &destPos); x = srcPos.x - destPos.x; y = srcPos.y - destPos.y; @@ -6385,7 +6355,7 @@ void Map_801AC9A0(s32 index) { case 2: temp = 0.04f; - if (D_menu_801CD944 == 7) { + if (sMapState == MAP_GAME_OVER) { temp = 0.25f; } Math_SmoothStepToF(&gTexturedLines[index].zScale, target, temp, 100.0f, 4.0f); @@ -6442,7 +6412,7 @@ void Map_801AC9A0(s32 index) { } } -void Map_801ACD90(s32 index, Vec3f* src, Vec3f* dest) { +void Map_PathLinePos(s32 index, Vec3f* src, Vec3f* dest) { f32 x1; f32 y1; f32 z1; @@ -6540,27 +6510,27 @@ void Map_801ACD90(s32 index, Vec3f* src, Vec3f* dest) { dest->z = z2; } -void Map_801AD048(void) { - f32 sp1C = Math_Atan2F(D_menu_801CD9F8 - D_menu_801CDA04, - sqrtf(SQ(D_menu_801CD9F4 - D_menu_801CDA00) + SQ(D_menu_801CD9FC - D_menu_801CDA08))); - f32 temp = -Math_Atan2F(D_menu_801CD9F4 - D_menu_801CDA00, D_menu_801CD9FC - D_menu_801CDA08); +void Map_CamMatrixRot(void) { + f32 xRot = + Math_Atan2F(sMapCamEyeY - sMapCamAtY, sqrtf(SQ(sMapCamEyeX - sMapCamAtX) + SQ(sMapCamEyeZ - sMapCamAtZ))); + f32 yRot = -Math_Atan2F(sMapCamEyeX - sMapCamAtX, sMapCamEyeZ - sMapCamAtZ); - Matrix_RotateY(gGfxMatrix, -temp, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -sp1C, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -yRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -xRot, MTXF_APPLY); } -void Map_801AD11C(void) { +void Map_Idle_Update(void) { s32 i; - s32 var_t0; - s32 var_a3; + bool movingCamera; + bool movingCameraStick; u8 var_a1 = 0; u8 var_a2 = 0; u8 var_a0; - f32 x; - f32 y; + f32 stickX; + f32 stickY; - var_a3 = 0; - var_t0 = 0; + movingCameraStick = false; + movingCamera = false; if (gControllerPress[gMainController].button & A_BUTTON) { if ((gLastGameState == GSTATE_PLAY) && (sPrevMissionStatus != MISSION_COMPLETE) && !D_menu_801CEFD0) { @@ -6568,19 +6538,19 @@ void Map_801AD11C(void) { D_menu_801CEFC4 = 1; D_menu_801CEFD4 = 0; D_menu_801CEFDC = 0; - D_menu_801CD944 = 6; + sMapState = MAP_PATH_CHANGE; D_menu_801CD94C = 0; } else { for (i = 0; i < TEAM_ID_MAX; i++) { D_ctx_80177C58[i] = gTeamShields[i]; } - Map_801A659C(); + Map_SetState_ZoomPlanet(); } return; } if (gControllerPress[gMainController].button & START_BUTTON) { - if ((D_menu_801CD944 == 3) && (gLastGameState == GSTATE_PLAY)) { + if ((sMapState == MAP_IDLE) && (gLastGameState == GSTATE_PLAY)) { if (D_menu_801CEFD0) { AUDIO_PLAY_SFX(NA_SE_ERROR, gDefaultSfxSource, 4); } else { @@ -6588,34 +6558,34 @@ void Map_801AD11C(void) { D_menu_801CEFC4 = 1; D_menu_801CEFD4 = 0; D_menu_801CEFDC = 0; - D_menu_801CD944 = 6; + sMapState = MAP_PATH_CHANGE; D_menu_801CD94C = 0; } return; } } - x = gControllerPress[gMainController].stick_x; - y = gControllerPress[gMainController].stick_y; + stickX = gControllerPress[gMainController].stick_x; + stickY = gControllerPress[gMainController].stick_y; - if (y != 0.0f) { - if (D_menu_801CDA0C - (y * 0.05f) < -80.0f) { + if (stickY != 0.0f) { + if (D_menu_801CDA0C - (stickY * 0.05f) < -80.0f) { D_menu_801CDA0C = -80.0f; - y = 0.0f; - } else if (D_menu_801CDA0C - (y * 0.05f) > 80.0f) { + stickY = 0.0f; + } else if (D_menu_801CDA0C - (stickY * 0.05f) > 80.0f) { D_menu_801CDA0C = 80.0f; - y = 0.0f; + stickY = 0.0f; } else { - D_menu_801CDA0C -= y * 0.05f; - var_a3 = 1; - var_a1 = (s32) fabsf(((y * 0.05f) / 0.27f)); + D_menu_801CDA0C -= stickY * 0.05f; + movingCameraStick = true; + var_a1 = (s32) fabsf(((stickY * 0.05f) / 0.27f)); } } - if (x != 0.0f) { - D_menu_801CDA10 += x * 0.05f; - var_a2 = (s32) fabsf((x * 0.05f) / 0.27f); - var_a3 = 1; + if (stickX != 0.0f) { + D_menu_801CDA10 += stickX * 0.05f; + var_a2 = (s32) fabsf((stickX * 0.05f) / 0.27f); + movingCameraStick = true; } if (D_menu_801CF014 == 1) { @@ -6626,12 +6596,12 @@ void Map_801AD11C(void) { Audio_SetSfxMapModulation(var_a0); } - if (D_menu_801CF014 == 0 && var_a3 == 1) { + if ((D_menu_801CF014 == 0) && (movingCameraStick == true)) { Audio_PlaySfxModulated(gDefaultSfxSource, NA_SE_MAP_ROLL); D_menu_801CF014 = 1; } - if ((D_menu_801CF014 == 1) && (var_a3 == 0) && (y == 0.0f) && (x == 0.0f)) { + if ((D_menu_801CF014 == 1) && (movingCameraStick == false) && (stickY == 0.0f) && (stickX == 0.0f)) { var_a1 = 0; var_a2 = 0; Audio_KillSfxById(NA_SE_MAP_ROLL); @@ -6641,51 +6611,51 @@ void Map_801AD11C(void) { if (gControllerHold[gMainController].button & R_TRIG) { if ((D_menu_801CDA14 - 20.0f) > 2475.0f) { D_menu_801CDA14 -= 20.0f; - var_t0 = 1; + movingCamera = true; } } if (gControllerHold[gMainController].button & Z_TRIG) { if ((D_menu_801CDA14 + 20.0f) < 7695.0f) { D_menu_801CDA14 += 20.0f; - var_t0 = 1; + movingCamera = true; } } if (gControllerHold[gMainController].button & U_CBUTTONS) { - if ((D_menu_801CDA04 - 10.0f) >= -1200.0f) { - D_menu_801CDA04 -= 10.0f; - var_t0 = 1; + if ((sMapCamAtY - 10.0f) >= -1200.0f) { + sMapCamAtY -= 10.0f; + movingCamera = true; } } if (gControllerHold[gMainController].button & D_CBUTTONS) { - if ((D_menu_801CDA04 + 10.0f) <= 1200.0f) { - D_menu_801CDA04 += 10.0f; - var_t0 = 1; + if ((sMapCamAtY + 10.0f) <= 1200.0f) { + sMapCamAtY += 10.0f; + movingCamera = true; } } if (gControllerHold[gMainController].button & L_CBUTTONS) { - if ((D_menu_801CDA00 + 10.0f) <= 1200.0f) { - D_menu_801CDA00 += 10.0f; - var_t0 = 1; + if ((sMapCamAtX + 10.0f) <= 1200.0f) { + sMapCamAtX += 10.0f; + movingCamera = true; } } if (gControllerHold[gMainController].button & R_CBUTTONS) { - if ((D_menu_801CDA00 - 10.0f) >= -1200.0f) { - D_menu_801CDA00 -= 10.0f; - var_t0 = 1; + if ((sMapCamAtX - 10.0f) >= -1200.0f) { + sMapCamAtX -= 10.0f; + movingCamera = true; } } - if ((D_menu_801CF010 == 0) && (var_t0 == 1)) { + if ((D_menu_801CF010 == 0) && (movingCamera == true)) { AUDIO_PLAY_SFX(NA_SE_MAP_MOVE, gDefaultSfxSource, 4); D_menu_801CF010 = 1; } - if ((D_menu_801CF010 == 1) && (var_t0 == 0)) { + if ((D_menu_801CF010 == 1) && (movingCamera == false)) { Audio_KillSfxById(NA_SE_MAP_MOVE); D_menu_801CF010 = 0; } @@ -6694,46 +6664,76 @@ void Map_801AD11C(void) { void func_dummy_() { } -void Map_801AD718(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32 arg7, f32 arg8) { - Vec3f sp2C; - Vec3f sp20; +void Map_SetCamRot(f32 camAtX, f32 camAtY, f32 camAtZ, f32* camEyeX, f32* camEyeY, f32* camEyeZ, f32 srcZ, f32 xRot, + f32 yRot) { + Vec3f dest; + Vec3f src; - sp20.x = 0.0f; - sp20.y = 0.0f; - sp20.z = arg6; + src.x = 0.0f; + src.y = 0.0f; + src.z = srcZ; - Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, M_DTOR * arg8, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp20, &sp2C); + Matrix_Translate(gCalcMatrix, camAtX, camAtY, camAtZ, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = sp2C.x; - *arg4 = sp2C.y; - *arg5 = sp2C.z; + *camEyeX = dest.x; + *camEyeY = dest.y; + *camEyeZ = dest.z; } -void Map_801AD7EC(s32 xPos, s32 yPos, s32 number) { +void Map_RemainingLives_Draw(s32 xPos, s32 yPos, s32 number) { RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - TextureRect_CI4(&gMasterDisp, D_MAP_601DC10, D_MAP_601DC90, 16, 16, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aMapArwingIconTex, aMapArwingIconTLUT, 16, 16, xPos, yPos, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - - TextureRect_CI4(&gMasterDisp, D_MAP_601DCA0, D_MAP_601DCD8, 16, 7, xPos + 18.0f, yPos + 9.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, aMapXTex, aMapXTLUT, 16, 7, xPos + 18.0f, yPos + 9.0f, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if (number >= 10) { - Graphics_DisplaySmallNumber(xPos + 33.0f - ((func_hud_8008BCBC(number) - 1) * 8) + 3, yPos + 8.0f, number); + Graphics_DisplaySmallNumber(xPos + 33.0f - ((HUD_CountDigits(number) - 1) * 8) + 3, yPos + 8.0f, number); } else { Graphics_DisplaySmallNumber(xPos + 33.0f, yPos + 8.0f, number); } } +// these probably belong to fox_title data + +u32 padding_801B6B34[3] = { 0, 0, 0 }; + +CameraPoint D_menu_801B6B40[] = { + { { 0.0f, 260.47226f, 1477.2115f }, { 0.0f, -17.364819f, -98.480774f } }, + { { 0.0f, 20.159666f, 759.7326f }, { 0.0f, -2.652588f, -99.96481f } }, + { { -45.790363f, 0.712088f, 336.90164f }, { 13.467754f, -0.209438f, -99.08872f } }, + { { -59.033607f, -7.952868f, 104.171906f }, { 49.19467f, 6.62739f, -86.80992f } }, + { { -39.374687f, 50.69824f, 40.264343f }, { 65.62447f, -4.497063f, -67.10724f } }, + { { -57.28257f, 48.529156f, -34.806377f }, { 95.470955f, 7.118073f, -11.322705f } }, + { { -64.80925f, 53.131527f, -77.35162f }, { 81.011566f, 3.335592f, 15.689522f } }, + { { -32.061317f, 30.244366f, -127.72071f }, { 32.061317f, 29.755634f, 61.72071f } }, + { { -62.32031f, 25.741756f, -222.99486f }, { 31.160154f, 32.12912f, 61.99743f } }, + { { -105.85609f, 14.339533f, -355.72162f }, { 31.134144f, 34.606018f, 61.91813f } }, + { { -136.99023f, 9.733513f, -450.63974f }, { 31.134144f, 34.606018f, 61.91813f } }, + { { -189.91827f, 1.90328f, -612.00055f }, { 31.134144f, 34.606018f, 61.91813f } }, +}; + +CameraPoint D_menu_801B6C60[] = { + { { 230.0f, -20.0f, -0.000004f }, { 90.0f, -20.0f, 0.000002f } }, + { { 217.92657f, 45.0272f, -0.006961f }, { 96.70746f, -25.01511f, 0.003867f } }, + { { 161.75992f, 66.4626f, 50.403748f }, { 73.1124f, -6.102585f, -28.316711f } }, + { { 117.362366f, 2.619884f, 27.208603f }, { 84.39606f, -4.366472f, -45.34767f } }, + { { 19.168537f, 2.445203f, 27.57978f }, { 7.556181f, -4.366434f, -49.249607f } }, + { { -116.45978f, 1.270139f, 27.862812f }, { -109.60754f, -2.268106f, -49.75502f } }, + { { -117.43788f, 1.272571f, 27.864624f }, { -110.646645f, -2.272449f, -49.758255f } }, + { { -118.43771f, 1.314066f, 27.862713f }, { -111.646935f, -2.346546f, -49.754845f } }, + { { -118.44501f, 1.314066f, 27.862074f }, { -111.63391f, -2.346546f, -49.753704f } }, + { { -118.46446f, 1.314066f, 27.860361f }, { -111.59918f, -2.346546f, -49.750645f } }, +}; + #if MODS_LEVEL_SELECT == 1 #include "../../mods/levelselect.c" #endif diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index ad657918..af42d5e9 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -14,21 +14,21 @@ #include "assets/ast_vs_menu.h" #include "assets/ast_map.h" -extern s32 D_menu_801B81A8[][3]; -extern Gfx D_menu_801B4A40[]; -extern Gfx D_menu_801B5E78[]; -extern Gfx D_menu_801B61E0[]; -extern Gfx D_menu_801B6548[]; -extern Gfx D_menu_801B4D70[]; -extern Gfx D_menu_801B5B10[]; -extern Gfx D_menu_801B5440[]; -extern Gfx D_menu_801B50D8[]; -extern Gfx D_menu_801B5E78[]; -extern Gfx D_menu_801B57A8[]; -extern f32 D_menu_801CD818[]; +extern s32 gRankingTeamAlive[][3]; +extern Gfx gMapVenomCloudDL[]; +extern Gfx gMapKatinaDL[]; +extern Gfx gMapMacbethDL[]; +extern Gfx gMapZonessDL[]; +extern Gfx gMapCorneriaDL[]; +extern Gfx gMapTitaniaDL[]; +extern Gfx gMapAquasDL[]; +extern Gfx gMapFortunaDL[]; +extern Gfx gMapKatinaDL[]; +extern Gfx gMapVenomDL[]; +extern f32 D_menu_801CD818[9]; s32 D_menu_801B9090; -s32 D_menu_801B9094; +s32 sRankInPos; s32 D_menu_801B9098; s32 D_menu_801B90A0[3]; s32 D_menu_801B90B0[3]; @@ -38,11 +38,11 @@ f32 D_menu_801B90E0[3]; f32 D_menu_801B90F0[3]; f32 D_menu_801B9100[3]; f32 D_menu_801B9110[3]; -f32 D_menu_801B911C; -f32 D_menu_801B9120; -OptionId D_menu_801B9124; +f32 sNameEntryLightXrot; +f32 sNameEntryLightYrot; +OptionId sMenuEntryState; s32 D_menu_801B9128; -s32 D_menu_801B912C; +s32 sMainMenuState; s32 D_menu_801B9130; s32 D_menu_801B9134; s32 D_menu_801B9138; @@ -51,24 +51,24 @@ s32 D_menu_801B9140[3]; s32 D_menu_801B914C; u8 D_menu_801B9150[3][2]; s32 D_menu_801B9158; -UnkStruct_D_menu_801B9250 D_menu_801B9160[3]; -s32 D_menu_801B9178; -s32 D_menu_801B917C; -UnkStruct_D_menu_801B9250 D_menu_801B9180; -UnkStruct_D_menu_801B9250 D_menu_801B9188; -UnkStruct_D_menu_801B9250 D_menu_801B9190; -UnkStruct_D_menu_801B9250 D_menu_801B9198; +StickInput D_menu_801B9160[3]; +s32 D_menu_801B9178; // timer of some kind +s32 D_menu_801B917C; // timer of some kind +StickInput D_menu_801B9180; +StickInput D_menu_801B9188; +StickInput D_menu_801B9190; +StickInput D_menu_801B9198; s32 D_menu_801B91A0; -s32 D_menu_801B91A4; -s32 D_menu_801B91A8; -s32 D_menu_801B91AC; -s32 D_menu_801B91B0; -s32 D_menu_801B91B4; +s32 sMainMenuCursor; // Position of the cursor in the main menu. +s32 sVsMenuCursor; // Position of the cursor in the versus menu. +s32 sExpertSoundCursor; // Whether the Expert Sound options are selected in the menu. +s32 sExpertModeCursor; // Whether the Expert Main Game mode is selected in the menu. +s32 D_menu_801B91B4; // Set to 0 and never used. s32 D_menu_801B91B8; -s32 D_menu_801B91BC; +bool sDrawCursor; s32 D_menu_801B91C0; s32 D_menu_801B91C4; -bool D_menu_801B91C8; +bool sExpertModesEnabled; s32 D_menu_801B91CC; s32 D_menu_801B91D0; f32 D_menu_801B91D4; @@ -77,72 +77,72 @@ f32 D_menu_801B91DC; f32 D_menu_801B91E0; f32 D_menu_801B91E4; f32 D_menu_801B91E8; -f32 D_menu_801B91EC; -s32 D_menu_801B91F0; +f32 sOkConfirmTimer; // Time before going to the next screen after confirming "OK?" in the versus menu. +bool sVsSubMenuFirstState; // Whether the first sub menu option has yet to be selected f32 D_menu_801B91F4; f32 D_menu_801B91F8; -f32 D_menu_801B91FC; -f32 D_menu_801B9200; -f32 D_menu_801B9204; -f32 D_menu_801B9208; -f32 D_menu_801B920C; -f32 D_menu_801B9210; +f32 sRightArwingCursorYrot; +f32 sLeftArwingCursorYrot; +f32 sLightningXpos; +f32 sLightningYpos; +f32 sLightningXScale; +f32 sLightningYScale; s32 D_menu_801B9214; f32 D_menu_801B9218; f32 D_menu_801B921C; f32 D_menu_801B9220; -f32 D_menu_801B9224; -f32 D_menu_801B9228; -s32 sArwingLightColR; // colR -s32 sArwingLightColG; // colG -s32 sArwingLightColB; // colB -s32 sArwingLightAmbR; // ambR -s32 sArwingLightAmbG; // ambG -s32 sArwingLightAmbB; // ambB -s32 D_menu_801B9244; -s32 D_menu_801B9248; +f32 sArwingLightXrot; +f32 sArwingLightYrot; +s32 sArwingLightColR; +s32 sArwingLightColG; +s32 sArwingLightColB; +s32 sArwingLightAmbR; +s32 sArwingLightAmbG; +s32 sArwingLightAmbB; +bool sMainMenuFromCancel; +bool sVsSubMenuFromCancel; u8 D_menu_801B924C; -UnkStruct_D_menu_801B9250 D_menu_801B9250; -UnkStruct_D_menu_801B9250 D_menu_801B9258; -UnkStruct_D_menu_801B9250 D_menu_801B9260; -UnkStruct_D_menu_801B9250 D_menu_801B9268; +StickInput D_menu_801B9250; +StickInput D_menu_801B9258; +StickInput D_menu_801B9260; +StickInput D_menu_801B9268; f32 D_menu_801B9270[5]; s32 D_menu_801B9284; -s32 D_menu_801B9288; // gap -UnkStruct_D_menu_801B9250 D_menu_801B9290; +s32 D_menu_801B9288; +StickInput D_menu_801B9290; f32 D_menu_801B9298[32]; -s32 spectrumAnalyzerMode; +s32 sSpectrumAnalyzerMode; s32 D_menu_801B931C; -bool sMusicPlaying; // MusicPlaying status in the expert sound options +bool sMusicPlaying; // Music is playing status in the expert sound options extern s32 BSS_PAD_0; s32 D_menu_801B9330[2]; s32 D_menu_801B933C; -s32 D_menu_801B9340; // gap +s32 D_menu_801B9340; s32 D_menu_801B9348[4]; f32 D_menu_801B9358[4]; f32 D_menu_801B9368; -s32 D_menu_801B936C; +s32 sPointConfirmTimer; f32 D_menu_801B9370; -s32 D_menu_801B9374; +s32 sStageSelectConfirmTimer; f32 D_menu_801B9378; -s32 D_menu_801B937C; -UnkStruct_D_menu_801B9250 D_menu_801B9380[4]; -UnkStruct_D_menu_801B9250 D_menu_801B93A0[4]; +s32 sTimeTrialConfirmTimer; +StickInput D_menu_801B9380[4]; +StickInput D_menu_801B93A0[4]; u8 D_menu_801B93C4; extern s32 BSS_PAD_1; -s32 D_menu_801B93D0; +s32 sVsMenuSelection; s32 D_menu_801B93D4; s32 D_menu_801B93D8; s32 D_menu_801B93DC; -s32 D_menu_801B93E0; +bool sRanking2ndPage; s32 D_menu_801B93E4; s32 D_menu_801B93E8; s32 D_menu_801B93EC; f32 D_menu_801B93F0; f32 D_menu_801B93F4; -f32 D_menu_801B93F8; // gap -UnkStruct_D_menu_801B9250 D_menu_801B9400; -UnkStruct_D_menu_801B9250 D_menu_801B9408; +f32 D_menu_801B93F8; +StickInput D_menu_801B9400; +StickInput D_menu_801B9408; #include "prevent_bss_reordering2.h" struct BssPad0 { @@ -168,45 +168,44 @@ f32 D_menu_801AE600[] = { 151.0f, 151.0f }; f32 D_menu_801AE608[] = { 8.0f, 8.0f, 8.0f, 8.0f, 8.0f, 8.0f }; f32 D_menu_801AE620[] = { 1.9f, 2.4f, 0.9f, 1.9f, 1.8f, 2.4f }; -// D_menu_801AE638 OptionEntry sOptionCardList[] = { { - { 0, 0, D_OPT_8003B50, 0, 72, 12, 126.0f, 46.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aMainGameCardTex, 0, 72, 12, 126.0f, 46.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 30.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 27.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_8003EB0, 0, 80, 12, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aTrainingCardTex, 0, 80, 12, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 18.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 16.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_8004270, 0, 32, 10, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aVsCardTex, 0, 32, 10, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 6.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 6.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_80043B0, 0, 64, 12, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aRankingCardTex, 0, 64, 12, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, -6.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, -5.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_80046B0, 0, 64, 10, 110.0f, 116.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aSoundCardTex, 0, 64, 10, 110.0f, 116.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, -18.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, -16.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_8004930, 0, 80, 10, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aDataCardTex, 0, 80, 10, 126.0f, 184.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, -30.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, -27.0f, 80.0f }, 1, @@ -214,31 +213,31 @@ OptionEntry sOptionCardList[] = { }, }; -// D_menu_801AE878 OptionEntry sOptionVSCardList[] = { { - { 0, 0, D_OPT_8005010, 0, 96, 13, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aVsPointMatchCardTex, 0, 96, 13, 110.0f, 91.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 11.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 11.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_80054F0, 0, 96, 10, 110.0f, 116.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aVsBattleRoyalCardTex, 0, 96, 10, 110.0f, 116.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, 0.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, 0.0f, 80.0f }, 1, 1, }, { - { 0, 0, D_OPT_8005910, 0, 96, 10, 110.0f, 138.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, + { 0, 0, aVsTimeTrialCardTex, 0, 96, 10, 110.0f, 138.0f, 1.0f, 1.0f, 20, 0, 75, 255 }, { 0.0f, -11.0f, -130.0f, 0.2f, 0.11f }, { -40.0f, -11.0f, 80.0f }, 1, 1, }, }; -u8 D_menu_801AE998[] = { SOUNDMODE_STEREO, SOUNDMODE_MONO, SOUNDMODE_HEADSET }; + +u8 sSoundMode[] = { SOUNDMODE_STEREO, SOUNDMODE_MONO, SOUNDMODE_HEADSET }; u8 D_menu_801AE99C[] = { 0, 1, 2 }; @@ -246,23 +245,23 @@ f32 D_menu_801AE9A0[4] = { 62.0f, 222.0f, 75.0f, 235.0f }; f32 D_menu_801AE9B0[4] = { 43.0f, 43.0f, 46.0f, 46.0f }; -OptionTexture D_menu_801AE9C0[4] = { - { 2, 0, D_OPT_80143B0, D_OPT_80147B0, 32, 32, 56.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 2, 0, D_OPT_80143B0, D_OPT_80147B0, 32, 32, 216.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 1, 0, D_OPT_80039D0, D_OPT_8003A50, 16, 16, 69.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 1, 0, D_OPT_80039D0, D_OPT_8003A50, 16, 16, 229.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, +OptionCardTexture D_menu_801AE9C0[4] = { + { 2, 0, aSpeakerTex, aSpeakerTLUT, 32, 32, 56.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 2, 0, aSpeakerTex, aSpeakerTLUT, 32, 32, 216.0f, 175.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 1, 0, aSpeakerCenterTex, aSpeakerCenterTLUT, 16, 16, 69.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 1, 0, aSpeakerCenterTex, aSpeakerCenterTLUT, 16, 16, 229.0f, 178.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, }; -OptionTexture D_menu_801AEAA0[3] = { - { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 135.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, - { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 161.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, - { 3, 0, D_OPT_8013990, 0, 104, 10, 151.0f, 188.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, +OptionCardTexture D_menu_801AEAA0[3] = { + { 3, 0, aSliderFrameTex, 0, 104, 10, 151.0f, 135.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, + { 3, 0, aSliderFrameTex, 0, 104, 10, 151.0f, 161.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, + { 3, 0, aSliderFrameTex, 0, 104, 10, 151.0f, 188.0f, 1.05f, 1.0f, 255, 255, 255, 255 }, }; -OptionTexture D_menu_801AEB48[3] = { - { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 132.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 158.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, - { 3, 0, D_OPT_80141B0, 0, 16, 16, 245.0f, 185.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, +OptionCardTexture D_menu_801AEB48[3] = { + { 3, 0, aSliderTex, 0, 16, 16, 245.0f, 132.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 3, 0, aSliderTex, 0, 16, 16, 245.0f, 158.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, + { 3, 0, aSliderTex, 0, 16, 16, 245.0f, 185.0f, 1.0f, 1.0f, 255, 255, 255, 255 }, }; Vtx D_menu_801AEBF0[] = { @@ -321,16 +320,16 @@ s32 D_menu_801AED28[] = { s32 D_menu_801AED3C[4] = { 0, 0, 0, 0 }; -UnkStruct_D_menu_801AED4C D_menu_801AED4C[24] = { +RouteColoredLine sRouteColoredLine[24] = { { 9, 0, 0 }, { 0, 12, 0 }, { 12, 4, 0 }, { 4, 10, 0 }, { 10, 2, 0 }, { 6, 4, 0 }, { 7, 2, 0 }, { 3, 2, 0 }, { 2, 14, 0 }, { 5, 6, 1 }, { 6, 13, 1 }, { 13, 7, 1 }, { 4, 7, 1 }, { 12, 13, 1 }, { 8, 7, 1 }, { 9, 5, 2 }, { 5, 11, 2 }, { 11, 8, 2 }, { 8, 3, 2 }, { 3, 1, 2 }, { 7, 1, 2 }, { 1, 14, 2 }, { 0, 6, 3 }, { 4, 3, 4 }, }; Gfx* D_menu_801AEE6C[16] = { - D_MAP_6060610, D_MAP_601DE80, D_MAP_604B750, D_MAP_601F6B0, D_MAP_601C0D0, D_MAP_601C960, - D_menu_801B5E78, D_menu_801B61E0, D_menu_801B6548, D_menu_801B4D70, D_menu_801B5B10, D_menu_801B5440, - D_menu_801B50D8, D_MAP_604DB10, D_menu_801B57A8, D_menu_801B57A8, + aMapMeteorDL, aMapArea6DL, aMapBolseDL, aMapSectorZDL, aMapSectorXDL, aMapSectorYDL, + gMapKatinaDL, gMapMacbethDL, gMapZonessDL, gMapCorneriaDL, gMapTitaniaDL, gMapAquasDL, + gMapFortunaDL, aMapSolarDL, gMapVenomDL, gMapVenomDL, }; char* D_menu_801AEEAC[] = { @@ -355,7 +354,7 @@ Gfx D_menu_801AEF30[] = { s32 PAD_menu_801AEF50[] = { 0, 0, 0 }; -char D_menu_801AEF5C[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."; +char sCharMap[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."; f32 D_menu_801AEF84[] = { 24.0f, 0.0f, -24.0f }; f32 D_menu_801AEF90[] = { 111.0f, 112.0f, 121.0f }; @@ -367,29 +366,31 @@ void Option_Setup(void) { s32 i; #if MODS_LEVEL_SELECT == 1 - for (i = 0; i < PLANET_MAX; i++) { + for (i = 0; i < ARRAY_COUNT(gSaveFile.save.data.planet); i++) { gSaveFile.save.data.planet[i].expertClear = 1; gSaveFile.save.data.planet[i].normalClear = 1; + gSaveFile.save.data.planet[i].normalMedal = 1; + gSaveFile.save.data.planet[i].expertMedal = 1; gSaveFile.save.data.planet[i].played = 1; } Save_Write(); #endif gVIsPerFrame = 2; - sOptionCardList[0].unk_00.texture = D_OPT_8003B50; - sOptionCardList[0].unk_00.width = 72; - sOptionCardList[0].unk_00.height = 12; - sOptionCardList[4].unk_00.texture = D_OPT_80046B0; - sOptionCardList[4].unk_00.width = 64; - sOptionCardList[4].unk_00.height = 10; + sOptionCardList[OPTION_MAP].tex.texture = aMainGameCardTex; + sOptionCardList[OPTION_MAP].tex.width = 72; + sOptionCardList[OPTION_MAP].tex.height = 12; + sOptionCardList[OPTION_SOUND].tex.texture = aSoundCardTex; + sOptionCardList[OPTION_SOUND].tex.width = 64; + sOptionCardList[OPTION_SOUND].tex.height = 10; - for (i = 0; i < OPTION_COUNT; i++) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i]; sOptionCardCurTextPosY[i] = sOptionCardTextPosY[i]; } enableExpertModes = true; - for (i = 0; i < 16; i++) { + for (i = 0; i < ARRAY_COUNT(gSaveFile.save.data.planet); i++) { if (i == SAVE_SLOT_VENOM_1) { continue; } @@ -405,34 +406,34 @@ void Option_Setup(void) { } } - D_menu_801B91C8 = enableExpertModes; + sExpertModesEnabled = enableExpertModes; + gFillScreenRed = 0; gFillScreenGreen = 0; gFillScreenBlue = 0; gFillScreenAlpha = 0; gBlurAlpha = 255; - gBgColor = 0; - D_menu_801B91A4 = 0; + sMainMenuCursor = OPTION_MAP; if ((gLastGameState == GSTATE_PLAY) && (gCurrentLevel == LEVEL_TRAINING)) { gLastGameState = GSTATE_NONE; - D_menu_801B91A4 = 1; + sMainMenuCursor = OPTION_TRAINING; } - D_menu_801B91A8 = 0; - D_menu_801B91AC = 0; - D_menu_801B91B0 = 0; + sVsMenuCursor = 0; + sExpertSoundCursor = 0; + sExpertModeCursor = 0; playedExpertMode = gExpertMode; gExpertMode = false; gGameFrameCount = 0; - D_menu_801B8284 = 0; + sWipeHeight = 0; D_menu_801B9178 = 0; D_menu_801B917C = 0; - D_menu_801B9124 = OPTION_MAIN_MENU; + sMenuEntryState = OPTION_MAIN_MENU; if ((gLastGameState == GSTATE_GAME_OVER) || (gLastGameState == GSTATE_ENDING)) { if (gLastGameState == GSTATE_ENDING) { @@ -459,52 +460,53 @@ void Option_Setup(void) { } } - Title_80188010(); - D_menu_801B9094 = Option_8019C8C4(); + Title_GetRankTotalHits(); - if (D_menu_801B9094 != -1) { - D_menu_801B9124 = 200; + sRankInPos = Option_RankInPos_Check(); + + if (sRankInPos != -1) { + sMenuEntryState = OPTION_NAME_ENTRY; } else { - D_menu_801B9124 = 300; + sMenuEntryState = OPTION_SCORE; } } else if (D_game_800D2870) { - D_menu_801B91A4 = 2; - D_menu_801B91A8 = gVsMatchType; - for (i = 0; i < OPTION_COUNT; i++) { - if (i == 2) { + sMainMenuCursor = OPTION_VERSUS; + sVsMenuCursor = gVsMatchType; + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (i == OPTION_VERSUS) { continue; } - sOptionCardList[i].unk_38.xScale = 0.01f; - sOptionCardList[i].unk_38.yScale = 0.21f; - sOptionCardList[i].unk_38.y = sOptionCardPosY[i]; - sOptionCardList[i].unk_38.x = 0.0f; - sOptionCardList[i].unk_38.z = 0.0f; - sOptionCardList[i].unk_5C = false; + sOptionCardList[i].frame.xScale = 0.01f; + sOptionCardList[i].frame.yScale = 0.21f; + sOptionCardList[i].frame.y = sOptionCardPosY[i]; + sOptionCardList[i].frame.x = 0.0f; + sOptionCardList[i].frame.z = 0.0f; + sOptionCardList[i].drawFrame = false; - sOptionCardList[i].unk_00.xScale = 0.01f; - sOptionCardList[i].unk_00.yScale = 1.0f; - sOptionCardList[i].unk_00.xPos = 158.0f; - sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; - sOptionCardList[i].unk_58 = false; + sOptionCardList[i].tex.xScale = 0.01f; + sOptionCardList[i].tex.yScale = 1.0f; + sOptionCardList[i].tex.xPos = 158.0f; + sOptionCardList[i].tex.yPos = sOptionCardCurTextPosY[i]; + sOptionCardList[i].drawTex = false; } - sOptionCardList[2].unk_38.x = 0.0f; - sOptionCardList[2].unk_38.z = 0.0f; - sOptionCardList[2].unk_38.y = 90.0f; - sOptionCardList[2].unk_38.xScale = 0.4f; - sOptionCardList[2].unk_38.yScale = 0.21f; - sOptionCardList[2].unk_5C = true; - sOptionCardList[2].unk_00.xScale = 1.0f; - sOptionCardList[2].unk_00.yScale = 1.0f; - sOptionCardList[2].unk_00.xPos = 145.0f; - sOptionCardList[2].unk_00.yPos = 25.0f; - sOptionCardList[2].unk_58 = true; + sOptionCardList[OPTION_VERSUS].frame.x = 0.0f; + sOptionCardList[OPTION_VERSUS].frame.z = 0.0f; + sOptionCardList[OPTION_VERSUS].frame.y = 90.0f; + sOptionCardList[OPTION_VERSUS].frame.xScale = 0.4f; + sOptionCardList[OPTION_VERSUS].frame.yScale = 0.21f; + sOptionCardList[OPTION_VERSUS].drawFrame = true; + sOptionCardList[OPTION_VERSUS].tex.xScale = 1.0f; + sOptionCardList[OPTION_VERSUS].tex.yScale = 1.0f; + sOptionCardList[OPTION_VERSUS].tex.xPos = 145.0f; + sOptionCardList[OPTION_VERSUS].tex.yPos = 25.0f; + sOptionCardList[OPTION_VERSUS].drawTex = true; - D_menu_801B9124 = OPTION_VERSUS; + sMenuEntryState = OPTION_VERSUS; } else { - D_menu_801B9124 = OPTION_MAIN_MENU; + sMenuEntryState = OPTION_MAIN_MENU; } - D_menu_801B912C = 0; + sMainMenuState = 0; D_menu_801B9134 = 0; D_menu_801B913C = 0; @@ -524,8 +526,8 @@ void Option_Setup(void) { gCsCamAtY = 0.0f; gCsCamAtZ = 0.0f; - D_menu_801B9224 = -80.0f; - D_menu_801B9228 = 0.0f; + sArwingLightXrot = -80.0f; + sArwingLightYrot = 0.0f; sArwingLightColR = 225; sArwingLightColG = 225; @@ -536,16 +538,23 @@ void Option_Setup(void) { D_menu_801B91F8 = 0.1f; D_menu_801B91F4 = -130.0f; - D_menu_801B91FC = 0.0f; - D_menu_801B9200 = 0.0f; + sRightArwingCursorYrot = 0.0f; + sLeftArwingCursorYrot = 0.0f; - D_menu_801B91EC = 0; - D_menu_801B9244 = 0; - D_menu_801B9248 = 0; + sOkConfirmTimer = 0; + sMainMenuFromCancel = false; + sVsSubMenuFromCancel = false; AUDIO_PLAY_BGM(NA_BGM_SELECT); } void Option_Main(void) { +#if 0 // Docs debug + { + RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + Graphics_DisplaySmallNumber(80, 220, sVsSubMenuFromCancel); + } +#endif if (D_menu_801B9178 > 0) { D_menu_801B9178--; } @@ -568,117 +577,117 @@ void Option_Main(void) { case OPTION_UPDATE: gDrawMode = DRAW_OPTION; - Option_UpdateEntry(); + Option_Entry_Update(); break; } gGameFrameCount++; } -void Option_UpdateEntry(void) { - switch (D_menu_801B9124) { +void Option_Entry_Update(void) { + switch (sMenuEntryState) { case OPTION_MAIN_MENU: - Option_MainMenuUpdate(); + Option_MainMenu_Update(); break; case OPTION_MAP: - Option_MapUpdate(); + Option_Map_Update(); break; case OPTION_TRAINING: - Option_TrainingUpdate(); + Option_Training_Update(); break; case OPTION_VERSUS: - Option_VersusUpdate(); + Option_Versus_Update(); break; case OPTION_RANKING: - Option_RankingUpdate(); + Option_Ranking_Update(); break; case OPTION_SOUND: - Option_SoundUpdate(); + Option_Sound_Update(); break; case OPTION_DATA: - Option_DataUpdate(); + Option_Data_Update(); break; case OPTION_EXPERT_SOUND: - Option_ExpertSoundUpdate(); + Option_ExpertSound_Update(); break; case OPTION_VERSUS_STAGE: - Option_VersusStageUpdate(); + Option_VersusStage_Update(); break; case OPTION_POINT_MATCH: case OPTION_BR_MATCH: case OPTION_TT_MATCH: - Option_VersusMenuUpdate(); + Option_VersusMenu_Update(); break; - case OPTION_NAME: - Option_8019CAE0(); + case OPTION_NAME_ENTRY: + Option_NameEntry_Update(); break; case OPTION_SCORE: - Option_8019DD44(); + Option_Score_Update(); break; case OPTION_INVOICE: - Option_InvoiceUpdate(); + Option_Invoice_Update(); break; } - if (D_menu_801B91BC != 0) { - D_menu_801B91FC += 3.8f; - D_menu_801B9200 += 4.2f; + if (sDrawCursor) { + sRightArwingCursorYrot += 3.8f; + sLeftArwingCursorYrot += 4.2f; } } -void Option_DrawEntry(void) { - switch (D_menu_801B9124) { +void Option_Entry_Draw(void) { + switch (sMenuEntryState) { case OPTION_MAIN_MENU: - Option_MainMenuDraw(); + Option_MainMenu_Draw(); break; case OPTION_VERSUS: - Option_VersusDraw(); + Option_Versus_Draw(); break; case OPTION_RANKING: - Option_RankingDraw(); + Option_Ranking_Draw(); break; case OPTION_SOUND: - Option_SoundDraw(); + Option_Sound_Draw(); break; case OPTION_EXPERT_SOUND: - Option_ExpertSoundDraw(); + Option_ExpertSound_Draw(); break; case OPTION_DATA: - Option_DataDraw(); + Option_Data_Draw(); break; case OPTION_VERSUS_STAGE: - Option_VersusStageDraw(); + Option_VersusStage_Draw(); break; case OPTION_POINT_MATCH: case OPTION_BR_MATCH: case OPTION_TT_MATCH: - Option_VersusMenuDraw(); + Option_VersusMenu_Draw(); break; - case OPTION_NAME: - Option_8019D118(); + case OPTION_NAME_ENTRY: + Option_NameEntry_Draw(); break; case OPTION_SCORE: - Option_8019DF64(); + Option_Score_Draw(); break; case OPTION_INVOICE: @@ -686,18 +695,18 @@ void Option_DrawEntry(void) { break; } - if (D_menu_801B8280 != 0) { - Option_8019BDF0(); - Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); + if (sLevelStartState) { + Option_Menu_Push(); + Wipe_Draw(WIPE_VERTICAL, sWipeHeight); Matrix_Pop(&gGfxMatrix); } } -void Option_InitEntry(void) { +void Option_Entry_Setup(void) { gBlurAlpha = 255; - D_menu_801B912C = 0; + sMainMenuState = 0; - switch (D_menu_801B9124) { + switch (sMenuEntryState) { case OPTION_MAP: gDrawMode = DRAW_NONE; break; @@ -705,32 +714,33 @@ void Option_InitEntry(void) { case OPTION_POINT_MATCH: case OPTION_BR_MATCH: case OPTION_TT_MATCH: - Option_VersusMenuInit(); + Option_VersusMenu_Setup(); break; case OPTION_VERSUS_STAGE: - Option_VersusStageInit(); + Option_VersusStage_Setup(); break; case OPTION_RANKING: - Option_RankingInit(); + Option_Ranking_Setup(); break; case OPTION_SOUND: - Option_SoundInit(); + Option_Sound_Setup(); break; case OPTION_EXPERT_SOUND: - Option_ExpertSoundInit(); + Option_ExpertSound_Setup(); break; case OPTION_DATA: - Option_DataInit(); + Option_Data_Setup(); break; } } -void Option_80192598(void) { +// Initialize the Planet textures before any drawing occurs +void Option_PlanetTextures_Setup(void) { s32 i; D_menu_801B93E8 = 0; @@ -738,37 +748,40 @@ void Option_80192598(void) { for (i = 0; i < (96 * 96); i++) { // Planet Textures - D_menu_801BB810[i] = 106; - D_menu_801BDC10[i] = 84; - D_menu_801C0010[i] = 75; - D_menu_801C2410[i] = 81; - D_menu_801C4810[i] = 55; - D_menu_801C6C10[i] = 82; - D_menu_801C9010[i] = 68; - D_menu_801CB410[i] = 52; - D_menu_801B9410[i] = 0; + gMapCorneriaTex[i] = 106; + gMapFortunaTex[i] = 84; + gMapAquasTex[i] = 75; + gMapVenomTex[i] = 81; + gMapTitaniaTex[i] = 55; + gMapKatinaTex[i] = 82; + gMapMacbethTex[i] = 68; + gMapZonessTex[i] = 52; + gMapVenomCloudTex[i] = 0; } - for (i = 0; i < 9; i++) { + for (i = 0; i < ARRAY_COUNT(gBSSMapPlanetTextures); i++) { D_menu_801CD818[i] = 0.0f; - Map_801A07E8(D_menu_801B68B0[i], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[i]), &D_menu_801CD818[i]); + Map_Texture_Sphere(gBSSMapPlanetTextures[i], SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[i]), + &D_menu_801CD818[i]); } } -void Option_80192738(void) { +void Option_ScrollPlanetTexture(void) { if (D_menu_801B93E8 == 5) { - Map_801A07E8(D_menu_801B68B0[8], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[8]), &D_menu_801CD818[8]); + Map_Texture_Sphere(gBSSMapPlanetTextures[8], SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[8]), + &D_menu_801CD818[8]); D_menu_801B93E8 = 0; } else { D_menu_801B93E8++; } - Map_801A07E8(D_menu_801B68B0[D_menu_801B93EC * 2], SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[D_menu_801B93EC * 2]), - &D_menu_801CD818[D_menu_801B93EC * 2]); + Map_Texture_Sphere(gBSSMapPlanetTextures[D_menu_801B93EC * 2], + SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[D_menu_801B93EC * 2]), + &D_menu_801CD818[D_menu_801B93EC * 2]); - Map_801A07E8(D_menu_801B68B0[(D_menu_801B93EC * 2) + 1], - SEGMENTED_TO_VIRTUAL(D_menu_801B68D4[(D_menu_801B93EC * 2) + 1]), - &D_menu_801CD818[(D_menu_801B93EC * 2) + 1]); + Map_Texture_Sphere(gBSSMapPlanetTextures[(D_menu_801B93EC * 2) + 1], + SEGMENTED_TO_VIRTUAL(gAssetMapPlanetTextures[(D_menu_801B93EC * 2) + 1]), + &D_menu_801CD818[(D_menu_801B93EC * 2) + 1]); D_menu_801B93EC++; if (D_menu_801B93EC >= 4) { @@ -776,10 +789,10 @@ void Option_80192738(void) { } } -void Option_MapUpdate(void) { +void Option_Map_Update(void) { if (gFillScreenAlpha == 255) { gStarCount = 0; - D_menu_801B9124 = 100; + sMenuEntryState = 100; gGameState = GSTATE_MAP; gNextGameStateTimer = 2; gMapState = 0; @@ -793,7 +806,7 @@ void Option_MapUpdate(void) { } } -void Option_TrainingUpdate(void) { +void Option_Training_Update(void) { if (gFillScreenAlpha == 255) { gCurrentLevel = LEVEL_TRAINING; gGameState = GSTATE_PLAY; @@ -814,42 +827,42 @@ void Option_TrainingUpdate(void) { } } -void Option_801929F0(void) { +void Option_MainMenu_Setup(void) { s32 i; D_game_800D2870 = false; gBlurAlpha = 255; gControllerLock = 0; gStarCount = 800; - D_menu_801B9248 = 0; + sVsSubMenuFromCancel = false; - if (D_menu_801B9244 == 0) { - D_menu_801B91BC = 1; - for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.xPos = sOptionCardCurTextPosX[i]; - sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; - sOptionCardList[i].unk_00.xScale = 1.0f; - sOptionCardList[i].unk_00.yScale = 1.0f; - sOptionCardList[i].unk_58 = true; + if (!sMainMenuFromCancel) { + sDrawCursor = true; + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + sOptionCardList[i].tex.xPos = sOptionCardCurTextPosX[i]; + sOptionCardList[i].tex.yPos = sOptionCardCurTextPosY[i]; + sOptionCardList[i].tex.xScale = 1.0f; + sOptionCardList[i].tex.yScale = 1.0f; + sOptionCardList[i].drawTex = true; - sOptionCardList[i].unk_38.xScale = 0.4f; - sOptionCardList[i].unk_38.yScale = 0.21f; - sOptionCardList[i].unk_38.y = sOptionCardPosY[i]; - sOptionCardList[i].unk_38.z = 0.0f; - sOptionCardList[i].unk_5C = true; + sOptionCardList[i].frame.xScale = 0.4f; + sOptionCardList[i].frame.yScale = 0.21f; + sOptionCardList[i].frame.y = sOptionCardPosY[i]; + sOptionCardList[i].frame.z = 0.0f; + sOptionCardList[i].drawFrame = true; } } else { - D_menu_801B91BC = 0; - for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.yScale = 1.0f; - sOptionCardList[i].unk_38.yScale = 0.21f; - sOptionCardList[i].unk_38.z = 0.0f; - sOptionCardList[i].unk_5C = true; - sOptionCardList[i].unk_58 = true; + sDrawCursor = false; + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + sOptionCardList[i].tex.yScale = 1.0f; + sOptionCardList[i].frame.yScale = 0.21f; + sOptionCardList[i].frame.z = 0.0f; + sOptionCardList[i].drawFrame = true; + sOptionCardList[i].drawTex = true; } } - D_menu_801B9204 = -45.0f; + sLightningXpos = -45.0f; D_menu_801B9214 = 0; D_menu_801B9180.unk_0 = 0; @@ -860,152 +873,152 @@ void Option_801929F0(void) { D_menu_801B9198.unk_4 = 0; } -void Option_MainMenuUpdate(void) { +void Option_MainMenu_Update(void) { s32 i; f32 var_fs0; f32 var_fs1; - switch (D_menu_801B912C) { + switch (sMainMenuState) { case 0: - Option_801929F0(); - if (D_menu_801B9244 == 0) { - D_menu_801B912C++; + Option_MainMenu_Setup(); + if (!sMainMenuFromCancel) { + sMainMenuState++; } else { - sOptionCardCurTextPosX[0] = D_menu_801AE5E8[D_menu_801B91B0]; - sOptionCardCurTextPosY[0] = D_menu_801AE5F0[D_menu_801B91B0]; - sOptionCardCurTextPosX[4] = D_menu_801AE5F8[D_menu_801B91AC]; - sOptionCardCurTextPosY[4] = D_menu_801AE600[D_menu_801B91AC]; - D_menu_801B912C = 1000; + sOptionCardCurTextPosX[0] = D_menu_801AE5E8[sExpertModeCursor]; + sOptionCardCurTextPosY[0] = D_menu_801AE5F0[sExpertModeCursor]; + sOptionCardCurTextPosX[4] = D_menu_801AE5F8[sExpertSoundCursor]; + sOptionCardCurTextPosY[4] = D_menu_801AE600[sExpertSoundCursor]; + sMainMenuState = 1000; } break; case 1000: - for (i = 0; i < OPTION_COUNT; i++) { - if (sOptionCardList[i].unk_38.xScale < 0.4f) { - sOptionCardList[i].unk_38.xScale += 0.04f; - if (sOptionCardList[i].unk_38.xScale > 0.4f) { - sOptionCardList[i].unk_38.xScale = 0.4f; + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (sOptionCardList[i].frame.xScale < 0.4f) { + sOptionCardList[i].frame.xScale += 0.04f; + if (sOptionCardList[i].frame.xScale > 0.4f) { + sOptionCardList[i].frame.xScale = 0.4f; } } - if (sOptionCardList[i].unk_00.xScale < 1.0f) { - sOptionCardList[i].unk_00.xScale += 0.1f; - if (sOptionCardList[i].unk_00.xScale > 1.0f) { - sOptionCardList[i].unk_00.xScale = 1.0f; + if (sOptionCardList[i].tex.xScale < 1.0f) { + sOptionCardList[i].tex.xScale += 0.1f; + if (sOptionCardList[i].tex.xScale > 1.0f) { + sOptionCardList[i].tex.xScale = 1.0f; } } - Math_SmoothStepToF(&sOptionCardList[i].unk_00.yPos, sOptionCardCurTextPosY[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[i].unk_38.y, sOptionCardPosY[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[i].unk_00.xPos, sOptionCardCurTextPosX[i], 0.2f, D_menu_801AE620[i], + Math_SmoothStepToF(&sOptionCardList[i].tex.yPos, sOptionCardCurTextPosY[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[i].frame.y, sOptionCardPosY[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[i].tex.xPos, sOptionCardCurTextPosX[i], 0.2f, D_menu_801AE620[i], 0.1f); } gBlurAlpha += 4; - if (sOptionCardList[D_menu_801B91A4].unk_38.y == sOptionCardPosY[D_menu_801B91A4]) { - for (i = 0; i < OPTION_COUNT; i++) { - sOptionCardList[i].unk_00.xScale = 1.0f; - sOptionCardList[i].unk_00.xPos = sOptionCardCurTextPosX[i]; - sOptionCardList[i].unk_00.yPos = sOptionCardCurTextPosY[i]; + if (sOptionCardList[sMainMenuCursor].frame.y == sOptionCardPosY[sMainMenuCursor]) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + sOptionCardList[i].tex.xScale = 1.0f; + sOptionCardList[i].tex.xPos = sOptionCardCurTextPosX[i]; + sOptionCardList[i].tex.yPos = sOptionCardCurTextPosY[i]; } - D_menu_801B91BC = 1; + sDrawCursor = true; gBlurAlpha = 255; - D_menu_801B912C = 1; + sMainMenuState = 1; } break; case 1: // clang-format off - if (Option_8019C418(&D_menu_801B91A4, OPTION_COUNT - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180)) {\ - AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);\ + if (Option_Input_MoveCursor_Y(&sMainMenuCursor, ARRAY_COUNT(sOptionCardList) - 1, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9180)) { \ + AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); } // clang-format on - if ((D_menu_801B91A4 == 0) && D_menu_801B91C8 && - Option_8019C418(&D_menu_801B91B0, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190)) { + if ((sMainMenuCursor == OPTION_MAP) && sExpertModesEnabled && + Option_Input_MoveCursor_Y(&sExpertModeCursor, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9190)) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); - if (D_menu_801B91B0) { - sOptionCardList[0].unk_00.texture = D_OPT_8004C50; - sOptionCardList[0].unk_00.width = 80; - sOptionCardList[0].unk_00.height = 12; - sOptionCardList[0].unk_00.xPos = 125.0f; - sOptionCardList[0].unk_00.yPos = 55.0f; + if (sExpertModeCursor) { + sOptionCardList[OPTION_MAP].tex.texture = aExpertCardTex; + sOptionCardList[OPTION_MAP].tex.width = 80; + sOptionCardList[OPTION_MAP].tex.height = 12; + sOptionCardList[OPTION_MAP].tex.xPos = 125.0f; + sOptionCardList[OPTION_MAP].tex.yPos = 55.0f; } else { - sOptionCardList[0].unk_00.texture = D_OPT_8003B50; - sOptionCardList[0].unk_00.width = 72; - sOptionCardList[0].unk_00.height = 12; - sOptionCardList[0].unk_00.xPos = 124.0f; - sOptionCardList[0].unk_00.yPos = 54.0f; + sOptionCardList[OPTION_MAP].tex.texture = aMainGameCardTex; + sOptionCardList[OPTION_MAP].tex.width = 72; + sOptionCardList[OPTION_MAP].tex.height = 12; + sOptionCardList[OPTION_MAP].tex.xPos = 124.0f; + sOptionCardList[OPTION_MAP].tex.yPos = 54.0f; } - gExpertMode = D_menu_801B91B0; + gExpertMode = sExpertModeCursor; } - if ((D_menu_801B91A4 == 4) && D_menu_801B91C8 && - Option_8019C418(&D_menu_801B91AC, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198)) { + if ((sMainMenuCursor == OPTION_SOUND) && sExpertModesEnabled && + Option_Input_MoveCursor_Y(&sExpertSoundCursor, 1, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9198)) { AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4); - if (D_menu_801B91AC) { - sOptionCardList[4].unk_00.texture = D_OPT_8004C50; - sOptionCardList[4].unk_00.width = 80; - sOptionCardList[4].unk_00.height = 12; - sOptionCardList[4].unk_00.xPos = 125.0f; - sOptionCardList[4].unk_00.yPos = 151.0f; + if (sExpertSoundCursor) { + sOptionCardList[OPTION_SOUND].tex.texture = aExpertCardTex; + sOptionCardList[OPTION_SOUND].tex.width = 80; + sOptionCardList[OPTION_SOUND].tex.height = 12; + sOptionCardList[OPTION_SOUND].tex.xPos = 125.0f; + sOptionCardList[OPTION_SOUND].tex.yPos = 151.0f; } else { - sOptionCardList[4].unk_00.texture = D_OPT_80046B0; - sOptionCardList[4].unk_00.width = 64; - sOptionCardList[4].unk_00.height = 10; - sOptionCardList[4].unk_00.xPos = 133.0f; - sOptionCardList[4].unk_00.yPos = 151.0f; + sOptionCardList[OPTION_SOUND].tex.texture = aSoundCardTex; + sOptionCardList[OPTION_SOUND].tex.width = 64; + sOptionCardList[OPTION_SOUND].tex.height = 10; + sOptionCardList[OPTION_SOUND].tex.xPos = 133.0f; + sOptionCardList[OPTION_SOUND].tex.yPos = 151.0f; } } if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { AUDIO_PLAY_SFX(NA_SE_ARWING_DECIDE, gDefaultSfxSource, 4); - D_menu_801B9208 = sOptionCardPosY[D_menu_801B91A4]; - D_menu_801B91BC = 0; - D_menu_801B912C = 11; + sLightningYpos = sOptionCardPosY[sMainMenuCursor]; + sDrawCursor = false; + sMainMenuState = 11; } if (gControllerPress[gMainController].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B8284 = 0; - D_menu_801B8280 = 1; - D_menu_801B912C = 100; + sWipeHeight = 0; + sLevelStartState = true; + sMainMenuState = 100; } break; case 11: gBlurAlpha = 16; D_menu_801B9178 = 3; - sOptionCardList[D_menu_801B91A4].unk_38.xScale -= 0.01f; - sOptionCardList[D_menu_801B91A4].unk_38.yScale -= 0.01f; - sOptionCardList[D_menu_801B91A4].unk_00.xScale -= 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.yScale -= 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.xPos += 4.0f; + sOptionCardList[sMainMenuCursor].frame.xScale -= 0.01f; + sOptionCardList[sMainMenuCursor].frame.yScale -= 0.01f; + sOptionCardList[sMainMenuCursor].tex.xScale -= 0.1f; + sOptionCardList[sMainMenuCursor].tex.yScale -= 0.1f; + sOptionCardList[sMainMenuCursor].tex.xPos += 4.0f; D_menu_801B917C = 3; - D_menu_801B912C++; + sMainMenuState++; break; case 12: if (D_menu_801B9178 == 1) { - sOptionCardList[D_menu_801B91A4].unk_38.xScale += 0.01f; - sOptionCardList[D_menu_801B91A4].unk_38.yScale += 0.01f; - sOptionCardList[D_menu_801B91A4].unk_00.xScale += 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.yScale += 0.1f; - sOptionCardList[D_menu_801B91A4].unk_00.xPos -= 4.0f; + sOptionCardList[sMainMenuCursor].frame.xScale += 0.01f; + sOptionCardList[sMainMenuCursor].frame.yScale += 0.01f; + sOptionCardList[sMainMenuCursor].tex.xScale += 0.1f; + sOptionCardList[sMainMenuCursor].tex.yScale += 0.1f; + sOptionCardList[sMainMenuCursor].tex.xPos -= 4.0f; D_menu_801B9214 = 1; } - for (i = 0; i < OPTION_COUNT; i++) { - if (i == D_menu_801B91A4) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (i == sMainMenuCursor) { continue; } - if (sOptionCardList[i].unk_38.xScale > 0.01f) { - sOptionCardList[i].unk_38.xScale -= 0.05f; - sOptionCardList[i].unk_00.xScale -= 0.19f; - Math_SmoothStepToF(&sOptionCardList[i].unk_00.xPos, 158.0f, 0.2f, D_menu_801AE608[i], 0.1f); + if (sOptionCardList[i].frame.xScale > 0.01f) { + sOptionCardList[i].frame.xScale -= 0.05f; + sOptionCardList[i].tex.xScale -= 0.19f; + Math_SmoothStepToF(&sOptionCardList[i].tex.xPos, 158.0f, 0.2f, D_menu_801AE608[i], 0.1f); } else { - sOptionCardList[i].unk_5C = false; - sOptionCardList[i].unk_58 = false; + sOptionCardList[i].drawFrame = false; + sOptionCardList[i].drawTex = false; } } @@ -1013,296 +1026,295 @@ void Option_MainMenuUpdate(void) { var_fs0 = 25.0f; var_fs1 = 90.0f; - if ((D_menu_801B91A4 == 0) || (D_menu_801B91A4 == 1)) { + if ((sMainMenuCursor == OPTION_MAP) || (sMainMenuCursor == OPTION_TRAINING)) { var_fs0 = 0.0f; var_fs1 = 120.0f; } - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, var_fs0, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, var_fs1, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].tex.yPos, var_fs0, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].frame.y, var_fs1, 0.25f, 100.0f, 0.1f); gBlurAlpha += 4; - if ((sOptionCardList[D_menu_801B91A4].unk_00.yPos == var_fs0) && - (sOptionCardList[D_menu_801B91A4].unk_38.y == var_fs1)) { + if ((sOptionCardList[sMainMenuCursor].tex.yPos == var_fs0) && + (sOptionCardList[sMainMenuCursor].frame.y == var_fs1)) { gBlurAlpha += 255; - D_menu_801B9124 = D_menu_801B91A4; + sMenuEntryState = sMainMenuCursor; - if (D_menu_801B91A4 == 4 && D_menu_801B91AC) { - D_menu_801B9124 = 6; + if ((sMainMenuCursor == OPTION_SOUND) && sExpertSoundCursor) { + sMenuEntryState = OPTION_EXPERT_SOUND; } - - Option_InitEntry(); + Option_Entry_Setup(); } } break; case 100: - if (D_menu_801B8284 < 120) { - D_menu_801B8284 += 18; + if (sWipeHeight < 120) { + sWipeHeight += 18; } else { gStarCount = 0; gGameState = GSTATE_TITLE; gNextGameStateTimer = 2; gTitleState = 0; - D_menu_801B827C = 1; + gGoToTitle = true; gDrawMode = DRAW_NONE; - D_menu_801B8280 = 0; - D_menu_801B8284 = 0; + sLevelStartState = false; + sWipeHeight = 0; gControllerLock = 3; } break; } } -void Option_MainMenuDraw(void) { +void Option_MainMenu_Draw(void) { s32 i; - Option_8019BDF0(); + Option_Menu_Push(); - for (i = 0; i < OPTION_COUNT; i++) { - if (sOptionCardList[i].unk_5C) { - Option_DrawMenuCard(sOptionCardList[i].unk_38); + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (sOptionCardList[i].drawFrame) { + Option_DrawMenuCard(sOptionCardList[i].frame); } } - Option_DrawMenuArwing(sOptionCardList[D_menu_801B91A4].unk_4C); + Option_DrawMenuArwing(sOptionCardList[sMainMenuCursor].pos); Matrix_Pop(&gGfxMatrix); - for (i = 0; i < OPTION_COUNT; i++) { - if (!(sOptionCardList[i].unk_58) || (sOptionCardList[i].unk_00.xScale) <= 0.0f) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { + if (!(sOptionCardList[i].drawTex) || (sOptionCardList[i].tex.xScale) <= 0.0f) { continue; } - if ((i == 0) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { - Option_8019B6D8(106.0f, 56.0f, 98.0f, 20, 0, 75); + if ((i == 0) && sExpertModesEnabled && ((sMainMenuState == 0) || (sMainMenuState == 1))) { + Option_VsSelectionArrows_Draw(106.0f, 56.0f, 98.0f, 20, 0, 75); } - if ((i == 4) && D_menu_801B91C8 && ((D_menu_801B912C == 0) || (D_menu_801B912C == 1))) { - Option_8019B6D8(106.0f, 152.0f, 98.0f, 20, 0, 75); + if ((i == 4) && sExpertModesEnabled && ((sMainMenuState == 0) || (sMainMenuState == 1))) { + Option_VsSelectionArrows_Draw(106.0f, 152.0f, 98.0f, 20, 0, 75); } - Option_DrawCardLabel(sOptionCardList[i].unk_00); + Option_DrawCardLabel(sOptionCardList[i].tex); } - Option_8019BF34(); + Option_CardLightning_Update(); } -void Option_80193B04(void) { +void Option_Versus_Setup(void) { s32 i; gBlurAlpha = 255; gControllerLock = 0; gStarCount = 800; - if (D_menu_801B9248 == 0) { - D_menu_801B91BC = 1; + if (!sVsSubMenuFromCancel) { + sDrawCursor = true; - for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.xPos = D_menu_801AEF90[i]; - sOptionVSCardList[i].unk_00.yPos = D_menu_801AEF9C[i]; - sOptionVSCardList[i].unk_00.xScale = 1.0f; - sOptionVSCardList[i].unk_00.yScale = 1.0f; - sOptionVSCardList[i].unk_58 = true; - sOptionVSCardList[i].unk_38.xScale = 0.4f; - sOptionVSCardList[i].unk_38.yScale = 0.21f; - sOptionVSCardList[i].unk_38.y = D_menu_801AEF84[i]; - sOptionVSCardList[i].unk_38.z = 0.0f; - sOptionVSCardList[i].unk_5C = true; + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + sOptionVSCardList[i].tex.xPos = D_menu_801AEF90[i]; + sOptionVSCardList[i].tex.yPos = D_menu_801AEF9C[i]; + sOptionVSCardList[i].tex.xScale = 1.0f; + sOptionVSCardList[i].tex.yScale = 1.0f; + sOptionVSCardList[i].drawTex = true; + sOptionVSCardList[i].frame.xScale = 0.4f; + sOptionVSCardList[i].frame.yScale = 0.21f; + sOptionVSCardList[i].frame.y = D_menu_801AEF84[i]; + sOptionVSCardList[i].frame.z = 0.0f; + sOptionVSCardList[i].drawFrame = true; } } else { - D_menu_801B91BC = 0; + sDrawCursor = false; - for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.yScale = 1.0f; - sOptionVSCardList[i].unk_38.yScale = 0.21f; - sOptionVSCardList[i].unk_38.z = 0.0f; - sOptionVSCardList[i].unk_58 = true; - sOptionVSCardList[i].unk_5C = true; + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + sOptionVSCardList[i].tex.yScale = 1.0f; + sOptionVSCardList[i].frame.yScale = 0.21f; + sOptionVSCardList[i].frame.z = 0.0f; + sOptionVSCardList[i].drawTex = true; + sOptionVSCardList[i].drawFrame = true; } } - D_menu_801B9204 = -45.0f; + sLightningXpos = -45.0f; D_menu_801B9214 = 0; D_menu_801B9188.unk_0 = 0; D_menu_801B9188.unk_4 = 0; } -void Option_VersusUpdate(void) { +void Option_Versus_Update(void) { f32 var_fs0; s32 i; - switch (D_menu_801B912C) { + switch (sMainMenuState) { case 0: - Option_80193B04(); - if (D_menu_801B9248 == 0) { - D_menu_801B912C++; + Option_Versus_Setup(); + if (!sVsSubMenuFromCancel) { + sMainMenuState++; } else { - D_menu_801B912C = 1000; + sMainMenuState = 1000; } break; case 1000: - for (i = 0; i < 3; i++) { - if (sOptionVSCardList[i].unk_38.xScale < 0.4f) { - sOptionVSCardList[i].unk_38.xScale += 0.04f; - if (sOptionVSCardList[i].unk_38.xScale > 0.4f) { - sOptionVSCardList[i].unk_38.xScale = 0.4f; + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + if (sOptionVSCardList[i].frame.xScale < 0.4f) { + sOptionVSCardList[i].frame.xScale += 0.04f; + if (sOptionVSCardList[i].frame.xScale > 0.4f) { + sOptionVSCardList[i].frame.xScale = 0.4f; } } - if (sOptionVSCardList[i].unk_00.xScale < 1.0f) { - sOptionVSCardList[i].unk_00.xScale += 0.15f; - if (sOptionVSCardList[i].unk_00.xScale > 1.0f) { - sOptionVSCardList[i].unk_00.xScale = 1.0f; + if (sOptionVSCardList[i].tex.xScale < 1.0f) { + sOptionVSCardList[i].tex.xScale += 0.15f; + if (sOptionVSCardList[i].tex.xScale > 1.0f) { + sOptionVSCardList[i].tex.xScale = 1.0f; } } - Math_SmoothStepToF(&sOptionVSCardList[i].unk_38.y, D_menu_801AEF84[i], 0.15f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.xPos, D_menu_801AEF90[i], 0.2f, 3.1f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.yPos, D_menu_801AEF9C[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].frame.y, D_menu_801AEF84[i], 0.15f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].tex.xPos, D_menu_801AEF90[i], 0.2f, 3.1f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[i].tex.yPos, D_menu_801AEF9C[i], 0.15f, 100.0f, 0.1f); } - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, 25.0f, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, 90.0f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].tex.yPos, 25.0f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].frame.y, 90.0f, 0.25f, 100.0f, 0.1f); gBlurAlpha += 4; - if (sOptionVSCardList[D_menu_801B91A8].unk_38.y == D_menu_801AEF84[D_menu_801B91A8]) { - for (i = 0; i < 3; i++) { - sOptionVSCardList[i].unk_00.xScale = 1.0f; - sOptionVSCardList[i].unk_00.yPos = D_menu_801AEF9C[i]; - sOptionVSCardList[i].unk_00.xPos = D_menu_801AEF90[i]; + if (sOptionVSCardList[sVsMenuCursor].frame.y == D_menu_801AEF84[sVsMenuCursor]) { + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + sOptionVSCardList[i].tex.xScale = 1.0f; + sOptionVSCardList[i].tex.yPos = D_menu_801AEF9C[i]; + sOptionVSCardList[i].tex.xPos = D_menu_801AEF90[i]; } - sOptionCardList[D_menu_801B91A4].unk_00.yPos = 25.0f; - sOptionCardList[D_menu_801B91A4].unk_38.y = 90.0f; - D_menu_801B91BC = 1; + sOptionCardList[sMainMenuCursor].tex.yPos = 25.0f; + sOptionCardList[sMainMenuCursor].frame.y = 90.0f; + sDrawCursor = true; gBlurAlpha = 255; - D_menu_801B912C = 1; + sMainMenuState = 1; } break; case 1: // clang-format off - if (Option_8019C418(&D_menu_801B91A8, 2, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9188)) {\ + if (Option_Input_MoveCursor_Y(&sVsMenuCursor, 2, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9188)) {\ AUDIO_PLAY_SFX(NA_SE_ARWING_CURSOR, gDefaultSfxSource, 4);\ } // clang-format on if (gControllerPress[gMainController].button & (A_BUTTON | START_BUTTON)) { AUDIO_PLAY_SFX(NA_SE_ARWING_DECIDE, gDefaultSfxSource, 4); - D_menu_801B9208 = D_menu_801AEF84[D_menu_801B91A8]; - D_menu_801B91BC = 0; - D_menu_801B912C = 11; + sLightningYpos = D_menu_801AEF84[sVsMenuCursor]; + sDrawCursor = false; + sMainMenuState = 11; } if (gControllerPress[gMainController].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 0; - D_menu_801B9124 = 1000; + sMainMenuState = 0; + sMenuEntryState = OPTION_MAIN_MENU; gDrawMode = DRAW_NONE; - D_menu_801B9244 = 1; + sMainMenuFromCancel = true; } break; case 11: gBlurAlpha = 16; D_menu_801B9178 = 5; - sOptionVSCardList[D_menu_801B91A8].unk_38.xScale -= 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_38.yScale -= 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_00.xScale -= 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.yScale -= 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.xPos += 4.0f; + sOptionVSCardList[sVsMenuCursor].frame.xScale -= 0.01f; + sOptionVSCardList[sVsMenuCursor].frame.yScale -= 0.01f; + sOptionVSCardList[sVsMenuCursor].tex.xScale -= 0.1f; + sOptionVSCardList[sVsMenuCursor].tex.yScale -= 0.1f; + sOptionVSCardList[sVsMenuCursor].tex.xPos += 4.0f; D_menu_801B917C = 5; - D_menu_801B912C++; + sMainMenuState++; break; case 12: if (D_menu_801B9178 == 1) { - sOptionVSCardList[D_menu_801B91A8].unk_38.xScale += 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_38.yScale += 0.01f; - sOptionVSCardList[D_menu_801B91A8].unk_00.xScale += 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.yScale += 0.1f; - sOptionVSCardList[D_menu_801B91A8].unk_00.xPos -= 4.0f; + sOptionVSCardList[sVsMenuCursor].frame.xScale += 0.01f; + sOptionVSCardList[sVsMenuCursor].frame.yScale += 0.01f; + sOptionVSCardList[sVsMenuCursor].tex.xScale += 0.1f; + sOptionVSCardList[sVsMenuCursor].tex.yScale += 0.1f; + sOptionVSCardList[sVsMenuCursor].tex.xPos -= 4.0f; D_menu_801B9214 = 1; } - for (i = 0; i < 3; i++) { - if (i == D_menu_801B91A8) { + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + if (i == sVsMenuCursor) { continue; } - if (sOptionVSCardList[i].unk_38.xScale > 0.01f) { - sOptionVSCardList[i].unk_38.xScale -= 0.05f; - sOptionVSCardList[i].unk_00.xScale -= 0.19f; - Math_SmoothStepToF(&sOptionVSCardList[i].unk_00.xPos, 158.0f, 0.2f, D_menu_801AE608[i + 1], 0.1f); + if (sOptionVSCardList[i].frame.xScale > 0.01f) { + sOptionVSCardList[i].frame.xScale -= 0.05f; + sOptionVSCardList[i].tex.xScale -= 0.19f; + Math_SmoothStepToF(&sOptionVSCardList[i].tex.xPos, 158.0f, 0.2f, D_menu_801AE608[i + 1], 0.1f); } else { - sOptionVSCardList[i].unk_5C = false; - sOptionVSCardList[i].unk_58 = false; + sOptionVSCardList[i].drawFrame = false; + sOptionVSCardList[i].drawTex = false; } } if (D_menu_801B917C == 0) { - if (D_menu_801B91A8 == 0) { + if (sVsMenuCursor == 0) { var_fs0 = 129.0f; } else { var_fs0 = 131.0f; } - Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_00.yPos, var_fs0, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionVSCardList[D_menu_801B91A8].unk_38.y, -15.5f, 0.25f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_00.yPos, -10.0f, 0.35f, 100.0f, 0.1f); - Math_SmoothStepToF(&sOptionCardList[D_menu_801B91A4].unk_38.y, 150.0f, 0.35f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[sVsMenuCursor].tex.yPos, var_fs0, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionVSCardList[sVsMenuCursor].frame.y, -15.5f, 0.25f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].tex.yPos, -10.0f, 0.35f, 100.0f, 0.1f); + Math_SmoothStepToF(&sOptionCardList[sMainMenuCursor].frame.y, 150.0f, 0.35f, 100.0f, 0.1f); gBlurAlpha += 4; - if ((var_fs0 == sOptionVSCardList[D_menu_801B91A8].unk_00.yPos) && - (sOptionVSCardList[D_menu_801B91A8].unk_38.y == -15.5f)) { + if ((var_fs0 == sOptionVSCardList[sVsMenuCursor].tex.yPos) && + (sOptionVSCardList[sVsMenuCursor].frame.y == -15.5f)) { gBlurAlpha += 255; - D_menu_801B9124 = (D_menu_801B91A8 + 1) * 10; - gVsMatchType = D_menu_801B91A8; + sMenuEntryState = (sVsMenuCursor + 1) * 10; + gVsMatchType = sVsMenuCursor; D_menu_801B91C4 = 1; - Option_InitEntry(); + Option_Entry_Setup(); } } break; } } -void Option_VersusDraw(void) { +void Option_Versus_Draw(void) { s32 i; Option_DrawMenuLabel(); - Option_8019BDF0(); + Option_Menu_Push(); - for (i = 0; i < 3; i++) { - if (sOptionVSCardList[i].unk_5C) { - Option_DrawMenuCard(sOptionVSCardList[i].unk_38); + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + if (sOptionVSCardList[i].drawFrame) { + Option_DrawMenuCard(sOptionVSCardList[i].frame); } } - Option_DrawMenuArwing(sOptionVSCardList[D_menu_801B91A8].unk_4C); + Option_DrawMenuArwing(sOptionVSCardList[sVsMenuCursor].pos); Matrix_Pop(&gGfxMatrix); - for (i = 0; i < 3; i++) { - if ((sOptionVSCardList[i].unk_58) && !(sOptionVSCardList[i].unk_00.xScale <= 0.0f)) { - Option_DrawCardLabel(sOptionVSCardList[i].unk_00); + for (i = 0; i < ARRAY_COUNT(sOptionVSCardList); i++) { + if ((sOptionVSCardList[i].drawTex) && !(sOptionVSCardList[i].tex.xScale <= 0.0f)) { + Option_DrawCardLabel(sOptionVSCardList[i].tex); } } - Option_8019BF34(); + Option_CardLightning_Update(); } -void Option_SoundInit(void) { +void Option_Sound_Setup(void) { s32 i; gStarCount = 800; D_menu_801B91B4 = 0; D_menu_801B91B8 = 0; - D_menu_801B91BC = 1; + sDrawCursor = true; D_menu_801B91A0 = 0; gOptionSoundMode = gSaveFile.save.data.soundMode; - SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); + SEQCMD_SET_SOUND_MODE(sSoundMode[gOptionSoundMode]); gVolumeSettings[AUDIO_TYPE_MUSIC] = gSaveFile.save.data.musicVolume; gVolumeSettings[AUDIO_TYPE_VOICE] = gSaveFile.save.data.voiceVolume; @@ -1334,7 +1346,7 @@ void Option_SoundInit(void) { D_menu_801B917C = 0; // clang-format off - for (i = 0; i < 5; i++) { D_menu_801B9270[i] = 255.0f; } + for (i = 0; i < ARRAY_COUNT(D_menu_801B9270); i++) { D_menu_801B9270[i] = 255.0f; } // clang-format on D_menu_801B91E4 = 255.0f; @@ -1355,18 +1367,18 @@ void Option_SoundInit(void) { D_menu_801B9268.unk_4 = 0; } -void Option_SoundUpdate(void) { +void Option_Sound_Update(void) { s32 sp34 = D_menu_801B9288; - if (Option_8019C418(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250)) { + if (Option_Input_MoveCursor_Y(&D_menu_801B9288, 3, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9250)) { D_menu_801B9270[sp34] = 255.0f; AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } if (D_menu_801B9288 == 0) { - Option_80194AEC(); + Option_Sound_SetSoundMode(); } else { - Option_80194BD0(); + Option_Sound_SetVolumeLevels(); } // Test sound @@ -1388,33 +1400,33 @@ void Option_SoundUpdate(void) { } Save_Write(); gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = OPTION_MAIN_MENU; + sMainMenuState = 0; + sMainMenuFromCancel = true; } } -void Option_80194AEC(void) { +void Option_Sound_SetSoundMode(void) { s32 sp3C = gOptionSoundMode; s32 pad; - if (Option_8019C418(&sp3C, 2, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9260)) { + if (Option_Input_MoveCursor_Y(&sp3C, 2, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9260)) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); gOptionSoundMode = sp3C; if (gOptionSoundMode >= OPTIONSOUND_MAX) { gOptionSoundMode = OPTIONSOUND_STEREO; } gSaveFile.save.data.soundMode = gOptionSoundMode; - SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); + SEQCMD_SET_SOUND_MODE(sSoundMode[gOptionSoundMode]); } } -void Option_80194BD0(void) { +void Option_Sound_SetVolumeLevels(void) { s32 var_v1; D_menu_801B924C = D_menu_801AE99C[D_menu_801B9288 - 1]; - if (Option_8019C66C(&(D_menu_801AEB48[D_menu_801B9288 - 1].xPos), 146.0f, 245.0f, &D_menu_801B9268)) { + if (Option_Input_Sound_X(&(D_menu_801AEB48[D_menu_801B9288 - 1].xPos), 146.0f, 245.0f, &D_menu_801B9268)) { var_v1 = D_menu_801AEB48[D_menu_801B9288 - 1].xPos - 146.0f; gVolumeSettings[D_menu_801B9288 - 1] = var_v1; @@ -1440,7 +1452,7 @@ void Option_80194BD0(void) { } } -void Option_SoundDraw(void) { +void Option_Sound_Draw(void) { s32 i; s32 colorGB; @@ -1454,20 +1466,20 @@ void Option_SoundDraw(void) { Option_DrawMenuLabel(); - Option_801952B4(); + Option_Sound_Speaker_Draw(); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, D_menu_801AEFA8[0], D_menu_801AEFD4[0], D_menu_801AF000, - 0.2f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapWhiteSquareTex, 8, 8, D_menu_801AEFA8[0], D_menu_801AEFD4[0], + D_menu_801AF000, 0.2f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8005CD0, 112, 13, D_menu_801AEFA8[1], D_menu_801AEFD4[1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8005CD0, 112, 13, D_menu_801AEFA8[1], D_menu_801AEFD4[1], 1.0f, 1.0f); for (i = 0; i < 4; i++) { if (D_menu_801B9288 == i) { - Option_8019C824(&D_menu_801B9270[i]); + Option_Color_FlashRed(&D_menu_801B9270[i]); } else { D_menu_801B9270[i] = 255.0f; } @@ -1475,51 +1487,54 @@ void Option_SoundDraw(void) { colorGB = D_menu_801B9270[0]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8006280, 48, 13, D_menu_801AEFA8[2], D_menu_801AEFD4[2], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8006280, 48, 13, D_menu_801AEFA8[2], D_menu_801AEFD4[2], 1.0f, 1.0f); colorGB = D_menu_801B9270[1]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_80064F0, 88, 14, D_menu_801AEFA8[3], D_menu_801AEFD4[3], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80064F0, 88, 14, D_menu_801AEFA8[3], D_menu_801AEFD4[3], 1.0f, 1.0f); colorGB = D_menu_801B9270[2]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_80069C0, 56, 15, D_menu_801AEFA8[4], D_menu_801AEFD4[4], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80069C0, 56, 15, D_menu_801AEFA8[4], D_menu_801AEFD4[4], 1.0f, 1.0f); colorGB = D_menu_801B9270[3]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8006D10, 24, 13, D_menu_801AEFA8[5], D_menu_801AEFD4[5], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8006D10, 24, 13, D_menu_801AEFA8[5], D_menu_801AEFD4[5], 1.0f, 1.0f); if (D_menu_801B9288 == 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AEFA8[6], D_menu_801AEFD4[6], 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AEFA8[7], D_menu_801AEFD4[7], 1.0f, 1.0f); + Lib_TextureRect_IA8_MirX(&gMasterDisp, aArrowTex, 8, 8, D_menu_801AEFA8[6], D_menu_801AEFD4[6], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aArrowTex, 8, 8, D_menu_801AEFA8[7], D_menu_801AEFD4[7], 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); switch (gOptionSoundMode) { case OPTIONSOUND_STEREO: - TextureRect_IA8(&gMasterDisp, D_OPT_800CD90, 56, 13, D_menu_801AEFA8[8], D_menu_801AEFD4[8], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800CD90, 56, 13, D_menu_801AEFA8[8], D_menu_801AEFD4[8], 1.0f, + 1.0f); break; case OPTIONSOUND_MONO: - TextureRect_IA8(&gMasterDisp, D_OPT_80076E0, 56, 14, D_menu_801AEFA8[9], D_menu_801AEFD4[9], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80076E0, 56, 14, D_menu_801AEFA8[9], D_menu_801AEFD4[9], 1.0f, + 1.0f); break; case OPTIONSOUND_HEADSET: - TextureRect_IA8(&gMasterDisp, D_OPT_8007210, 88, 14, D_menu_801AEFA8[10], D_menu_801AEFD4[10], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8007210, 88, 14, D_menu_801AEFA8[10], D_menu_801AEFD4[10], 1.0f, + 1.0f); break; } - TextureRect_IA8(&gMasterDisp, D_OPT_8006E50, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aBtoCancelTex, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); - for (i = 0; i < 3; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801AEAA0); i++) { Option_DrawCardLabel(D_menu_801AEAA0[i]); Option_DrawCardLabel(D_menu_801AEB48[i]); } } -void Option_801952B4(void) { +void Option_Sound_Speaker_Draw(void) { s32 i; if (D_menu_801B9284 == 1) { @@ -1533,7 +1548,7 @@ void Option_801952B4(void) { break; // looks fake, but isn't } - for (i = 2; i < 4; i++) { + for (i = 2; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale += 0.02f; D_menu_801AE9C0[i].yScale += 0.02f; D_menu_801AE9C0[i].xPos -= 0.1f; @@ -1545,7 +1560,7 @@ void Option_801952B4(void) { case 2: if (D_menu_801B9178 == 0) { - for (i = 2; i < 4; i++) { + for (i = 2; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale -= 0.02f; D_menu_801AE9C0[i].yScale -= 0.02f; D_menu_801AE9C0[i].xPos += 0.1f; @@ -1563,7 +1578,7 @@ void Option_801952B4(void) { switch (D_menu_801B9158) { case 0: if (D_menu_801B917C == 0) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale += 0.08f; D_menu_801AE9C0[i].yScale += 0.08f; D_menu_801AE9C0[i].xPos -= 0.4f; @@ -1578,7 +1593,7 @@ void Option_801952B4(void) { case 1: if (D_menu_801B917C == 0) { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale -= 0.08f; D_menu_801AE9C0[i].yScale -= 0.08f; D_menu_801AE9C0[i].xPos += 0.4f; @@ -1599,7 +1614,7 @@ void Option_801952B4(void) { } } else { - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { D_menu_801AE9C0[i].xScale = 1.0f; D_menu_801AE9C0[i].yScale = 1.0f; D_menu_801AE9C0[i].xPos = D_menu_801AE9A0[i]; @@ -1611,14 +1626,14 @@ void Option_801952B4(void) { Option_DrawCardLabel(D_menu_801AE9C0[i]); } - for (i = 2; i < 4; i++) { + for (i = 2; i < ARRAY_COUNT(D_menu_801AE9C0); i++) { if (D_menu_801B914C != 3) { Option_DrawCardLabel(D_menu_801AE9C0[i]); } } } -void Option_ExpertSoundInit(void) { +void Option_ExpertSound_Setup(void) { s32 i; gStarCount = 800; @@ -1627,11 +1642,11 @@ void Option_ExpertSoundInit(void) { D_menu_801B9290.unk_0 = 0; D_menu_801B9290.unk_4 = 0; - spectrumAnalyzerMode = 0; + sSpectrumAnalyzerMode = 0; sMusicPlaying = false; // clang-format off - for (i = 0; i < 32; i++) { D_menu_801B9298[i] = 0.0f; } + for (i = 0; i < ARRAY_COUNT(D_menu_801B9298); i++) { D_menu_801B9298[i] = 0.0f; } // clang-format on } @@ -1640,7 +1655,7 @@ void Option_ExpertSoundInit(void) { #endif // Expert Sound Options -void Option_ExpertSoundUpdate(void) { +void Option_ExpertSound_Update(void) { s32 pad; f32 sp28 = D_menu_801B931C; @@ -1654,7 +1669,7 @@ void Option_ExpertSoundUpdate(void) { } #endif - if (Option_8019C66C(&sp28, 0.0f, 49.0f, &D_menu_801B9290) != 0) { + if (Option_Input_Sound_X(&sp28, 0.0f, 49.0f, &D_menu_801B9290) != 0) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B931C = sp28; } @@ -1669,9 +1684,9 @@ void Option_ExpertSoundUpdate(void) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); AUDIO_PLAY_BGM(NA_BGM_SELECT); gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = OPTION_MAIN_MENU; + sMainMenuState = 0; + sMainMenuFromCancel = true; } else { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); @@ -1682,14 +1697,14 @@ void Option_ExpertSoundUpdate(void) { // Spectrum Analyzer mode selector if (gControllerPress[gMainController].button & R_CBUTTONS) { - spectrumAnalyzerMode++; - if (spectrumAnalyzerMode > 2) { - spectrumAnalyzerMode = 0; + sSpectrumAnalyzerMode++; + if (sSpectrumAnalyzerMode > 2) { + sSpectrumAnalyzerMode = 0; } } } -void Option_ExpertSoundDraw(void) { +void Option_ExpertSound_Draw(void) { u8* temp_v0_4; f32 var_fs0; f32 var_fv1; @@ -1729,44 +1744,44 @@ void Option_ExpertSoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_80079F0, 128, 14, 49.0f, 81.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80079F0, 128, 14, 49.0f, 81.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C / 10], 16, 15, 230.0f, 82.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C / 10], 16, 15, 230.0f, 82.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C % 10], 16, 15, 244.0f, 82.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[D_menu_801B931C % 10], 16, 15, 244.0f, 82.0f, 1.0f, 1.0f); #if MODS_SFX_JUKEBOX == 1 } #endif - Option_8019B7D4(); + Option_AcceptCancel_Draw(); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 50, 50, 200, 255); for (i = 0; i < 4; i++) { - TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, D_menu_801AF014[i], D_menu_801AF024[i], - D_menu_801AF034[i], D_menu_801AF044[i]); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapWhiteSquareTex, 8, 8, D_menu_801AF014[i], D_menu_801AF024[i], + D_menu_801AF034[i], D_menu_801AF044[i]); } if (sMusicPlaying) { temp_v0_4 = Audio_UpdateFrequencyAnalysis(); var_fv1 = 60.0f; - if (spectrumAnalyzerMode == 2) { + if (sSpectrumAnalyzerMode == 2) { var_fv1 = 30.0f; } - for (i = 0; i < 32; i++) { - if (spectrumAnalyzerMode == 0 || spectrumAnalyzerMode == 2) { + for (i = 0; i < ARRAY_COUNT(D_menu_801B9298); i++) { + if ((sSpectrumAnalyzerMode == 0) || (sSpectrumAnalyzerMode == 2)) { D_menu_801B9298[i] = (var_fv1 / 255.0f) * temp_v0_4[i]; } else { D_menu_801B9298[i] = var_fv1 - ((var_fv1 / 255.0f) * temp_v0_4[i]); } } } else { - for (i = 0; i < 32; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801B9298); i++) { Math_SmoothStepToF(&D_menu_801B9298[i], 0.0f, 0.2f, 100.0f, 0.1f); } } @@ -1779,7 +1794,7 @@ void Option_ExpertSoundDraw(void) { Matrix_LookAt(gGfxMatrix, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - for (var_fs0 = D_menu_801AF004, i = 0; i < 32; i++, var_fs0 += D_menu_801AF010) { + for (var_fs0 = D_menu_801AF004, i = 0; i < ARRAY_COUNT(D_menu_801B9298); i++, var_fs0 += D_menu_801AF010) { r = D_menu_801AF054 + ((D_menu_801AF060 - D_menu_801AF054) / 31.0f) * i; g = D_menu_801AF058 + ((D_menu_801AF064 - D_menu_801AF058) / 31.0f) * i; b = D_menu_801AF05C + ((D_menu_801AF068 - D_menu_801AF05C) / 31.0f) * i; @@ -1787,11 +1802,11 @@ void Option_ExpertSoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, (s32) r, (s32) g, (s32) b, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[spectrumAnalyzerMode], D_menu_801AF008, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[sSpectrumAnalyzerMode], D_menu_801AF008, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801AF00C, D_menu_801B9298[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AF06C[spectrumAnalyzerMode]); + gSPDisplayList(gMasterDisp++, D_menu_801AF06C[sSpectrumAnalyzerMode]); Matrix_Pop(&gGfxMatrix); } @@ -1800,7 +1815,7 @@ void Option_ExpertSoundDraw(void) { Lib_InitPerspective(&gMasterDisp); } -void Option_DataInit(void) { +void Option_Data_Setup(void) { gStarCount = 800; D_menu_801B91E4 = 255.0f; D_menu_801B9330[0] = 0; @@ -1809,13 +1824,13 @@ void Option_DataInit(void) { D_menu_801B91CC = 0; } -void Option_DataUpdate(void) { +void Option_Data_Update(void) { f32 temp_fv0; s32 i; - switch (D_menu_801B912C) { + switch (sMainMenuState) { case 0: - Option_8019669C(); + Option_Data_Select(); break; case 2: @@ -1824,15 +1839,15 @@ void Option_DataUpdate(void) { } D_menu_801B91CC = 0; D_menu_801B91C0 = 0; - D_menu_801B912C = 0; + sMainMenuState = 0; break; case 3: if (D_menu_801B9330[D_menu_801B91C0] == 0) { gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = OPTION_MAIN_MENU; + sMainMenuState = 0; + sMainMenuFromCancel = true; } break; @@ -1842,7 +1857,7 @@ void Option_DataUpdate(void) { case 0: D_menu_801B91CC = 1; D_menu_801B91C0 = 0; - D_menu_801B912C = 0; + sMainMenuState = 0; break; case 1: @@ -1868,29 +1883,29 @@ void Option_DataUpdate(void) { Save_Write(); - D_menu_801B91AC = 0; - D_menu_801B91B0 = 0; - D_menu_801B91C8 = false; + sExpertSoundCursor = 0; + sExpertModeCursor = 0; + sExpertModesEnabled = false; gExpertMode = false; - sOptionCardList[0].unk_00.texture = D_OPT_8003B50; - sOptionCardList[0].unk_00.width = 72; - sOptionCardList[0].unk_00.height = 12; - sOptionCardList[4].unk_00.texture = D_OPT_80046B0; - sOptionCardList[4].unk_00.width = 64; - sOptionCardList[4].unk_00.height = 10; + sOptionCardList[OPTION_MAP].tex.texture = aMainGameCardTex; + sOptionCardList[OPTION_MAP].tex.width = 72; + sOptionCardList[OPTION_MAP].tex.height = 12; + sOptionCardList[OPTION_SOUND].tex.texture = aSoundCardTex; + sOptionCardList[OPTION_SOUND].tex.width = 64; + sOptionCardList[OPTION_SOUND].tex.height = 10; - for (i = 0; i < OPTION_COUNT; i++) { + for (i = 0; i < ARRAY_COUNT(sOptionCardList); i++) { sOptionCardCurTextPosX[i] = sOptionCardTextPosX[i]; sOptionCardCurTextPosY[i] = sOptionCardTextPosY[i]; } - Title_80188010(); + Title_GetRankTotalHits(); } break; case 3: - D_menu_801B912C = 0; + sMainMenuState = 0; break; } } @@ -1898,9 +1913,9 @@ void Option_DataUpdate(void) { } } -void Option_8019669C(void) { +void Option_Data_Select(void) { if ((D_menu_801B91CC == 0) || (D_menu_801B91CC == 1)) { - if (Option_8019C5A0(&D_menu_801B91C0) != 0) { + if (Option_Input_DataSelect_X(&D_menu_801B91C0) != 0) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } if (1) {} @@ -1909,37 +1924,37 @@ void Option_8019669C(void) { if (gControllerPress[gMainController].button & A_BUTTON) { if (D_menu_801B91CC == 3) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 3; + sMainMenuState = 3; } else { D_menu_801B9330[D_menu_801B91C0] = 10; if (D_menu_801B91C0 == 0) { if (D_menu_801B91CC == 1) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B912C = 2; + sMainMenuState = 2; } else { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 3; + sMainMenuState = 3; } } else { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B912C = 4; + sMainMenuState = 4; } } } else if (gControllerPress[gMainController].button & B_BUTTON) { if (D_menu_801B91CC == 1) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 2; + sMainMenuState = 2; } else { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - D_menu_801B912C = 3; + sMainMenuState = 3; } } } -void Option_DataDraw(void) { +void Option_Data_Draw(void) { s32 i; s32 sp7C[2]; - s32 sp74[2]; + s32 mask[2]; static f32 D_menu_801AF084[2] = { 172.0f, 76.0f }; static f32 D_menu_801AF08C[2] = { 228.0f, 121.0f }; @@ -1953,85 +1968,90 @@ void Option_DataDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + (176 * 4 * i), 176, 4, D_menu_801AF094[0], - D_menu_801AF0AC[0] + (4.0f * i), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + (176 * 4 * i), 176, 4, D_menu_801AF094[0], + D_menu_801AF0AC[0] + (4.0f * i), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + 176 * 4 * 2, 176, 5, D_menu_801AF094[0], D_menu_801AF0AC[0] + 8.0f, - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_80084B0 + 176 * 4 * 2, 176, 5, D_menu_801AF094[0], + D_menu_801AF0AC[0] + 8.0f, 1.0f, 1.0f); if (D_menu_801B91CC < 2) { - TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF084[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF08C[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8_MirX(&gMasterDisp, aArrowTex, 8, 8, D_menu_801AF084[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aArrowTex, 8, 8, D_menu_801AF08C[D_menu_801B91C0], 140.0f, 1.0f, 1.0f); - Option_8019C824(&D_menu_801AED20[D_menu_801B91C0]); + Option_Color_FlashRed(&D_menu_801AED20[D_menu_801B91C0]); D_menu_801AED20[!D_menu_801B91C0] = 255.0f; - sp74[0] = sp74[1] = 0xFFFFFFFF; + mask[0] = mask[1] = 0xFFFFFFFF; - for (i = 0; i < 2; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801B9330); i++) { if (D_menu_801B9330[i] != 0) { - sp74[i] = 1; + mask[i] = 1; sp7C[i] = 255; D_menu_801B9330[i]--; } } - if ((gGameFrameCount & sp74[1]) != 0) { + if ((gGameFrameCount & mask[1]) != 0) { sp7C[1] = D_menu_801AED20[1]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[1], sp7C[1], 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8009980, 32, 12, D_menu_801AF094[1], D_menu_801AF0AC[1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8009980, 32, 12, D_menu_801AF094[1], D_menu_801AF0AC[1], 1.0f, + 1.0f); } - if ((gGameFrameCount & sp74[0]) != 0) { + if ((gGameFrameCount & mask[0]) != 0) { sp7C[0] = D_menu_801AED20[0]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, sp7C[0], sp7C[0], 255); - TextureRect_IA8(&gMasterDisp, D_OPT_8009B00, 40, 12, D_menu_801AF094[2], D_menu_801AF0AC[2], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8009B00, 40, 12, D_menu_801AF094[2], D_menu_801AF0AC[2], 1.0f, + 1.0f); } } switch (D_menu_801B91CC) { case 0: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - for (i = 0; i < 9; i++) { - TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + (160 * 2 * i), 160, 2, D_menu_801AF094[3], - D_menu_801AF0AC[3] + (2.0f * i), 1.0f, 1.0f); + { + for (i = 0; i < 9; i++) { + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + (160 * 2 * i), 160, 2, D_menu_801AF094[3], + D_menu_801AF0AC[3] + (2.0f * i), 1.0f, 1.0f); + } + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + 160 * 2 * 9, 160, 1, D_menu_801AF094[3], + D_menu_801AF0AC[3] + 18.0f, 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, D_OPT_8008DA0 + 160 * 2 * 9, 160, 1, D_menu_801AF094[3], - D_menu_801AF0AC[3] + 18.0f, 1.0f, 1.0f); break; case 1: case 2: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - for (i = 0; i < 20; i++) { - TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + (160 * 2 * i), 160, 2, D_menu_801AF094[4], - D_menu_801AF0AC[4] + (2.0f * i), 1.0f, 1.0f); + { + for (i = 0; i < 20; i++) { + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + (160 * 2 * i), 160, 2, D_menu_801AF094[4], + D_menu_801AF0AC[4] + (2.0f * i), 1.0f, 1.0f); + } + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + 160 * 2 * 20, 160, 1, D_menu_801AF094[4], + D_menu_801AF0AC[4] + 40.0f, 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, D_OPT_8009CE0 + 160 * 2 * 20, 160, 1, D_menu_801AF094[4], - D_menu_801AF0AC[4] + 40.0f, 1.0f, 1.0f); break; case 3: gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 32, 32, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_800B680, 144, 28, D_menu_801AF094[5], D_menu_801AF0AC[5], 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_800B680 + 4032, 144, 13, D_menu_801AF094[5], D_menu_801AF0AC[5] + 28.0f, - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800B680, 144, 28, D_menu_801AF094[5], D_menu_801AF0AC[5], 1.0f, + 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800B680 + 4032, 144, 13, D_menu_801AF094[5], + D_menu_801AF0AC[5] + 28.0f, 1.0f, 1.0f); break; } - Option_8019B7D4(); + Option_AcceptCancel_Draw(); } -char* D_menu_801AF0C4[3] = { "P", "S", "F" }; -s32 D_menu_801AF0D0[3] = { 255, 0, 30 }; -s32 D_menu_801AF0DC[3] = { 30, 179, 30 }; -s32 D_menu_801AF0E8[3] = { 0, 67, 255 }; +char* sTeamLetter[3] = { "P", "S", "F" }; +s32 sTeamAlivePrimR[3] = { 255, 0, 30 }; +s32 sTeamAlivePrimG[3] = { 30, 179, 30 }; +s32 sTeamAlivePrimB[3] = { 0, 67, 255 }; -void Option_RankingInit(void) { - Title_80188010(); +void Option_Ranking_Setup(void) { + Title_GetRankTotalHits(); gStarCount = 800; @@ -2044,50 +2064,51 @@ void Option_RankingInit(void) { D_menu_801B91D8 = -6.0f; D_menu_801B91E0 = -6.0f; - D_menu_801B93E0 = 0; - D_menu_801B8288 = 10; + sRanking2ndPage = false; + sTitleRankMaxRecords = 10; D_menu_801B9400.unk_0 = 0; D_menu_801B9400.unk_4 = 0; D_menu_801B9408.unk_0 = 0; D_menu_801B9408.unk_4 = 0; - Option_80192598(); + Option_PlanetTextures_Setup(); } -void Option_RankingUpdate(void) { - Option_80196FC4(); +void Option_Ranking_Update(void) { + Option_Ranking_Select(); if (gControllerPress[gMainController].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); gDrawMode = DRAW_NONE; - D_menu_801B9124 = 1000; - D_menu_801B912C = 0; - D_menu_801B9244 = 1; + sMenuEntryState = OPTION_MAIN_MENU; + sMainMenuState = 0; + sMainMenuFromCancel = true; } } -void Option_RankingDraw(void) { - Option_RankingMenuDraw(); +void Option_Ranking_Draw(void) { + Option_RankingMenu_Draw(); Option_DrawMenuLabel(); } -void Option_80196FC4(void) { +void Option_Ranking_Select(void) { + // Press A to go to the 2nd page if (gControllerPress[gMainController].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B93E0 ^= 1; + sRanking2ndPage ^= 1; } - if (D_menu_801B93E0 != 0) { - Option_8019715C(); + if (sRanking2ndPage) { + Option_Ranking2_Cursor(); return; } - Option_80197074(); + Option_Ranking_Cursor(); } -void Option_80197074(void) { - if (Option_8019C418(&D_menu_801B93E4, 9, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9400)) { +void Option_Ranking_Cursor(void) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93E4, 9, 1, 0, 20, 5, 4, gMainController, &D_menu_801B9400)) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B91D4 = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91DC = 114.0f - D_menu_801B93E4 * 130.0f; @@ -2096,7 +2117,7 @@ void Option_80197074(void) { } } -void Option_8019715C(void) { +void Option_Ranking2_Cursor(void) { s32 pad; f32 sp30; f32 temp_fv0_2; @@ -2104,7 +2125,8 @@ void Option_8019715C(void) { s32 temp2; if (D_menu_801B91D0 != 0) { - if (Option_8019C418(&D_menu_801B93E4, 9, 1, 1, 20, 2, 9, gMainController, &D_menu_801B9408) != 0.00f) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93E4, 9, 1, 1, 20, 2, 9, gMainController, &D_menu_801B9408) != + 0.00f) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B91DC = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91E0 = -6.0f + D_menu_801B93E4 * 130.0f; @@ -2138,28 +2160,30 @@ void Option_8019715C(void) { } } -void Option_RankingMenuDraw(void) { - s32 temp_t0; +void Option_RankingMenu_Draw(void) { + s32 colorGB; - if (D_menu_801B93E0 != 0) { - Option_8019752C(); + if (sRanking2ndPage) { + Option_RankingMenu2_Draw(); } else { - Title_80187E28(); + Title_RankingData_Draw(); RCP_SetupDL(&gMasterDisp, SETUPDL_83); - Option_8019C824(&D_menu_801B93F0); - temp_t0 = D_menu_801B93F0; - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_t0, temp_t0, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, 70.0f, (D_menu_801B93E4 * 17.0f) + 55.0f, 1.0f, 1.0f); + Option_Color_FlashRed(&D_menu_801B93F0); + colorGB = D_menu_801B93F0; + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, 70.0f, (D_menu_801B93E4 * 17.0f) + 55.0f, 1.0f, + 1.0f); } RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); Graphics_DisplaySmallText(242, 215, 1.0f, 1.0f, "PUSH A"); } -void Option_8019752C(void) { +// 2nd page and more detailed version of the Ranking +void Option_RankingMenu2_Draw(void) { f32 var_fs0; f32 var_fs1; - s32 temp_a0; + s32 colorGB; s32 i; static f32 D_menu_801AF0F4 = 130.0f; static f32 D_menu_801AF0F8[] = { 48.0f, 175.0f }; @@ -2167,53 +2191,54 @@ void Option_8019752C(void) { var_fs0 = D_menu_801B91D4; var_fs1 = D_menu_801B91D8; - for (i = 0; i < 10; i++) { + for (i = 0; i < RANKING_MAX; i++) { if ((var_fs0 > 69.0f) && (var_fs0 < 230.0f)) { - Option_80197A3C(i, 41, var_fs0); - Option_80197D30(i, 75, var_fs0 - 25.0f); - Option_80197DE4(i, 130, (var_fs0 - 26.0f)); - Map_801AD7EC(210, (var_fs0 - 24.0f), gSaveFile.save.data.unk_40[i]); - Option_80197F74(i, 258, var_fs0 - 25.0f); + Option_OrdinalNumbers_Draw(i, 41, var_fs0); + Option_RankingName_Draw(i, 75, var_fs0 - 25.0f); + Option_RankingTotalHits_Draw(i, 130, (var_fs0 - 26.0f)); + Map_RemainingLives_Draw(210, (var_fs0 - 24.0f), gSaveFile.save.data.rankingLives[i]); + Option_RankingTeamAlive_Draw(i, 258, var_fs0 - 25.0f); } - Option_80198164(i, var_fs0, var_fs1); + Option_RankingRoute_Draw(i, var_fs0, var_fs1); var_fs0 += D_menu_801AF0F4; var_fs1 -= D_menu_801AF0F4; } - Option_8019BDF0(); + Option_Menu_Push(); Option_80197914(); Matrix_Pop(&gGfxMatrix); - RCP_SetupDL(&gMasterDisp, SETUPDL_76); + RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[0], 40.0f, 1.5f); - TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[1], 40.0f, 1.5f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[0], 40.0f, 1.5f); + Lib_TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[1], 40.0f, 1.5f); Background_DrawPartialStarfield(0, 70); Background_DrawPartialStarfield(170, 239); + RCP_SetupDL(&gMasterDisp, SETUPDL_83); if (D_menu_801B91D4 >= 114.0f) { gDPSetPrimColor(gMasterDisp++, 0, 0, 32, 32, 32, 255); } else { - Option_8019C824(&D_menu_801B93F4); - temp_a0 = D_menu_801B93F4; - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_a0, temp_a0, 255); + Option_Color_FlashRed(&D_menu_801B93F4); + colorGB = D_menu_801B93F4; + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); } - TextureRect_IA8(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 44.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 44.0f, 1.0f, 1.0f); if (D_menu_801B91D4 <= -1055.0f) { gDPSetPrimColor(gMasterDisp++, 0, 0, 32, 32, 32, 255); } else { - Option_8019C824(&D_menu_801B93F8); - temp_a0 = D_menu_801B93F8; - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, temp_a0, temp_a0, 255); + Option_Color_FlashRed(&D_menu_801B93F8); + colorGB = D_menu_801B93F8; + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); } - TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 200.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8_MirY(&gMasterDisp, D_OPT_800D070, 16, 16, 150.0f, 200.0f, 1.0f, 1.0f); } Vec3f D_menu_801AF100[2] = { { 0.0f, 167.0f, 0.0f }, { 0.0f, -167.0f, 0.0f } }; @@ -2236,124 +2261,126 @@ void Option_80197914(void) { } } -void Option_80197A3C(s32 arg0, s32 arg1, s32 arg2) { +void Option_OrdinalNumbers_Draw(s32 ordinalType, s32 xPos, s32 yPos) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - if (arg0 != 9) { - TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[arg0 + 1], 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); + if (ordinalType != 9) { + Lib_TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[ordinalType + 1], 16, 15, xPos, yPos - 25.0f, 1.0f, 1.0f); } else { - TextureRect_IA8(&gMasterDisp, aLargeText_1, 16, 15, arg1 - 14.0f, arg2 - 25.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, aLargeText_0, 16, 15, arg1, arg2 - 25.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aLargeText_1, 16, 15, xPos - 14.0f, yPos - 25.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aLargeText_0, 16, 15, xPos, yPos - 25.0f, 1.0f, 1.0f); } RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - switch (arg0) { - case 0: - TextureRect_CI4(&gMasterDisp, D_OPT_8003A70, D_OPT_8003AB8, 16, 9, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); + switch (ordinalType) { + case 0: // st + Lib_TextureRect_CI4(&gMasterDisp, aStTex, aStTLUT, 16, 9, xPos + 17.0f, yPos - 19.0f, 1.0f, 1.0f); break; - case 1: - TextureRect_CI4(&gMasterDisp, D_OPT_80038E0, D_OPT_8003930, 16, 10, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); + case 1: // nd + Lib_TextureRect_CI4(&gMasterDisp, aNdTex, aNdTLUT, 16, 10, xPos + 17.0f, yPos - 19.0f, 1.0f, 1.0f); break; - case 2: - TextureRect_CI4(&gMasterDisp, D_OPT_8003950, D_OPT_80039A8, 16, 11, arg1 + 17.0f, arg2 - 20.0f, 1.0f, 1.0f); + case 2: // rd + Lib_TextureRect_CI4(&gMasterDisp, aRdTex, aRdTLUT, 16, 11, xPos + 17.0f, yPos - 20.0f, 1.0f, 1.0f); break; - default: - TextureRect_CI4(&gMasterDisp, D_OPT_8003AE0, D_OPT_8003B28, 16, 9, arg1 + 17.0f, arg2 - 19.0f, 1.0f, 1.0f); + default: // th + Lib_TextureRect_CI4(&gMasterDisp, aThTex, aThTLUT, 16, 9, xPos + 17.0f, yPos - 19.0f, 1.0f, 1.0f); break; } } -void Option_80197D30(s32 arg0, s32 arg1, s32 arg2) { - char temp[4]; +void Option_RankingName_Draw(s32 rankIdx, s32 xPos, s32 yPos) { + char rankName[4]; RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - temp[0] = gSaveFile.save.data.unk_18[arg0][0] & 0xFF; - temp[1] = gSaveFile.save.data.unk_18[arg0][1] & 0xFF; - temp[2] = gSaveFile.save.data.unk_18[arg0][2] & 0xFF; - temp[3] = '\0'; + rankName[0] = gSaveFile.save.data.rankNameEntry[rankIdx][0] & 0xFF; + rankName[1] = gSaveFile.save.data.rankNameEntry[rankIdx][1] & 0xFF; + rankName[2] = gSaveFile.save.data.rankNameEntry[rankIdx][2] & 0xFF; + rankName[3] = '\0'; - Graphics_DisplayLargeText(arg1, arg2, 1.0f, 1.0f, temp); + Graphics_DisplayLargeText(xPos, yPos, 1.0f, 1.0f, rankName); } -void Option_80197DE4(s32 arg0, s32 arg1, s32 arg2) { +void Option_RankingTotalHits_Draw(s32 rankIdx, s32 xPos, s32 yPos) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 170); - TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, arg1, arg2, 3.17f, 1.05f); + Lib_TextureRect_IA8(&gMasterDisp, aMapOptionBgTex, 24, 17, xPos, yPos, 3.17f, 1.05f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - Graphics_DisplaySmallText(arg1, arg2, 1.0f, 1.0f, "TOTAL HITS"); + Graphics_DisplaySmallText(xPos, yPos, 1.0f, 1.0f, "TOTAL HITS"); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Graphics_DisplaySmallNumber((arg1 + 40.0f) - ((func_hud_8008BCBC(D_menu_801B8220[arg0]) * 8) - 8), (arg2 + 9.0f), - D_menu_801B8220[arg0]); + Graphics_DisplaySmallNumber((xPos + 40.0f) - ((HUD_CountDigits(gTotalHitsRanking[rankIdx]) * 8) - 8), (yPos + 9.0f), + gTotalHitsRanking[rankIdx]); } -void Option_80197F74(s32 arg0, s32 arg1, s32 arg2) { - f32 temp_fs1; +void Option_RankingTeamAlive_Draw(s32 rankIdx, s32 xPos, s32 yPos) { + f32 xOffset; s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); - for (temp_fs1 = 0.0f, i = 0; i < 3; i++, temp_fs1 += 12.0f) { - gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF0D0[i], D_menu_801AF0DC[i], D_menu_801AF0E8[i], 255); - Graphics_DisplaySmallText(temp_fs1 + arg1, arg2, 1.0f, 1.0f, D_menu_801AF0C4[i]); + for (xOffset = 0.0f, i = 0; i < ARRAY_COUNT(sTeamAlivePrimR); i++, xOffset += 12.0f) { + gDPSetPrimColor(gMasterDisp++, 0, 0, sTeamAlivePrimR[i], sTeamAlivePrimG[i], sTeamAlivePrimB[i], 255); + Graphics_DisplaySmallText(xOffset + xPos, yPos, 1.0f, 1.0f, sTeamLetter[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Graphics_DisplaySmallNumber(arg1 + temp_fs1 - ((func_hud_8008BCBC(D_menu_801B81A8[arg0][i]) - 1) * 8), - arg2 + 9.0f, D_menu_801B81A8[arg0][i]); + Graphics_DisplaySmallNumber(xPos + xOffset - ((HUD_CountDigits(gRankingTeamAlive[rankIdx][i]) - 1) * 8), + yPos + 9.0f, gRankingTeamAlive[rankIdx][i]); } } -void Option_80198164(s32 arg0, f32 arg1, f32 arg2) { +void Option_RankingRoute_Draw(s32 rankIdx, f32 arg1, f32 arg2) { f32 temp = 16.0f; - s32 temp_s2 = gSaveFile.save.data.unk_36[arg0]; + s32 routeMax = gSaveFile.save.data.rankingRoute[rankIdx]; f32 var_fs2; s32 i; - for (var_fs2 = 0.0f, i = 0; i < 7; i++, var_fs2 += 24.0f + temp) { - Option_801982B0(arg0, i, 28.0f + var_fs2, arg1, temp_s2); - if (i < temp_s2) { - Option_8019882C(arg0, i, 28.0f + var_fs2, arg1); - Option_801984D0(arg0, i, 28.0f + var_fs2, arg1); - Option_80198608(arg0, i, 28.0f + var_fs2, arg1); + for (var_fs2 = 0.0f, i = 0; i < ROUTE_MAX; i++, var_fs2 += 24.0f + temp) { + Option_RankingRouteFrame_Draw(rankIdx, i, 28.0f + var_fs2, arg1, routeMax); + if (i < routeMax) { + Option_RankingPlanetName_Draw(rankIdx, i, 28.0f + var_fs2, arg1); + Option_RankingHitCount_Draw(rankIdx, i, 28.0f + var_fs2, arg1); + Option_RankingTeamPresence_Draw(rankIdx, i, 28.0f + var_fs2, arg1); } } if ((arg2 < 75.0f) && (arg2 > -80.0f)) { - Option_8019896C(arg0, arg2, temp_s2); + Option_RankingPlanetRoute_Draw(rankIdx, arg2, routeMax); } } -void Option_801982B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, s32 arg4) { +void Option_RankingRouteFrame_Draw(s32 rankIdx, s32 routeIdx, f32 xPos, f32 yPos, s32 arg4) { s32 r; s32 g; s32 b; - s32 temp_v0; + s32 routeLineColor; PlanetId start; PlanetId end; - if ((arg3 > 30.0f) && (arg3 < 200.0f)) { + if ((yPos > 30.0f) && (yPos < 200.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_76); - if (arg1 < 6) { + + if (routeIdx < 6) { r = g = b = 255; - if (arg1 < (arg4 - 1)) { - start = gSaveFile.save.data.unk_5E[arg0][arg1].unk_8 & 0xF; - end = gSaveFile.save.data.unk_5E[arg0][arg1 + 1].unk_8 & 0xF; + if (routeIdx < (arg4 - 1)) { + start = gSaveFile.save.data.stats[rankIdx][routeIdx].planetId & 0xF; + end = gSaveFile.save.data.stats[rankIdx][routeIdx + 1].planetId & 0xF; - temp_v0 = Option_80199284(start, end); + routeLineColor = Option_GetRouteLineColor(start, end); - r = g = b = 255; + r = g = b = 255; // white by default - switch (temp_v0) { + switch (routeLineColor) { case 0: r = 16; g = 64; @@ -2373,71 +2400,71 @@ void Option_801982B0(s32 arg0, s32 arg1, f32 arg2, f32 arg3, s32 arg4) { } } gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); - TextureRect_RGBA16(&gMasterDisp, D_MAP_60447A0, 8, 8, arg2 + 24.0f, arg3 + 11.0f, 2.0f, 0.2f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapWhiteSquareTex, 8, 8, xPos + 24.0f, yPos + 11.0f, 2.0f, 0.2f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_RGBA16(&gMasterDisp, D_MAP_6047550, 24, 24, arg2, arg3, 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, aMapPathBoxTex, 24, 24, xPos, yPos, 1.0f, 1.0f); } } -void Option_801984D0(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { - s32 sp1C; +void Option_RankingHitCount_Draw(s32 rankIdx, s32 routeIdx, f32 xPos, f32 yPos) { + s32 hitCount; - if ((arg3 > 22.0f) && (arg3 < 162.0f)) { + if ((yPos > 22.0f) && (yPos < 162.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - sp1C = (gSaveFile.save.data.unk_5E[arg0][arg1].unk_C & 1) << 8; - sp1C |= gSaveFile.save.data.unk_5E[arg0][arg1].unk_0; - Graphics_DisplaySmallNumber(arg2 + 15.0f - (func_hud_8008BCBC(sp1C) - 1) * 8, arg3 + 24.0f + 1.0f, sp1C); + hitCount = (gSaveFile.save.data.stats[rankIdx][routeIdx].unk_C & 1) << 8; + hitCount |= gSaveFile.save.data.stats[rankIdx][routeIdx].hitCount; + Graphics_DisplaySmallNumber(xPos + 15.0f - (HUD_CountDigits(hitCount) - 1) * 8, yPos + 24.0f + 1.0f, hitCount); } } -void Option_80198608(s32 arg0, s32 arg1, f32 xPos, f32 yPos) { +void Option_RankingTeamPresence_Draw(s32 rankIdx, s32 routeIdx, f32 xPos, f32 yPos) { f32 xOffset; - s32 sp90[3]; + s32 teamAlive[3]; s32 i; if ((yPos > 12.0f) && (yPos < 154.0f)) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); - sp90[0] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_D & 1; - sp90[1] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_F & 1; - sp90[2] = gSaveFile.save.data.unk_5E[arg0][arg1].unk_E & 1; + teamAlive[0] = gSaveFile.save.data.stats[rankIdx][routeIdx].peppyAlive & 1; + teamAlive[1] = gSaveFile.save.data.stats[rankIdx][routeIdx].slippyAlive & 1; + teamAlive[2] = gSaveFile.save.data.stats[rankIdx][routeIdx].falcoAlive & 1; - for (xOffset = 0.0f, i = 0; i < 3; i++, xOffset += 9.0f) { - if (sp90[i] == 0) { + for (xOffset = 0.0f, i = 0; i < ARRAY_COUNT(teamAlive); i++, xOffset += 9.0f) { + if (teamAlive[i] == 0) { continue; } - gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF0D0[i], D_menu_801AF0DC[i], D_menu_801AF0E8[i], 255); - Graphics_DisplaySmallText(xPos + xOffset - 1.0f, yPos + 24.0f + 8.0f + 1.0f, 1.0f, 1.0f, - D_menu_801AF0C4[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, sTeamAlivePrimR[i], sTeamAlivePrimG[i], sTeamAlivePrimB[i], 255); + Graphics_DisplaySmallText(xPos + xOffset - 1.0f, yPos + 24.0f + 8.0f + 1.0f, 1.0f, 1.0f, sTeamLetter[i]); } } } -void Option_8019882C(s32 arg0, s32 arg1, f32 arg2, f32 arg3) { - PlanetId temp; - char* sp20; - f32 temp2; +void Option_RankingPlanetName_Draw(s32 rankIdx, s32 routeIdx, f32 xPos, f32 yPos) { + PlanetId planetIdx; + char* planetName; + f32 textWidth; + + if ((yPos > 58.0f) && (yPos < 197.0f)) { + planetIdx = gSaveFile.save.data.stats[rankIdx][routeIdx].planetId & 0xF; + planetName = D_menu_801AEEAC[planetIdx]; - if ((arg3 > 58.0f) && (arg3 < 197.0f)) { - temp = gSaveFile.save.data.unk_5E[arg0][arg1].unk_8 & 0xF; - sp20 = D_menu_801AEEAC[temp]; RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - temp2 = Graphics_GetSmallTextWidth(sp20) / 2.0f; - Graphics_DisplaySmallText(arg2 + 12.0f - temp2, arg3 - 8.0f, 1.0f, 1.0f, sp20); + textWidth = Graphics_GetSmallTextWidth(planetName) / 2.0f; + Graphics_DisplaySmallText(xPos + 12.0f - textWidth, yPos - 8.0f, 1.0f, 1.0f, planetName); } } -void Option_8019896C(s32 arg0, f32 y, s32 arg2) { +void Option_RankingPlanetRoute_Draw(s32 rankIdx, f32 y, s32 routeMax) { static f32 zAngle = 0.0f; static f32 xStart = -121.0f; static f32 xAdvance = 40.1f; s32 i; PlanetId planet; - s32 spFC; - s32 spF4; + bool gotMedal; + bool drawPlanetMedal; f32 x; s32 pad[2]; @@ -2447,9 +2474,10 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Lib_InitOrtho(&gMasterDisp); - spFC = gSaveFile.save.data.unk_4A[arg0]; - for (x = xStart, i = 0; i < arg2; i++, x += xAdvance) { - planet = gSaveFile.save.data.unk_5E[arg0][i].unk_8 & 0xF; + gotMedal = gSaveFile.save.data.rankingMedal[rankIdx]; + + for (x = xStart, i = 0; i < routeMax; i++, x += xAdvance) { + planet = gSaveFile.save.data.stats[rankIdx][i].planetId & 0xF; switch (planet) { case SAVE_SLOT_SOLAR: @@ -2463,13 +2491,14 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_RotateZ(gGfxMatrix, M_DTOR * zAngle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); gDPSetEnvColor(gMasterDisp++, 31, 0, 0, 0); Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); + Matrix_Pop(&gGfxMatrix); break; @@ -2482,12 +2511,10 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_Translate(gGfxMatrix, x - 1.0f, y + 4.0f, 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Translate(gGfxMatrix, 18.0f, -20.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Pop(&gGfxMatrix); @@ -2504,7 +2531,6 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Pop(&gGfxMatrix); @@ -2519,7 +2545,6 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_RotateX(gGfxMatrix, M_DTOR * 20.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.01f, 0.01f, 0.01f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); Matrix_Pop(&gGfxMatrix); @@ -2549,7 +2574,6 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { Matrix_Translate(gGfxMatrix, x, y, 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.3f, 0.3f, 0.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AEE6C[planet]); if ((planet != SAVE_SLOT_VENOM_1) && (planet != SAVE_SLOT_VENOM_2) && (planet != PLANET_AQUAS)) { @@ -2559,7 +2583,7 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801B4A40); + gSPDisplayList(gMasterDisp++, gMapVenomCloudDL); } Matrix_Scale(gGfxMatrix, 1.6f, 1.6f, 1.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2570,15 +2594,15 @@ void Option_8019896C(s32 arg0, f32 y, s32 arg2) { break; } - spF4 = (spFC >> i) & 1; - if (spF4 != 0) { - Option_80199198(x, y, 0.0f); + drawPlanetMedal = (gotMedal >> i) & 1; + if (drawPlanetMedal) { + Option_RankingRouteMedal_Draw(x, y, 0.0f); } } Matrix_Pop(&gGfxMatrix); - Option_80192738(); + Option_ScrollPlanetTexture(); zAngle += 0.1f; @@ -2589,40 +2613,40 @@ f32 D_menu_801AF13C = 0.7f; f32 D_menu_801AF140 = 11.0f; f32 D_menu_801AF144 = 2.7f; -void Option_80199198(f32 arg0, f32 arg1, f32 arg2) { +void Option_RankingRouteMedal_Draw(f32 xPos, f32 yPos, f32 zPos) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, arg0 - D_menu_801AF140, arg1 + D_menu_801AF144, arg2, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, xPos - D_menu_801AF140, yPos + D_menu_801AF144, zPos, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801AF13C, D_menu_801AF13C, D_menu_801AF13C, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_MAP_601D1F0); + gSPDisplayList(gMasterDisp++, aMapMedalDL); Matrix_Pop(&gGfxMatrix); } -s32 Option_80199284(PlanetId start, PlanetId end) { +s32 Option_GetRouteLineColor(PlanetId start, PlanetId end) { s32 i; - for (i = 0; i < 24; i++) { - if ((D_menu_801AED4C[i].unk_0 == start) && (D_menu_801AED4C[i].unk_4 == end)) { + for (i = 0; i < ARRAY_COUNT(sRouteColoredLine); i++) { + if ((sRouteColoredLine[i].start == start) && (sRouteColoredLine[i].end == end)) { break; } } - return D_menu_801AED4C[i].unk_8; + return sRouteColoredLine[i].color; } -void Option_VersusMenuInit(void) { +void Option_VersusMenu_Setup(void) { s32 i; if (D_menu_801B91C4) { AUDIO_PLAY_BGM(NA_BGM_VS_SELECT); } - D_menu_801B93D0 = D_menu_801B9124; + sVsMenuSelection = sMenuEntryState; if (D_game_800D2870) { - sOptionCardList[1].unk_00.yPos = 129.0f; - sOptionCardList[1].unk_38.y = -7.5f; + sOptionCardList[OPTION_TRAINING].tex.yPos = 129.0f; + sOptionCardList[OPTION_TRAINING].frame.y = -7.5f; } gVsPointsToWin = 3; @@ -2634,7 +2658,7 @@ void Option_VersusMenuInit(void) { D_menu_801B93C4 = 0; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { gPlayerInactive[i] = false; if (gControllerPlugged[i] == 0) { gPlayerInactive[i] = true; @@ -2648,28 +2672,28 @@ void Option_VersusMenuInit(void) { D_menu_801B91E8 = 255.0f; } -void Option_VersusMenuUpdate(void) { - switch (D_menu_801B912C) { +void Option_VersusMenu_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019949C(); + Option_VersusMenu_Cursor(); break; case 1: - if (D_menu_801B91EC == 0.0f) { - D_menu_801B9124 = 2000; - Option_InitEntry(); + if (sOkConfirmTimer == 0.0f) { + sMenuEntryState = OPTION_VERSUS_STAGE; + Option_Entry_Setup(); } break; } } -void Option_8019949C(void) { +void Option_VersusMenu_Cursor(void) { s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPress); i++) { if (!(D_menu_801B93C4 & (1 << i))) { - Option_8019C824(&D_menu_801B9358[i]); - if (Option_8019C418(&D_menu_801AED3C[i], 2, 0, 0, 20, 2, 4, i, &D_menu_801B93A0[i])) { + Option_Color_FlashRed(&D_menu_801B9358[i]); + if (Option_Input_MoveCursor_Y(&D_menu_801AED3C[i], 2, 0, 0, 20, 2, 4, i, &D_menu_801B93A0[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); } } @@ -2677,8 +2701,8 @@ void Option_8019949C(void) { if (gControllerPress[i].button & A_BUTTON) { if (D_menu_801B93C4 == 15) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B91EC = 10; - D_menu_801B912C++; + sOkConfirmTimer = 10; + sMainMenuState++; break; } else { if (!(D_menu_801B93C4 & (1 << i))) { @@ -2698,42 +2722,42 @@ void Option_8019949C(void) { } else { AUDIO_PLAY_BGM(NA_BGM_SELECT); AUDIO_PLAY_SFX(NA_SE_ARWING_CANCEL, gDefaultSfxSource, 4); - Option_8019B8A0(2); - D_menu_801B9248 = 1; + Option_VsBackToSubMenu(2); + sVsSubMenuFromCancel = true; break; } } } } -void Option_VersusMenuDraw(void) { +void Option_VersusMenu_Draw(void) { s32 i; - Option_8019B8C8(); - Option_80199EA8(); + Option_VsMenuCard_Draw(); + Option_VS_N64Console_Draw(); - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 1) { - Option_80199820(i); + Option_VS_HandicapSet_Draw(i); } } if (D_menu_801B93C4 == 15) { - Option_8019B5AC(); + Option_VsOKConfirm_Draw(); } } -f32 D_menu_801AF148[4] = { 30.0f, 214.0f, 30.0f, 215.0f }; -f32 D_menu_801AF158[4] = { 18.0f, 18.0f, 151.0f, 151.0f }; -s32 D_menu_801AF168[4] = { 56, 48, 56, 48 }; -s32 D_menu_801AF178[4] = { 8, 10, 10, 8 }; -f32 D_menu_801AF188[4] = { 12.0f, 16.0f, 12.0f, 18.0f }; -f32 D_menu_801AF198 = -1.0f; +f32 sVsHandicapFrameXpos[4] = { 30.0f, 214.0f, 30.0f, 215.0f }; +f32 sVsHandicapFrameYpos[4] = { 18.0f, 18.0f, 151.0f, 151.0f }; +s32 sCharNameWidth[4] = { 56, 48, 56, 48 }; +s32 sCharNameHeight[4] = { 8, 10, 10, 8 }; +f32 sCharNameXoffsetPos[4] = { 12.0f, 16.0f, 12.0f, 18.0f }; +f32 sCharNameYoffsetPos = -1.0f; f32 D_menu_801AF19C[4] = { 46.0f, 41.0f, 41.0f, 41.0f }; f32 D_menu_801AF1AC = 24.0f; f32 D_menu_801AF1B0 = 1.4f; -f32 D_menu_801AF1B4 = 5.0f; -f32 D_menu_801AF1B8 = 11.0f; +f32 sPlayerFaceXoffsetPos = 5.0f; +f32 sPlayerFaceYoffsetPos = 11.0f; f32 D_menu_801AF1BC = 8.0f; f32 D_menu_801AF1C0 = 45.0f; f32 D_menu_801AF1C4 = 20.0f; @@ -2744,132 +2768,137 @@ f32 D_menu_801AF1D4 = 7.0f; f32 D_menu_801AF1D8 = 59.0f; f32 D_menu_801AF1DC = 58.0f; -void Option_80199820(s32 arg0) { - s32 var_v0; - s32 var_a2; +void Option_VS_HandicapSet_Draw(s32 PlayerIdx) { + s32 mask; + s32 width; s32 colorGB; s32 i; - static u8* D_menu_801AF1E0[3] = { - D_VS_MENU_70030B0, - D_VS_MENU_7003290, - D_VS_MENU_7003470, + static u8* sVsHandicapLvlTex[3] = { + aVsHandicapLvl1Tex, + aVsHandicapLvl2Tex, + aVsHandicapLvl3Tex, }; - static u8* D_menu_801AF1EC[4] = { - D_VS_MENU_70049C0, - D_VS_MENU_7004BB0, - D_VS_MENU_7004DC0, - D_VS_MENU_7005020, + static u8* sVsCharNameTex[4] = { + aVsFoxNameTex, + aVsPeppyNameTex, + aVsSlippyNameTex, + aVsFalcoNameTex, }; - static u16* D_menu_801AF1FC[4] = { - D_VS_MENU_7004B80, - D_VS_MENU_7004D90, - D_VS_MENU_7004FF0, - D_VS_MENU_70051A0, + static u16* sVsCharNameTLUT[4] = { + aVsFoxNameTLUT, + aVsPeppyNameTLUT, + aVsSlippyNameTLUT, + aVsFalcoNameTLUT, }; - static u16* D_menu_801AF20C[4] = { - D_VS_MENU_7008EE0, - D_VS_MENU_700AD20, - D_VS_MENU_700CB60, - D_VS_MENU_70070A0, + static u16* sVsPlayerFaceTex[4] = { + aVsFoxFaceTex, + aVsPeppyFaceTex, + aVsSlippyFaceTex, + aVsFalcoFaceTex, }; - static u8* D_menu_801AF21C[4] = { - D_VS_MENU_7000000, - D_VS_MENU_70000D0, - D_VS_MENU_7000210, - D_VS_MENU_7000350, + static u8* sVsPlayerNumTex[4] = { + aVsPlayerNum1Tex, + aVsPlayerNum2Tex, + aVsPlayerNum3Tex, + aVsPlayerNum4Tex, }; - static s32 D_menu_801AF22C[4] = { 177, 255, 0, 30 }; - static s32 D_menu_801AF23C[4] = { 242, 30, 255, 30 }; - static s32 D_menu_801AF24C[4] = { 12, 0, 67, 255 }; + static s32 sCharNameR[4] = { 177, 255, 0, 30 }; + static s32 sCharNameG[4] = { 242, 30, 255, 30 }; + static s32 sCharNameB[4] = { 12, 0, 67, 255 }; RCP_SetupDL(&gMasterDisp, SETUPDL_85); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - for (i = 0; i < 4; i++) { - TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + (80 * 16 * i) / 2, D_VS_MENU_70123F8, 80, 16, - D_menu_801AF148[arg0], D_menu_801AF158[arg0] + (16.0f * i), 1.0f, 1.0f); + { + for (i = 0; i < 4; i++) { + Lib_TextureRect_CI4(&gMasterDisp, aVsHandicapFrameTex + (80 * 16 * i) / 2, aVsHandicapFrameTLUT, 80, 16, + sVsHandicapFrameXpos[PlayerIdx], sVsHandicapFrameYpos[PlayerIdx] + (16.0f * i), 1.0f, + 1.0f); + } + Lib_TextureRect_CI4(&gMasterDisp, aVsHandicapFrameTex + (80 * 16 * 4) / 2, aVsHandicapFrameTLUT, 80, 7, + sVsHandicapFrameXpos[PlayerIdx], sVsHandicapFrameYpos[PlayerIdx] + (16.0f * 4), 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_VS_MENU_70118E0 + (80 * 16 * 4) / 2, D_VS_MENU_70123F8, 80, 7, - D_menu_801AF148[arg0], D_menu_801AF158[arg0] + (16.0f * 4), 1.0f, 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, sCharNameR[PlayerIdx], sCharNameG[PlayerIdx], sCharNameB[PlayerIdx], 255); - gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF22C[arg0], D_menu_801AF23C[arg0], D_menu_801AF24C[arg0], 255); - - TextureRect_CI8(&gMasterDisp, D_menu_801AF1EC[arg0], D_menu_801AF1FC[arg0], D_menu_801AF168[arg0], - D_menu_801AF178[arg0], D_menu_801AF148[arg0] + D_menu_801AF188[arg0], - D_menu_801AF158[arg0] + D_menu_801AF198, 1.0f, 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, sVsCharNameTex[PlayerIdx], sVsCharNameTLUT[PlayerIdx], sCharNameWidth[PlayerIdx], + sCharNameHeight[PlayerIdx], sVsHandicapFrameXpos[PlayerIdx] + sCharNameXoffsetPos[PlayerIdx], + sVsHandicapFrameYpos[PlayerIdx] + sCharNameYoffsetPos, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); - var_v0 = 0xFFFFFFFF; - if (D_menu_801B9348[arg0] != 0) { - var_v0 = 1; - D_menu_801B9348[arg0]--; + mask = 0xFFFFFFFF; + if (D_menu_801B9348[PlayerIdx] != 0) { + mask = 0x00000001; + D_menu_801B9348[PlayerIdx]--; } - if ((gGameFrameCount & var_v0) != 0) { - colorGB = D_menu_801B9358[arg0]; + if ((gGameFrameCount & mask) != 0) { + colorGB = D_menu_801B9358[PlayerIdx]; gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001030, 64, 9, D_menu_801AF148[arg0] + D_menu_801AF1BC, - D_menu_801AF158[arg0] + D_menu_801AF1C0, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001030, 64, 9, sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1BC, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1C0, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_menu_801AF1E0[D_menu_801AED3C[arg0]], 40, 12, - D_menu_801AF148[arg0] + D_menu_801AF1C4, D_menu_801AF158[arg0] + D_menu_801AF1C8, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sVsHandicapLvlTex[D_menu_801AED3C[PlayerIdx]], 40, 12, + sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1C4, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1C8, 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8_MirX(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF148[arg0] + D_menu_801AF1D4, - D_menu_801AF158[arg0] + D_menu_801AF1DC, 1.0f, 1.0f); + Lib_TextureRect_IA8_MirX(&gMasterDisp, aArrowTex, 8, 8, sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1D4, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1DC, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_800E130, 8, 8, D_menu_801AF148[arg0] + D_menu_801AF1D8, - D_menu_801AF158[arg0] + D_menu_801AF1DC, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aArrowTex, 8, 8, sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1D8, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1DC, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7000F10, 40, 7, D_menu_801AF148[arg0] + D_menu_801AF1CC, - D_menu_801AF158[arg0] + D_menu_801AF1D0, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aVsTextContTex, 40, 7, sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF1CC, + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1D0, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - for (i = 0; i < 2; i++) { - TextureRect_RGBA16(&gMasterDisp, D_menu_801AF20C[arg0] + (44 * 20 * i), 44, 20, - D_menu_801AF148[arg0] + D_menu_801AF1B4, - D_menu_801AF158[arg0] + D_menu_801AF1B8 + (i * 20.0f * 0.7f), 0.7f, 0.7f); + { + for (i = 0; i < 2; i++) { + Lib_TextureRect_RGBA16(&gMasterDisp, sVsPlayerFaceTex[PlayerIdx] + (44 * 20 * i), 44, 20, + sVsHandicapFrameXpos[PlayerIdx] + sPlayerFaceXoffsetPos, + sVsHandicapFrameYpos[PlayerIdx] + sPlayerFaceYoffsetPos + (i * 20.0f * 0.7f), 0.7f, + 0.7f); + } + Lib_TextureRect_RGBA16(&gMasterDisp, sVsPlayerFaceTex[PlayerIdx] + 44 * 20 * 2, 44, 4, + sVsHandicapFrameXpos[PlayerIdx] + sPlayerFaceXoffsetPos, + sVsHandicapFrameYpos[PlayerIdx] + sPlayerFaceYoffsetPos + 28.0f, 0.7f, 0.7f); } - TextureRect_RGBA16(&gMasterDisp, D_menu_801AF20C[arg0] + 44 * 20 * 2, 44, 4, - D_menu_801AF148[arg0] + D_menu_801AF1B4, D_menu_801AF158[arg0] + D_menu_801AF1B8 + 28.0f, 0.7f, - 0.7f); - - var_a2 = 24; - if (arg0 == 0) { - var_a2 = 16; + width = 24; + if (PlayerIdx == 0) { + width = 16; } - gDPSetPrimColor(gMasterDisp++, 0, 0, D_menu_801AF22C[arg0], D_menu_801AF23C[arg0], D_menu_801AF24C[arg0], 255); + gDPSetPrimColor(gMasterDisp++, 0, 0, sCharNameR[PlayerIdx], sCharNameG[PlayerIdx], sCharNameB[PlayerIdx], 255); - TextureRect_IA8(&gMasterDisp, D_menu_801AF21C[arg0], var_a2, 13, D_menu_801AF148[arg0] + D_menu_801AF19C[arg0], - D_menu_801AF158[arg0] + D_menu_801AF1AC, D_menu_801AF1B0, D_menu_801AF1B0); + Lib_TextureRect_IA8(&gMasterDisp, sVsPlayerNumTex[PlayerIdx], width, 13, + sVsHandicapFrameXpos[PlayerIdx] + D_menu_801AF19C[PlayerIdx], + sVsHandicapFrameYpos[PlayerIdx] + D_menu_801AF1AC, D_menu_801AF1B0, D_menu_801AF1B0); } -void Option_80199EA8(void) { +void Option_VS_N64Console_Draw(void) { s32 i; RCP_SetupDL_76(); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 3; i++) { - TextureRect_RGBA16(&gMasterDisp, D_VS_MENU_700E9A0 + (144 * 14 * i), 144, 14, 87.0f, 84 + (i * 14.0f), 1.0f, - 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, aVsN64ConsoleTex + (144 * 14 * i), 144, 14, 87.0f, 84 + (i * 14.0f), 1.0f, + 1.0f); } } -void Option_VersusStageInit(void) { +void Option_VersusStage_Setup(void) { s32 i; gStarCount = 0; @@ -2880,102 +2909,101 @@ void Option_VersusStageInit(void) { D_menu_801B93DC = D_menu_801B9340; gVsTimeTrialLimit = D_menu_801B93DC; // clang-format off - for (i = 0; i < 4; i++) {\ + for (i = 0; i < ARRAY_COUNT(D_menu_801B9358); i++) { \ D_menu_801B9358[i] = 0; } // clang-format on - D_menu_801B936C = 0; - D_menu_801B9374 = 0; - D_menu_801B937C = 0; - D_menu_801B91EC = 0; - D_menu_801B91F0 = 0; + sPointConfirmTimer = 0; + sStageSelectConfirmTimer = 0; + sTimeTrialConfirmTimer = 0; + sOkConfirmTimer = 0; + sVsSubMenuFirstState = false; D_menu_801B9368 = 255.0f; D_menu_801B9370 = 255.0f; D_menu_801B9378 = 255.0f; Option_8019A080(); } -// D_menu_801B9380 needs to be static but belongs to bss section? void Option_8019A080(void) { s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(D_menu_801B9380); i++) { D_menu_801B9380[i].unk_0 = 0; D_menu_801B9380[i].unk_4 = 0; } } -void Option_VersusStageUpdate(void) { - switch (D_menu_801B93D0) { +void Option_VersusStage_Update(void) { + switch (sVsMenuSelection) { case OPTION_POINT_MATCH: - Option_8019A124(); + Option_Vs_PointMatch_Update(); break; case OPTION_BR_MATCH: - Option_8019A1A8(); + Option_Vs_BattleRoyal_Update(); break; case OPTION_TT_MATCH: - Option_8019A214(); + Option_Vs_TimeTrial_Update(); break; } } -void Option_8019A124(void) { - switch (D_menu_801B912C) { +void Option_Vs_PointMatch_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019A2E0(); + Option_Vs_Point_Selection(); break; case 1: - Option_8019A6DC(); + Option_VsStageSelection(); break; case 2: - Option_8019A954(); + Option_VsConfirmSelection(); break; case 3: - Option_8019A298(); + Option_Vs_StartMatch(); break; } } -void Option_8019A1A8(void) { - switch (D_menu_801B912C) { +void Option_Vs_BattleRoyal_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019A6DC(); + Option_VsStageSelection(); break; case 1: - Option_8019A954(); + Option_VsConfirmSelection(); break; case 2: - Option_8019A298(); + Option_Vs_StartMatch(); break; } } -void Option_8019A214(void) { - switch (D_menu_801B912C) { +void Option_Vs_TimeTrial_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019A4DC(); + Option_VsTimeSelection(); break; case 1: - Option_8019A6DC(); + Option_VsStageSelection(); break; case 2: - Option_8019A954(); + Option_VsConfirmSelection(); break; case 3: - Option_8019A298(); + Option_Vs_StartMatch(); break; } } -void Option_8019A298(void) { - if (D_menu_801B91EC == 0.0f) { +void Option_Vs_StartMatch(void) { + if (sOkConfirmTimer == 0.0f) { gGameState = GSTATE_VS_INIT; gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; @@ -2983,25 +3011,25 @@ void Option_8019A298(void) { } } -void Option_8019A2E0(void) { +void Option_Vs_Point_Selection(void) { s32 i; - if (D_menu_801B936C != 0) { + if (sPointConfirmTimer != 0) { return; } - if (D_menu_801B91F0) { - D_menu_801B912C++; - D_menu_801B91F0 = 0; + if (sVsSubMenuFirstState) { + sMainMenuState++; + sVsSubMenuFirstState = false; return; } - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 0) { continue; } - if (Option_8019C418(&D_menu_801B93D4, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93D4, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); gVsPointsToWin = D_menu_801B93D4 + 1; } @@ -3009,39 +3037,39 @@ void Option_8019A2E0(void) { if (gControllerPress[i].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); Option_8019A080(); - D_menu_801B936C = 10; + sPointConfirmTimer = 10; break; } if (gControllerPress[i].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - D_menu_801B9124 = D_menu_801B93D0; + sMenuEntryState = sVsMenuSelection; D_menu_801B91C4 = 0; - Option_InitEntry(); + Option_Entry_Setup(); break; } } } -void Option_8019A4DC(void) { +void Option_VsTimeSelection(void) { s32 i; - if (D_menu_801B937C != 0) { - return; // investigate - } - - if (D_menu_801B91F0) { - D_menu_801B912C++; - D_menu_801B91F0 = 0; + if (sTimeTrialConfirmTimer != 0) { return; } - for (i = 0; i < 4; i++) { + if (sVsSubMenuFirstState) { + sMainMenuState++; + sVsSubMenuFirstState = false; + return; + } + + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (!gControllerPlugged[i]) { continue; } - if (Option_8019C418(&D_menu_801B93DC, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93DC, 4, 0, 0, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); D_menu_801B9340 = D_menu_801B93DC; gVsTimeTrialLimit = D_menu_801B93DC; @@ -3050,39 +3078,39 @@ void Option_8019A4DC(void) { if (gControllerPress[i].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); Option_8019A080(); - D_menu_801B937C = 10; + sTimeTrialConfirmTimer = 10; break; } if (gControllerPress[i].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - D_menu_801B9124 = D_menu_801B93D0; + sMenuEntryState = sVsMenuSelection; D_menu_801B91C4 = 0; - Option_InitEntry(); + Option_Entry_Setup(); break; } } } -void Option_8019A6DC(void) { +void Option_VsStageSelection(void) { s32 i; - if (D_menu_801B9374 != 0) { - return; // investigate - } - - if (D_menu_801B91F0) { - D_menu_801B933C = 1; - D_menu_801B91F0 = 0; - D_menu_801B912C++; + if (sStageSelectConfirmTimer != 0) { return; } - for (i = 0; i < 4; i++) { + if (sVsSubMenuFirstState) { + D_menu_801B933C = 1; + sVsSubMenuFirstState = false; + sMainMenuState++; + return; + } + + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 0) { continue; } - if (Option_8019C418(&D_menu_801B93D8, 1, 0, 1, 20, 2, 4, i, &D_menu_801B9380[i])) { + if (Option_Input_MoveCursor_Y(&D_menu_801B93D8, 1, 0, 1, 20, 2, 4, i, &D_menu_801B9380[i])) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); gVsMenuSelection = D_menu_801B93D8; } @@ -3091,56 +3119,55 @@ void Option_8019A6DC(void) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); if (gVsMenuSelection == 0) { gVersusStage = VS_STAGE_CORNERIA; - if (D_menu_801B93D0 == 30) { + if (sVsMenuSelection == OPTION_TT_MATCH) { gVersusStage = VS_STAGE_KATINA; } } else { gVersusStage = VS_STAGE_SECTOR_Z; } - D_menu_801B9374 = 10; + sStageSelectConfirmTimer = 10; Option_8019A080(); break; } if (gControllerPress[i].button & B_BUTTON) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); - if (D_menu_801B93D0 == 20) { - D_menu_801B9124 = D_menu_801B93D0; + if (sVsMenuSelection == OPTION_BR_MATCH) { + sMenuEntryState = sVsMenuSelection; D_menu_801B91C4 = 0; - Option_InitEntry(); + Option_Entry_Setup(); } else { Option_8019A080(); - D_menu_801B91F0 = 0; - D_menu_801B912C--; + sVsSubMenuFirstState = false; + sMainMenuState--; } break; } } } -void Option_8019A954(void) { +void Option_VsConfirmSelection(void) { s32 i; - if (D_menu_801B91EC != 0) { - return; // investigate - } - - if (D_menu_801B91F0) { - - D_menu_801B91F0 = 0; - D_menu_801B912C++; + if (sOkConfirmTimer != 0) { return; } - for (i = 0; i < 4; i++) { + if (sVsSubMenuFirstState) { + sVsSubMenuFirstState = false; + sMainMenuState++; + return; + } + + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 0) { continue; } if (gControllerPress[i].button & A_BUTTON) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B91EC = 10; + sOkConfirmTimer = 10; break; } @@ -3148,80 +3175,80 @@ void Option_8019A954(void) { AUDIO_PLAY_SFX(NA_SE_CANCEL, gDefaultSfxSource, 4); Option_8019A080(); D_menu_801B933C = 0; - D_menu_801B91F0 = 0; - D_menu_801B912C--; + sVsSubMenuFirstState = false; + sMainMenuState--; break; } } } -void Option_VersusStageDraw(void) { - switch (D_menu_801B93D0) { +void Option_VersusStage_Draw(void) { + switch (sVsMenuSelection) { case OPTION_BR_MATCH: break; case OPTION_POINT_MATCH: - Option_8019AB30(); + Option_VsPointMatch_Draw(); break; case OPTION_TT_MATCH: - Option_8019AD84(); + Option_VsTimeTrial_Draw(); break; } - Option_8019AFFC(); + Option_VsStageSelect_Draw(); if (D_menu_801B933C != 0) { - Option_8019B5AC(); + Option_VsOKConfirm_Draw(); } } -void Option_8019AB30(void) { +void Option_VsPointMatch_Draw(void) { s32 pad[5]; s32 colorGB; s32 sp44 = gVsPointsToWin; - s32 var_v0; + s32 mask; RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 190); - TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, 94.0f, 43.0f, 5.0f, 1.1f); + Lib_TextureRect_IA8(&gMasterDisp, aMapOptionBgTex, 24, 17, 94.0f, 43.0f, 5.0f, 1.1f); - if (D_menu_801B912C == 0) { - Option_8019B6D8(97.0f, 50.0f, 107.0f, 255, 255, 255); - Option_8019C824(&D_menu_801B9368); + if (sMainMenuState == 0) { + Option_VsSelectionArrows_Draw(97.0f, 50.0f, 107.0f, 255, 255, 255); + Option_Color_FlashRed(&D_menu_801B9368); } else { D_menu_801B9368 = 255.0f; } colorGB = D_menu_801B9368; - var_v0 = 0xFFFFFFFF; + mask = 0xFFFFFFFF; - if (D_menu_801B936C != 0) { + if (sPointConfirmTimer != 0) { colorGB = 255; - var_v0 = 1; - D_menu_801B936C--; - if (D_menu_801B936C == 0) { - D_menu_801B91F0 = 1; + mask = 0x00000001; + sPointConfirmTimer--; + if (sPointConfirmTimer == 0) { + sVsSubMenuFirstState = true; } } - if ((gGameFrameCount & var_v0) != 0) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[sp44], 16, 15, 109.0f, 45.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_menu_801AECF8[sp44], 16, 15, 109.0f, 45.0f, 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001DF0, 80, 10, 122.0f, 49.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001DF0, 80, 10, 122.0f, 49.0f, 1.0f, 1.0f); } } -void Option_8019AD84(void) { +void Option_VsTimeTrial_Draw(void) { static f32 D_menu_801AF25C[6] = { 156.0f, 112.0f, 112.0f, 112.0f, 112.0f, 112.0f }; static f32 D_menu_801AF274[6] = { 46.0f, 43.0f, 43.0f, 43.0f, 43.0f, 43.0f }; static f32 D_menu_801B9324; @@ -3229,7 +3256,7 @@ void Option_8019AD84(void) { static f32 D_menu_801B9338; s32 pad[2]; s32 colorGB; - s32 var_v0; + s32 mask; static u8* sTimeTrialMinuteTextures[] = { D_VS_MENU_70024D0, D_VS_MENU_7002730, D_VS_MENU_7002990, D_VS_MENU_7002BF0, D_VS_MENU_7002E50 }; @@ -3238,95 +3265,97 @@ void Option_8019AD84(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 190); - TextureRect_IA8(&gMasterDisp, D_MAP_601B4B0, 24, 17, 93.0f, 42.0f, 5.1f, 1.1f); + Lib_TextureRect_IA8(&gMasterDisp, aMapOptionBgTex, 24, 17, 93.0f, 42.0f, 5.1f, 1.1f); - if (D_menu_801B912C == 0) { + if (sMainMenuState == 0) { D_menu_801B9324 = 97.0f; D_menu_801B9328 = 49.0f; D_menu_801B9338 = 107.0f; - Option_8019B6D8(D_menu_801B9324, D_menu_801B9328, D_menu_801B9338, 255, 255, 255); - Option_8019C824(&D_menu_801B9378); + Option_VsSelectionArrows_Draw(D_menu_801B9324, D_menu_801B9328, D_menu_801B9338, 255, 255, 255); + Option_Color_FlashRed(&D_menu_801B9378); } else { D_menu_801B9378 = 255.0f; } colorGB = D_menu_801B9378; - var_v0 = 0xFFFFFFFF; + mask = 0xFFFFFFFF; - if (D_menu_801B937C != 0) { + if (sTimeTrialConfirmTimer != 0) { colorGB = 255; - var_v0 = 1; - D_menu_801B937C--; - if (D_menu_801B937C == 0) { - D_menu_801B91F0 = 1; + mask = 0x00000001; + sTimeTrialConfirmTimer--; + if (sTimeTrialConfirmTimer == 0) { + sVsSubMenuFirstState = true; } } - if ((gGameFrameCount & var_v0) != 0) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, sTimeTrialMinuteTextures[D_menu_801B9340], 40, 15, - D_menu_801AF25C[D_menu_801B9340 + 1], D_menu_801AF274[D_menu_801B9340 + 1], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sTimeTrialMinuteTextures[D_menu_801B9340], 40, 15, + D_menu_801AF25C[D_menu_801B9340 + 1], D_menu_801AF274[D_menu_801B9340 + 1], 1.0f, 1.0f); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7002110, 80, 12, D_menu_801AF25C[0], D_menu_801AF274[0], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7002110, 80, 12, D_menu_801AF25C[0], D_menu_801AF274[0], 1.0f, + 1.0f); } } -void Option_8019AFFC(void) { +void Option_VsStageSelect_Draw(void) { static f32 D_menu_801B93C0; static f32 D_menu_801B93C8; static f32 D_menu_801B93CC; static f32 D_menu_801AF2A0 = 101.0f; static f32 D_menu_801AF2A4 = 86.0f; - s32 var_v0; + s32 mask; s32 colorGB; - if ((D_menu_801B912C == 0 && D_menu_801B93D0 == 20) || (D_menu_801B912C == 1 && D_menu_801B93D0 != 20)) { + if (((sMainMenuState == 0) && (sVsMenuSelection == OPTION_BR_MATCH)) || + ((sMainMenuState == 1) && (sVsMenuSelection != OPTION_BR_MATCH))) { D_menu_801B93C0 = 94.0f; D_menu_801B93C8 = 88.0f; D_menu_801B93CC = 114.0f; RCP_SetupDL(&gMasterDisp, SETUPDL_83); - Option_8019B6D8(D_menu_801B93C0, D_menu_801B93C8, D_menu_801B93CC, 255, 255, 255); - Option_8019C824(&D_menu_801B9370); + Option_VsSelectionArrows_Draw(D_menu_801B93C0, D_menu_801B93C8, D_menu_801B93CC, 255, 255, 255); + Option_Color_FlashRed(&D_menu_801B9370); } else { D_menu_801B9370 = 255.0f; } colorGB = D_menu_801B9370; - var_v0 = 0xFFFFFFFF; - if (D_menu_801B9374 != 0) { - var_v0 = 1; + mask = 0xFFFFFFFF; + if (sStageSelectConfirmTimer != 0) { + mask = 0x00000001; colorGB = 255; - D_menu_801B9374--; - if (D_menu_801B9374 == 0) { - D_menu_801B91F0 = 1; + sStageSelectConfirmTimer--; + if (sStageSelectConfirmTimer == 0) { + sVsSubMenuFirstState = true; } } - if ((gGameFrameCount & var_v0) != 0) { + if ((gGameFrameCount & mask) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001270, 112, 12, D_menu_801AF2A0, D_menu_801AF2A4, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7001270, 112, 12, D_menu_801AF2A0, D_menu_801AF2A4, 1.0f, 1.0f); } - if (D_menu_801B93D0 == 30) { - Option_8019B1F8(); + if (sVsMenuSelection == OPTION_TT_MATCH) { + Option_VsTimeTrialStageSelect_Draw(); } else { - Option_8019B3DC(); + Option_VsStageSelect2_Draw(); } } -void Option_8019B1F8(void) { +void Option_VsTimeTrialStageSelect_Draw(void) { static f32 D_menu_801AF2A8 = 69.0f; static f32 D_menu_801AF2AC = 110.0f; static f32 D_menu_801AF2B0 = 123.0f; @@ -3334,142 +3363,142 @@ void Option_8019B1F8(void) { f32 xPos; s32 i; s32 width; - s32 sp8C[2]; - static u8* D_menu_801AF2BC[] = { D_VS_MENU_7001C10, D_VS_MENU_70019E0 }; - static u8* D_menu_801AF2C4[] = { D_VS_MENU_7006780, D_VS_MENU_7005F10 }; - static u16* D_menu_801AF2CC[] = { D_VS_MENU_7006EA0, D_VS_MENU_7006630 }; + s32 alpha[2]; + static u8* sVsTextLevelTex[] = { aVsTextKatinaTex, aVsTextSectorZTex }; + static u8* sVsLevelTex[] = { aVsKatinaTex, aVsSectorZTex }; + static u16* sVsLevelTLUT[] = { aVsKatinaTLUT, aVsSectorZTLUT }; - for (xPos = D_menu_801AF2A8, i = 0; i < 2; i++, xPos += D_menu_801AF2B0) { + for (xPos = D_menu_801AF2A8, i = 0; i < ARRAY_COUNT(sVsTextLevelTex); i++, xPos += D_menu_801AF2B0) { if (i == gVsMenuSelection) { - sp8C[i] = 255; + alpha[i] = 255; } else { - sp8C[i] = 32; + alpha[i] = 32; } RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); - TextureRect_CI8(&gMasterDisp, D_menu_801AF2C4[i], D_menu_801AF2CC[i], 48, 38, xPos, D_menu_801AF2AC, 1.0f, - 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, sVsLevelTex[i], sVsLevelTLUT[i], 48, 38, xPos, D_menu_801AF2AC, 1.0f, 1.0f); width = 48; if (i == 1) { width = 56; } + RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); - TextureRect_IA8(&gMasterDisp, D_menu_801AF2BC[i], width, 10, D_menu_801AF2B4[i], D_menu_801AF2AC + 40.0f, 1.0f, - 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); + Lib_TextureRect_IA8(&gMasterDisp, sVsTextLevelTex[i], width, 10, D_menu_801AF2B4[i], D_menu_801AF2AC + 40.0f, + 1.0f, 1.0f); } } -void Option_8019B3DC(void) { +void Option_VsStageSelect2_Draw(void) { static f32 D_menu_801AF2D4 = 69.0f; static f32 D_menu_801AF2D8 = 110.0f; static f32 D_menu_801AF2DC = 123.0f; static f32 D_menu_801AF2E0[] = { 66.0f, 189.0f }; f32 xPos; s32 i; - s32 sp8C[3]; - static u8* D_menu_801AF2E8[] = { - D_VS_MENU_70017B0, - D_VS_MENU_70019E0, + s32 alpha[3]; + static u8* sVsTextLevelTex[] = { + aVsTextCorneriaTex, + aVsTextSectorZTex, }; - static u8* D_menu_801AF2F0[] = { - D_VS_MENU_7005600, - D_VS_MENU_7005F10, + static u8* sVsLevelTex[] = { + aVsCorneriaTex, + aVsSectorZTex, }; - static u16* D_menu_801AF2F8[] = { - D_VS_MENU_7005D20, - D_VS_MENU_7006630, + static u16* sVsLevelTLUT[] = { + aVsCorneriaTLUT, + aVsSectorZTLUT, }; - for (xPos = D_menu_801AF2D4, i = 0; i < 2; i++, xPos += D_menu_801AF2DC) { + for (xPos = D_menu_801AF2D4, i = 0; i < ARRAY_COUNT(sVsTextLevelTex); i++, xPos += D_menu_801AF2DC) { if (i == gVsMenuSelection) { - sp8C[i] = 255; + alpha[i] = 255; } else { - sp8C[i] = 32; + alpha[i] = 32; } RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); - TextureRect_CI8(&gMasterDisp, D_menu_801AF2F0[i], D_menu_801AF2F8[i], 48, 38, xPos, D_menu_801AF2D8, 1.0f, - 1.0f); + Lib_TextureRect_CI8(&gMasterDisp, sVsLevelTex[i], sVsLevelTLUT[i], 48, 38, xPos, D_menu_801AF2D8, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, sp8C[i]); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha[i]); - TextureRect_IA8(&gMasterDisp, D_menu_801AF2E8[i], 56, 10, D_menu_801AF2E0[i], D_menu_801AF2D8 + 40.0f, 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, sVsTextLevelTex[i], 56, 10, D_menu_801AF2E0[i], D_menu_801AF2D8 + 40.0f, 1.0f, + 1.0f); } } -void Option_8019B5AC(void) { +void Option_VsOKConfirm_Draw(void) { s32 pad[2]; s32 colorGB; s32 bitmask; - Option_8019C824(&D_menu_801B91E8); + Option_Color_FlashRed(&D_menu_801B91E8); colorGB = D_menu_801B91E8; bitmask = 0xFFFFFFFF; - if (D_menu_801B91EC != 0) { + if (sOkConfirmTimer != 0) { colorGB = 255; bitmask = 0x00000001; - D_menu_801B91EC--; - if (D_menu_801B91EC == 0) { - D_menu_801B91F0 = 1; + sOkConfirmTimer--; + if (sOkConfirmTimer == 0) { + sVsSubMenuFirstState = true; } } if (gGameFrameCount & bitmask) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, colorGB, colorGB, 255); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7003650, 40, 12, 143.0f, 210.0f, 1.0f, 1.0f); } } -void Option_8019B6D8(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b) { +void Option_VsSelectionArrows_Draw(f32 xPos, f32 yPos, f32 offset, s32 r, s32 g, s32 b) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, r, g, b, 255); - TextureRect_IA8_MirX(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos, yPos, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos + offset, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8_MirX(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_VS_MENU_7004010, 8, 8, xPos + offset, yPos, 1.0f, 1.0f); } -void Option_8019B7D4(void) { +void Option_AcceptCancel_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, D_OPT_80080F0, 96, 10, 62.0f, 213.0f, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, D_OPT_8006E50, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aAtoConfirmTex, 96, 10, 62.0f, 213.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aBtoCancelTex, 96, 10, 166.0f, 213.0f, 1.0f, 1.0f); } -void Option_8019B8A0(s32 arg0) { - D_menu_801B9124 = arg0; +void Option_VsBackToSubMenu(OptionId menuEntryState) { + sMenuEntryState = menuEntryState; gDrawMode = DRAW_NONE; - D_menu_801B912C = 0; + sMainMenuState = 0; D_menu_801B91B4 = 0; } -void Option_8019B8C8(void) { - Option_8019BDF0(); - Option_DrawMenuCard(sOptionVSCardList[D_menu_801B91A8].unk_38); +// Menu card drawned below the N64 console +void Option_VsMenuCard_Draw(void) { + Option_Menu_Push(); + Option_DrawMenuCard(sOptionVSCardList[sVsMenuCursor].frame); Matrix_Pop(&gGfxMatrix); - Option_DrawCardLabel(sOptionVSCardList[D_menu_801B91A8].unk_00); + Option_DrawCardLabel(sOptionVSCardList[sVsMenuCursor].tex); } void Option_DrawMenuLabel(void) { - Option_8019BDF0(); - Option_DrawMenuCard(sOptionCardList[D_menu_801B91A4].unk_38); + Option_Menu_Push(); + Option_DrawMenuCard(sOptionCardList[sMainMenuCursor].frame); Matrix_Pop(&gGfxMatrix); - Option_DrawCardLabel(sOptionCardList[D_menu_801B91A4].unk_00); + Option_DrawCardLabel(sOptionCardList[sMainMenuCursor].tex); } -void Option_DrawMenuCard(MenuContext_38 arg0) { +void Option_DrawMenuCard(OptionCardFrame arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_17); Lib_InitOrtho(&gMasterDisp); @@ -3489,10 +3518,11 @@ void Option_DrawMenuCard(MenuContext_38 arg0) { Lib_InitPerspective(&gMasterDisp); } -void Option_DrawMenuArwing(ArwingPosition arwing) { - if (D_menu_801B91BC != 0) { - Option_DrawArwing(arwing.x, arwing.y, D_menu_801B91F4, D_menu_801B9200, 90.0f, D_menu_801B91F8); - Option_DrawArwing(arwing.x + arwing.range, arwing.y, D_menu_801B91F4, D_menu_801B91FC, -90.0f, D_menu_801B91F8); +void Option_DrawMenuArwing(ArwingCursorPos arwing) { + if (sDrawCursor) { + Option_DrawArwing(arwing.x, arwing.y, D_menu_801B91F4, sLeftArwingCursorYrot, 90.0f, D_menu_801B91F8); + Option_DrawArwing(arwing.x + arwing.range, arwing.y, D_menu_801B91F4, sRightArwingCursorYrot, -90.0f, + D_menu_801B91F8); } } @@ -3501,7 +3531,7 @@ void Option_DrawArwing(f32 x, f32 y, f32 z, f32 yRot, f32 zRot, f32 scale) { f32 dirY; f32 dirZ; - Option_8019BE7C(D_menu_801B9224, D_menu_801B9228, 100.0f, &dirX, &dirY, &dirZ); + Option_SetMenuLightPos(sArwingLightXrot, sArwingLightYrot, 100.0f, &dirX, &dirY, &dirZ); Lights_SetOneLight(&gMasterDisp, dirX, dirY, dirZ, sArwingLightColR, sArwingLightColG, sArwingLightColB, sArwingLightAmbR, sArwingLightAmbG, sArwingLightAmbB); @@ -3523,69 +3553,69 @@ void Option_DrawArwing(f32 x, f32 y, f32 z, f32 yRot, f32 zRot, f32 scale) { Matrix_Pop(&gGfxMatrix); } -void Option_8019BDF0(void) { +void Option_Menu_Push(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 1.0f, 0.0f, MTXF_APPLY); } -void Option_8019BE7C(f32 xRot, f32 yRot, f32 arg2, f32* arg3, f32* arg4, f32* arg5) { +void Option_SetMenuLightPos(f32 xRot, f32 yRot, f32 zSrc, f32* dirX, f32* dirY, f32* dirZ) { Vec3f dest; Vec3f src; src.x = 0.0f; src.y = 0.0f; - src.z = arg2; + src.z = zSrc; Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = dest.x; - *arg4 = dest.y; - *arg5 = dest.z; + *dirX = dest.x; + *dirY = dest.y; + *dirZ = dest.z; } -void Option_8019BF34(void) { +void Option_CardLightning_Update(void) { s32 i; - f32 sp40; + f32 savedLightningXpos; if (D_menu_801B9214 != 0) { - sp40 = D_menu_801B9204; - Option_8019BDF0(); + savedLightningXpos = sLightningXpos; + Option_Menu_Push(); for (i = 0; i < 3; i++) { - D_menu_801B920C = RAND_FLOAT(0.5f); - D_menu_801B9210 = 0.5f; - Option_8019C04C(); - D_menu_801B9204 += 6.0f; + sLightningXScale = RAND_FLOAT(0.5f); + sLightningYScale = 0.5f; + Option_CardLightning_Draw(); + sLightningXpos += 6.0f; } Matrix_Pop(&gGfxMatrix); - D_menu_801B9204 = sp40; + sLightningXpos = savedLightningXpos; - if (D_menu_801B9204 < 23.0f) { - D_menu_801B9204 += 18.0f; + if (sLightningXpos < 23.0f) { + sLightningXpos += 18.0f; } else { - D_menu_801B9204 = 23.0f; + sLightningXpos = 23.0f; D_menu_801B9214 = 0; } } } -void Option_8019C04C(void) { +void Option_CardLightning_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_36); Lib_InitOrtho(&gMasterDisp); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B9204, D_menu_801B9208, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B920C, D_menu_801B9210, 1.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sLightningXpos, sLightningYpos, 0.0f, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sLightningXScale, sLightningYScale, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_OPT_8015DF0); + gSPDisplayList(gMasterDisp++, aLightningDL); Matrix_Pop(&gGfxMatrix); @@ -3594,42 +3624,43 @@ void Option_8019C04C(void) { //! TODO: Enum for Texture types -void Option_DrawCardLabel(OptionTexture tex) { +void Option_DrawCardLabel(OptionCardTexture tex) { if (!(tex.xScale <= 0.0f) && !(tex.yScale <= 0.0f)) { switch (tex.type) { case 1: RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); - TextureRect_CI4(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, - tex.xScale, tex.yScale); + Lib_TextureRect_CI4(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, + tex.xScale, tex.yScale); break; case 2: RCP_SetupDL(&gMasterDisp, SETUPDL_78); gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); - TextureRect_CI8(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, - tex.xScale, tex.yScale); + Lib_TextureRect_CI8(&gMasterDisp, tex.texture, tex.palette, tex.width, tex.height, tex.xPos, tex.yPos, + tex.xScale, tex.yScale); break; case 0: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); - TextureRect_IA8(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, - tex.yScale); + Lib_TextureRect_IA8(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, + tex.yScale); break; case 3: RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, tex.red, tex.green, tex.blue, tex.alpha); - TextureRect_RGBA16(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, - tex.yScale); + Lib_TextureRect_RGBA16(&gMasterDisp, tex.texture, tex.width, tex.height, tex.xPos, tex.yPos, tex.xScale, + tex.yScale); break; } } } -bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, - UnkStruct_D_menu_801B9250* arg8) { +// Input for vertical movement of the cursor +bool Option_Input_MoveCursor_Y(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, + s32 controllerNum, StickInput* stickY) { s32 axis; s32 x; s32 y; @@ -3642,8 +3673,8 @@ bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg temp = *arg0; - x = gControllerPress[arg7].stick_x; - y = -gControllerPress[arg7].stick_y; + x = +gControllerPress[controllerNum].stick_x; + y = -gControllerPress[controllerNum].stick_y; if (arg2 == true) { axis = y; @@ -3661,7 +3692,7 @@ bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg axis = 0; } - if (!(arg8->unk_4)) { + if (!(stickY->unk_4)) { if (axis != 0) { if (axis > 0) { (*arg0)++; @@ -3685,18 +3716,18 @@ bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg } } - arg8->unk_4 = arg5 + arg8->unk_0; - if (arg8->unk_0 > 0) { - arg8->unk_0 -= arg6; + stickY->unk_4 = arg5 + stickY->unk_0; + if (stickY->unk_0 > 0) { + stickY->unk_0 -= arg6; } } else { - arg8->unk_4 = 0; - arg8->unk_0 = arg6; + stickY->unk_4 = 0; + stickY->unk_0 = arg6; } } - if (arg8->unk_4 > 0) { - arg8->unk_4--; + if (stickY->unk_4 > 0) { + stickY->unk_4--; } if (temp != *arg0) { @@ -3706,10 +3737,11 @@ bool Option_8019C418(s32* arg0, s32 arg1, bool arg2, s32 arg3, s32 arg4, s32 arg return ret; } -s32 Option_8019C5A0(s32* arg0) { +// Input for horizontal selection in DataSelect +s32 Option_Input_DataSelect_X(s32* arg0) { s32 ret = 0; s32 temp = *arg0; - s32 x = gControllerPress[gMainController].stick_x; + s32 x = +gControllerPress[gMainController].stick_x; s32 y = -gControllerPress[gMainController].stick_y; if ((y > 40) || (y < -40)) { @@ -3730,7 +3762,7 @@ s32 Option_8019C5A0(s32* arg0) { *arg0 = 1; ret = -1; } - D_menu_801B91A0 = OPTION_COUNT; + D_menu_801B91A0 = ARRAY_COUNT(sOptionCardList); } } @@ -3745,12 +3777,13 @@ s32 Option_8019C5A0(s32* arg0) { return ret; } -bool Option_8019C66C(f32* arg0, f32 arg1, f32 arg2, UnkStruct_D_menu_801B9250* arg3) { +// Input for horizontal selection in Sound menus +bool Option_Input_Sound_X(f32* arg0, f32 arg1, f32 arg2, StickInput* arg3) { f32 var_fv1; f32 temp2; bool var_a2 = false; f32 temp = *arg0; - s32 x = gControllerPress[gMainController].stick_x; + s32 x = +gControllerPress[gMainController].stick_x; s32 y = -gControllerPress[gMainController].stick_y; if ((y > 10) || (y < -10)) { @@ -3810,9 +3843,9 @@ bool Option_8019C66C(f32* arg0, f32 arg1, f32 arg2, UnkStruct_D_menu_801B9250* a return var_a2; } -void Option_8019C824(f32* arg0) { - if ((s32) Math_SmoothStepToF(arg0, D_menu_801B91E4, 0.5f, 100.0f, 1.0f) == 0.0f) { - if (*arg0 == 32.0f) { +void Option_Color_FlashRed(f32* color) { + if ((s32) Math_SmoothStepToF(color, D_menu_801B91E4, 0.5f, 100.0f, 1.0f) == 0.0f) { + if (*color == 32.0f) { D_menu_801B91E4 = 255.0f; } else { D_menu_801B91E4 = 32.0f; @@ -3820,100 +3853,104 @@ void Option_8019C824(f32* arg0) { } } -s32 Option_8019C8C4(void) { +s32 Option_RankInPos_Check(void) { s32 i; s32 j; s32 k; s32 m; - s32 ret; - s32 var_v0 = 0; - s32 var_a0 = 0; - s32 temp[10]; + s32 rankInPos; + s32 missionTeamStatus = 0; + s32 rankingTeamAlive = 0; + s32 rankingLives[10]; for (i = 0; i < gMissionNumber + 1; i++) { - var_v0 += ((gMissionTeamStatus[i] & 0x00FF0000) >> 16) & 1; - var_v0 += ((gMissionTeamStatus[i] & 0x0000FF00) >> 8) & 1; - var_v0 += (gMissionTeamStatus[i] & 0x000000FF) & 1; + missionTeamStatus += ((gMissionTeamStatus[i] & TEAMSTATUS_PEPPY) >> 16) & 1; + missionTeamStatus += ((gMissionTeamStatus[i] & TEAMSTATUS_SLIPPY) >> 8) & 1; + missionTeamStatus += (gMissionTeamStatus[i] & TEAMSTATUS_FALCO) & 1; } - for (i = 0; i < 10; i++) { - temp[i] = gSaveFile.save.data.unk_40[i]; + for (i = 0; i < RANKING_MAX; i++) { + rankingLives[i] = gSaveFile.save.data.rankingLives[i]; } - ret = -1; + rankInPos = -1; // Didn't get into the ranking - for (i = 0; i < 10; i++) { - if (D_menu_801B8220[i] <= gTotalHits) { - if (D_menu_801B8220[i] == gTotalHits) { - for (j = i; j < 10; j++) { - if (D_menu_801B8220[j] != gTotalHits) { - ret = j; + // Ranking + for (i = 0; i < RANKING_MAX; i++) { + if (gTotalHitsRanking[i] <= gTotalHits) { + if (gTotalHitsRanking[i] == gTotalHits) { + for (j = i; j < RANKING_MAX; j++) { + if (gTotalHitsRanking[j] != gTotalHits) { + rankInPos = j; break; } - if (temp[j] <= gLifeCount[gPlayerNum]) { - if (temp[j] == gLifeCount[gPlayerNum]) { - for (k = j; k < 10; k++) { - if ((temp[k] != gLifeCount[gPlayerNum]) || (D_menu_801B8220[k] != gTotalHits)) { - ret = k; + // Lives count + if (rankingLives[j] <= gLifeCount[gPlayerNum]) { + if (rankingLives[j] == gLifeCount[gPlayerNum]) { + for (k = j; k < RANKING_MAX; k++) { + if ((rankingLives[k] != gLifeCount[gPlayerNum]) || + (gTotalHitsRanking[k] != gTotalHits)) { + rankInPos = k; break; } - for (var_a0 = 0, m = 0; m < 3; m++) { - var_a0 += D_menu_801B81A8[k][m]; + // Team count + for (rankingTeamAlive = 0, m = 0; m < 3; m++) { + rankingTeamAlive += gRankingTeamAlive[k][m]; } - if (var_v0 > var_a0) { - ret = k; + if (missionTeamStatus > rankingTeamAlive) { + rankInPos = k; break; } } } else { - ret = j; + rankInPos = j; } break; } } } else { - ret = i; + rankInPos = i; } break; } } - return ret; + return rankInPos; } -void Option_8019CAE0(void) { - switch (D_menu_801B912C) { +void Option_NameEntry_Update(void) { + switch (sMainMenuState) { case 0: - Option_8019CBC0(); - D_menu_801B912C++; + Option_NameEntry_Setup(); + sMainMenuState++; break; case 1: - Option_8019CD54(); + Option_NameEntry_Select(); break; case 2: - Option_8019D624(); - Title_80188010(); + Option_Ranking_SaveData(); + Title_GetRankTotalHits(); D_menu_801B917C = 15; - D_menu_801B912C++; + sMainMenuState++; break; case 3: if (D_menu_801B917C == 0) { gBlurAlpha = 255; gDrawMode = DRAW_NONE; - D_menu_801B912C = 0; - D_menu_801B9124 = 300; + sMainMenuState = 0; + sMenuEntryState = OPTION_SCORE; } break; } } -void Option_8019CBC0(void) { +void Option_NameEntry_Setup(void) { s32 temp; s32 i; @@ -3924,8 +3961,8 @@ void Option_8019CBC0(void) { D_menu_801B9130 = 1; D_menu_801B9128 = 0; - D_menu_801B911C = 0.0f; - D_menu_801B9120 = 70.0f; + sNameEntryLightXrot = 0.0f; + sNameEntryLightYrot = 70.0f; temp = gSaveFile.save.data.unk_EA & 0xFF; @@ -3933,12 +3970,12 @@ void Option_8019CBC0(void) { D_menu_801B9098 = 3; D_menu_801B9138 = 1; - D_menu_801B9150[0][0] = gSaveFile.save.data.unk_18[temp][0] & 0xFF; - D_menu_801B9150[1][0] = gSaveFile.save.data.unk_18[temp][1] & 0xFF; - D_menu_801B9150[2][0] = gSaveFile.save.data.unk_18[temp][2] & 0xFF; + D_menu_801B9150[0][0] = gSaveFile.save.data.rankNameEntry[temp][0] & 0xFF; + D_menu_801B9150[1][0] = gSaveFile.save.data.rankNameEntry[temp][1] & 0xFF; + D_menu_801B9150[2][0] = gSaveFile.save.data.rankNameEntry[temp][2] & 0xFF; for (i = 0; i < 3; i++) { - D_menu_801B90A0[i] = Option_8019DCE8(D_menu_801B9150[i][0]); + D_menu_801B90A0[i] = Option_GetCharIndex(D_menu_801B9150[i][0]); D_menu_801B90B0[i] = 1; D_menu_801B9150[i][1] = 0; } @@ -3953,16 +3990,17 @@ void Option_8019CBC0(void) { D_menu_801B9150[i][1] = 0; } } - Option_80192598(); + Option_PlanetTextures_Setup(); } -void Option_8019CD54(void) { +void Option_NameEntry_Select(void) { switch (D_menu_801B9128) { case 0: - if ((D_menu_801B9138 == 0) && (Option_8019C418(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10, - gMainController, &D_menu_801B9160[D_menu_801B9098]))) { + if ((D_menu_801B9138 == 0) && + (Option_Input_MoveCursor_Y(&D_menu_801B90A0[D_menu_801B9098], 36, 0, 0, 50, 5, 10, gMainController, + &D_menu_801B9160[D_menu_801B9098]))) { AUDIO_PLAY_SFX(NA_SE_CURSOR, gDefaultSfxSource, 4); - D_menu_801B9150[D_menu_801B9098][0] = D_menu_801AEF5C[D_menu_801B90A0[D_menu_801B9098]]; + D_menu_801B9150[D_menu_801B9098][0] = sCharMap[D_menu_801B90A0[D_menu_801B9098]]; D_menu_801B90D0[D_menu_801B9098] = 0.0f; D_menu_801B9100[D_menu_801B9098] = 0.0f; } @@ -4031,13 +4069,13 @@ void Option_8019CD54(void) { case 3: if (D_menu_801B917C == 0) { - D_menu_801B912C = 2; + sMainMenuState = 2; } break; } } -void Option_8019D118(void) { +void Option_NameEntry_Draw(void) { static f32 D_menu_801AF300[] = { -120.0f, 0.0f, 120.0f }; f32 dirX; f32 dirY; @@ -4067,22 +4105,22 @@ void Option_8019D118(void) { if (D_menu_801B9138 == 1) { if ((gGameFrameCount & 0x10) != 0) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - TextureRect_IA8(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTextEnd, 32, 8, D_menu_801AF30C[5], D_menu_801AF324[5], 1.0f, 1.0f); } } - Option_80197A3C(D_menu_801B9094, D_menu_801AF30C[4], D_menu_801AF324[4]); + Option_OrdinalNumbers_Draw(sRankInPos, D_menu_801AF30C[4], D_menu_801AF324[4]); RCP_SetupDL(&gMasterDisp, SETUPDL_76); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - Graphics_DisplayLargeNumber(D_menu_801AF30C[3] - ((func_hud_8008BCBC(gTotalHits) - 1) * 13), D_menu_801AF324[3], + Graphics_DisplayLargeNumber(D_menu_801AF30C[3] - ((HUD_CountDigits(gTotalHits) - 1) * 13), D_menu_801AF324[3], gTotalHits); - Map_801A9FD4(1); + Map_801A9FD4(true); - Option_80192738(); + Option_ScrollPlanetTexture(); for (i = 0; i < 3; i++) { if (i == D_menu_801B9098) { @@ -4099,7 +4137,7 @@ void Option_8019D118(void) { } } - Option_8019BE7C(D_menu_801B911C, D_menu_801B9120, 127.0f, &dirX, &dirY, &dirZ); + Option_SetMenuLightPos(sNameEntryLightXrot, sNameEntryLightYrot, 127.0f, &dirX, &dirY, &dirZ); Lights_SetOneLight(&gMasterDisp, dirX, dirY, dirZ, 255, 255, 255, 65, 70, 48); @@ -4111,139 +4149,135 @@ void Option_8019D118(void) { for (i = 0; i < 3; i++) { if (gGameFrameCount & bitmask[i]) { - Option_8019DB20(D_menu_801B9150[i][0], D_menu_801AF300[i], 18.0f, -455.0f, 1.0f, - D_menu_801B90C0[i] + D_menu_801B90F0[i], D_menu_801B90D0[i] + D_menu_801B9100[i], - D_menu_801B90E0[i] + D_menu_801B9110[i]); + Option_3DFont_Draw(D_menu_801B9150[i][0], D_menu_801AF300[i], 18.0f, -455.0f, 1.0f, + D_menu_801B90C0[i] + D_menu_801B90F0[i], D_menu_801B90D0[i] + D_menu_801B9100[i], + D_menu_801B90E0[i] + D_menu_801B9110[i]); } } Matrix_Pop(&gGfxMatrix); } -void Option_8019D624(void) { +void Option_Ranking_SaveData(void) { s32 i; s32 j; - s32 var_t2; - s32 var_a3; - s32 var_a0; - s32 var_a1; - u8 sp142[11][3]; - u8 sp122[11]; - u8 sp116[11]; - u8 sp10A[11]; - Save_SubStruct_5E var_s0[11][7]; + s32 missionHitCount; + s32 originalRankIdx; + PlanetId planetId; + s32 currentRankIdx; + u8 rankNameEntry[11][3]; + u8 rankingRoute[11]; + u8 rankingLives[11]; + u8 rankingMedal[11]; + PlanetStats planetStats[11][7]; - sp142[10][0] = D_menu_801B9150[0][0]; - sp142[10][1] = D_menu_801B9150[1][0]; - sp142[10][2] = D_menu_801B9150[2][0]; + rankNameEntry[10][0] = D_menu_801B9150[0][0]; + rankNameEntry[10][1] = D_menu_801B9150[1][0]; + rankNameEntry[10][2] = D_menu_801B9150[2][0]; - sp122[10] = gMissionNumber + 1; + rankingRoute[10] = gMissionNumber + 1; - sp116[10] = gLifeCount[0]; + rankingLives[10] = gLifeCount[0]; - sp10A[10] = 0; + rankingMedal[10] = 0; - for (i = 0; i < 7; i++) { - sp10A[10] |= (gMissionMedal[i] << i); + for (i = 0; i < ROUTE_MAX; i++) { + rankingMedal[10] |= (gMissionMedal[i] << i); } - for (j = 0; j < 7; j++) { - var_s0[10][j].unk_C = 0; + for (j = 0; j < ROUTE_MAX; j++) { + planetStats[10][j].unk_C = 0; - var_t2 = gMissionHitCount[j]; + missionHitCount = gMissionHitCount[j]; - if (var_t2 > 255) { - var_t2 = var_t2 - 256; - var_s0[10][j].unk_C = 1; + if (missionHitCount > 255) { + missionHitCount -= 256; + planetStats[10][j].unk_C = 1; } - var_s0[10][j].unk_0 = var_t2; + planetStats[10][j].hitCount = missionHitCount; - var_a0 = gMissionPlanet[j]; + planetId = gMissionPlanet[j]; if (gMissionPlanet[j] == PLANET_VENOM) { - var_a0 = SAVE_SLOT_VENOM_1; + planetId = SAVE_SLOT_VENOM_1; } if (gMissionPlanet[j] == PLANET_SOLAR) { - var_a0 = SAVE_SLOT_SOLAR; + planetId = SAVE_SLOT_SOLAR; } - var_s0[10][j].unk_8 = var_a0; + planetStats[10][j].planetId = planetId; - var_s0[10][j].unk_D = ((gMissionTeamStatus[j] & 0x00FF0000) >> 16) & 1; - var_s0[10][j].unk_F = ((gMissionTeamStatus[j] & 0x0000FF00) >> 8) & 1; - var_s0[10][j].unk_E = (gMissionTeamStatus[j] & 0x000000FF) & 1; + planetStats[10][j].peppyAlive = ((gMissionTeamStatus[j] & TEAMSTATUS_PEPPY) >> 16) & 1; + planetStats[10][j].slippyAlive = ((gMissionTeamStatus[j] & TEAMSTATUS_SLIPPY) >> 8) & 1; + planetStats[10][j].falcoAlive = (gMissionTeamStatus[j] & TEAMSTATUS_FALCO) & 1; } - for (i = 0; i < 10; i++) { - sp142[i][0] = gSaveFile.save.data.unk_18[i][0]; - sp142[i][1] = gSaveFile.save.data.unk_18[i][1]; - sp142[i][2] = gSaveFile.save.data.unk_18[i][2]; - sp122[i] = gSaveFile.save.data.unk_36[i]; - sp116[i] = gSaveFile.save.data.unk_40[i]; - sp10A[i] = gSaveFile.save.data.unk_4A[i]; + for (i = 0; i < RANKING_MAX; i++) { + rankNameEntry[i][0] = gSaveFile.save.data.rankNameEntry[i][0]; + rankNameEntry[i][1] = gSaveFile.save.data.rankNameEntry[i][1]; + rankNameEntry[i][2] = gSaveFile.save.data.rankNameEntry[i][2]; + rankingRoute[i] = gSaveFile.save.data.rankingRoute[i]; + rankingLives[i] = gSaveFile.save.data.rankingLives[i]; + rankingMedal[i] = gSaveFile.save.data.rankingMedal[i]; - for (j = 0; j < 7; j++) { - var_s0[i][j].unk_0 = gSaveFile.save.data.unk_5E[i][j].unk_0; - var_s0[i][j].unk_8 = gSaveFile.save.data.unk_5E[i][j].unk_8; - var_s0[i][j].unk_C = gSaveFile.save.data.unk_5E[i][j].unk_C; - var_s0[i][j].unk_D = gSaveFile.save.data.unk_5E[i][j].unk_D; - var_s0[i][j].unk_E = gSaveFile.save.data.unk_5E[i][j].unk_E; - var_s0[i][j].unk_F = gSaveFile.save.data.unk_5E[i][j].unk_F; + for (j = 0; j < ROUTE_MAX; j++) { + planetStats[i][j].hitCount = gSaveFile.save.data.stats[i][j].hitCount; + planetStats[i][j].planetId = gSaveFile.save.data.stats[i][j].planetId; + planetStats[i][j].unk_C = gSaveFile.save.data.stats[i][j].unk_C; + planetStats[i][j].peppyAlive = gSaveFile.save.data.stats[i][j].peppyAlive; + planetStats[i][j].falcoAlive = gSaveFile.save.data.stats[i][j].falcoAlive; + planetStats[i][j].slippyAlive = gSaveFile.save.data.stats[i][j].slippyAlive; } } - for (var_a1 = 0, i = 0; i < 10; i++) { - if (i == D_menu_801B9094) { - var_a3 = var_a1; - var_a1 = 10; + for (currentRankIdx = 0, i = 0; i < RANKING_MAX; i++) { + if (i == sRankInPos) { + originalRankIdx = currentRankIdx; + currentRankIdx = 10; } - gSaveFile.save.data.unk_18[i][0] = sp142[var_a1][0]; - gSaveFile.save.data.unk_18[i][1] = sp142[var_a1][1]; - gSaveFile.save.data.unk_18[i][2] = sp142[var_a1][2]; - gSaveFile.save.data.unk_36[i] = sp122[var_a1]; - gSaveFile.save.data.unk_40[i] = sp116[var_a1]; - gSaveFile.save.data.unk_4A[i] = sp10A[var_a1]; + gSaveFile.save.data.rankNameEntry[i][0] = rankNameEntry[currentRankIdx][0]; + gSaveFile.save.data.rankNameEntry[i][1] = rankNameEntry[currentRankIdx][1]; + gSaveFile.save.data.rankNameEntry[i][2] = rankNameEntry[currentRankIdx][2]; + gSaveFile.save.data.rankingRoute[i] = rankingRoute[currentRankIdx]; + gSaveFile.save.data.rankingLives[i] = rankingLives[currentRankIdx]; + gSaveFile.save.data.rankingMedal[i] = rankingMedal[currentRankIdx]; - for (j = 0; j < 7; j++) { - gSaveFile.save.data.unk_5E[i][j].unk_0 = var_s0[var_a1][j].unk_0; - gSaveFile.save.data.unk_5E[i][j].unk_8 = var_s0[var_a1][j].unk_8; - gSaveFile.save.data.unk_5E[i][j].unk_C = var_s0[var_a1][j].unk_C; - gSaveFile.save.data.unk_5E[i][j].unk_D = var_s0[var_a1][j].unk_D; - gSaveFile.save.data.unk_5E[i][j].unk_E = var_s0[var_a1][j].unk_E; - gSaveFile.save.data.unk_5E[i][j].unk_F = var_s0[var_a1][j].unk_F; + for (j = 0; j < ROUTE_MAX; j++) { + gSaveFile.save.data.stats[i][j].hitCount = planetStats[currentRankIdx][j].hitCount; + gSaveFile.save.data.stats[i][j].planetId = planetStats[currentRankIdx][j].planetId; + gSaveFile.save.data.stats[i][j].unk_C = planetStats[currentRankIdx][j].unk_C; + gSaveFile.save.data.stats[i][j].peppyAlive = planetStats[currentRankIdx][j].peppyAlive; + gSaveFile.save.data.stats[i][j].falcoAlive = planetStats[currentRankIdx][j].falcoAlive; + gSaveFile.save.data.stats[i][j].slippyAlive = planetStats[currentRankIdx][j].slippyAlive; } - if (i == D_menu_801B9094) { - var_a1 = var_a3; + if (i == sRankInPos) { + currentRankIdx = originalRankIdx; } else { - var_a1++; + currentRankIdx++; } } - gSaveFile.save.data.unk_EA = D_menu_801B9094; + gSaveFile.save.data.unk_EA = sRankInPos; Save_Write(); } -void Option_8019DB20(s32 character, f32 x, f32 y, f32 z, f32 scale, f32 xAngle, f32 yAngle, f32 zAngle) { - static Gfx* D_menu_801AF33C[37] = { - D_FONT3D_90086F0, D_FONT3D_9007FD0, D_FONT3D_9007BB0, D_FONT3D_9000980, D_FONT3D_90075A0, D_FONT3D_90070C0, - D_FONT3D_9006AE0, D_FONT3D_9006500, D_FONT3D_90062D0, D_FONT3D_9001120, D_FONT3D_9005CA0, D_FONT3D_9005980, - D_FONT3D_9005380, D_FONT3D_9004E10, D_FONT3D_9000570, D_FONT3D_90014E0, D_FONT3D_9004920, D_FONT3D_9004230, - D_FONT3D_9003A30, D_FONT3D_9003620, D_FONT3D_9003230, D_FONT3D_9002EA0, D_FONT3D_9002890, D_FONT3D_90022A0, - D_FONT3D_9001E90, D_FONT3D_9001A10, D_FONT3D_900BB90, D_FONT3D_90001F0, D_FONT3D_900B580, D_FONT3D_900AF60, - D_FONT3D_900A870, D_FONT3D_900A290, D_FONT3D_9009CB0, D_FONT3D_9009990, D_FONT3D_9009280, D_FONT3D_9008C60, - D_FONT3D_9000000, +void Option_3DFont_Draw(s32 character, f32 x, f32 y, f32 z, f32 scale, f32 xAngle, f32 yAngle, f32 zAngle) { + static Gfx* s3DFont[37] = { + aFont3D_A, aFont3D_B, aFont3D_C, aFont3D_D, aFont3D_E, aFont3D_F, aFont3D_G, aFont3D_H, aFont3D_I, aFont3D_J, + aFont3D_K, aFont3D_L, aFont3D_M, aFont3D_N, aFont3D_O, aFont3D_P, aFont3D_Q, aFont3D_R, aFont3D_S, aFont3D_T, + aFont3D_U, aFont3D_V, aFont3D_W, aFont3D_X, aFont3D_Y, aFont3D_Z, aFont3D_0, aFont3D_1, aFont3D_2, aFont3D_3, + aFont3D_4, aFont3D_5, aFont3D_6, aFont3D_7, aFont3D_8, aFont3D_9, aFont3D_DOT, }; - s32 i; s32 charIndex = -1; - for (i = 0; D_menu_801AEF5C[i] != NULL; i++) { - if (character == D_menu_801AEF5C[i]) { + for (i = 0; sCharMap[i] != NULL; i++) { + if (character == sCharMap[i]) { charIndex = i; break; } @@ -4269,69 +4303,69 @@ void Option_8019DB20(s32 character, f32 x, f32 y, f32 z, f32 scale, f32 xAngle, Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AF33C[charIndex]); + gSPDisplayList(gMasterDisp++, s3DFont[charIndex]); Matrix_Pop(&gGfxMatrix); } -s32 Option_8019DCE8(s32 arg0) { - s32 i = 0; +s32 Option_GetCharIndex(s32 character) { + s32 charIdx = 0; // 'for()' causes instruction reorder - while (D_menu_801AEF5C[i] != 0) { - if (D_menu_801AEF5C[i] == arg0) { + while (sCharMap[charIdx] != 0) { + if (sCharMap[charIdx] == character) { break; } - i++; + charIdx++; } - if (D_menu_801AEF5C[i] == 0) { - i = 0; + if (sCharMap[charIdx] == 0) { + charIdx = 0; } - return i; + return charIdx; } -void Option_8019DD44(void) { - switch (D_menu_801B912C) { +void Option_Score_Update(void) { + switch (sMainMenuState) { case 0: - Option_RankingInit(); + Option_Ranking_Setup(); - D_menu_801B93E4 = D_menu_801B9094; + D_menu_801B93E4 = sRankInPos; - if ((D_menu_801B9094 < 0) || (D_menu_801B9094 >= 10)) { + if ((sRankInPos < 0) || (sRankInPos >= 10)) { D_menu_801B93E4 = 0; } D_menu_801B91D4 = 114.0f - D_menu_801B93E4 * 130.0f; D_menu_801B91D8 = -6.0f + D_menu_801B93E4 * 130.0f; - sOptionCardList[3].unk_00.xPos = sOptionCardCurTextPosX[3]; - sOptionCardList[3].unk_00.yPos = 23.0f; - sOptionCardList[3].unk_00.xScale = 1.0f; - sOptionCardList[3].unk_00.yScale = 1.0f; - sOptionCardList[3].unk_58 = true; - sOptionCardList[3].unk_38.y = 90.0f; - sOptionCardList[3].unk_38.xScale = 0.4f; - sOptionCardList[3].unk_38.yScale = 0.21f; - sOptionCardList[3].unk_5C = true; - D_menu_801B912C++; + sOptionCardList[3].tex.xPos = sOptionCardCurTextPosX[3]; + sOptionCardList[3].tex.yPos = 23.0f; + sOptionCardList[3].tex.xScale = 1.0f; + sOptionCardList[3].tex.yScale = 1.0f; + sOptionCardList[3].drawTex = true; + sOptionCardList[3].frame.y = 90.0f; + sOptionCardList[3].frame.xScale = 0.4f; + sOptionCardList[3].frame.yScale = 0.21f; + sOptionCardList[3].drawFrame = true; + sMainMenuState++; break; case 1: - Option_8019DE74(); + Option_Score_Update2(); break; } } -void Option_8019DE74(void) { - Option_8019715C(); +void Option_Score_Update2(void) { + Option_Ranking2_Cursor(); if (gControllerPress[gMainController].button & (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); gDrawMode = DRAW_NONE; - D_menu_801B912C = 0; + sMainMenuState = 0; if (gLastGameState == GSTATE_GAME_OVER) { gStarCount = 0; @@ -4341,21 +4375,21 @@ void Option_8019DE74(void) { } else if (gLastGameState == GSTATE_ENDING) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - D_menu_801B9124 = 400; + sMenuEntryState = OPTION_INVOICE; } } } -void Option_8019DF64(void) { - Option_8019752C(); - Option_8019BDF0(); - Option_DrawMenuCard(sOptionCardList[3].unk_38); +void Option_Score_Draw(void) { + Option_RankingMenu2_Draw(); + Option_Menu_Push(); + Option_DrawMenuCard(sOptionCardList[3].frame); Matrix_Pop(&gGfxMatrix); - Option_DrawCardLabel(sOptionCardList[3].unk_00); + Option_DrawCardLabel(sOptionCardList[3].tex); } -void Option_InvoiceUpdate(void) { - switch (D_menu_801B912C) { +void Option_Invoice_Update(void) { + switch (sMainMenuState) { case 0: gStarCount = 0; gBgColor = 0; @@ -4365,7 +4399,7 @@ void Option_InvoiceUpdate(void) { gFillScreenAlpha = 0; D_menu_801B9090 = 0; D_menu_801B9178 = 30; - D_menu_801B912C++; + sMainMenuState++; break; case 1: @@ -4377,7 +4411,7 @@ void Option_InvoiceUpdate(void) { AUDIO_PLAY_SFX(NA_SE_VO_PEPPER_SURPRISE, gDefaultSfxSource, 4); } D_menu_801B9178 = 20; - D_menu_801B912C++; + sMainMenuState++; } break; @@ -4388,7 +4422,7 @@ void Option_InvoiceUpdate(void) { AUDIO_PLAY_SFX(NA_SE_STARFOX_SEAL, gDefaultSfxSource, 4); D_menu_801B9090 = 1; D_menu_801B9178 = 60; - D_menu_801B912C++; + sMainMenuState++; } break; @@ -4414,55 +4448,52 @@ void Option_InvoiceDraw(void) { Graphics_FillRectangle(&gMasterDisp, 25, 18, SCREEN_WIDTH - 25, SCREEN_HEIGHT - 18, 255, 255, 255, 255); RCP_SetupDL(&gMasterDisp, SETUPDL_78); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_CI4(&gMasterDisp, D_OPT_8000000, D_OPT_8000680, 128, 16, D_menu_801AF3D0[0], D_menu_801AF3F0[0], 1.0f, - 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_8000000, D_OPT_8000680, 128, 16, D_menu_801AF3D0[0], D_menu_801AF3F0[0], + 1.0f, 1.0f); - TextureRect_CI4(&gMasterDisp, D_OPT_8000000 + 128 * 16 / 2, D_OPT_8000680, 128, 10, D_menu_801AF3D0[0], - D_menu_801AF3F0[0] + 16.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_8000000 + 128 * 16 / 2, D_OPT_8000680, 128, 10, D_menu_801AF3D0[0], + D_menu_801AF3F0[0] + 16.0f, 1.0f, 1.0f); for (i = 0; i < 2; i++) { - TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + (256 * 16 * i) / 2, D_OPT_80017A0, 256, 16, D_menu_801AF3D0[1], - D_menu_801AF3F0[1] + (16 * i), 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + (256 * 16 * i) / 2, D_OPT_80017A0, 256, 16, + D_menu_801AF3D0[1], D_menu_801AF3F0[1] + (16 * i), 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + 256 * 32 / 2, D_OPT_80017A0, 256, 2, D_menu_801AF3D0[1], - D_menu_801AF3F0[1] + 32.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_80006A0 + 256 * 32 / 2, D_OPT_80017A0, 256, 2, D_menu_801AF3D0[1], + D_menu_801AF3F0[1] + 32.0f, 1.0f, 1.0f); for (i = 0; i < 4; i++) { - TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + (256 * 16 * i) / 2, D_OPT_80038C0, 256, 16, D_menu_801AF3D0[2], - D_menu_801AF3F0[2] + (16 * i), 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + (256 * 16 * i) / 2, D_OPT_80038C0, 256, 16, + D_menu_801AF3D0[2], D_menu_801AF3F0[2] + (16 * i), 1.0f, 1.0f); } - TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + 256 * 16 * 4 / 2, D_OPT_80038C0, 256, 2, D_menu_801AF3D0[2], - D_menu_801AF3F0[2] + 64.0f, 1.0f, 1.0f); + Lib_TextureRect_CI4(&gMasterDisp, D_OPT_80017C0 + 256 * 16 * 4 / 2, D_OPT_80038C0, 256, 2, D_menu_801AF3D0[2], + D_menu_801AF3F0[2] + 64.0f, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_76); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 30; i++) { - TextureRect_RGBA16(&gMasterDisp, D_OPT_800E170 + (188 * 2 * i), 188, 2, D_menu_801AF3D0[3], - D_menu_801AF3F0[3] + (2.0f * i), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, D_OPT_800E170 + (188 * 2 * i), 188, 2, D_menu_801AF3D0[3], + D_menu_801AF3F0[3] + (2.0f * i), 1.0f, 1.0f); } gDPSetPrimColor(gMasterDisp++, 0, 0, 0, 0, 0, 255); - - Graphics_DisplayLargeNumber(D_menu_801AF3D0[6] - ((func_hud_8008BCBC(gTotalHits) - 1) * 13), D_menu_801AF3F0[6], + Graphics_DisplayLargeNumber(D_menu_801AF3D0[6] - ((HUD_CountDigits(gTotalHits) - 1) * 13), D_menu_801AF3F0[6], gTotalHits); temp_a0 = gTotalHits * 64; - Graphics_DisplayLargeNumber(D_menu_801AF3D0[7] - ((func_hud_8008BCBC(temp_a0) - 1) * 13), D_menu_801AF3F0[7], + Graphics_DisplayLargeNumber(D_menu_801AF3D0[7] - ((HUD_CountDigits(temp_a0) - 1) * 13), D_menu_801AF3F0[7], temp_a0); if (D_menu_801B9090) { gDPSetPrimColor(gMasterDisp++, 0, 0, 120, 0, 0, 192); for (i = 0; i < 3; i++) { - TextureRect_IA8(&gMasterDisp, D_OPT_800D1F0 + (80 * 16 * i), 80, 16, D_menu_801AF3D0[5], - D_menu_801AF3F0[5] + (16.0f * i), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, D_OPT_800D1F0 + (80 * 16 * i), 80, 16, D_menu_801AF3D0[5], + D_menu_801AF3F0[5] + (16.0f * i), 1.0f, 1.0f); } } diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index f2fa53c8..7cf21285 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -3,7 +3,9 @@ * System: Title * Description: Starfox Title Handler */ -// #include "prevent_bss_reordering.h" + +#include "prevent_bss_reordering.h" +#include "prevent_bss_reordering2.h" #include "global.h" #include "fox_title.h" #include "assets/ast_title.h" @@ -15,22 +17,22 @@ f32 D_menu_801B7BB8; f32 D_menu_801B7BBC; f32 D_menu_801B7BC0; f32 D_menu_801B7BC4; -f32 D_menu_801B7BC8; -f32 D_menu_801B7BCC; +f32 sTitleTextPrimCol; +f32 sTitleTextPrimColTarget; s32 D_menu_801B7BD0; -s32 D_menu_801B7BD4; +TitleLogoStates sTitleLogoState; s32 D_menu_801B7BD8; -f32 D_menu_801B7BDC; -f32 D_menu_801B7BE0; +f32 sStarfoxLogoAlpha; +f32 sInAlpha; s32 D_menu_801B7BE4; f32 D_menu_801B7BE8; s32 D_menu_801B7BEC; -s32 D_menu_801B7BF0; +TitleCardStates sTitleCardState; f32 D_menu_801B7BF8[10]; f32 D_menu_801B7C20[10]; f32 D_menu_801B7C48[10]; f32 D_menu_801B7C70[10]; -s32 D_menu_801B7C98; +s32 sMaxExplosions; s32 D_menu_801B7CA0[10]; s32 D_menu_801B7CC8[10]; s32 D_menu_801B7CF0[10]; @@ -43,30 +45,30 @@ f32 D_menu_801B7FC0[40]; f32 D_menu_801B8060[40]; s32 D_menu_801B8100; s32 D_menu_801B8108[40]; -s32 D_menu_801B81A8[10][3]; -s32 D_menu_801B8220[10]; -u8 D_menu_801B8248[10][4]; +s32 gRankingTeamAlive[10][3]; +s32 gTotalHitsRanking[10]; +u8 sRankNameEntry[10][4]; UNK_TYPE D_menu_801B8270[3]; -s32 D_menu_801B827C; -s32 D_menu_801B8280; -s32 D_menu_801B8284; -s32 D_menu_801B8288; +bool gGoToTitle; +bool sLevelStartState; +s32 sWipeHeight; +s32 sTitleRankMaxRecords; f32 D_menu_801B828C; f32 D_menu_801B8290; CameraPoint* D_menu_801B8294; s32 D_menu_801B8298; -f32 D_menu_801B829C; -f32 D_menu_801B82A0; -f32 D_menu_801B82A4; -s32 D_menu_801B82A8; -s32 D_menu_801B82AC; +f32 sTitleCamUpX; +f32 sTitleCamUpY; +f32 sTitleCamUpZ; +s32 sTimer1; +s32 sTimer2; s32 D_menu_801B82B0; -s32 D_menu_801B82B4; -s32 D_menu_801B82B8; +s32 sTimer3; +s32 sTitleMsgFrameCount; s32 D_menu_801B82BC; -s32 D_menu_801B82C0; -s32 D_menu_801B82C4; -f32 D_menu_801B82C8; +s32 sSceneState; +s32 sCutsceneState; +f32 sPassageWayZoffset; f32 D_menu_801B82CC; f32 D_menu_801B82D0; f32 D_menu_801B82D4; @@ -90,24 +92,24 @@ s32 D_menu_801B8318; s32 D_menu_801B831C; s32 D_menu_801B8320; s32 D_menu_801B8324; -f32 D_menu_801B8328; -f32 D_menu_801B832C; -f32 D_menu_801B8330; +f32 sAmbientR; +f32 sAmbientG; +f32 sAmbientB; s32 D_menu_801B8334; bool D_menu_801B8338; -f32 D_menu_801B833C; -s32 D_menu_801B8340; -s32 D_menu_801B8344; -s32 D_menu_801B8348; -UnkStruct_D_801B8350 D_menu_801B8350[4]; +f32 D_menu_801B833C; // Set but never unused +TitleTeam D_menu_801B8340; +bool sDrawTeamName; +bool D_menu_801B8348; +TitleTeamInfo sTitleTeam[4]; f32 D_menu_801B84D0; f32 D_menu_801B84D4; f32 D_menu_801B84D8[3]; -UnkStruct_D_menu_801B84E8 D_menu_801B84E8[4]; -UnkStruct_D_menu_801B8658 D_menu_801B8658; -UnkStruct_D_menu_801B8688 D_menu_801B8688; +TitleArwingInfo sTitleArwing[4]; +TitleGreatFoxInfo sTitleGreatFox; +TitleCorneria sTitleCorneria; s32 D_menu_801B869C; -s32 D_menu_801B86A0; +bool sDrawTakeOffSpace; s32 D_menu_801B86A4; f32 D_menu_801B86A8; f32 D_menu_801B86AC; @@ -123,14 +125,14 @@ f32 D_menu_801B86D0; f32 D_menu_801B86D4; f32 D_menu_801B86D8; f32 D_menu_801B86DC; -Vec3f D_menu_801B86E0[4][50]; -s32 D_menu_801B9040; -f32 D_menu_801B9044; +Vec3f sCharFrameTable[4][50]; +bool D_menu_801B9040; +f32 sTitleDeckLauncherZpos; f32 D_menu_801B9048; f32 D_menu_801B904C; f32 D_menu_801B9050; -f32 D_menu_801B9054; -f32 D_menu_801B9058; +f32 sTitleStarfoxLogoXpos; +f32 sTitleStarfoxLogoYpos; f32 D_menu_801B905C; f32 D_menu_801B9060; f32 D_menu_801B9064; @@ -143,34 +145,25 @@ f32 D_menu_801B907C; f32 D_menu_801B9080; f32 D_menu_801B9084; -typedef struct { - /* 0x00 */ Animation* unk_0; - /* 0x04 */ Animation* unk_4; - /* 0x08 */ Limb** skeleton; -} TitleAnimation; // size = 0x0C - -TitleAnimation D_menu_801ADA00[4] = { - { &D_TITLE_602F8E0, &D_TITLE_6035024, D_TITLE_602FBAC }, - { &D_TITLE_60305C0, &D_TITLE_60338DC, D_TITLE_603088C }, - { &D_TITLE_6031DB8, &D_TITLE_603531C, D_TITLE_6032084 }, - { &D_TITLE_6031120, &D_TITLE_6036278, D_TITLE_60313AC }, +TitleAnimation sTeamAnim[4] = { + { &aFoxRunningAnim, &aFoxAnim, aFoxSkel }, + { &aFalcoRunningAnim, &aFalcoAnim, aFalcoSkel }, + { &aPeppyRunningAnim, &aPeppyAnim, aPeppySkel }, + { &aSlippyRunningAnim, &aSlippyAnim, aSlippySkel }, }; -u16* D_menu_801ADA30[5] = { +u16* sGralPepperMsg[5] = { gMsg_ID_10, gMsg_ID_20, gMsg_ID_30, gMsg_ID_40, gMsg_ID_50, }; -void Title_Init(void) { +void Title_Setup(void) { gVIsPerFrame = 2; - gGameFrameCount = 0; - - gTitleState = 2; - + gTitleState = TITLE_UPDATE_ENTRY; gLastGameState = GSTATE_NONE; D_game_800D2870 = false; - gMainController = Title_80187ABC(); + gMainController = Title_CheckControllers(); gFillScreenRed = 0; gFillScreenGreen = 0; @@ -183,17 +176,17 @@ void Title_Init(void) { gBgColor = 0; - D_menu_801B8284 = 0; - D_menu_801B82A8 = 0; - D_menu_801B82AC = 0; + sWipeHeight = 0; + sTimer1 = 0; + sTimer2 = 0; - D_menu_801B833C = 0.0f; + D_menu_801B833C = 0; - D_menu_801B82C0 = 0; - D_menu_801B8280 = 0; + sSceneState = 0; + sLevelStartState = false; - D_menu_801B7BCC = 255.0f; - D_menu_801B7BC8 = 255.0f; + sTitleTextPrimColTarget = 255.0f; + sTitleTextPrimCol = 255.0f; Memory_FreeAll(); @@ -201,34 +194,34 @@ void Title_Init(void) { gStarfieldX = SCREEN_WIDTH; gStarfieldY = SCREEN_HEIGHT; - Title_80188010(); + Title_GetRankTotalHits(); - if ((gMainController == -1) || (D_menu_801B827C != 0)) { + if ((gMainController == -1) || gGoToTitle) { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); - D_menu_801B82C4 = 0; - D_menu_801B827C = 0; + sCutsceneState = TITLE_SCREEN; + gGoToTitle = false; } else { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); - D_menu_801B82C4 = 1; + sCutsceneState = TITLE_GREAT_FOX_TRAVELING; } gControllerLock = 30; } void Title_Main(void) { switch (gTitleState) { - case 0: + case TITLE_IDLE: if (gNextGameStateTimer == 0) { gDrawMode = DRAW_NONE; - gTitleState = 1; + gTitleState = TITLE_SETUP; } break; - case 1: + case TITLE_SETUP: gDrawMode = DRAW_NONE; - Title_Init(); + Title_Setup(); break; - case 2: + case TITLE_UPDATE_ENTRY: gDrawMode = DRAW_TITLE; Title_UpdateEntry(); break; @@ -237,115 +230,133 @@ void Title_Main(void) { } void Title_UpdateEntry(void) { - if (D_menu_801B82A8 > 0) { - D_menu_801B82A8--; + if (sTimer1 > 0) { + sTimer1--; + } + if (sTimer2 > 0) { + sTimer2--; } - if (D_menu_801B82AC > 0) { - D_menu_801B82AC--; - } - - switch (D_menu_801B82C4) { - case 7: - Title_80187B00(); + switch (sCutsceneState) { + case TITLE_RANKING: + Title_Ranking_Update(); break; - case 0: - Title_801888E8(); - Title_8019111C(); + case TITLE_SCREEN: + Title_Screen_Update(); + Title_Screen_Input(); break; - case 1: - Title_8018994C(); + case TITLE_GREAT_FOX_TRAVELING: + Title_CsGreatFoxTraveling_Update(); break; - case 2: - Title_8018A644(); + case TITLE_CS_TEAM_RUNNING: + Title_CsTeamRunning_Update(); break; - case 3: - Title_8018ACEC(); + case TITLE_GREAT_FOX_CLOSE_UP: + Title_CsGreatFoxCloseUp_Update(); break; - case 4: - Title_8018B5C4(); + case TITLE_TAKE_OFF: + Title_CsTakeOff_Update(); break; - case 5: - Title_8018C644(); + case TITLE_TAKE_OFF_SPACE: + Title_CsTakeOffSpace_Update(); break; } - Title_80190E64(); + Title_NextState_Check(); } void Title_Draw(void) { - switch (D_menu_801B82C4) { - case 7: - Title_80187CA8(); + switch (sCutsceneState) { + case TITLE_RANKING: + Title_Ranking_Draw(); break; - case 0: - Title_801918FC(); - Title_80189208(); + case TITLE_SCREEN: + Title_Matrix_Push(); + Title_Screen_Draw(); + Matrix_Pop(&gGfxMatrix); - Title_8018F680(); - Title_8018F85C(); - Title_8018FC14(); - Title_8018F8E4(); - Title_801918FC(); - Title_8018F77C(); + + Title_StarfoxLogo_Draw(); + Title_CopyrightSymbol_Draw(); + Title_Copyright_Draw(); + Title_PressStart_Draw(); + Title_Matrix_Push(); + Title_64Logo_Draw(); + Matrix_Pop(&gGfxMatrix); break; - case 1: - if (D_menu_801B8348 != 0) { - Title_801918FC(); - Title_8018A2F8(); + case TITLE_GREAT_FOX_TRAVELING: + if (D_menu_801B8348) { + Title_Matrix_Push(); + Title_CsGreatFoxTraveling_Draw(); + Matrix_Pop(&gGfxMatrix); + Radio_Draw(); - Title_80190C9C(); + Title_TitleCard_Draw(); } - Title_8018FF74(); - Title_801906A0(); + Title_SunGlare_Draw(); + Title_Logos_Draw(); break; - case 2: - Title_801918FC(); - Title_8018A990(); + case TITLE_CS_TEAM_RUNNING: + Title_Matrix_Push(); + Title_CsTeamRunning_Draw(); + Matrix_Pop(&gGfxMatrix); - if (D_menu_801B8344 != 0) { - Title_8018FD08(); + + if (sDrawTeamName) { + Title_TeamName_Draw(); } break; - case 3: - Title_801918FC(); - Title_8018B038(); + case TITLE_GREAT_FOX_CLOSE_UP: + Title_Matrix_Push(); + + Title_CsGreatFoxCloseUp_Draw(); + Matrix_Pop(&gGfxMatrix); break; - case 4: - Title_801918FC(); - Title_8018C114(); + case TITLE_TAKE_OFF: + Title_Matrix_Push(); + Title_CsTakeOff_Draw(); + Matrix_Pop(&gGfxMatrix); - Title_80190C9C(); + + Title_TitleCard_Draw(); break; - case 5: - Title_801918FC(); - Title_8018CB90(); + case TITLE_TAKE_OFF_SPACE: + Title_Matrix_Push(); + + Title_CsTakeOffSpace_Draw(); + Matrix_Pop(&gGfxMatrix); break; } - if (D_menu_801B8284 != 0) { + if (sWipeHeight != 0) { gFillScreenAlpha = 0; gFillScreenRed = 0; gFillScreenGreen = 0; gFillScreenBlue = 0; - Wipe_Draw(WIPE_VERTICAL, D_menu_801B8284); + Wipe_Draw(WIPE_VERTICAL, sWipeHeight); } +#if 0 + // @decomp Debug: + RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); + Graphics_DisplaySmallNumber(80, 220, sSceneState); +#endif } -s32 Title_80187ABC(void) { - s32 ret = -1; +s32 Title_CheckControllers(void) { + s32 ret = -1; // No controller s32 i; - for (i = 0; i < 4; i++) { + for (i = 0; i < ARRAY_COUNT(gControllerPlugged); i++) { if (gControllerPlugged[i] == 1) { ret = i; break; @@ -355,14 +366,14 @@ s32 Title_80187ABC(void) { return ret; } -void Title_80187B00(void) { - switch (D_menu_801B82C0) { +void Title_Ranking_Update(void) { + switch (sSceneState) { case 0: - D_menu_801B8288 = 0; + sTitleRankMaxRecords = 0; gStarCount = 800; D_menu_801B82BC = 450; - D_menu_801B82C0++; - D_menu_801B82A8 = 20; + sSceneState++; + sTimer1 = 20; break; case 1: @@ -376,49 +387,50 @@ void Title_80187B00(void) { } else { gStarCount = 0; gRadioState = 0; - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); - D_menu_801B82C4 = 1; + sCutsceneState = TITLE_GREAT_FOX_TRAVELING; } - if (D_menu_801B8288 == 10) { + if (sTitleRankMaxRecords == 10) { D_menu_801B82BC--; } break; } - if ((D_menu_801B82A8 == 0) && ((gGameFrameCount % 8U) == 7) && (D_menu_801B8288 < 10)) { - D_menu_801B8288++; + if ((sTimer1 == 0) && ((gGameFrameCount % 8U) == 7) && (sTitleRankMaxRecords < 10)) { + sTitleRankMaxRecords++; } } -void Title_80187CA8(void) { - static char D_menu_801ADA44[] = "S T A R F O X R A N K I N G"; - s32 temp = 20; - s32 temp2 = 36; +void Title_Ranking_Draw(void) { + static char sSTARFOX_RANKING[] = "S T A R F O X R A N K I N G"; + s32 yPos = 20; + s32 xPos = 36; + // Ranking header RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - - Graphics_DisplaySmallText(temp2, temp, 1.0f, 1.0f, D_menu_801ADA44); + Graphics_DisplaySmallText(xPos, yPos, 1.0f, 1.0f, sSTARFOX_RANKING); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - TextureRect_IA8(&gMasterDisp, aSmallText_6, 16, 8, 148.0f, temp, 1.0f, 1.0f); - TextureRect_IA8(&gMasterDisp, aSmallText_4, 16, 8, 164, temp, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aSmallText_6, 16, 8, 148.0f, yPos, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aSmallText_4, 16, 8, 164, yPos, 1.0f, 1.0f); RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, &aTextKanjiCOMPLETE[48 * 6], 16, 2, 36, 32, 15.2f, 1.0f); - Title_80187E28(); + // This Kanji texture was used to draw a white line. + Lib_TextureRect_IA8(&gMasterDisp, &aTextKanjiCOMPLETE[288], 16, 2, 36, 32, 15.2f, 1.0f); + + Title_RankingData_Draw(); } -void Title_80187E28(void) { - s32 temp; +void Title_RankingData_Draw(void) { + s32 yPos; s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); @@ -428,76 +440,73 @@ void Title_80187E28(void) { Graphics_DisplaySmallText(94, 38, 1.0f, 1.0f, "RANK"); Graphics_DisplaySmallText(146, 38, 1.0f, 1.0f, "NAME"); Graphics_DisplaySmallText(192, 38, 1.0f, 1.0f, "HITS"); - temp = 55; - for (i = 0; i < D_menu_801B8288; i++) { + for (yPos = 55, i = 0; i < sTitleRankMaxRecords; i++) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - Graphics_DisplaySmallNumber(105 - ((func_hud_8008BCBC(i + 1) - 1) * 8), temp, i + 1); + Graphics_DisplaySmallNumber(105 - ((HUD_CountDigits(i + 1) - 1) * 8), yPos, i + 1); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); - - Graphics_DisplaySmallText(150, temp, 1.0f, 1.0f, &D_menu_801B8248[i][0]); + Graphics_DisplaySmallText(150, yPos, 1.0f, 1.0f, &sRankNameEntry[i][0]); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - - Graphics_DisplaySmallNumber(211 - ((func_hud_8008BCBC(D_menu_801B8220[i]) - 1) * 8), temp, D_menu_801B8220[i]); - temp += 17; + Graphics_DisplaySmallNumber(211 - ((HUD_CountDigits(gTotalHitsRanking[i]) - 1) * 8), yPos, + gTotalHitsRanking[i]); + yPos += 17; } } -s32 Title_80188010(void) { - s32 temp1; - s32 temp2; - s32 temp3; +s32 Title_GetRankTotalHits(void) { + s32 rankTotalHits; + s32 hitCount; + s32 rankingRoute; s32 i; s32 j; - for (i = 0; i < 10; i++) { - D_menu_801B8220[i] = 0; + for (i = 0; i < RANKING_MAX; i++) { + gTotalHitsRanking[i] = 0; for (j = 0; j < 3; j++) { - D_menu_801B81A8[i][j] = 0; + gRankingTeamAlive[i][j] = 0; } } - for (i = 0; i < 10; i++) { - D_menu_801B8248[i][0] = gSaveFile.save.data.unk_18[i][0] & 0xFF; - D_menu_801B8248[i][1] = gSaveFile.save.data.unk_18[i][1] & 0xFF; - D_menu_801B8248[i][2] = gSaveFile.save.data.unk_18[i][2] & 0xFF; - D_menu_801B8248[i][3] = '\0'; + for (i = 0; i < RANKING_MAX; i++) { + sRankNameEntry[i][0] = gSaveFile.save.data.rankNameEntry[i][0] & 0xFF; + sRankNameEntry[i][1] = gSaveFile.save.data.rankNameEntry[i][1] & 0xFF; + sRankNameEntry[i][2] = gSaveFile.save.data.rankNameEntry[i][2] & 0xFF; + sRankNameEntry[i][3] = '\0'; - temp3 = gSaveFile.save.data.unk_36[i]; + rankingRoute = gSaveFile.save.data.rankingRoute[i]; - for (j = 0; j < temp3; j++) { - temp2 = gSaveFile.save.data.unk_5E[i][j].unk_0; - temp2 |= (gSaveFile.save.data.unk_5E[i][j].unk_C & 1) * 256; + for (j = 0; j < rankingRoute; j++) { + hitCount = gSaveFile.save.data.stats[i][j].hitCount; + hitCount |= (gSaveFile.save.data.stats[i][j].unk_C & 1) << 8; - D_menu_801B8220[i] += temp2; + gTotalHitsRanking[i] += hitCount; - D_menu_801B81A8[i][0] += gSaveFile.save.data.unk_5E[i][j].unk_D & 1; - D_menu_801B81A8[i][1] += gSaveFile.save.data.unk_5E[i][j].unk_F & 1; - D_menu_801B81A8[i][2] += gSaveFile.save.data.unk_5E[i][j].unk_E & 1; + gRankingTeamAlive[i][0] += gSaveFile.save.data.stats[i][j].peppyAlive & 1; + gRankingTeamAlive[i][1] += gSaveFile.save.data.stats[i][j].slippyAlive & 1; + gRankingTeamAlive[i][2] += gSaveFile.save.data.stats[i][j].falcoAlive & 1; } } - temp1 = D_menu_801B8220[0]; + rankTotalHits = gTotalHitsRanking[0]; - for (i = 1; i < 10; i++) { - if (temp1 < D_menu_801B8220[i]) { - temp1 = D_menu_801B8220[i]; + for (i = 1; i < RANKING_MAX; i++) { + if (rankTotalHits < gTotalHitsRanking[i]) { + rankTotalHits = gTotalHitsRanking[i]; } } - return temp1; + return rankTotalHits; } -void Title_801881FC(void) { - bool var_a1 = true; +void Title_Screen_Setup(void) { + bool allExpertMedals = true; s32 i; - for (i = 0; i < 16; i++) { - if ((i != 14) && (!(gSaveFile.save.data.planet[i].expertMedal & 1))) { - var_a1 = false; + for (i = 0; i < ARRAY_COUNT(gSaveFile.save.data.planet); i++) { + if ((i != SAVE_SLOT_VENOM_1) && ((gSaveFile.save.data.planet[i].expertMedal & 1) == 0)) { + allExpertMedals = false; break; } } @@ -527,8 +536,8 @@ void Title_801881FC(void) { D_menu_801B831C = 6; D_menu_801B8320 = 1; D_menu_801B8324 = 11; - D_menu_801B9054 = 26.0f; - D_menu_801B9058 = 37.0f; + sTitleStarfoxLogoXpos = 26.0f; + sTitleStarfoxLogoYpos = 37.0f; D_menu_801B9068 = 1.5f; D_menu_801B906C = 3.0f; D_menu_801B905C = 124.0f; @@ -548,160 +557,164 @@ void Title_801881FC(void) { gCsCamAtY = 180.0f; gCsCamAtZ = 0.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; D_menu_801B84D4 = 0.5f; - D_menu_801B84E8[0].unk_00.x = -80.0f; - D_menu_801B84E8[0].unk_00.y = 220.0f; - D_menu_801B84E8[0].unk_00.z = -360.0f; - D_menu_801B84E8[0].unk_0C = 4.0f; - D_menu_801B84E8[0].unk_18 = 35.0f; - D_menu_801B84E8[0].unk_1C = -90.0f; - D_menu_801B84E8[0].unk_20 = -15.0f; - D_menu_801B84E8[0].unk_24 = 0.0f; - D_menu_801B84E8[0].unk_28 = 0.0f; - D_menu_801B84E8[0].unk_2C = 0.0f; - D_menu_801B84E8[0].unk_30 = 0.0f; - D_menu_801B84E8[0].unk_34 = 1; - D_menu_801B84E8[0].unk_3C = 0; - D_menu_801B84E8[0].unk_40 = 0; - D_menu_801B84E8[0].unk_48 = 0; + sTitleArwing[TEAM_FOX].pos.x = -80.0f; + sTitleArwing[TEAM_FOX].pos.y = 220.0f; + sTitleArwing[TEAM_FOX].pos.z = -360.0f; + sTitleArwing[TEAM_FOX].scale = 4.0f; + sTitleArwing[TEAM_FOX].xRot = 35.0f; + sTitleArwing[TEAM_FOX].yRot = -90.0f; + sTitleArwing[TEAM_FOX].zRot = -15.0f; + sTitleArwing[TEAM_FOX].cockpitGlassXrot = 0.0f; + sTitleArwing[TEAM_FOX].laserGunsYpos = 0.0f; + sTitleArwing[TEAM_FOX].teamFaceXrot = 0.0f; + sTitleArwing[TEAM_FOX].teamFaceYrot = 0.0f; + sTitleArwing[TEAM_FOX].drawFace = 1; + sTitleArwing[TEAM_FOX].unk_3C = 0; + sTitleArwing[TEAM_FOX].unk_40 = 0; + sTitleArwing[TEAM_FOX].drawShadow = 0; - if (var_a1) { - D_menu_801B8350[0].unk_00.x = -299.0f; - D_menu_801B8350[0].unk_00.y = -32.0f; - D_menu_801B8350[0].unk_00.z = 90.0f; - D_menu_801B8350[0].unk_48 = -9.660022f; - D_menu_801B8350[0].unk_4C = 60.330208f; - D_menu_801B8350[0].unk_50 = 0.00f; + if (allExpertMedals) { + sTitleTeam[TEAM_FOX].pos.x = -299.0f; + sTitleTeam[TEAM_FOX].pos.y = -32.0f; + sTitleTeam[TEAM_FOX].pos.z = 90.0f; + sTitleTeam[TEAM_FOX].unk_48 = -9.660022f; + sTitleTeam[TEAM_FOX].unk_4C = 60.330208f; + sTitleTeam[TEAM_FOX].unk_50 = 0.00f; } else { - D_menu_801B8350[0].unk_00.x = 33.00f; - D_menu_801B8350[0].unk_00.y = 23.00f; - D_menu_801B8350[0].unk_00.z = 4.00f; - D_menu_801B8350[0].unk_48 = -7.800007f; - D_menu_801B8350[0].unk_4C = 0.589999f; - D_menu_801B8350[0].unk_50 = 0.00f; + sTitleTeam[TEAM_FOX].pos.x = 33.00f; + sTitleTeam[TEAM_FOX].pos.y = 23.00f; + sTitleTeam[TEAM_FOX].pos.z = 4.00f; + sTitleTeam[TEAM_FOX].unk_48 = -7.800007f; + sTitleTeam[TEAM_FOX].unk_4C = 0.589999f; + sTitleTeam[TEAM_FOX].unk_50 = 0.00f; } - D_menu_801B8350[0].unk_30 = 0.0f; - D_menu_801B8350[0].unk_34 = 0.0f; - D_menu_801B8350[0].unk_28 = 0.0f; - D_menu_801B8350[0].unk_2C = 0.0f; - D_menu_801B8350[0].unk_14 = 150.0f; - D_menu_801B8350[0].unk_18 = 0.0f; - D_menu_801B8350[0].unk_1C = 1.0f; - D_menu_801B8350[0].unk_20 = 0.0f; - D_menu_801B8350[0].unk_24 = 0.0f; - D_menu_801B8350[0].unk_54 = 0; - D_menu_801B8350[0].unk_38 = 0.0f; - D_menu_801B8350[0].unk_3C = 0.0f; - D_menu_801B8350[0].unk_40 = 0.0f; - D_menu_801B8350[0].unk_44 = 0.0f; - D_menu_801B8350[0].unk_58 = 0; - D_menu_801B8350[0].unk_5C = 0; - if (var_a1) { - D_menu_801B8350[1].unk_00.x = -42.0f; - D_menu_801B8350[1].unk_00.y = -7.0f; - D_menu_801B8350[1].unk_00.z = -12.0f; - D_menu_801B8350[1].unk_48 = -2.009996f; - D_menu_801B8350[1].unk_4C = 56.90997f; - D_menu_801B8350[1].unk_50 = 0.00f; + sTitleTeam[TEAM_FOX].unk_30 = 0.0f; + sTitleTeam[TEAM_FOX].unk_34 = 0.0f; + sTitleTeam[TEAM_FOX].unk_28 = 0.0f; + sTitleTeam[TEAM_FOX].unk_2C = 0.0f; + sTitleTeam[TEAM_FOX].unk_14 = 150.0f; + sTitleTeam[TEAM_FOX].unk_18 = 0.0f; + sTitleTeam[TEAM_FOX].unk_1C = 1.0f; + sTitleTeam[TEAM_FOX].unk_20 = 0.0f; + sTitleTeam[TEAM_FOX].unk_24 = 0.0f; + sTitleTeam[TEAM_FOX].unk_54 = false; + sTitleTeam[TEAM_FOX].unk_38 = 0.0f; + sTitleTeam[TEAM_FOX].unk_3C = 0.0f; + sTitleTeam[TEAM_FOX].unk_40 = 0.0f; + sTitleTeam[TEAM_FOX].unk_44 = 0.0f; + sTitleTeam[TEAM_FOX].frameCount = 0; + sTitleTeam[TEAM_FOX].unk_5C = 0; + + if (allExpertMedals) { + sTitleTeam[TEAM_FALCO].pos.x = -42.0f; + sTitleTeam[TEAM_FALCO].pos.y = -7.0f; + sTitleTeam[TEAM_FALCO].pos.z = -12.0f; + sTitleTeam[TEAM_FALCO].unk_48 = -2.009996f; + sTitleTeam[TEAM_FALCO].unk_4C = 56.90997f; + sTitleTeam[TEAM_FALCO].unk_50 = 0.00f; } else { - D_menu_801B8350[1].unk_00.x = 147.0f; - D_menu_801B8350[1].unk_00.y = 18.0f; - D_menu_801B8350[1].unk_00.z = -32.0f; - D_menu_801B8350[1].unk_48 = -6.009995f; - D_menu_801B8350[1].unk_4C = 22.620012f; - D_menu_801B8350[1].unk_50 = 0.00f; + sTitleTeam[TEAM_FALCO].pos.x = 147.0f; + sTitleTeam[TEAM_FALCO].pos.y = 18.0f; + sTitleTeam[TEAM_FALCO].pos.z = -32.0f; + sTitleTeam[TEAM_FALCO].unk_48 = -6.009995f; + sTitleTeam[TEAM_FALCO].unk_4C = 22.620012f; + sTitleTeam[TEAM_FALCO].unk_50 = 0.00f; } - D_menu_801B8350[1].unk_30 = 0.0f; - D_menu_801B8350[1].unk_34 = 0.0f; - D_menu_801B8350[1].unk_28 = 0.0f; - D_menu_801B8350[1].unk_2C = 0.0f; - D_menu_801B8350[1].unk_14 = 180.0f; - D_menu_801B8350[1].unk_18 = 0.0f; - D_menu_801B8350[1].unk_1C = 1.0f; - D_menu_801B8350[1].unk_20 = 0.0f; - D_menu_801B8350[1].unk_24 = -4.0f; - D_menu_801B8350[1].unk_54 = 0; - D_menu_801B8350[1].unk_38 = 0.0f; - D_menu_801B8350[1].unk_3C = 0.0f; - D_menu_801B8350[1].unk_40 = 0.0f; - D_menu_801B8350[1].unk_44 = 0.0f; - D_menu_801B8350[1].unk_58 = 0; - D_menu_801B8350[1].unk_5C = 0; - if (var_a1) { - D_menu_801B8350[2].unk_00.x = 90.0f; - D_menu_801B8350[2].unk_00.y = 1.00f; - D_menu_801B8350[2].unk_00.z = -143.0f; - D_menu_801B8350[2].unk_48 = -0.500016f; - D_menu_801B8350[2].unk_4C = -33.31999f; - D_menu_801B8350[2].unk_50 = 0.00f; + sTitleTeam[TEAM_FALCO].unk_30 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_34 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_28 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_2C = 0.0f; + sTitleTeam[TEAM_FALCO].unk_14 = 180.0f; + sTitleTeam[TEAM_FALCO].unk_18 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_1C = 1.0f; + sTitleTeam[TEAM_FALCO].unk_20 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_24 = -4.0f; + sTitleTeam[TEAM_FALCO].unk_54 = false; + sTitleTeam[TEAM_FALCO].unk_38 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_3C = 0.0f; + sTitleTeam[TEAM_FALCO].unk_40 = 0.0f; + sTitleTeam[TEAM_FALCO].unk_44 = 0.0f; + sTitleTeam[TEAM_FALCO].frameCount = 0; + sTitleTeam[TEAM_FALCO].unk_5C = 0; + + if (allExpertMedals) { + sTitleTeam[TEAM_PEPPY].pos.x = 90.0f; + sTitleTeam[TEAM_PEPPY].pos.y = 1.00f; + sTitleTeam[TEAM_PEPPY].pos.z = -143.0f; + sTitleTeam[TEAM_PEPPY].unk_48 = -0.500016f; + sTitleTeam[TEAM_PEPPY].unk_4C = -33.31999f; + sTitleTeam[TEAM_PEPPY].unk_50 = 0.00f; } else { - D_menu_801B8350[2].unk_00.x = -143.0f; - D_menu_801B8350[2].unk_00.y = 22.00f; - D_menu_801B8350[2].unk_00.z = -57.0f; - D_menu_801B8350[2].unk_48 = -5.950006f; - D_menu_801B8350[2].unk_4C = -7.689997f; - D_menu_801B8350[2].unk_50 = 0.00f; + sTitleTeam[TEAM_PEPPY].pos.x = -143.0f; + sTitleTeam[TEAM_PEPPY].pos.y = 22.00f; + sTitleTeam[TEAM_PEPPY].pos.z = -57.0f; + sTitleTeam[TEAM_PEPPY].unk_48 = -5.950006f; + sTitleTeam[TEAM_PEPPY].unk_4C = -7.689997f; + sTitleTeam[TEAM_PEPPY].unk_50 = 0.00f; } - D_menu_801B8350[2].unk_30 = 0.0f; - D_menu_801B8350[2].unk_34 = 0.0f; - D_menu_801B8350[2].unk_28 = 0.0f; - D_menu_801B8350[2].unk_2C = 0.0f; - D_menu_801B8350[2].unk_14 = 130.0f; - D_menu_801B8350[2].unk_18 = 0.0f; - D_menu_801B8350[2].unk_1C = 1.0f; - D_menu_801B8350[2].unk_20 = 0.0f; - D_menu_801B8350[2].unk_24 = 0.0f; - D_menu_801B8350[2].unk_54 = 0; - D_menu_801B8350[2].unk_38 = 0.0f; - D_menu_801B8350[2].unk_3C = 0.0f; - D_menu_801B8350[2].unk_40 = 0.0f; - D_menu_801B8350[2].unk_44 = 0.0f; - D_menu_801B8350[2].unk_58 = 0; - D_menu_801B8350[2].unk_5C = 0; - if (var_a1) { - D_menu_801B8350[3].unk_00.x = 58.0f; - D_menu_801B8350[3].unk_00.y = -5.0f; - D_menu_801B8350[3].unk_00.z = 22.00f; - D_menu_801B8350[3].unk_48 = -17.899979f; - D_menu_801B8350[3].unk_4C = -8.890011f; - D_menu_801B8350[3].unk_50 = 0.00f; + sTitleTeam[TEAM_PEPPY].unk_30 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_34 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_28 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_2C = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_14 = 130.0f; + sTitleTeam[TEAM_PEPPY].unk_18 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_1C = 1.0f; + sTitleTeam[TEAM_PEPPY].unk_20 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_24 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_54 = false; + sTitleTeam[TEAM_PEPPY].unk_38 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_3C = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_40 = 0.0f; + sTitleTeam[TEAM_PEPPY].unk_44 = 0.0f; + sTitleTeam[TEAM_PEPPY].frameCount = 0; + sTitleTeam[TEAM_PEPPY].unk_5C = 0; + + if (allExpertMedals) { + sTitleTeam[TEAM_SLIPPY].pos.x = 58.0f; + sTitleTeam[TEAM_SLIPPY].pos.y = -5.0f; + sTitleTeam[TEAM_SLIPPY].pos.z = 22.00f; + sTitleTeam[TEAM_SLIPPY].unk_48 = -17.899979f; + sTitleTeam[TEAM_SLIPPY].unk_4C = -8.890011f; + sTitleTeam[TEAM_SLIPPY].unk_50 = 0.00f; } else { - D_menu_801B8350[3].unk_00.x = -50.0f; - D_menu_801B8350[3].unk_00.y = 25.0f; - D_menu_801B8350[3].unk_00.z = 15.0f; - D_menu_801B8350[3].unk_48 = -15.870002f; - D_menu_801B8350[3].unk_4C = -17.549995f; - D_menu_801B8350[3].unk_50 = 0.00f; + sTitleTeam[TEAM_SLIPPY].pos.x = -50.0f; + sTitleTeam[TEAM_SLIPPY].pos.y = 25.0f; + sTitleTeam[TEAM_SLIPPY].pos.z = 15.0f; + sTitleTeam[TEAM_SLIPPY].unk_48 = -15.870002f; + sTitleTeam[TEAM_SLIPPY].unk_4C = -17.549995f; + sTitleTeam[TEAM_SLIPPY].unk_50 = 0.00f; } - D_menu_801B8350[3].unk_30 = 0.0f; - D_menu_801B8350[3].unk_34 = 0.0f; - D_menu_801B8350[3].unk_28 = 0.0f; - D_menu_801B8350[3].unk_2C = 0.0f; - D_menu_801B8350[3].unk_14 = 140.0f; - D_menu_801B8350[3].unk_18 = 0.0f; - D_menu_801B8350[3].unk_1C = 1.0f; - D_menu_801B8350[3].unk_20 = 0.0f; - D_menu_801B8350[3].unk_24 = 0.0f; - D_menu_801B8350[3].unk_54 = 0; - D_menu_801B8350[3].unk_38 = 0.0f; - D_menu_801B8350[3].unk_3C = 0.0f; - D_menu_801B8350[3].unk_40 = 0.0f; - D_menu_801B8350[3].unk_44 = 0.0f; - D_menu_801B8350[3].unk_58 = 254; - D_menu_801B8350[3].unk_5C = 0; - for (i = 0; i < 4; i++) { - Animation_GetFrameData(D_menu_801ADA00[i].unk_4, - D_menu_801B8350[i].unk_58 % Animation_GetFrameCount(D_menu_801ADA00[i].unk_4), - D_menu_801B86E0[i]); + sTitleTeam[TEAM_SLIPPY].unk_30 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_34 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_28 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_2C = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_14 = 140.0f; + sTitleTeam[TEAM_SLIPPY].unk_18 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_1C = 1.0f; + sTitleTeam[TEAM_SLIPPY].unk_20 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_24 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_54 = false; + sTitleTeam[TEAM_SLIPPY].unk_38 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_3C = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_40 = 0.0f; + sTitleTeam[TEAM_SLIPPY].unk_44 = 0.0f; + sTitleTeam[TEAM_SLIPPY].frameCount = 254; + sTitleTeam[TEAM_SLIPPY].unk_5C = 0; + + for (i = 0; i < ARRAY_COUNT(sTeamAnim); i++) { + Animation_GetFrameData(sTeamAnim[i].title, + sTitleTeam[i].frameCount % Animation_GetFrameCount(sTeamAnim[i].title), + sCharFrameTable[i]); } D_menu_801B86A4 = 0; @@ -710,19 +723,19 @@ void Title_801881FC(void) { AUDIO_PLAY_BGM(NA_BGM_TITLE); } -void Title_801888E8(void) { +void Title_Screen_Update(void) { f32 temp_fv1; s32 i; static f32 D_menu_801ADA64[4] = { 10.0f, 20.0f, 20.0f, 20.0f }; static f32 D_menu_801ADA74[4] = { 2.0f, 5.0f, 4.0f, 4.0f }; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: - Title_801881FC(); + Title_Screen_Setup(); D_menu_801B82CC = 0.04f; D_menu_801B82D0 = 0.1f; D_menu_801B8340 = 0; - D_menu_801B82C0++; + sSceneState++; break; case 1: @@ -734,74 +747,74 @@ void Title_801888E8(void) { D_menu_801B82CC *= 1.04f; if (D_menu_801B86CC == 57.0f) { - D_menu_801B82C0++; + sSceneState++; } break; case 2: if (D_menu_801B82B0 == 0) { - D_menu_801B82C0++; + sSceneState++; } break; case 3: - D_menu_801B82A8 = (s32) (RAND_FLOAT(5.0f) + 1.0f) * 10; + sTimer1 = (s32) (RAND_FLOAT(5.0f) + 1.0f) * 10; temp_fv1 = D_menu_801B8340; - D_menu_801B8350[D_menu_801B8340].unk_5C = 0; - D_menu_801B8350[D_menu_801B8340].unk_18 = 0.0f; + sTitleTeam[D_menu_801B8340].unk_5C = 0; + sTitleTeam[D_menu_801B8340].unk_18 = 0.0f; if (D_menu_801B8340 == 2) { - D_menu_801B8350[D_menu_801B8340].unk_58 = 0; + sTitleTeam[D_menu_801B8340].frameCount = 0; } while (temp_fv1 == D_menu_801B8340) { D_menu_801B8340 = RAND_INT(4.0f); } - D_menu_801B8350[D_menu_801B8340].unk_5C = RAND_INT(6.0f) + 5; - D_menu_801B8350[D_menu_801B8340].unk_54 = 1; + sTitleTeam[D_menu_801B8340].unk_5C = RAND_INT(6.0f) + 5; + sTitleTeam[D_menu_801B8340].unk_54 = true; D_menu_801B82CC = 0.07f; - D_menu_801B82C0++; + sSceneState++; break; case 4: - if (D_menu_801B82A8 == 0) { - D_menu_801B8350[D_menu_801B8340].unk_54 = 0; - Math_SmoothStepToF(&D_menu_801B8350[D_menu_801B8340].unk_18, 0.0f, D_menu_801B82CC, 100.0f, 0.001f); + if (sTimer1 == 0) { + sTitleTeam[D_menu_801B8340].unk_54 = false; + Math_SmoothStepToF(&sTitleTeam[D_menu_801B8340].unk_18, 0.0f, D_menu_801B82CC, 100.0f, 0.001f); D_menu_801B82CC *= 1.07f; - if (D_menu_801B8350[D_menu_801B8340].unk_18 == 0.0f) { - D_menu_801B82C0 = 3; + if (sTitleTeam[D_menu_801B8340].unk_18 == 0.0f) { + sSceneState = 3; } } break; } - if (D_menu_801B8350[D_menu_801B8340].unk_54 != 0) { - if ((D_menu_801B8350[D_menu_801B8340].unk_18 + D_menu_801B8350[D_menu_801B8340].unk_1C) < 0.0f) { - D_menu_801B8350[D_menu_801B8340].unk_1C = D_menu_801ADA74[D_menu_801B8340]; + if (sTitleTeam[D_menu_801B8340].unk_54) { + if ((sTitleTeam[D_menu_801B8340].unk_18 + sTitleTeam[D_menu_801B8340].unk_1C) < 0.0f) { + sTitleTeam[D_menu_801B8340].unk_1C = D_menu_801ADA74[D_menu_801B8340]; } - if ((D_menu_801B8350[D_menu_801B8340].unk_18 + D_menu_801B8350[D_menu_801B8340].unk_1C) > + if ((sTitleTeam[D_menu_801B8340].unk_18 + sTitleTeam[D_menu_801B8340].unk_1C) > D_menu_801ADA64[D_menu_801B8340]) { - D_menu_801B8350[D_menu_801B8340].unk_1C = -D_menu_801ADA74[D_menu_801B8340]; + sTitleTeam[D_menu_801B8340].unk_1C = -D_menu_801ADA74[D_menu_801B8340]; } - D_menu_801B8350[D_menu_801B8340].unk_18 += D_menu_801B8350[D_menu_801B8340].unk_1C; + sTitleTeam[D_menu_801B8340].unk_18 += sTitleTeam[D_menu_801B8340].unk_1C; } if (D_menu_801B82B0 == 0) { if ((gGameFrameCount & 0x80) != 0) { - if (D_menu_801B8350[1].unk_20 + D_menu_801B8350[1].unk_24 < -20.0f) { - D_menu_801B8350[1].unk_24 = 4.0f; + if (sTitleTeam[TEAM_FALCO].unk_20 + sTitleTeam[TEAM_FALCO].unk_24 < -20.0f) { + sTitleTeam[TEAM_FALCO].unk_24 = 4.0f; } - if (D_menu_801B8350[1].unk_20 + D_menu_801B8350[1].unk_24 > 0.0f) { - D_menu_801B8350[1].unk_24 = -4.0f; + if (sTitleTeam[TEAM_FALCO].unk_20 + sTitleTeam[TEAM_FALCO].unk_24 > 0.0f) { + sTitleTeam[TEAM_FALCO].unk_24 = -4.0f; } - D_menu_801B8350[1].unk_20 += D_menu_801B8350[1].unk_24; + sTitleTeam[TEAM_FALCO].unk_20 += sTitleTeam[TEAM_FALCO].unk_24; } else { - Math_SmoothStepToF(&D_menu_801B8350[1].unk_20, 0.0f, 0.3f, 100.0f, 0.1f); + Math_SmoothStepToF(&sTitleTeam[TEAM_FALCO].unk_20, 0.0f, 0.3f, 100.0f, 0.1f); } } @@ -811,15 +824,15 @@ void Title_801888E8(void) { Math_SmoothStepToF(&D_menu_801B905C, 124.0f, D_menu_801B82D0, 100.0f, 0.0001f); Math_SmoothStepToF(&D_menu_801B9060, 242.0f, D_menu_801B82D0, 100.0f, 0.0001f); - for (i = 0; i < 4; i++) { - Math_SmoothStepToF(&D_menu_801B8350[i].unk_28, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_2C, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_30, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_34, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_38, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_3C, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_40, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_44, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + for (i = 0; i < ARRAY_COUNT(sTitleTeam); i++) { + Math_SmoothStepToF(&sTitleTeam[i].unk_28, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_2C, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_30, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_34, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_38, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_3C, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_40, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); + Math_SmoothStepToF(&sTitleTeam[i].unk_44, 0.0f, D_menu_801B82D0, 100.0f, 0.01f); } D_menu_801B82D0 *= 1.1f; @@ -835,10 +848,10 @@ void Title_801888E8(void) { } } - D_menu_801B84E8->unk_18 += 0.6f; + sTitleArwing->xRot += 0.6f; - Title_80191320(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, - D_menu_801B86AC, D_menu_801B86B0); + Title_SetCamUp3(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, + D_menu_801B86AC, D_menu_801B86B0); Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); gStarfieldScrollX -= 0.5f; @@ -858,16 +871,16 @@ void Title_801888E8(void) { gStarCount = 0; - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 7; + sCutsceneState = TITLE_RANKING; } -void Title_80189208(void) { +void Title_Screen_Draw(void) { s32 i; - static s32 D_menu_801ADA84[4] = { 0, 1, 3, 2 }; + static TitleTeam D_menu_801ADA84[4] = { TEAM_FOX, TEAM_FALCO, TEAM_SLIPPY, TEAM_PEPPY }; gLight1R = D_menu_801B82F8; gLight1G = D_menu_801B82FC; @@ -884,11 +897,11 @@ void Title_80189208(void) { Math_SmoothStepToF(&D_menu_801B86CC, D_menu_801B86DC, 0.1f, 100.0f, 0.0001f); } - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); - for (i = 0; i < 4; i++) { - Title_8018EA78(D_menu_801ADA84[i]); - D_menu_801B8350[D_menu_801ADA84[i]].unk_58 += D_menu_801B8350[D_menu_801ADA84[i]].unk_5C; + for (i = 0; i < ARRAY_COUNT(D_menu_801ADA84); i++) { + Title_Team_Draw(D_menu_801ADA84[i]); + sTitleTeam[D_menu_801ADA84[i]].frameCount += sTitleTeam[D_menu_801ADA84[i]].unk_5C; } gLight1R = D_menu_801B8310; @@ -899,16 +912,16 @@ void Title_80189208(void) { gAmbientG = D_menu_801B8320; gAmbientB = D_menu_801B8324; - Title_80191674(D_menu_801B86D0, D_menu_801B86D4, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_SetLightRot(D_menu_801B86D0, D_menu_801B86D4, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); - Title_8018D2B8(0); + Title_Arwing_Draw(0); } -void Title_801894E8(void) { +void Title_CsGreatFox_Setup(void) { s32 i; gStarCount = 800; - D_menu_801B7C98 = 10; + sMaxExplosions = 10; for (i = 0; i < 10; i++) { D_menu_801B7BF8[i] = 10.0f + RAND_FLOAT(10.0f); @@ -931,9 +944,9 @@ void Title_801894E8(void) { D_menu_801B9074 = 70.0f; D_menu_801B9078 = 1.0f; D_menu_801B907C = 1.0f; - D_menu_801B7BDC = 0.0f; - D_menu_801B7BE0 = 0.0f; - D_menu_801B7BD4 = 0; + sStarfoxLogoAlpha = 0.0f; + sInAlpha = 0.0f; + sTitleLogoState = TITLE_LOGO_STARFOX_IN; D_menu_801B7BD8 = 0; D_menu_801B9080 = 0.0f; D_menu_801B9084 = 60.0f; @@ -954,21 +967,21 @@ void Title_801894E8(void) { gAmbientG = 4; gAmbientB = 10; - D_menu_801B8688.pos.y = 0.0f; - D_menu_801B8688.unk_0C = 0; - D_menu_801B8688.pos.x = -80.0f; - D_menu_801B8688.pos.z = 500.0f; - D_menu_801B8688.scale = 5.0f; + sTitleCorneria.pos.y = 0.0f; + sTitleCorneria.draw = false; + sTitleCorneria.pos.x = -80.0f; + sTitleCorneria.pos.z = 500.0f; + sTitleCorneria.scale = 5.0f; - D_menu_801B8348 = 0; + D_menu_801B8348 = false; - D_menu_801B8658.pos.x = 20.0f; - D_menu_801B8658.pos.y = 0.0f; - D_menu_801B8658.pos.z = 30.0f; - D_menu_801B8658.angleX = 0.0f; - D_menu_801B8658.angleY = 0.0f; - D_menu_801B8658.angleZ = 0.0f; - D_menu_801B8658.scale = 0.1f; + sTitleGreatFox.pos.x = 20.0f; + sTitleGreatFox.pos.y = 0.0f; + sTitleGreatFox.pos.z = 30.0f; + sTitleGreatFox.xRot = 0.0f; + sTitleGreatFox.yRot = 0.0f; + sTitleGreatFox.zRot = 0.0f; + sTitleGreatFox.scale = 0.1f; D_menu_801B86BC = 0.0f; D_menu_801B86C0 = 0.0f; @@ -978,31 +991,31 @@ void Title_801894E8(void) { D_menu_801B86B4 = 1500.0f; D_menu_801B86B8 = -100.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); - D_menu_801B7BF0 = 0; + sTitleCardState = TITLE_CARD_NONE; AUDIO_PLAY_BGM(NA_BGM_OPENING); } -void Title_8018994C(void) { +void Title_CsGreatFoxTraveling_Update(void) { f32 temp; f32 temp2; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: - Title_801894E8(); + Title_CsGreatFox_Setup(); D_menu_801B8294 = D_menu_801B6B40; D_menu_801B7BE8 = 1.0f; D_menu_801B82CC = 0.002f; - D_menu_801B82C0 = 100; - D_menu_801B82B8 = 0; + sSceneState = 100; + sTitleMsgFrameCount = 0; gRadioState = 0; gHideRadio = false; @@ -1013,36 +1026,36 @@ void Title_8018994C(void) { if (gFillScreenAlpha != 0) { gFillScreenAlpha -= 5; } else { - D_menu_801B82A8 = 19; - D_menu_801B82C0 = 1; + sTimer1 = 19; + sSceneState = 1; } break; case 1: - if (D_menu_801B82A8 == 0) { - temp2 = Math_SmoothStepToF(&D_menu_801B7BDC, 255.0f, D_menu_801B82CC, 100.0f, 1.0f); + if (sTimer1 == 0) { + temp2 = Math_SmoothStepToF(&sStarfoxLogoAlpha, 255.0f, D_menu_801B82CC, 100.0f, 1.0f); D_menu_801B82CC *= 1.08f; if (temp2 == 0.0f) { - D_menu_801B82A8 = 50; - D_menu_801B82AC = 85; + sTimer1 = 50; + sTimer2 = 85; D_menu_801B82D0 = 0.01f; D_menu_801B82CC = 0.002f; - D_menu_801B82C0++; + sSceneState++; } } break; case 2: - if (D_menu_801B82A8 == 0) { - Math_SmoothStepToF(&D_menu_801B7BDC, 0.0f, D_menu_801B82D0, 100.0f, 0.1f); + if (sTimer1 == 0) { + Math_SmoothStepToF(&sStarfoxLogoAlpha, 0.0f, D_menu_801B82D0, 100.0f, 0.1f); D_menu_801B82D0 *= 1.06f; - if (D_menu_801B82AC == 0) { - temp2 = Math_SmoothStepToF(&D_menu_801B7BE0, 255.0f, D_menu_801B82CC, 100.0f, 1.0f); + if (sTimer2 == 0) { + temp2 = Math_SmoothStepToF(&sInAlpha, 255.0f, D_menu_801B82CC, 100.0f, 1.0f); D_menu_801B82CC *= 1.08f; if (temp2 == 0.0f) { - D_menu_801B82A8 = 30; + sTimer1 = 30; D_menu_801B82D0 = 0.02f; - D_menu_801B82C0++; + sSceneState++; D_menu_801B7BD8 = 1; gFillScreenAlpha = 0; } @@ -1051,29 +1064,29 @@ void Title_8018994C(void) { break; case 3: - if (D_menu_801B82A8 == 0) { - Math_SmoothStepToF(&D_menu_801B7BE0, 0.0f, D_menu_801B82D0, 100.0f, 0.1f); + if (sTimer1 == 0) { + Math_SmoothStepToF(&sInAlpha, 0.0f, D_menu_801B82D0, 100.0f, 0.1f); D_menu_801B82D0 *= 1.07f; if (D_menu_801B7BB8 < 1200.0f) { D_menu_801B7BB8 += 10.0f; if (D_menu_801B7BB8 > 50.0f) { - D_menu_801B7BD4 = 1; - D_menu_801B7BDC += 1.8f; + sTitleLogoState = TITLE_LOGO_NINTENDO_64; + sStarfoxLogoAlpha += 1.8f; } } else { D_menu_801B7BD8 = 0; - D_menu_801B82C0++; + sSceneState++; } } break; case 4: - if (D_menu_801B7BDC < 255.0f) { - D_menu_801B7BDC += 1.0f; + if (sStarfoxLogoAlpha < 255.0f) { + sStarfoxLogoAlpha += 1.0f; } else { - D_menu_801B7BDC = 255.0f; - D_menu_801B82A8 = 70; - D_menu_801B82B4 = 0; + sStarfoxLogoAlpha = 255.0f; + sTimer1 = 70; + sTimer3 = 0; D_menu_801B82D4 = 0.02f; D_menu_801B82D8 = 0.00005f; D_menu_801B82DC = 0.02f; @@ -1088,34 +1101,34 @@ void Title_8018994C(void) { gCsCamAtY = D_menu_801B6B40[0].at.y; gCsCamAtZ = D_menu_801B6B40[0].at.z; - D_menu_801B82C0 = 10; + sSceneState = 10; } break; case 10: - if (D_menu_801B82B4 == 45) { - D_menu_801B7BF0 = 1; + if (sTimer3 == 45) { + sTitleCardState = TITLE_CARD_GREAT_FOX; } - if (D_menu_801B82B4 == 145) { - D_menu_801B7BF0 = 0; + if (sTimer3 == 145) { + sTitleCardState = TITLE_CARD_NONE; } - if (D_menu_801B82B8 == 638) { - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); + if (sTitleMsgFrameCount == 638) { + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, sTitleGreatFox.sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, sTitleGreatFox.sfxSource, 0); Radio_PlayMessage(gMsg_ID_60, RCID_ROB64_TITLE); } - if (D_menu_801B82B8 == 838) { - Title_801919C4(D_menu_801ADA30, RCID_GEN_PEPPER_TITLE); + if (sTitleMsgFrameCount == 838) { + Title_Radio_PlayMessage(sGralPepperMsg, RCID_GEN_PEPPER_TITLE); } - if (D_menu_801B82A8 == 1) { - D_menu_801B8348 = 1; + if (sTimer1 == 1) { + D_menu_801B8348 = true; } - if (D_menu_801B82A8 != 0) { + if (sTimer1 != 0) { break; } @@ -1126,20 +1139,20 @@ void Title_8018994C(void) { D_menu_801B9074 -= 0.5f; } - temp = Math_SmoothStepToF(&D_menu_801B7BDC, 0.0f, D_menu_801B82DC, 100.0f, 0.1f); + temp = Math_SmoothStepToF(&sStarfoxLogoAlpha, 0.0f, D_menu_801B82DC, 100.0f, 0.1f); D_menu_801B82DC *= 1.06f; if (temp == 0.0f) { - D_menu_801B7BD4 = -1; + sTitleLogoState = TITLE_LOGO_NONE; } - Title_8018CC30(D_menu_801B8294, 12, D_menu_801B8290); + Title_Cutscene_SetCamera(D_menu_801B8294, 12, D_menu_801B8290); - Title_80191798(&D_menu_801B86A8, &D_menu_801B86AC); - Title_80191844(D_menu_801B86A8, D_menu_801B86AC); + Title_GetCamRot(&D_menu_801B86A8, &D_menu_801B86AC); + Title_SetCamUp(D_menu_801B86A8, D_menu_801B86AC); - if ((D_menu_801B82B8 > 960) && (D_menu_801B7BE8 > 0.0f)) { + if ((sTitleMsgFrameCount > 960) && (D_menu_801B7BE8 > 0.0f)) { D_menu_801B7BE8 -= 0.0022f; if (D_menu_801B7BE8 < 0.0f) { D_menu_801B7BE8 = 0.0f; @@ -1154,18 +1167,18 @@ void Title_8018994C(void) { Math_SmoothStepToF(&D_menu_801B86C8, -20.0f, D_menu_801B82D8, 100.0f, 0.0001f); Math_SmoothStepToF(&D_menu_801B86CC, -25.0f, D_menu_801B82D8, 100.0f, 0.0001f); - if (D_menu_801B82B4 > 550) { + if (sTimer3 > 550) { D_menu_801B82D8 += 0.0001f; } else { D_menu_801B82D8 += 0.000001f; } } - if (D_menu_801B82B4 == 260) { - D_menu_801B8688.unk_0C = 1; + if (sTimer3 == 260) { + sTitleCorneria.draw = true; } - if (D_menu_801B82B4 == 750) { + if (sTimer3 == 750) { gFillScreenAlpha = 0; gFillScreenRed = 0; gFillScreenGreen = 0; @@ -1174,38 +1187,38 @@ void Title_8018994C(void) { } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_BURNER); - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 2; + sCutsceneState = TITLE_CS_TEAM_RUNNING; } - D_menu_801B82B4++; + sTimer3++; break; } - Title_801912A0(); - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_ScreenFade_Update(); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); if (D_menu_801B7BE8 != 0) { Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); } gStarfieldScrollX -= D_menu_801B7BE8; - D_menu_801B82B8++; + sTitleMsgFrameCount++; } -void Title_8018A2F8(void) { - if (D_menu_801B8688.unk_0C != 0) { - Title_8018DF0C(-700.0f); +void Title_CsGreatFoxTraveling_Draw(void) { + if (sTitleCorneria.draw) { + Title_Corneria_Draw(-700.0f); } - Title_8018E058(); + Title_GreatFox_Draw(); } -void Title_8018A338(void) { +void Title_CsTeamRunning_Setup(void) { gStarCount = 0; D_menu_801B869C = 255; @@ -1215,15 +1228,14 @@ void Title_8018A338(void) { gFillScreenGreen = 0; gFillScreenBlue = 0; - D_menu_801B8344 = 0; + sDrawTeamName = false; D_menu_801B8334 = 0; D_menu_801B8338 = 1; - D_menu_801B8328 = D_menu_801B832C = D_menu_801B8330 = 155.0f; - - D_menu_801B8328 = 77.0f; - D_menu_801B832C = 77.0f; - D_menu_801B8330 = 77.0f; + sAmbientR = sAmbientG = sAmbientB = 155.0f; + sAmbientR = 77.0f; + sAmbientG = 77.0f; + sAmbientB = 77.0f; D_menu_801B86C8 = 0.0f; D_menu_801B86CC = -90.0f; @@ -1235,37 +1247,37 @@ void Title_8018A338(void) { D_menu_801B830C = 1.0f; D_menu_801B84D4 = 0.5f; - D_menu_801B8350[0].unk_00.x = -20.0f; - D_menu_801B8350[0].unk_00.y = 0.0f; - D_menu_801B8350[0].unk_00.z = -600.0f; - D_menu_801B8350[0].unk_0C = 0.0f; - D_menu_801B8350[0].unk_10 = 3.0f; - D_menu_801B8350[0].unk_58 = 14; - D_menu_801B8350[0].unk_5C = 5; + sTitleTeam[TEAM_FOX].pos.x = -20.0f; + sTitleTeam[TEAM_FOX].pos.y = 0.0f; + sTitleTeam[TEAM_FOX].pos.z = -600.0f; + sTitleTeam[TEAM_FOX].unk_0C = 0.0f; + sTitleTeam[TEAM_FOX].shadowScale = 3.0f; + sTitleTeam[TEAM_FOX].frameCount = 14; + sTitleTeam[TEAM_FOX].unk_5C = 5; - D_menu_801B8350[1].unk_00.x = -209.0f; - D_menu_801B8350[1].unk_00.y = 0.0f; - D_menu_801B8350[1].unk_00.z = -820.0f; - D_menu_801B8350[1].unk_0C = 0.0f; - D_menu_801B8350[1].unk_10 = 3.0f; - D_menu_801B8350[1].unk_58 = 0; - D_menu_801B8350[1].unk_5C = 5; + sTitleTeam[TEAM_FALCO].pos.x = -209.0f; + sTitleTeam[TEAM_FALCO].pos.y = 0.0f; + sTitleTeam[TEAM_FALCO].pos.z = -820.0f; + sTitleTeam[TEAM_FALCO].unk_0C = 0.0f; + sTitleTeam[TEAM_FALCO].shadowScale = 3.0f; + sTitleTeam[TEAM_FALCO].frameCount = 0; + sTitleTeam[TEAM_FALCO].unk_5C = 5; - D_menu_801B8350[2].unk_00.x = 62.0f; - D_menu_801B8350[2].unk_00.y = 0.0f; - D_menu_801B8350[2].unk_00.z = -813.0f; - D_menu_801B8350[2].unk_0C = 0.0f; - D_menu_801B8350[2].unk_10 = 3.0f; - D_menu_801B8350[2].unk_58 = 29; - D_menu_801B8350[2].unk_5C = 6; + sTitleTeam[TEAM_PEPPY].pos.x = 62.0f; + sTitleTeam[TEAM_PEPPY].pos.y = 0.0f; + sTitleTeam[TEAM_PEPPY].pos.z = -813.0f; + sTitleTeam[TEAM_PEPPY].unk_0C = 0.0f; + sTitleTeam[TEAM_PEPPY].shadowScale = 3.0f; + sTitleTeam[TEAM_PEPPY].frameCount = 29; + sTitleTeam[TEAM_PEPPY].unk_5C = 6; - D_menu_801B8350[3].unk_00.x = 183.0f; - D_menu_801B8350[3].unk_00.y = 0.0f; - D_menu_801B8350[3].unk_00.z = -990.0f; - D_menu_801B8350[3].unk_0C = 0.0f; - D_menu_801B8350[3].unk_10 = 3.0f; - D_menu_801B8350[3].unk_58 = 41; - D_menu_801B8350[3].unk_5C = 7; + sTitleTeam[TEAM_SLIPPY].pos.x = 183.0f; + sTitleTeam[TEAM_SLIPPY].pos.y = 0.0f; + sTitleTeam[TEAM_SLIPPY].pos.z = -990.0f; + sTitleTeam[TEAM_SLIPPY].unk_0C = 0.0f; + sTitleTeam[TEAM_SLIPPY].shadowScale = 3.0f; + sTitleTeam[TEAM_SLIPPY].frameCount = 41; + sTitleTeam[TEAM_SLIPPY].unk_5C = 7; D_menu_801B84D0 = -6000.0f; D_menu_801B86BC = 22.0f; @@ -1275,13 +1287,13 @@ void Title_8018A338(void) { D_menu_801B86AC = 7.0f; D_menu_801B86B4 = 400.0f; D_menu_801B86B8 = -100.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); } CameraPoint D_menu_801ADA94[50] = { @@ -1321,23 +1333,23 @@ CameraPoint D_menu_801ADA94[50] = { { -357.60858f, 192.84035f, -1394.141f, 41.881878f, 129.81488f, -738.9043f }, }; -void Title_8018A644(void) { +void Title_CsTeamRunning_Update(void) { static s32 D_menu_801ADF44[] = { 63, 170, 268, 368 }; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: - Title_8018A338(); + Title_CsTeamRunning_Setup(); AUDIO_PLAY_SFX(NA_SE_DEMO_SIREN, gDefaultSfxSource, 4); AUDIO_PLAY_SFX(NA_SE_DEMO_RUNNING, D_menu_801B84D8, 0); - D_menu_801B82B4 = 0; - D_menu_801B82C8 = 0.0f; + sTimer3 = 0; + sPassageWayZoffset = 0.0f; D_menu_801B7BEC = 0; - D_menu_801B82C0++; + sSceneState++; break; case 1: - if (D_menu_801B82B4 == 20) { + if (sTimer3 == 20) { D_menu_801B869C = 0; } @@ -1346,29 +1358,29 @@ void Title_8018A644(void) { } if (D_menu_801B84D0 == 0.0f) { - D_menu_801B82B4 = 0; + sTimer3 = 0; D_menu_801B8340 = 0; D_menu_801B8294 = D_menu_801ADA94; D_menu_801B8298 = 0; D_menu_801B828C = 0.0f; D_menu_801B8290 = 0.06f; - D_menu_801B82C0++; + sSceneState++; } - D_menu_801B82B4++; + sTimer3++; break; case 2: - Title_80191798(&D_menu_801B86A8, &D_menu_801B86AC); - Title_80191844(D_menu_801B86A8, D_menu_801B86AC); - Title_8018CC30(D_menu_801B8294, 34, D_menu_801B8290); + Title_GetCamRot(&D_menu_801B86A8, &D_menu_801B86AC); + Title_SetCamUp(D_menu_801B86A8, D_menu_801B86AC); + Title_Cutscene_SetCamera(D_menu_801B8294, 34, D_menu_801B8290); - if (D_menu_801B82B4 == D_menu_801ADF44[D_menu_801B8340]) { - D_menu_801B8344 = 1; - D_menu_801B82A8 = 40; - D_menu_801B82C0 = 3; + if (sTimer3 == D_menu_801ADF44[D_menu_801B8340]) { + sDrawTeamName = true; + sTimer1 = 40; + sSceneState = 3; } - if (D_menu_801B82B4 == 475) { + if (sTimer3 == 475) { D_menu_801B869C = 1; } @@ -1376,33 +1388,33 @@ void Title_8018A644(void) { Audio_KillSfxById(NA_SE_DEMO_SIREN); Audio_KillSfxBySourceAndId(D_menu_801B84D8, NA_SE_DEMO_RUNNING); - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 3; + sCutsceneState = TITLE_GREAT_FOX_CLOSE_UP; } - D_menu_801B82B4++; + sTimer3++; break; case 3: - if (D_menu_801B82A8 == 0) { - D_menu_801B8344 = 0; - D_menu_801B82C0 = 2; + if (sTimer1 == 0) { + sDrawTeamName = false; + sSceneState = 2; D_menu_801B8340++; } break; } - Title_801912A0(); - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_ScreenFade_Update(); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); D_menu_801B7BEC++; } -void Title_8018A990(void) { +void Title_CsTeamRunning_Draw(void) { s32 i; - static UnkStruct_D_menu_801ADF54 D_menu_801ADF54[4] = { + static AmbientRGB sAmbientRGB[4] = { { 255.0f, 155.0f, 155.0f }, { 155.0f, 255.0f, 155.0f }, { 135.0f, 206.0f, 255.0f }, @@ -1412,13 +1424,13 @@ void Title_8018A990(void) { if ((gGameFrameCount % 8U) == 7) { if (D_menu_801B8338 != 0) { D_menu_801B8334 = (D_menu_801B8334 + 1) % 4U; - D_menu_801B8328 = D_menu_801ADF54[D_menu_801B8334].unk_0; - D_menu_801B832C = D_menu_801ADF54[D_menu_801B8334].unk_4; - D_menu_801B8330 = D_menu_801ADF54[D_menu_801B8334].unk_8; + sAmbientR = sAmbientRGB[D_menu_801B8334].r; + sAmbientG = sAmbientRGB[D_menu_801B8334].g; + sAmbientB = sAmbientRGB[D_menu_801B8334].b; } else { - D_menu_801B8328 = 155.0f; - D_menu_801B832C = 155.0f; - D_menu_801B8330 = 155.0f; + sAmbientR = 155.0f; + sAmbientG = 155.0f; + sAmbientB = 155.0f; } D_menu_801B8338 ^= 1; } @@ -1430,11 +1442,11 @@ void Title_8018A990(void) { } } - gAmbientR = D_menu_801B8328; - gAmbientG = D_menu_801B832C; - gAmbientB = D_menu_801B8330; + gAmbientR = sAmbientR; + gAmbientG = sAmbientG; + gAmbientB = sAmbientB; - Title_8018F438(); + Title_Passage_Draw(); gLight1R = D_menu_801B82F8; gLight1G = D_menu_801B82FC; @@ -1443,13 +1455,13 @@ void Title_8018A990(void) { gAmbientG = D_menu_801B8308; gAmbientB = D_menu_801B830C; - for (i = 0; i < 4; i++) { - Title_8018E67C(i); - D_menu_801B8350[i].unk_58 += D_menu_801B8350[i].unk_5C; + for (i = 0; i < ARRAY_COUNT(sTitleTeam); i++) { + Title_TeamRunning_Draw(i); + sTitleTeam[i].frameCount += sTitleTeam[i].unk_5C; } } -void Title_8018ABC0(void) { +void Title_CsGreatFoxCloseUp_Setup(void) { gStarCount = 800; D_menu_801B869C = 255; @@ -1475,28 +1487,28 @@ void Title_8018ABC0(void) { gCsCamAtY = 0.0f; gCsCamAtZ = 0.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - D_menu_801B8658.pos.x = 0.0f; - D_menu_801B8658.pos.y = 0.0f; - D_menu_801B8658.pos.z = 0.0f; - D_menu_801B8658.angleX = 0.0f; - D_menu_801B8658.angleY = 0.0f; - D_menu_801B8658.angleZ = 0.0f; + sTitleGreatFox.pos.x = 0.0f; + sTitleGreatFox.pos.y = 0.0f; + sTitleGreatFox.pos.z = 0.0f; + sTitleGreatFox.xRot = 0.0f; + sTitleGreatFox.yRot = 0.0f; + sTitleGreatFox.zRot = 0.0f; } -void Title_8018ACEC(void) { - switch (D_menu_801B82C0) { +void Title_CsGreatFoxCloseUp_Update(void) { + switch (sSceneState) { case 0: - Title_8018ABC0(); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); + Title_CsGreatFoxCloseUp_Setup(); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, sTitleGreatFox.sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, sTitleGreatFox.sfxSource, 0); D_menu_801B82CC = 0.01f; - D_menu_801B82B4 = 0; - D_menu_801B82C0++; + sTimer3 = 0; + sSceneState++; break; case 1: @@ -1507,42 +1519,42 @@ void Title_8018ACEC(void) { Math_SmoothStepToF(&D_menu_801B86B0, 100.0f, D_menu_801B82CC, 100.0f, 0.0001f); D_menu_801B82CC *= 1.04f; - if (D_menu_801B82B4 == 50) { + if (sTimer3 == 50) { D_menu_801B869C = 1; } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_BURNER); gDrawMode = DRAW_NONE; - D_menu_801B82C0 = 0; - D_menu_801B82C4 = 4; + sSceneState = 0; + sCutsceneState = TITLE_TAKE_OFF; } - Title_801912A0(); - D_menu_801B82B4++; + Title_ScreenFade_Update(); + sTimer3++; break; } - Title_80191320(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, - D_menu_801B86AC, D_menu_801B86B0); - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_SetCamUp3(1, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86A8, + D_menu_801B86AC, D_menu_801B86B0); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); gStarfieldScrollX += 2.0f; gStarfieldScrollY += 2.0f; } -void Title_8018B038(void) { - Title_8018E058(); +void Title_CsGreatFoxCloseUp_Draw(void) { + Title_GreatFox_Draw(); } -void Title_8018B058(void) { +void Title_CsTakeOff_Setup(void) { f32 var_fv0; s32 i; - D_menu_801B7C98 = 10; + sMaxExplosions = 10; for (i = 0; i < 10; i++) { D_menu_801B7BF8[i] = 10.0f + RAND_FLOAT(10.0f); @@ -1583,41 +1595,42 @@ void Title_8018B058(void) { gLight1R = 90; gLight1G = 75; gLight1B = 90; + gAmbientR = 45; gAmbientG = 34; gAmbientB = 56; - D_menu_801B8688.pos.x = 0.0f; - D_menu_801B8688.pos.y = 0.0f; - D_menu_801B8688.pos.z = 1000.0f; - D_menu_801B8688.scale = 2.0f; - D_menu_801B8688.unk_0C = 0; + sTitleCorneria.pos.x = 0.0f; + sTitleCorneria.pos.y = 0.0f; + sTitleCorneria.pos.z = 1000.0f; + sTitleCorneria.scale = 2.0f; + sTitleCorneria.draw = false; D_menu_801B7BE4 = 1; var_fv0 = -120.0f; - for (i = 0; i < 4; i++, var_fv0 += 75.0f) { - D_menu_801B84E8[i].unk_00.x = var_fv0; - D_menu_801B84E8[i].unk_00.y = 0.0f; - D_menu_801B84E8[i].unk_00.z = 0.0f; - D_menu_801B84E8[i].unk_0C = 0.5f; - D_menu_801B84E8[i].unk_18 = 0.0f; - D_menu_801B84E8[i].unk_1C = 0.0f; - D_menu_801B84E8[i].unk_20 = 0.0f; - D_menu_801B84E8[i].unk_24 = -60.0f; - D_menu_801B84E8[i].unk_28 = -10.0f; - D_menu_801B84E8[i].unk_2C = 0.0f; - D_menu_801B84E8[i].unk_30 = 0.0f; - D_menu_801B84E8[i].unk_34 = 4 - i; + for (i = 0; i < ARRAY_COUNT(sTitleArwing); i++, var_fv0 += 75.0f) { + sTitleArwing[i].pos.x = var_fv0; + sTitleArwing[i].pos.y = 0.0f; + sTitleArwing[i].pos.z = 0.0f; + sTitleArwing[i].scale = 0.5f; + sTitleArwing[i].xRot = 0.0f; + sTitleArwing[i].yRot = 0.0f; + sTitleArwing[i].zRot = 0.0f; + sTitleArwing[i].cockpitGlassXrot = -60.0f; + sTitleArwing[i].laserGunsYpos = -10.0f; + sTitleArwing[i].teamFaceXrot = 0.0f; + sTitleArwing[i].teamFaceYrot = 0.0f; + sTitleArwing[i].drawFace = 4 - i; - D_menu_801B84E8[i].unk_3C = 0; - D_menu_801B84E8[i].unk_40 = 0; - D_menu_801B84E8[i].unk_44 = 0.0f; - D_menu_801B84E8[i].unk_10 = 0.05f; + sTitleArwing[i].unk_3C = 0; + sTitleArwing[i].unk_40 = 0; + sTitleArwing[i].unk_44 = 0.0f; + sTitleArwing[i].vel = 0.05f; - D_menu_801B84E8[i].unk_48 = 1; - D_menu_801B84E8[i].unk_4C = 1; + sTitleArwing[i].drawShadow = true; + sTitleArwing[i].draw = true; } D_menu_801B86BC = 140.0f; @@ -1627,57 +1640,57 @@ void Title_8018B058(void) { D_menu_801B86AC = 90.0f; D_menu_801B86B4 = 90.0f; D_menu_801B86B8 = -50.0f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); - D_menu_801B9044 = 25.0f; + sTitleDeckLauncherZpos = 25.0f; D_menu_801B9048 = 84.0f; D_menu_801B904C = -20.0f; D_menu_801B9050 = -33.0f; } -void Title_8018B5C4(void) { +void Title_CsTakeOff_Update(void) { s32 i; f32 temp[4]; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: D_menu_801B7BEC = 0; - Title_8018B058(); + Title_CsTakeOff_Setup(); Audio_SetEnvSfxReverb(104); - D_menu_801B82A8 = 30; + sTimer1 = 30; - D_menu_801B84E8[3].unk_38 = 70; - D_menu_801B84E8[2].unk_38 = 102; - D_menu_801B84E8[1].unk_38 = 132; - D_menu_801B84E8[0].unk_38 = 171; + sTitleArwing[TEAM_SLIPPY].timer = 70; + sTitleArwing[TEAM_PEPPY].timer = 102; + sTitleArwing[TEAM_FALCO].timer = 132; + sTitleArwing[TEAM_FOX].timer = 171; D_menu_801B8294 = D_menu_801B6C60; D_menu_801B8298 = 0; D_menu_801B828C = 0.0f; D_menu_801B8290 = 0.024f; - D_menu_801B82C0 = 10; + sSceneState = 10; break; case 10: - if (D_menu_801B82A8 == 0) { + if (sTimer1 == 0) { AUDIO_PLAY_SFX(NA_SE_LIFT_UP, gDefaultSfxSource, 4); - D_menu_801B82B4 = 0; - D_menu_801B82C0 = 1; + sTimer3 = 0; + sSceneState = 1; } break; case 1: - Title_80191798(&D_menu_801B86A8, &D_menu_801B86AC); - Title_80191844(D_menu_801B86A8, D_menu_801B86AC); - Title_8018CC30(D_menu_801B8294, 10, D_menu_801B8290); + Title_GetCamRot(&D_menu_801B86A8, &D_menu_801B86AC); + Title_SetCamUp(D_menu_801B86A8, D_menu_801B86AC); + Title_Cutscene_SetCamera(D_menu_801B8294, 10, D_menu_801B8290); if (D_menu_801B9048 > 0.0f) { D_menu_801B9048 -= 0.41f; @@ -1687,52 +1700,52 @@ void Title_8018B5C4(void) { } } - if (D_menu_801B82B4 == 60) { - D_menu_801B7BF0 = 2; + if (sTimer3 == 60) { + sTitleCardState = TITLE_CARD_ARWING; } - for (i = 3; i >= 0; i--) { - if (D_menu_801B84E8[i].unk_38 > 0) { - D_menu_801B84E8[i].unk_38--; + for (i = ARRAY_COUNT(sTitleArwing) - 1; i >= 0; i--) { + if (sTitleArwing[i].timer > 0) { + sTitleArwing[i].timer--; } - if (D_menu_801B84E8[i].unk_38 == 1) { - AUDIO_PLAY_SFX(NA_SE_ARWING_HATCH, D_menu_801B84E8[i].unk_50, 0); + if (sTitleArwing[i].timer == 1) { + AUDIO_PLAY_SFX(NA_SE_ARWING_HATCH, sTitleArwing[i].sfxSource, 0); }; - if (D_menu_801B84E8[i].unk_38 == 0) { - Math_SmoothStepToF(&D_menu_801B84E8[i].unk_28, 0.0f, D_menu_801B84E8[i].unk_10, 100.0f, 0.01f); - temp[i] = Math_SmoothStepToF(&(D_menu_801B84E8[i].unk_24), 0.0f, D_menu_801B84E8[i].unk_10, 100.0f, + if (sTitleArwing[i].timer == 0) { + Math_SmoothStepToF(&sTitleArwing[i].laserGunsYpos, 0.0f, sTitleArwing[i].vel, 100.0f, 0.01f); + temp[i] = Math_SmoothStepToF(&(sTitleArwing[i].cockpitGlassXrot), 0.0f, sTitleArwing[i].vel, 100.0f, 0.01f); - D_menu_801B84E8[i].unk_10 *= 1.04f; + sTitleArwing[i].vel *= 1.04f; if (temp[i] == 0.0f) { - Audio_KillSfxBySourceAndId(D_menu_801B84E8[i].unk_50, NA_SE_ARWING_HATCH); + Audio_KillSfxBySourceAndId(sTitleArwing[i].sfxSource, NA_SE_ARWING_HATCH); } } } - if (D_menu_801B82B4 == 70) { + if (sTimer3 == 70) { D_menu_801B7BE4 = 0; - D_menu_801B84E8[0].unk_4C = 0; + sTitleArwing[TEAM_FOX].draw = false; } - if (D_menu_801B82B4 == 80) { - D_menu_801B84E8[1].unk_4C = 0; + if (sTimer3 == 80) { + sTitleArwing[TEAM_FALCO].draw = false; for (i = 0; i < 4; i++) { - D_menu_801B84E8[i].unk_48 = 0; + sTitleArwing[i].drawShadow = false; } } - if (D_menu_801B82B4 == 115) { - D_menu_801B84E8[0].unk_4C = 1; - D_menu_801B84E8[1].unk_4C = 1; + if (sTimer3 == 115) { + sTitleArwing[TEAM_FOX].draw = true; + sTitleArwing[TEAM_FALCO].draw = true; } - if (D_menu_801B82B4 == 226) { - D_menu_801B7BF0 = 0; + if (sTimer3 == 226) { + sTitleCardState = TITLE_CARD_NONE; - AUDIO_PLAY_SFX(NA_SE_ENGINE_START, D_menu_801B84E8[3].unk_50, 0); + AUDIO_PLAY_SFX(NA_SE_ENGINE_START, sTitleArwing[TEAM_SLIPPY].sfxSource, 0); D_menu_801B86BC = 105.0f; D_menu_801B86C0 = 0.0f; @@ -1742,13 +1755,13 @@ void Title_8018B5C4(void) { D_menu_801B86B4 = 36.0f; D_menu_801B86B8 = -70.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, + &gCsCamEyeZ, D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, + D_menu_801B86A8, D_menu_801B86AC); - D_menu_801B82B4 = 0; + sTimer3 = 0; - D_menu_801B84E8[3].unk_44 = 0.0f; + sTitleArwing[TEAM_SLIPPY].unk_44 = 0.0f; D_menu_801B86C8 = 60.0f; D_menu_801B86CC = 0.0f; @@ -1764,25 +1777,25 @@ void Title_8018B5C4(void) { gAmbientG = 24; gAmbientB = 46; - D_menu_801B82C0++; + sSceneState++; } - D_menu_801B82B4++; + sTimer3++; break; case 2: - if (D_menu_801B82B4 == 30) { - D_menu_801B84E8[3].unk_40 = 1; + if (sTimer3 == 30) { + sTitleArwing[TEAM_SLIPPY].unk_40 = 1; } - if (D_menu_801B82B4 == 40) { - D_menu_801B84E8[3].unk_3C = 1; + if (sTimer3 == 40) { + sTitleArwing[TEAM_SLIPPY].unk_3C = 1; } - if (D_menu_801B82B4 > 40) { - D_menu_801B84E8[3].unk_44 += 0.002f; + if (sTimer3 > 40) { + sTitleArwing[TEAM_SLIPPY].unk_44 += 0.002f; - if (D_menu_801B84E8[3].unk_44 > 0.2f) { - D_menu_801B84E8[3].unk_44 = 0.2f; + if (sTitleArwing[TEAM_SLIPPY].unk_44 > 0.2f) { + sTitleArwing[TEAM_SLIPPY].unk_44 = 0.2f; } Math_SmoothStepToF(&D_menu_801B82EC, 240.0f, 0.06f, 2.0f, 0.01f); @@ -1794,111 +1807,111 @@ void Title_8018B5C4(void) { gLight1B = D_menu_801B82F4; } - if ((D_menu_801B82B4 > 60) && (gFillScreenAlpha < 255)) { + if ((sTimer3 > 60) && (gFillScreenAlpha < 255)) { gFillScreenAlpha++; } if (gFillScreenAlpha == 128) { - D_menu_801B82A8 = 7; - D_menu_801B84E8[3].unk_3C = 0; - D_menu_801B84E8[3].unk_40 = 0; + sTimer1 = 7; + sTitleArwing[TEAM_SLIPPY].unk_3C = 0; + sTitleArwing[TEAM_SLIPPY].unk_40 = 0; gFillScreenAlpha = 255; - D_menu_801B82C0++; + sSceneState++; } - if (D_menu_801B82B4 == 50) { - D_menu_801B84E8[0].unk_4C = 0; + if (sTimer3 == 50) { + sTitleArwing[TEAM_FOX].draw = false; } - if (D_menu_801B82B4 == 60) { - D_menu_801B84E8[1].unk_4C = 0; + if (sTimer3 == 60) { + sTitleArwing[TEAM_FALCO].draw = false; } Math_SmoothStepToF(&D_menu_801B86B4, 16.0f, 0.01f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86AC, 138.0f, 0.01f, 100.0f, 0.01f); - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); - D_menu_801B82B4++; + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); + sTimer3++; break; case 3: - if (D_menu_801B82A8 == 0) { - Audio_KillSfxBySourceAndId(D_menu_801B84E8[3].unk_50, NA_SE_ENGINE_START); - AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, D_menu_801B84E8[3].unk_50, 0); + if (sTimer1 == 0) { + Audio_KillSfxBySourceAndId(sTitleArwing[TEAM_SLIPPY].sfxSource, NA_SE_ENGINE_START); + AUDIO_PLAY_SFX(NA_SE_ARWING_BOOST, sTitleArwing[TEAM_SLIPPY].sfxSource, 0); - D_menu_801B82A8 = 4; + sTimer1 = 4; gFillScreenAlpha = 0; for (i = 0; i < 4; i++) { - D_menu_801B84E8[i].unk_3C = 1; - D_menu_801B84E8[i].unk_44 = 0.9f; + sTitleArwing[i].unk_3C = 1; + sTitleArwing[i].unk_44 = 0.9f; } - D_menu_801B82B4 = 0; + sTimer3 = 0; gStarCount = 800; - D_menu_801B82C0++; + sSceneState++; } break; case 4: - if (D_menu_801B82A8 == 0) { - D_menu_801B84E8[3].unk_44 = 1.2f; + if (sTimer1 == 0) { + sTitleArwing[TEAM_SLIPPY].unk_44 = 1.2f; - Math_SmoothStepToF(&D_menu_801B84E8[3].unk_00.z, 900.0f, 0.06f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleArwing[TEAM_SLIPPY].pos.z, 900.0f, 0.06f, 100.0f, 0.0001f); Math_SmoothStepToF(&D_menu_801B86AC, 154.0f, 0.2f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86A8, -5.0f, 0.2f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86BC, 100.0f, 0.2f, 100.0f, 0.01f); Math_SmoothStepToF(&D_menu_801B86B4, 40.0f, 0.2f, 100.0f, 0.01f); - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, + &gCsCamEyeZ, D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, + D_menu_801B86A8, D_menu_801B86AC); - if (D_menu_801B82B4 > 8) { + if (sTimer3 > 8) { Audio_SetEnvSfxReverb(0); - D_menu_801B82C0 = 0; - D_menu_801B82C4 = 5; + sSceneState = 0; + sCutsceneState = TITLE_TAKE_OFF_SPACE; } - D_menu_801B82B4++; + sTimer3++; } break; } - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); D_menu_801B7BEC++; } -void Title_8018C114(void) { +void Title_CsTakeOff_Draw(void) { s32 i; - if (D_menu_801B8688.unk_0C != 0) { - Title_8018DF0C(0.0f); + if (sTitleCorneria.draw) { + Title_Corneria_Draw(0.0f); } - Title_80190950(); + Title_GreatFoxDeck_Draw(); - for (i = 3; i >= 0; i--) { - if (D_menu_801B84E8[i].unk_4C) { - Title_80190B30(i); + for (i = ARRAY_COUNT(sTitleArwing) - 1; i >= 0; i--) { + if (sTitleArwing[i].draw) { + Title_GreatFoxDeckLauncher_Draw(i); } } - for (i = 0; i < 4; i++) { - if (D_menu_801B84E8[i].unk_4C) { - Title_8018D2B8(i); + for (i = 0; i < ARRAY_COUNT(sTitleArwing); i++) { + if (sTitleArwing[i].draw) { + Title_Arwing_Draw(i); } } } -void Title_8018C1C0(void) { +void Title_CsTakeOffSpace_Setup(void) { s32 i; gStarCount = 1; - D_menu_801B7C98 = 10; + sMaxExplosions = 10; for (i = 0; i < 10; i++) { D_menu_801B7BF8[i] = RAND_FLOAT(10.0f) + 10.0f; @@ -1911,7 +1924,7 @@ void Title_8018C1C0(void) { D_menu_801B7CA0[i] = 0; } - D_menu_801B86A0 = 1; + sDrawTakeOffSpace = true; D_menu_801B86BC = 0.0f; D_menu_801B86C0 = -38.0f; D_menu_801B86C4 = 35.0f; @@ -1928,19 +1941,19 @@ void Title_8018C1C0(void) { gFillScreenGreen = 0; gFillScreenBlue = 0; - D_menu_801B8688.pos.x = 130.0f; - D_menu_801B8688.pos.y = -30.0f; - D_menu_801B8688.pos.z = 2000.0f; - D_menu_801B8688.scale = 8.0f; - D_menu_801B8688.unk_0C = 0; + sTitleCorneria.pos.x = 130.0f; + sTitleCorneria.pos.y = -30.0f; + sTitleCorneria.pos.z = 2000.0f; + sTitleCorneria.scale = 8.0f; + sTitleCorneria.draw = false; - D_menu_801B8658.pos.x = 0.0f; - D_menu_801B8658.pos.y = 0.0f; - D_menu_801B8658.pos.z = 0.0f; - D_menu_801B8658.angleX = 0.0f; - D_menu_801B8658.angleY = 0.0f; - D_menu_801B8658.angleZ = 0.0f; - D_menu_801B8658.scale = 0.1f; + sTitleGreatFox.pos.x = 0.0f; + sTitleGreatFox.pos.y = 0.0f; + sTitleGreatFox.pos.z = 0.0f; + sTitleGreatFox.xRot = 0.0f; + sTitleGreatFox.yRot = 0.0f; + sTitleGreatFox.zRot = 0.0f; + sTitleGreatFox.scale = 0.1f; D_menu_801B86C8 = 0.0f; D_menu_801B86CC = 0.0f; @@ -1952,25 +1965,25 @@ void Title_8018C1C0(void) { gAmbientG = 4; gAmbientB = 10; - for (i = 0; i < 4; i++) { - D_menu_801B84E8[i].unk_00.x = 0.0f; - D_menu_801B84E8[i].unk_00.y = -40.0f; - D_menu_801B84E8[i].unk_00.z = -30.0f; - D_menu_801B84E8[i].unk_0C = 0.1f; - D_menu_801B84E8[i].unk_18 = 0.0f; - D_menu_801B84E8[i].unk_1C = 0.0f; - D_menu_801B84E8[i].unk_20 = 0.0f; - D_menu_801B84E8[i].unk_10 = 0.05f; - D_menu_801B84E8[i].unk_24 = 0.0f; - D_menu_801B84E8[i].unk_28 = 0.0f; - D_menu_801B84E8[i].unk_2C = 0.0f; - D_menu_801B84E8[i].unk_30 = 0.0f; - D_menu_801B84E8[i].unk_34 = i + 1; - D_menu_801B84E8[i].unk_3C = 1; - D_menu_801B84E8[i].unk_40 = 0; - D_menu_801B84E8[i].unk_44 = 1.2f; - D_menu_801B84E8[i].unk_48 = 0; - D_menu_801B84E8[i].unk_4C = 0; + for (i = 0; i < ARRAY_COUNT(sTitleArwing); i++) { + sTitleArwing[i].pos.x = 0.0f; + sTitleArwing[i].pos.y = -40.0f; + sTitleArwing[i].pos.z = -30.0f; + sTitleArwing[i].scale = 0.1f; + sTitleArwing[i].xRot = 0.0f; + sTitleArwing[i].yRot = 0.0f; + sTitleArwing[i].zRot = 0.0f; + sTitleArwing[i].vel = 0.05f; + sTitleArwing[i].cockpitGlassXrot = 0.0f; + sTitleArwing[i].laserGunsYpos = 0.0f; + sTitleArwing[i].teamFaceXrot = 0.0f; + sTitleArwing[i].teamFaceYrot = 0.0f; + sTitleArwing[i].drawFace = i + 1; + sTitleArwing[i].unk_3C = 1; + sTitleArwing[i].unk_40 = 0; + sTitleArwing[i].unk_44 = 1.2f; + sTitleArwing[i].drawShadow = false; + sTitleArwing[i].draw = false; } D_menu_801B86BC = -8.0f; @@ -1982,13 +1995,13 @@ void Title_8018C1C0(void) { D_menu_801B86B4 = 235.0f; D_menu_801B86B8 = 50.00f; - D_menu_801B829C = 0.0f; - D_menu_801B82A0 = 1.0f; - D_menu_801B82A4 = 0.0f; + sTitleCamUpX = 0.0f; + sTitleCamUpY = 1.0f; + sTitleCamUpZ = 0.0f; - Title_801914AC(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, - D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, - D_menu_801B86AC); + Title_SetCamUp2(D_menu_801B86BC, D_menu_801B86C0, D_menu_801B86C4, &gCsCamEyeX, &gCsCamEyeY, &gCsCamEyeZ, + D_menu_801B86B4, &gCsCamAtX, &gCsCamAtY, &gCsCamAtZ, D_menu_801B86B8, D_menu_801B86A8, + D_menu_801B86AC); } CameraPoint D_menu_801ADF84[50] = { @@ -2003,7 +2016,7 @@ CameraPoint D_menu_801ADF84[50] = { { 481.63818f, -313.2934f, -628.9213f, 96.2103f, -5.343582f, -4.23885f }, }; -void Title_8018C644(void) { +void Title_CsTakeOffSpace_Update(void) { s32 i; f32 x; f32 y; @@ -2012,127 +2025,124 @@ void Title_8018C644(void) { static f32 D_menu_801AE444[4] = { -50.0f, -45.0f, -55.0f, -60.0f }; static f32 D_menu_801AE454[4] = { 265.0f, 260.0f, 255.0f, 230.0f }; - switch (D_menu_801B82C0) { + switch (sSceneState) { case 0: - AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, D_menu_801B8658.unk_24, 0); - AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, D_menu_801B8658.unk_24, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, sTitleGreatFox.sfxSource, 0); + AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, sTitleGreatFox.sfxSource, 0); - Title_8018C1C0(); + Title_CsTakeOffSpace_Setup(); - D_menu_801B82B4 = 0; + sTimer3 = 0; D_menu_801B7BEC = 0; - D_menu_801B8688.unk_0C = 1; + sTitleCorneria.draw = true; - D_menu_801B84E8[0].unk_38 = 3; - D_menu_801B84E8[1].unk_38 = 23; - D_menu_801B84E8[2].unk_38 = 43; - D_menu_801B84E8[3].unk_38 = 63; + sTitleArwing[TEAM_FOX].timer = 3; + sTitleArwing[TEAM_FALCO].timer = 23; + sTitleArwing[TEAM_PEPPY].timer = 43; + sTitleArwing[TEAM_SLIPPY].timer = 63; D_menu_801B8294 = D_menu_801ADF84; D_menu_801B8298 = 0; D_menu_801B828C = 0.0f; D_menu_801B8290 = 0.042f; - D_menu_801B82C0++; + sSceneState++; break; case 1: - for (i = 0; i < 4; i++) { - if (D_menu_801B84E8[i].unk_38 > 0) { - D_menu_801B84E8[i].unk_38--; + for (i = 0; i < ARRAY_COUNT(sTitleArwing); i++) { + if (sTitleArwing[i].timer > 0) { + sTitleArwing[i].timer--; } else { - if (D_menu_801B84E8[i].unk_38 == 0) { - AUDIO_PLAY_SFX(NA_SE_PASS, D_menu_801B84E8[i].unk_50, 0); - D_menu_801B84E8[i].unk_38 = -1; - D_menu_801B84E8[i].unk_4C = 1; + if (sTitleArwing[i].timer == 0) { + AUDIO_PLAY_SFX(NA_SE_PASS, sTitleArwing[i].sfxSource, 0); + sTitleArwing[i].timer = -1; + sTitleArwing[i].draw = true; } - Math_SmoothStepToF(&D_menu_801B84E8[i].unk_00.y, D_menu_801AE444[i], D_menu_801B84E8[i].unk_10, - 100.0f, 0.001f); - Math_SmoothStepToF(&D_menu_801B84E8[i].unk_00.x, D_menu_801AE434[i], D_menu_801B84E8[i].unk_10, - 100.0f, 0.001f); - Math_SmoothStepToF(&D_menu_801B84E8[i].unk_00.z, D_menu_801AE454[i], D_menu_801B84E8[i].unk_10, - 100.0f, 0.001f); + Math_SmoothStepToF(&sTitleArwing[i].pos.y, D_menu_801AE444[i], sTitleArwing[i].vel, 100.0f, 0.001f); + Math_SmoothStepToF(&sTitleArwing[i].pos.x, D_menu_801AE434[i], sTitleArwing[i].vel, 100.0f, 0.001f); + Math_SmoothStepToF(&sTitleArwing[i].pos.z, D_menu_801AE454[i], sTitleArwing[i].vel, 100.0f, 0.001f); - D_menu_801B84E8[i].unk_10 *= 1.05f; + sTitleArwing[i].vel *= 1.05f; - if (D_menu_801B84E8[i].unk_00.z == D_menu_801AE454[i]) { - D_menu_801B84E8[i].unk_0C -= 0.002f; - if (D_menu_801B84E8[i].unk_0C < 0.0f) { - D_menu_801B84E8[i].unk_0C = 0.0f; - D_menu_801B84E8[i].unk_4C = 0; + if (sTitleArwing[i].pos.z == D_menu_801AE454[i]) { + sTitleArwing[i].scale -= 0.002f; + if (sTitleArwing[i].scale < 0.0f) { + sTitleArwing[i].scale = 0.0f; + sTitleArwing[i].draw = false; } } - x = D_menu_801AE434[i] - D_menu_801B84E8[i].unk_00.x; - y = D_menu_801AE444[i] - D_menu_801B84E8[i].unk_00.y; - z = D_menu_801AE454[i] + 10.0f - D_menu_801B84E8[i].unk_00.z; + x = D_menu_801AE434[i] - sTitleArwing[i].pos.x; + y = D_menu_801AE444[i] - sTitleArwing[i].pos.y; + z = D_menu_801AE454[i] + 10.0f - sTitleArwing[i].pos.z; - D_menu_801B84E8[i].unk_18 = RAD_TO_DEG(-Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); - D_menu_801B84E8[i].unk_1C = RAD_TO_DEG(Math_Atan2F(x, z)); + sTitleArwing[i].xRot = RAD_TO_DEG(-Math_Atan2F(y, sqrtf(SQ(x) + SQ(z)))); + sTitleArwing[i].yRot = RAD_TO_DEG(Math_Atan2F(x, z)); } } - if (D_menu_801B82B4 == 125) { + if (sTimer3 == 125) { D_menu_801B869C = 1; } if (gFillScreenAlpha == 255) { - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_ENGINE); - Audio_KillSfxBySourceAndId(D_menu_801B8658.unk_24, NA_SE_GREATFOX_BURNER); - D_menu_801B82C0++; + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_ENGINE); + Audio_KillSfxBySourceAndId(sTitleGreatFox.sfxSource, NA_SE_GREATFOX_BURNER); + sSceneState++; } - Title_801912A0(); - D_menu_801B82B4++; + Title_ScreenFade_Update(); + sTimer3++; break; case 2: gFillScreenAlpha = 0; gStarCount = 0; - D_menu_801B86A0 = 0; - D_menu_801B82A8 = 20; - D_menu_801B82C0++; + sDrawTakeOffSpace = false; + sTimer1 = 20; + sSceneState++; break; case 3: - if (D_menu_801B82A8 != 0) { + if (sTimer1 != 0) { break; } - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 0; + sCutsceneState = TITLE_SCREEN; AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); break; } - Title_80191798(&D_menu_801B86A8, &D_menu_801B86AC); - Title_80191844(D_menu_801B86A8, D_menu_801B86AC); - Title_8018CC30(D_menu_801B8294, 9, D_menu_801B8290); - Title_80191674(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); + Title_GetCamRot(&D_menu_801B86A8, &D_menu_801B86AC); + Title_SetCamUp(D_menu_801B86A8, D_menu_801B86AC); + Title_Cutscene_SetCamera(D_menu_801B8294, 9, D_menu_801B8290); + Title_SetLightRot(D_menu_801B86C8, D_menu_801B86CC, 100.0f, &D_menu_801B82E0, &D_menu_801B82E4, &D_menu_801B82E8); Camera_SetStarfieldPos(gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ); D_menu_801B7BEC++; } -void Title_8018CB90(void) { +void Title_CsTakeOffSpace_Draw(void) { s32 i; - if (D_menu_801B86A0 != 0) { - if (D_menu_801B8688.unk_0C != 0) { - Title_8018DF0C(-1000.0f); + if (sDrawTakeOffSpace) { + if (sTitleCorneria.draw) { + Title_Corneria_Draw(-1000.0f); } - Title_8018E058(); + Title_GreatFox_Draw(); for (i = 0; i < 4; i++) { - if ((D_menu_801B84E8[i].unk_38 <= 0) && (D_menu_801B84E8[i].unk_4C != 0)) { - Title_8018D2B8(i); + if ((sTitleArwing[i].timer <= 0) && sTitleArwing[i].draw) { + Title_Arwing_Draw(i); } } } } -void Title_8018CC30(CameraPoint* arg0, s32 arg1, f32 arg2) { +void Title_Cutscene_SetCamera(CameraPoint* arg0, s32 arg1, f32 arg2) { s32 var_a3; CameraPoint pos; @@ -2152,7 +2162,8 @@ void Title_8018CC30(CameraPoint* arg0, s32 arg1, f32 arg2) { var_a3 = 2; } - Title_8018CD9C(&pos, &arg0[D_menu_801B8298], D_menu_801B828C, var_a3); + Title_Camera_Calc(&pos, &arg0[D_menu_801B8298], D_menu_801B828C, var_a3); + gCsCamEyeX = pos.eye.x; gCsCamEyeY = pos.eye.y; gCsCamEyeZ = pos.eye.z; @@ -2172,7 +2183,8 @@ void Title_8018CC30(CameraPoint* arg0, s32 arg1, f32 arg2) { } } -void Title_8018CD9C(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { +// Calculation of camera movements using Cubic spline interpolation +void Title_Camera_Calc(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { f32 temp1; f32 temp2; f32 temp3; @@ -2231,7 +2243,8 @@ void Title_8018CD9C(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3) { (temp4 * (arg1 + 3)->at.z); } -void Title_8018D2B8(s32 arg0) { +// Arwings in the take off cutscene +void Title_Arwing_Draw(TitleTeam teamIdx) { ArwingInfo arwing; Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, @@ -2241,15 +2254,15 @@ void Title_8018D2B8(s32 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B84E8[arg0].unk_00.x, D_menu_801B84E8[arg0].unk_00.y, - D_menu_801B84E8[arg0].unk_00.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleArwing[teamIdx].pos.x, sTitleArwing[teamIdx].pos.y, sTitleArwing[teamIdx].pos.z, + MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B84E8[arg0].unk_0C, D_menu_801B84E8[arg0].unk_0C, D_menu_801B84E8[arg0].unk_0C, + Matrix_Scale(gGfxMatrix, sTitleArwing[teamIdx].scale, sTitleArwing[teamIdx].scale, sTitleArwing[teamIdx].scale, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, sTitleArwing[teamIdx].zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, sTitleArwing[teamIdx].xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, sTitleArwing[teamIdx].yRot * M_DTOR, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2257,33 +2270,34 @@ void Title_8018D2B8(s32 arg0) { arwing.laserGunsXpos = arwing.wingsXrot = arwing.wingsYrot = arwing.wingsZrot = arwing.upperRightFlapYrot = arwing.bottomRightFlapYrot = arwing.upperLeftFlapYrot = arwing.bottomLeftFlapYrot = arwing.unk_28 = 0.0f; - arwing.laserGunsYpos = D_menu_801B84E8[arg0].unk_28; - arwing.drawFace = D_menu_801B84E8[arg0].unk_34; - arwing.teamFaceXrot = D_menu_801B84E8[arg0].unk_2C; - arwing.teamFaceYrot = D_menu_801B84E8[arg0].unk_30; - arwing.windshieldXrot = D_menu_801B84E8[arg0].unk_24; + arwing.laserGunsYpos = sTitleArwing[teamIdx].laserGunsYpos; + arwing.drawFace = sTitleArwing[teamIdx].drawFace; + arwing.teamFaceXrot = sTitleArwing[teamIdx].teamFaceXrot; + arwing.teamFaceYrot = sTitleArwing[teamIdx].teamFaceYrot; + arwing.cockpitGlassXrot = sTitleArwing[teamIdx].cockpitGlassXrot; Display_ArwingWings(&arwing); - Object_UpdateSfxSource(D_menu_801B84E8[arg0].unk_50); + Object_UpdateSfxSource(sTitleArwing[teamIdx].sfxSource); - if (D_menu_801B84E8[arg0].unk_40 != 0) { - Title_8018D80C(arg0); + if (sTitleArwing[teamIdx].unk_40 != 0) { + Title_EngineGlowParticles_Draw(teamIdx); } - if (D_menu_801B84E8[arg0].unk_3C != 0) { - Title_8018D510(arg0); + if (sTitleArwing[teamIdx].unk_3C != 0) { + Title_Arwing_DrawEngineGlow(teamIdx); } - if (D_menu_801B84E8[arg0].unk_48 != 0) { - Title_8018DDB8(arg0); + if (sTitleArwing[teamIdx].drawShadow) { + Title_ArwingShadow_Draw(teamIdx); } Matrix_Pop(&gGfxMatrix); } -void Title_8018D510(s32 arg0) { - f32 var_fv0; +// Engine glow of Team Arwing in the take off cutscene +void Title_Arwing_DrawEngineGlow(TitleTeam teamIdx) { + f32 engineGlowScale; f32 sp40; f32 sp3C; f32 var_fv1; @@ -2293,7 +2307,7 @@ void Title_8018D510(s32 arg0) { RCP_SetupDL(&gMasterDisp, SETUPDL_67); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - if (D_menu_801B84E8[arg0].unk_40 == 1) { + if (sTitleArwing[teamIdx].unk_40 == 1) { var_fa0 = -30.0f; var_fv1 = 0.02f; gDPSetEnvColor(gMasterDisp++, 128, 128, 255, 255); @@ -2303,36 +2317,36 @@ void Title_8018D510(s32 arg0) { gDPSetEnvColor(gMasterDisp++, 0, 0, 255, 255); } - var_fv0 = D_menu_801B84E8[arg0].unk_44; + engineGlowScale = sTitleArwing[teamIdx].unk_44; if ((gGameFrameCount % 2) != 0) { - var_fv0 += var_fv1; + engineGlowScale += var_fv1; } Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, var_fa0, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, var_fv0, var_fv0 * 0.7f, var_fv0, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, engineGlowScale, engineGlowScale * 0.7f, engineGlowScale, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -sTitleArwing[teamIdx].zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sTitleArwing[teamIdx].xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -sTitleArwing[teamIdx].yRot * M_DTOR, MTXF_APPLY); - sp3C = -Math_Atan2F(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x, gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z); - temp = sqrtf(SQ(gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z) + SQ(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x)); - sp40 = Math_Atan2F(gCsCamEyeY - D_menu_801B84E8[arg0].unk_00.y, temp); + sp3C = -Math_Atan2F(gCsCamEyeX - sTitleArwing[teamIdx].pos.x, gCsCamEyeZ - sTitleArwing[teamIdx].pos.z); + temp = sqrtf(SQ(gCsCamEyeZ - sTitleArwing[teamIdx].pos.z) + SQ(gCsCamEyeX - sTitleArwing[teamIdx].pos.x)); + sp40 = Math_Atan2F(gCsCamEyeY - sTitleArwing[teamIdx].pos.y, temp); Matrix_RotateY(gGfxMatrix, -sp3C, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -sp40, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); - gSPDisplayList(gMasterDisp++, D_TITLE_60320E0); + gSPDisplayList(gMasterDisp++, aTitleArwingEngineGlowDL); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); Matrix_Pop(&gGfxMatrix); } -void Title_8018D80C(s32 arg0) { +void Title_EngineGlowParticles_Draw(TitleTeam teamIdx) { s32 i; f32 sp70; f32 sp6C; @@ -2373,9 +2387,9 @@ void Title_8018D80C(s32 arg0) { } } - sp6C = -Math_Atan2F(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x, gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z); - temp = sqrtf(SQ(gCsCamEyeZ - D_menu_801B84E8[arg0].unk_00.z) + SQ(gCsCamEyeX - D_menu_801B84E8[arg0].unk_00.x)); - sp70 = Math_Atan2F(gCsCamEyeY - D_menu_801B84E8[arg0].unk_00.y, temp); + sp6C = -Math_Atan2F(gCsCamEyeX - sTitleArwing[teamIdx].pos.x, gCsCamEyeZ - sTitleArwing[teamIdx].pos.z); + temp = sqrtf(SQ(gCsCamEyeZ - sTitleArwing[teamIdx].pos.z) + SQ(gCsCamEyeX - sTitleArwing[teamIdx].pos.x)); + sp70 = Math_Atan2F(gCsCamEyeY - sTitleArwing[teamIdx].pos.y, temp); RCP_SetupDL(&gMasterDisp, SETUPDL_49); @@ -2392,26 +2406,26 @@ void Title_8018D80C(s32 arg0) { Matrix_Translate(gGfxMatrix, D_menu_801B7D40[i], D_menu_801B7DE0[i], D_menu_801B7E80[i], MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B7FC0[i], D_menu_801B7FC0[i], D_menu_801B7FC0[i], MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, -D_menu_801B84E8[arg0].unk_20 * M_DTOR, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, -D_menu_801B84E8[arg0].unk_18 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -D_menu_801B84E8[arg0].unk_1C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, -sTitleArwing[teamIdx].zRot * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, -sTitleArwing[teamIdx].xRot * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -sTitleArwing[teamIdx].yRot * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, -sp6C, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, -sp70, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_60320E0); + gSPDisplayList(gMasterDisp++, aTitleArwingEngineGlowDL); Matrix_Pop(&gGfxMatrix); } } -void Title_8018DDB8(s32 arg0) { +void Title_ArwingShadow_Draw(s32 arg0) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, - (D_menu_801B9050 - D_menu_801B84E8[arg0].unk_00.y * 2.05f) + (D_menu_801B9048 - 84.0f) * 1.99f, - 0.0f, MTXF_APPLY); + (D_menu_801B9050 - sTitleArwing[arg0].pos.y * 2.05f) + (D_menu_801B9048 - 84.0f) * 1.99f, 0.0f, + MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2419,64 +2433,65 @@ void Title_8018DDB8(s32 arg0) { RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 240); - gSPDisplayList(gMasterDisp++, D_TITLE_6032580); + gSPDisplayList(gMasterDisp++, aTitleArwingShadowDL); Matrix_Pop(&gGfxMatrix); } -void Title_8018DF0C(f32 arg0) { - f32 sp34; - f32 sp30; +void Title_Corneria_Draw(f32 zPos) { + f32 xRot; + f32 yRot; - Title_80191798(&sp34, &sp30); + Title_GetCamRot(&xRot, &yRot); RCP_SetupDL(&gMasterDisp, SETUPDL_53); - if (arg0 != 0.0f) { - D_menu_801B8688.pos.z = gCsCamEyeZ - arg0; + if (zPos != 0.0f) { + sTitleCorneria.pos.z = gCsCamEyeZ - zPos; } Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8688.pos.x, D_menu_801B8688.pos.y, D_menu_801B8688.pos.z, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * sp30, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, M_DTOR * sp34, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B8688.scale, D_menu_801B8688.scale, D_menu_801B8688.scale, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleCorneria.pos.x, sTitleCorneria.pos.y, sTitleCorneria.pos.z, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * xRot, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sTitleCorneria.scale, sTitleCorneria.scale, sTitleCorneria.scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_6037CF0); - Title_8018E200(); + gSPDisplayList(gMasterDisp++, aPlanetCorneriaDL); + Title_CorneriaExplosions_Draw(); Matrix_Pop(&gGfxMatrix); } -void Title_8018E058(void) { +void Title_GreatFox_Draw(void) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8658.pos.x, D_menu_801B8658.pos.y, D_menu_801B8658.pos.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleGreatFox.pos.x, sTitleGreatFox.pos.y, sTitleGreatFox.pos.z, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * D_menu_801B8658.angleZ, MTXF_APPLY); - Matrix_RotateX(gGfxMatrix, M_DTOR * D_menu_801B8658.angleX, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, M_DTOR * D_menu_801B8658.angleY, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * sTitleGreatFox.zRot, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, M_DTOR * sTitleGreatFox.xRot, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, M_DTOR * sTitleGreatFox.yRot, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B8658.scale, D_menu_801B8658.scale, D_menu_801B8658.scale, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sTitleGreatFox.scale, sTitleGreatFox.scale, sTitleGreatFox.scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_23); - gGreatFoxIntact = true; + gGreatFoxIntact = true; // Unused here Cutscene_DrawGreatFox(); - Object_UpdateSfxSource(D_menu_801B8658.unk_24); + + Object_UpdateSfxSource(sTitleGreatFox.sfxSource); Matrix_Pop(&gGfxMatrix); } -void Title_8018E200(void) { +void Title_CorneriaExplosions_Draw(void) { f32 scale; s32 i; - for (i = 0; i < D_menu_801B7C98; i++) { + for (i = 0; i < sMaxExplosions; i++) { switch (D_menu_801B7CA0[i]) { case 0: D_menu_801B7C48[i] += 0.15f; @@ -2522,11 +2537,11 @@ void Title_8018E200(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_49); - for (i = 0; i < D_menu_801B7C98; i++) { + for (i = 0; i < sMaxExplosions; i++) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 200, 200, D_menu_801B7CC8[i]); gDPSetEnvColor(gMasterDisp++, 255, 0, 0, D_menu_801B7CF0[i]); - scale = D_menu_801B7C48[i] / D_menu_801B8688.scale; + scale = D_menu_801B7C48[i] / sTitleCorneria.scale; Matrix_Push(&gGfxMatrix); @@ -2534,84 +2549,83 @@ void Title_8018E200(void) { Matrix_RotateZ(gGfxMatrix, D_menu_801B7C20[i] * M_DTOR, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, D_menu_801B7BF8[i], 0.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); - Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_60320E0); + gSPDisplayList(gMasterDisp++, aTitleArwingEngineGlowDL); Matrix_Pop(&gGfxMatrix); } } -void Title_8018E67C(s32 arg0) { - Vec3f sp60[50]; - s32 sp5C; +void Title_TeamRunning_Draw(TitleTeam teamIdx) { + Vec3f frameTable[50]; + s32 frame; f32 temp_fv1; Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); - sp5C = D_menu_801B8350[arg0].unk_58 % Animation_GetFrameCount(D_menu_801ADA00[arg0].unk_0); + frame = sTitleTeam[teamIdx].frameCount % Animation_GetFrameCount(sTeamAnim[teamIdx].cutscene); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, 255, 995, 1000); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x, D_menu_801B8350[arg0].unk_00.y, - D_menu_801B8350[arg0].unk_00.z + D_menu_801B84D0, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleTeam[teamIdx].pos.x, sTitleTeam[teamIdx].pos.y, + sTitleTeam[teamIdx].pos.z + D_menu_801B84D0, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B84D4, D_menu_801B84D4, D_menu_801B84D4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - if (arg0 == 2) { + if (teamIdx == TEAM_PEPPY) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } - Animation_GetFrameData(D_menu_801ADA00[arg0].unk_0, sp5C, sp60); - Animation_DrawSkeleton(0, D_menu_801ADA00[arg0].skeleton, sp60, NULL, NULL, NULL, &gIdentityMatrix); + Animation_GetFrameData(sTeamAnim[teamIdx].cutscene, frame, frameTable); + Animation_DrawSkeleton(0, sTeamAnim[teamIdx].skeleton, frameTable, NULL, NULL, NULL, &gIdentityMatrix); - if (arg0 == 2) { + if (teamIdx == TEAM_PEPPY) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } - if (arg0 == 0) { + if (teamIdx == TEAM_FOX) { Object_UpdateSfxSource(D_menu_801B84D8); } Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x - 5.0f, 5.0f, - D_menu_801B8350[arg0].unk_00.z + 10.0f + D_menu_801B84D0, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleTeam[teamIdx].pos.x - 5.0f, 5.0f, + sTitleTeam[teamIdx].pos.z + 10.0f + D_menu_801B84D0, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, D_menu_801B8350[arg0].unk_10, D_menu_801B8350[arg0].unk_10, D_menu_801B8350[arg0].unk_10, - MTXF_APPLY); + Matrix_Scale(gGfxMatrix, sTitleTeam[teamIdx].shadowScale, sTitleTeam[teamIdx].shadowScale, + sTitleTeam[teamIdx].shadowScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL_64(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); - gSPDisplayList(gMasterDisp++, D_TITLE_6041070); + gSPDisplayList(gMasterDisp++, aTeamShadowDL); Matrix_Pop(&gGfxMatrix); - temp_fv1 = SIN_DEG(sp5C * 12.0f) * 15.0f; + temp_fv1 = SIN_DEG(frame * 12.0f) * 15.0f; if (temp_fv1 >= 0) { - D_menu_801B8350[arg0].unk_0C = temp_fv1; + sTitleTeam[teamIdx].unk_0C = temp_fv1; } else if (temp_fv1 > -2.0f) { - D_menu_801B8350[arg0].unk_0C = -temp_fv1; + sTitleTeam[teamIdx].unk_0C = -temp_fv1; } else { - D_menu_801B8350[arg0].unk_0C = 0.0f; + sTitleTeam[teamIdx].unk_0C = 0.0f; } - D_menu_801B8350[arg0].unk_10 = 3.0f - (D_menu_801B8350[arg0].unk_0C / 100.0f); + sTitleTeam[teamIdx].shadowScale = 3.0f - (sTitleTeam[teamIdx].unk_0C / 100.0f); } -void Title_8018EA78(s32 arg0) { - Vec3f sp48[50]; - s32 sp44; - - sp44 = D_menu_801B8350[arg0].unk_58 % Animation_GetFrameCount(D_menu_801ADA00[arg0].unk_4); +void Title_Team_Draw(TitleTeam teamIdx) { + Vec3f frameTable[50]; + s32 frame; + // return; // DEBUG + frame = sTitleTeam[teamIdx].frameCount % Animation_GetFrameCount(sTeamAnim[teamIdx].title); RCP_SetupDL(&gMasterDisp, SETUPDL_23); @@ -2620,150 +2634,151 @@ void Title_8018EA78(s32 arg0) { Matrix_Push(&gGfxMatrix); - Matrix_RotateX(gGfxMatrix, D_menu_801B8350[arg0].unk_48 * M_DTOR, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, D_menu_801B8350[arg0].unk_4C * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, D_menu_801B8350[arg0].unk_50 * M_DTOR, MTXF_APPLY); + Matrix_RotateX(gGfxMatrix, sTitleTeam[teamIdx].unk_48 * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, sTitleTeam[teamIdx].unk_4C * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, sTitleTeam[teamIdx].unk_50 * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_menu_801B8350[arg0].unk_00.x, D_menu_801B8350[arg0].unk_00.y, - D_menu_801B8350[arg0].unk_00.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleTeam[teamIdx].pos.x, sTitleTeam[teamIdx].pos.y, sTitleTeam[teamIdx].pos.z, + MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B84D4, D_menu_801B84D4, D_menu_801B84D4, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Math_SmoothStepToVec3fArray(sp48, D_menu_801B86E0[arg0], 1, - Animation_GetFrameData(D_menu_801ADA00[arg0].unk_4, sp44, sp48), 0.2f, 100.0f, 0.0001f); - Animation_DrawSkeleton(1, D_menu_801ADA00[arg0].skeleton, D_menu_801B86E0[arg0], Title_8018EDC8, NULL, &arg0, - &gIdentityMatrix); + Math_SmoothStepToVec3fArray(frameTable, sCharFrameTable[teamIdx], 1, + Animation_GetFrameData(sTeamAnim[teamIdx].title, frame, frameTable), 0.2f, 100.0f, + 0.0001f); + Animation_DrawSkeleton(1, sTeamAnim[teamIdx].skeleton, sCharFrameTable[teamIdx], Title_Team_OverrideLimbDraw, NULL, + &teamIdx, &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); } -bool Title_8018EDC8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool Title_Team_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { f32 x; f32 y; f32 z; - s32 i = *(s32*) data; + TitleTeam teamIdx = *(TitleTeam*) thisx; if ((D_menu_801B86A4 < 2) && D_menu_801B9040) { - x = D_menu_801B905C - D_menu_801B8350[i].unk_00.x; - y = D_menu_801B9060 - (D_menu_801B8350[i].unk_00.y + D_menu_801B8350[i].unk_14); - z = D_menu_801B9064 - D_menu_801B8350[i].unk_00.z; + x = D_menu_801B905C - sTitleTeam[teamIdx].pos.x; + y = D_menu_801B9060 - (sTitleTeam[teamIdx].pos.y + sTitleTeam[teamIdx].unk_14); + z = D_menu_801B9064 - sTitleTeam[teamIdx].pos.z; - D_menu_801B8350[i].unk_28 = Math_Atan2F(x, sqrtf(SQ(y) + SQ(z))) * M_RTOD; - D_menu_801B8350[i].unk_2C = Math_Atan2F(y, z) * M_RTOD; + sTitleTeam[teamIdx].unk_28 = Math_Atan2F(x, sqrtf(SQ(y) + SQ(z))) * M_RTOD; + sTitleTeam[teamIdx].unk_2C = Math_Atan2F(y, z) * M_RTOD; - D_menu_801B8350[i].unk_38 = D_menu_801B8350[i].unk_28; - D_menu_801B8350[i].unk_3C = D_menu_801B8350[i].unk_2C; + sTitleTeam[teamIdx].unk_38 = sTitleTeam[teamIdx].unk_28; + sTitleTeam[teamIdx].unk_3C = sTitleTeam[teamIdx].unk_2C; - if (D_menu_801B8350[i].unk_28 < -45.0f) { - D_menu_801B8350[i].unk_28 = -45.0f; - } else if (D_menu_801B8350[i].unk_28 > 45.0f) { - D_menu_801B8350[i].unk_28 = 45.0f; + if (sTitleTeam[teamIdx].unk_28 < -45.0f) { + sTitleTeam[teamIdx].unk_28 = -45.0f; + } else if (sTitleTeam[teamIdx].unk_28 > 45.0f) { + sTitleTeam[teamIdx].unk_28 = 45.0f; } - if (D_menu_801B8350[i].unk_2C < -40.0f) { - D_menu_801B8350[i].unk_2C = -40.0f; - } else if (D_menu_801B8350[i].unk_2C > 55.0f) { - D_menu_801B8350[i].unk_2C = 55.0f; + if (sTitleTeam[teamIdx].unk_2C < -40.0f) { + sTitleTeam[teamIdx].unk_2C = -40.0f; + } else if (sTitleTeam[teamIdx].unk_2C > 55.0f) { + sTitleTeam[teamIdx].unk_2C = 55.0f; } - if (D_menu_801B8350[i].unk_38 < -20.0f) { - D_menu_801B8350[i].unk_38 = D_menu_801B8350[i].unk_38 - (-20.0f); - if (D_menu_801B8350[i].unk_38 < -20.0f) { - D_menu_801B8350[i].unk_38 = -20.0f; + if (sTitleTeam[teamIdx].unk_38 < -20.0f) { + sTitleTeam[teamIdx].unk_38 = sTitleTeam[teamIdx].unk_38 - (-20.0f); + if (sTitleTeam[teamIdx].unk_38 < -20.0f) { + sTitleTeam[teamIdx].unk_38 = -20.0f; } - } else if (D_menu_801B8350[i].unk_38 > 20.0f) { - D_menu_801B8350[i].unk_38 = D_menu_801B8350[i].unk_38 - 20.0f; - if (D_menu_801B8350[i].unk_38 > 20.0f) { - D_menu_801B8350[i].unk_38 = 20.0f; + } else if (sTitleTeam[teamIdx].unk_38 > 20.0f) { + sTitleTeam[teamIdx].unk_38 = sTitleTeam[teamIdx].unk_38 - 20.0f; + if (sTitleTeam[teamIdx].unk_38 > 20.0f) { + sTitleTeam[teamIdx].unk_38 = 20.0f; } } else { - D_menu_801B8350[i].unk_38 = 0.0f; + sTitleTeam[teamIdx].unk_38 = 0.0f; } - if (D_menu_801B8350[i].unk_3C < -35.0f) { - D_menu_801B8350[i].unk_3C = D_menu_801B8350[i].unk_3C - (-35.0f); - if (D_menu_801B8350[i].unk_3C < -10.0f) { - D_menu_801B8350[i].unk_3C = -10.0f; + if (sTitleTeam[teamIdx].unk_3C < -35.0f) { + sTitleTeam[teamIdx].unk_3C = sTitleTeam[teamIdx].unk_3C - (-35.0f); + if (sTitleTeam[teamIdx].unk_3C < -10.0f) { + sTitleTeam[teamIdx].unk_3C = -10.0f; } - } else if (D_menu_801B8350[i].unk_3C > 40.0f) { - D_menu_801B8350[i].unk_3C = D_menu_801B8350[i].unk_3C - 40.0f; - if (D_menu_801B8350[i].unk_3C > 10.0f) { - D_menu_801B8350[i].unk_3C = 10.0f; + } else if (sTitleTeam[teamIdx].unk_3C > 40.0f) { + sTitleTeam[teamIdx].unk_3C = sTitleTeam[teamIdx].unk_3C - 40.0f; + if (sTitleTeam[teamIdx].unk_3C > 10.0f) { + sTitleTeam[teamIdx].unk_3C = 10.0f; } } else { - D_menu_801B8350[i].unk_3C = 0.0f; + sTitleTeam[teamIdx].unk_3C = 0.0f; } - Math_SmoothStepToF(&D_menu_801B8350[i].unk_30, D_menu_801B8350[i].unk_28, 0.01f, 100.0f, 0.0001f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_34, D_menu_801B8350[i].unk_2C, 0.01f, 100.0f, 0.0001f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_40, D_menu_801B8350[i].unk_38, 0.005f, 100.0f, 0.0001f); - Math_SmoothStepToF(&D_menu_801B8350[i].unk_44, D_menu_801B8350[i].unk_3C, 0.005f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleTeam[teamIdx].unk_30, sTitleTeam[teamIdx].unk_28, 0.01f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleTeam[teamIdx].unk_34, sTitleTeam[teamIdx].unk_2C, 0.01f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleTeam[teamIdx].unk_40, sTitleTeam[teamIdx].unk_38, 0.005f, 100.0f, 0.0001f); + Math_SmoothStepToF(&sTitleTeam[teamIdx].unk_44, sTitleTeam[teamIdx].unk_3C, 0.005f, 100.0f, 0.0001f); } - switch (i) { - case 0: + switch (teamIdx) { + case TEAM_FOX: if (limbIndex == 1) { - rot->z += D_menu_801B8350[i].unk_18; + rot->z += sTitleTeam[teamIdx].unk_18; } if (limbIndex == 19) { - rot->x += D_menu_801B8350[i].unk_30; - rot->y += D_menu_801B8350[i].unk_34; + rot->x += sTitleTeam[teamIdx].unk_30; + rot->y += sTitleTeam[teamIdx].unk_34; } if (limbIndex == 20) { - rot->x += D_menu_801B8350[i].unk_40; - rot->y += D_menu_801B8350[i].unk_44; + rot->x += sTitleTeam[teamIdx].unk_40; + rot->y += sTitleTeam[teamIdx].unk_44; } break; - case 1: + case TEAM_FALCO: if (limbIndex == 1) { - rot->z += D_menu_801B8350[i].unk_18; + rot->z += sTitleTeam[teamIdx].unk_18; } if (limbIndex == 11) { - rot->z += D_menu_801B8350[i].unk_20; + rot->z += sTitleTeam[teamIdx].unk_20; } if (limbIndex == 19) { - rot->x += D_menu_801B8350[i].unk_30; - rot->y += D_menu_801B8350[i].unk_34; + rot->x += sTitleTeam[teamIdx].unk_30; + rot->y += sTitleTeam[teamIdx].unk_34; } if (limbIndex == 20) { - rot->x += D_menu_801B8350[i].unk_40; - rot->y += D_menu_801B8350[i].unk_44; + rot->x += sTitleTeam[teamIdx].unk_40; + rot->y += sTitleTeam[teamIdx].unk_44; } if (limbIndex == 21) { rot->x += -5.0f; } break; - case 2: + case TEAM_PEPPY: if (limbIndex == 1) { - rot->z += D_menu_801B8350[i].unk_18; + rot->z += sTitleTeam[teamIdx].unk_18; } if (limbIndex == 19) { - rot->x += D_menu_801B8350[i].unk_30; - rot->y += D_menu_801B8350[i].unk_34; + rot->x += sTitleTeam[teamIdx].unk_30; + rot->y += sTitleTeam[teamIdx].unk_34; } if (limbIndex == 20) { - rot->x += D_menu_801B8350[i].unk_40; - rot->y += D_menu_801B8350[i].unk_44; + rot->x += sTitleTeam[teamIdx].unk_40; + rot->y += sTitleTeam[teamIdx].unk_44; } if (limbIndex == 21) { rot->x += 10.0f; } break; - case 3: + case TEAM_SLIPPY: if (limbIndex == 1) { - rot->z += D_menu_801B8350[i].unk_18; + rot->z += sTitleTeam[teamIdx].unk_18; } if (limbIndex == 17) { - rot->x += D_menu_801B8350[i].unk_30; - rot->y += D_menu_801B8350[i].unk_34; + rot->x += sTitleTeam[teamIdx].unk_30; + rot->y += sTitleTeam[teamIdx].unk_34; } if (limbIndex == 18) { - rot->x += D_menu_801B8350[i].unk_40; - rot->y += D_menu_801B8350[i].unk_44; + rot->x += sTitleTeam[teamIdx].unk_40; + rot->y += sTitleTeam[teamIdx].unk_44; } if (limbIndex == 19) { rot->x += 4.0f; @@ -2774,134 +2789,136 @@ bool Title_8018EDC8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* da return false; } -void Title_8018F438(void) { - f32 sp54; +void Title_Passage_Draw(void) { + f32 sZoffsetScale; Lights_SetOneLight(&gMasterDisp, 0, 0, 0, 0, 0, 0, gAmbientR, gAmbientG, gAmbientB); if (gCsCamAtZ < gCsCamEyeZ) { - sp54 = 1.0f; + sZoffsetScale = 1.0f; } else { - sp54 = 3.0f; + sZoffsetScale = 3.0f; } - D_menu_801B82C8 += 70.0f; - D_menu_801B82C8 = Math_ModF(D_menu_801B82C8, 4101.6f); + sPassageWayZoffset += 70.0f; + sPassageWayZoffset = Math_ModF(sPassageWayZoffset, 4101.6f); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, 255, 995, 1000); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, (3079.2002f * sp54) - D_menu_801B82C8, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, (3079.2002f * sZoffsetScale) - sPassageWayZoffset, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.6f, 0.6f, 0.6f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_602E380); + gSPDisplayList(gMasterDisp++, aTitleCsPassageWayDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -6836.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_602E380); + gSPDisplayList(gMasterDisp++, aTitleCsPassageWayDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -6836.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_602E380); + gSPDisplayList(gMasterDisp++, aTitleCsPassageWayDL); Matrix_Pop(&gGfxMatrix); } -void Title_8018F680(void) { +void Title_StarfoxLogo_Draw(void) { s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 30; i++) { - TextureRect_RGBA16(&gMasterDisp, gTitleStarfoxLogo + (236 * 2 * i), 236, 2, D_menu_801B9054, - D_menu_801B9058 + (i * 2.0f), 1.0f, 1.0f); + Lib_TextureRect_RGBA16(&gMasterDisp, aTitleStarfoxLogoTex + (236 * 2 * i), 236, 2, sTitleStarfoxLogoXpos, + sTitleStarfoxLogoYpos + (i * 2.0f), 1.0f, 1.0f); } } -void Title_8018F77C(void) { +void Title_64Logo_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_53); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, D_menu_801B905C, D_menu_801B9060, D_menu_801B9064, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801B9068, D_menu_801B906C, 1.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * 90, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_60148D0); + gSPDisplayList(gMasterDisp++, a64LogoDL); Matrix_Pop(&gGfxMatrix); } -void Title_8018F85C(void) { +void Title_CopyrightSymbol_Draw(void) { RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, gTitleCopyrightSymbol, 16, 16, 234.0f, 20.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleCopyrightTex, 16, 16, 234.0f, 20.0f, 1.0f, 1.0f); } -void Title_8018F8E4(void) { - f32 temp2; +void Title_PressStart_Draw(void) { + f32 yPos; s32 i; - static f32 D_menu_801AE464 = 68.0f; - static f32 D_menu_801AE468 = 170.0f; - static f32 D_menu_801AE46C = 5.55f; - static f32 D_menu_801AE470 = 0.9f; + static f32 sNoControllerBgXpos = 68.0f; + static f32 sNoControllerBgYpos = 170.0f; + static f32 sNoControllerBgXscale = 5.55f; + static f32 sNoControllerBgYscale = 0.9f; static f32 D_menu_801AE474 = 70.0f; static f32 D_menu_801AE478 = 172.0f; if (gControllerLock == 0) { - temp2 = 188.0f; + yPos = 188.0f; - if ((s32) Math_SmoothStepToF(&D_menu_801B7BC8, D_menu_801B7BCC, 0.5f, 100.0f, 1.0f) == 0.0f) { - if (D_menu_801B7BC8 == 32.0f) { - D_menu_801B7BCC = 255.0f; + if ((s32) Math_SmoothStepToF(&sTitleTextPrimCol, sTitleTextPrimColTarget, 0.5f, 100.0f, 1.0f) == 0.0f) { + if (sTitleTextPrimCol == 32.0f) { + sTitleTextPrimColTarget = 255.0f; } else { - D_menu_801B7BCC = 32.0f; + sTitleTextPrimColTarget = 32.0f; } } if (gMainController < 0) { + // No Controller background RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 60, 60, 255, 200); - TextureRect_CI8(&gMasterDisp, D_TITLE_601D750, D_TITLE_601DB50, 32, 32, D_menu_801AE464, D_menu_801AE468, - D_menu_801AE46C, D_menu_801AE470); - RCP_SetupDL(&gMasterDisp, SETUPDL_83); + Lib_TextureRect_CI8(&gMasterDisp, aNoControllerBgTex, aNoControllerBgTLUT, 32, 32, sNoControllerBgXpos, + sNoControllerBgYpos, sNoControllerBgXscale, sNoControllerBgYscale); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) D_menu_801B7BC8, (s32) D_menu_801B7BC8, 255); + // No Controller + RCP_SetupDL(&gMasterDisp, SETUPDL_83); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) sTitleTextPrimCol, (s32) sTitleTextPrimCol, 255); for (i = 0; i < 6; i++) { - TextureRect_IA8(&gMasterDisp, gTitleNoController + (176 * 4 * i), 176, 4, D_menu_801AE474, - D_menu_801AE478 + (i * 4.0f), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleNoControllerTex + (176 * 4 * i), 176, 4, D_menu_801AE474, + D_menu_801AE478 + (i * 4.0f), 1.0f, 1.0f); } } else { + // Press Start RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) D_menu_801B7BC8, (s32) D_menu_801B7BC8, 255); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, (s32) sTitleTextPrimCol, (s32) sTitleTextPrimCol, 255); for (i = 0; i < 2; i++) { - TextureRect_IA8(&gMasterDisp, gTitlePressStart + (120 * 6 * i), 120, 6, 101.0f, temp2 + (i * 6.0f), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitlePressStartTex + (120 * 6 * i), 120, 6, 101.0f, + yPos + (i * 6.0f), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, gTitlePressStart + 120 * 6 * 2, 120, 1, 101.0f, temp2 + 12, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitlePressStartTex + 120 * 6 * 2, 120, 1, 101.0f, yPos + 12, 1.0f, 1.0f); } } } -void Title_8018FC14(void) { +void Title_Copyright_Draw(void) { s32 i; RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 2; i++) { - TextureRect_IA8(&gMasterDisp, gTitleNintendoCopyright + (120 * 6 * i), 120, 6, 102.0f, 209.0f + (i * 6.0f), - 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, a1997NintendoTex + (120 * 6 * i), 120, 6, 102.0f, 209.0f + (i * 6.0f), 1.0f, + 1.0f); } } -void Title_8018FD08(void) { +void Title_TeamName_Draw(void) { s32 i; Gfx* temp_v1; f32 temp_fs2; @@ -2919,27 +2936,28 @@ void Title_8018FD08(void) { switch (D_menu_801B8340) { case 0: - TextureRect_IA8(&gMasterDisp, gTitleSlippyCard, 144, 13, temp_fs2, temp, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleSlippyCard, 144, 13, temp_fs2, temp, 1.0f, 1.0f); break; case 1: - TextureRect_IA8(&gMasterDisp, gTitlePeppyCard, 120, 13, temp_fs2, temp, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitlePeppyCard, 120, 13, temp_fs2, temp, 1.0f, 1.0f); break; case 2: for (i = 0; i < 3; i++) { - TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), + 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12.0f, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleFalcoCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12.0f, 1.0f, + 1.0f); break; case 3: for (i = 0; i < 3; i++) { - TextureRect_IA8(&gMasterDisp, gTitleFoxCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, - 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleFoxCard + (176 * 4 * i), 176, 4, temp_fs2, temp + (i * 4), 1.0f, + 1.0f); } - TextureRect_IA8(&gMasterDisp, gTitleFoxCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, gTitleFoxCard + 176 * 4 * 3, 176, 1, temp_fs2, temp + 12, 1.0f, 1.0f); break; } } @@ -2965,7 +2983,7 @@ s32 D_menu_801AE528[] = { 80, 64, 48, 32, 12, 32, 44, 32, 42, 36, 12, 38, }; -void Title_8018FF74(void) { +void Title_SunGlare_Draw(void) { if (D_menu_801B7BD8 != 0) { if ((D_menu_801B7BB8 > -870.0f) && (D_menu_801B7BB8 < 900.0f) && (gFillScreenAlpha > 0)) { if ((D_menu_801B7BB8 < 0.0f) && (D_menu_801B7BD0 < 255)) { @@ -2981,20 +2999,20 @@ void Title_8018FF74(void) { gDPSetColorDither(gMasterDisp++, G_CD_NOISE); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, D_menu_801B7BD0); - TextureRect_RGBA16(&gMasterDisp, gTitleSunBeam, 32, 32, D_menu_801B9080, D_menu_801B9084, D_menu_801B7BB0, - D_menu_801B7BB4); + Lib_TextureRect_RGBA16(&gMasterDisp, aTitleSunGlareTex, 32, 32, D_menu_801B9080, D_menu_801B9084, + D_menu_801B7BB0, D_menu_801B7BB4); D_menu_801B9080 += 1.66f; } - Title_801918FC(); - Title_80190144(); - Title_801903B8(); + Title_Matrix_Push(); + Title_Sun_Draw(); + Title_SunGlare2_Draw(); Matrix_Pop(&gGfxMatrix); } } -void Title_80190144(void) { +void Title_Sun_Draw(void) { s32 i; if (gFillScreenAlpha > 0) { @@ -3040,7 +3058,7 @@ void Title_80190144(void) { } } -void Title_801903B8(void) { +void Title_SunGlare2_Draw(void) { static s32 D_menu_801AE558 = 12; f32 temp_fs3; f32 temp_fs4; @@ -3090,36 +3108,37 @@ void Title_801903B8(void) { } } -void Title_801906A0(void) { +// Draws the Starfox and N64 logos +void Title_Logos_Draw(void) { s32 i; - switch (D_menu_801B7BD4) { - case 0: + switch (sTitleLogoState) { + case TITLE_LOGO_STARFOX_IN: RCP_SetupDL(&gMasterDisp, SETUPDL_85); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BDC); - TextureRect_CI4(&gMasterDisp, gTextIntroStarfox, gTextIntroStarfoxPalette, 256, 13, 90.0f, 110.0f, 1.0f, - 1.0f); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BE0); - TextureRect_CI4(&gMasterDisp, gTextIntroIn, gTextIntroInPalette, 32, 13, 150.0f, 110.0f, 1.0f, 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) sStarfoxLogoAlpha); + Lib_TextureRect_CI4(&gMasterDisp, aIntroStarfoxLogoTex, aIntroStarfoxLogoTLUT, 256, 13, 90.0f, 110.0f, 1.0f, + 1.0f); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) sInAlpha); + Lib_TextureRect_CI4(&gMasterDisp, aIntroInTex, aIntroInTLUT, 32, 13, 150.0f, 110.0f, 1.0f, 1.0f); break; - case 1: + case TITLE_LOGO_NINTENDO_64: RCP_SetupDL(&gMasterDisp, SETUPDL_83); - gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) D_menu_801B7BDC); + gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, (s32) sStarfoxLogoAlpha); for (i = 0; i < 5; i++) { - TextureRect_RGBA16(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * i), 128, 16, D_menu_801B9070, - D_menu_801B9074 + (16 * i * D_menu_801B907C), D_menu_801B9078, D_menu_801B907C); + Lib_TextureRect_RGBA16(&gMasterDisp, aTitleN64LogoTex + (128 * 16 * i), 128, 16, D_menu_801B9070, + D_menu_801B9074 + (16 * i * D_menu_801B907C), D_menu_801B9078, D_menu_801B907C); } - TextureRect_RGBA16(&gMasterDisp, gTitleNintendo64Logo + (128 * 16 * 5), 128, 8, D_menu_801B9070, - (80.0f * D_menu_801B907C) + D_menu_801B9074, D_menu_801B9078, D_menu_801B907C); + Lib_TextureRect_RGBA16(&gMasterDisp, aTitleN64LogoTex + (128 * 16 * 5), 128, 8, D_menu_801B9070, + (80.0f * D_menu_801B907C) + D_menu_801B9074, D_menu_801B9078, D_menu_801B907C); - case -1: + case TITLE_LOGO_NONE: break; } } -void Title_80190950(void) { +void Title_GreatFoxDeck_Draw(void) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, 0, 0, 0, gAmbientR, gAmbientG, gAmbientB); RCP_SetupDL(&gMasterDisp, SETUPDL_23); @@ -3129,132 +3148,133 @@ void Title_80190950(void) { Matrix_Scale(gGfxMatrix, 0.4f, 0.4f, 0.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_6018D40); + gSPDisplayList(gMasterDisp++, aTitleGreatFoxDeckDL); if (D_menu_801B7BE4 != 0) { - Title_80190A98(); + Title_GreatFoxDeckPlatform_Draw(); } Matrix_Pop(&gGfxMatrix); } -void Title_80190A98(void) { +void Title_GreatFoxDeckPlatform_Draw(void) { Matrix_Translate(gGfxMatrix, 401.0f, -249.0f, -22.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_602A720); + gSPDisplayList(gMasterDisp++, aTitleGreatFoxDeckPlatformDL); } -void Title_80190B30(s32 arg0) { +void Title_GreatFoxDeckLauncher_Draw(TitleTeam teamidx) { Lights_SetOneLight(&gMasterDisp, D_menu_801B82E0, D_menu_801B82E4, D_menu_801B82E8, gLight1R, gLight1G, gLight1B, gAmbientR, gAmbientG, gAmbientB); RCP_SetupDL(&gMasterDisp, SETUPDL_23); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_menu_801B84E8[arg0].unk_00.x, -12.8f, D_menu_801B9044, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sTitleArwing[teamidx].pos.x, -12.8f, sTitleDeckLauncherZpos, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.8f, 0.8f, 0.8f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_TITLE_601C7C0); + gSPDisplayList(gMasterDisp++, aTitleGreatFoxDeckLauncherDL); Matrix_Pop(&gGfxMatrix); } -void Title_80190C9C(void) { +void Title_TitleCard_Draw(void) { s32 i; - static f32 D_menu_801AE55C = 89.0f; - static f32 D_menu_801AE560 = 17.0f; - static f32 D_menu_801AE564 = 101.0f; - static f32 D_menu_801AE568 = 197.0f; + static f32 aTitleGreatFoxCardXpos = 89.0f; + static f32 aTitleGreatFoxCardYpos = 17.0f; + static f32 sTitleArwingCardXpos = 101.0f; + static f32 sTitleArwingCardYpos = 197.0f; - switch (D_menu_801B7BF0) { - case 0: + switch (sTitleCardState) { + case TITLE_CARD_NONE: break; - case 1: + case TITLE_CARD_GREAT_FOX: RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - TextureRect_IA8(&gMasterDisp, gTitleGreatFoxCard, 144, 28, D_menu_801AE55C, D_menu_801AE560, 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleGreatFoxCardTex, 144, 28, aTitleGreatFoxCardXpos, + aTitleGreatFoxCardYpos, 1.0f, 1.0f); break; - case 2: + case TITLE_CARD_ARWING: RCP_SetupDL(&gMasterDisp, SETUPDL_83); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); for (i = 0; i < 4; i++) { - TextureRect_IA8(&gMasterDisp, gTitleArwingCard + (112 * 6 * i), 112, 6, D_menu_801AE564, - D_menu_801AE568 + (6.0f * i), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleArwingCardTex + (112 * 6 * i), 112, 6, sTitleArwingCardXpos, + sTitleArwingCardYpos + (6.0f * i), 1.0f, 1.0f); } - TextureRect_IA8(&gMasterDisp, gTitleArwingCard + (112 * 6 * 4), 112, 2, D_menu_801AE564, - D_menu_801AE568 + (6.0f * 4), 1.0f, 1.0f); + Lib_TextureRect_IA8(&gMasterDisp, aTitleArwingCardTex + (112 * 6 * 4), 112, 2, sTitleArwingCardXpos, + sTitleArwingCardYpos + (6.0f * 4), 1.0f, 1.0f); } } -void Title_80190E64(void) { - if (D_menu_801B82C4 == 0) { - Title_80190FD0(); +// Redirect to either Title Screen or Option menu +void Title_NextState_Check(void) { + if (sCutsceneState == TITLE_SCREEN) { + Title_NextState_OptionMenu(); } else { - Title_80190EA4(); + Title_NextState_TitleScreen(); } } -void Title_80190EA4(void) { - switch (D_menu_801B8280) { - case 0: +void Title_NextState_TitleScreen(void) { + switch (sLevelStartState) { + case 0: // Wait for input if (gControllerPress[gMainController].button & - (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS | - R_CBUTTONS)) { // START, A, B, C-left, C-Down, C-Up, C-Right + (START_BUTTON | A_BUTTON | B_BUTTON | D_CBUTTONS | L_CBUTTONS | U_CBUTTONS | R_CBUTTONS)) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); - D_menu_801B8284 = 0; - D_menu_801B8280 = 1; + sWipeHeight = 0; + sLevelStartState = true; gControllerLock = 30; } break; - case 1: - if (D_menu_801B8284 < 120) { - D_menu_801B8284 += 18; + case 1: // Go to the title screen + if (sWipeHeight < 120) { + sWipeHeight += 18; } else { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); gStarCount = 0; gRadioState = 0; - D_menu_801B82C0 = 0; + sSceneState = 0; gDrawMode = DRAW_NONE; - D_menu_801B82C4 = 0; + sCutsceneState = TITLE_SCREEN; gControllerLock = 30; - D_menu_801B8284 = 0; - D_menu_801B8280 = 0; + sWipeHeight = 0; + sLevelStartState = false; } break; } } -void Title_80190FD0(void) { +void Title_NextState_OptionMenu(void) { if (gControllerLock == 0) { - switch (D_menu_801B8280) { - case 0: + switch (sLevelStartState) { + case 0: // Wait for input if (((gControllerPress[gMainController].button & START_BUTTON) || (gControllerPress[gMainController].button & A_BUTTON)) && - (D_menu_801B8280 == 0)) { + !sLevelStartState) { AUDIO_PLAY_SFX(NA_SE_DECIDE, gDefaultSfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 30); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 30); - D_menu_801B8284 = 0; - D_menu_801B8280 = 1; + sWipeHeight = 0; + sLevelStartState = true; } break; - case 1: - if (D_menu_801B8284 < 120) { - D_menu_801B8284 += 18; + case 1: // Go to the Option Menu + if (sWipeHeight < 120) { + sWipeHeight += 18; } else { gGameState = GSTATE_MENU; gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; gStarCount = 0; - D_menu_801B8280 = 0; - D_menu_801B8284 = 0; + sLevelStartState = false; + sWipeHeight = 0; gControllerLock = 3; } break; @@ -3262,29 +3282,29 @@ void Title_80190FD0(void) { } } -void Title_8019111C(void) { - f32 x; - f32 y; +void Title_Screen_Input(void) { + f32 stickX; + f32 stickY; - if ((D_menu_801B82B0 == 0) && (D_menu_801B9040 == 0) && + if ((D_menu_801B82B0 == 0) && !D_menu_801B9040 && ((gControllerPress[gMainController].stick_x != 0) || (gControllerPress[gMainController].stick_y != 0))) { - D_menu_801B9040 = 1; - D_menu_801B86A4 = 0; + D_menu_801B9040 = true; + D_menu_801B86A4 = false; } - x = gControllerPress[gMainController].stick_x; - y = gControllerPress[gMainController].stick_y; + stickX = gControllerPress[gMainController].stick_x; + stickY = gControllerPress[gMainController].stick_y; - if (D_menu_801B9040 != 0) { - if (((x * 0.2f) + D_menu_801B905C > -500.0f) && ((x * 0.2f) + D_menu_801B905C < 500.0f)) { - D_menu_801B905C += x * 0.2f; + if (D_menu_801B9040) { + if (((D_menu_801B905C + (stickX * 0.2f)) > -500.0f) && ((D_menu_801B905C + (stickX * 0.2f)) < 500.0f)) { + D_menu_801B905C += stickX * 0.2f; } - if (((y * 0.2f) + D_menu_801B9060 > -500.0f) && ((y * 0.2f) + D_menu_801B9060 < 500.0f)) { - D_menu_801B9060 += y * 0.2f; + if (((D_menu_801B9060 + (stickY * 0.2f)) > -500.0f) && ((D_menu_801B9060 + (stickY * 0.2f)) < 500.0f)) { + D_menu_801B9060 += stickY * 0.2f; } } - if ((D_menu_801B9040 != 0) && (gControllerPress[gMainController].stick_x == 0) && + if (D_menu_801B9040 && (gControllerPress[gMainController].stick_x == 0) && (gControllerPress[gMainController].stick_y == 0)) { D_menu_801B86A4++; } else { @@ -3292,7 +3312,7 @@ void Title_8019111C(void) { } } -void Title_801912A0(void) { +void Title_ScreenFade_Update(void) { switch (D_menu_801B869C) { case 0: gFillScreenAlpha -= 4; @@ -3312,8 +3332,8 @@ void Title_801912A0(void) { } } -void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32 arg7, f32 arg8, - f32 arg9) { +void Title_SetCamUp3(bool arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32 arg7, f32 arg8, + f32 arg9) { Vec3f sp54; Vec3f sp48; f32* sp44; @@ -3323,7 +3343,7 @@ void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* a f32* var_v0; f32* var_v1; - if (arg0 != 0) { + if (arg0) { var_v0 = arg4; var_v1 = arg5; var_t0 = arg6; @@ -3361,117 +3381,117 @@ void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* a Matrix_RotateX(gCalcMatrix, M_DTOR * arg7, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp54); - D_menu_801B829C = sp54.x; - D_menu_801B82A0 = sp54.y; - D_menu_801B82A4 = sp54.z; + sTitleCamUpX = sp54.x; + sTitleCamUpY = sp54.y; + sTitleCamUpZ = sp54.z; } -void Title_801914AC(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32* arg7, f32* arg8, - f32* arg9, f32 argA, f32 argB, f32 argC) { - Vec3f sp44; - Vec3f sp38; +void Title_SetCamUp2(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32* arg7, f32* arg8, + f32* arg9, f32 argA, f32 argB, f32 argC) { + Vec3f dest; + Vec3f src; - sp38.x = 0.0f; - sp38.y = 0.0f; - sp38.z = argA; + src.x = 0.0f; + src.y = 0.0f; + src.z = argA; Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg7 = sp44.x; - *arg8 = sp44.y; - *arg9 = sp44.z; + *arg7 = dest.x; + *arg8 = dest.y; + *arg9 = dest.z; - sp38.x = 0.0f; - sp38.y = 0.0f; - sp38.z = arg6; + src.x = 0.0f; + src.y = 0.0f; + src.z = arg6; Matrix_Translate(gCalcMatrix, arg0, arg1, arg2, MTXF_NEW); Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = sp44.x; - *arg4 = sp44.y; - *arg5 = sp44.z; + *arg3 = dest.x; + *arg4 = dest.y; + *arg5 = dest.z; - sp38.x = 0.0f; - sp38.y = 1.0f; - sp38.z = 0.0f; + src.x = 0.0f; + src.y = 1.0f; + src.z = 0.0f; Matrix_RotateY(gCalcMatrix, M_DTOR * argC, MTXF_NEW); Matrix_RotateX(gCalcMatrix, M_DTOR * argB, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp38, &sp44); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_menu_801B829C = sp44.x; - D_menu_801B82A0 = sp44.y; - D_menu_801B82A4 = sp44.z; + sTitleCamUpX = dest.x; + sTitleCamUpY = dest.y; + sTitleCamUpZ = dest.z; } -void Title_80191674(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5) { - f32 sp34; - f32 sp30; - Vec3f sp24; - Vec3f sp18; +void Title_SetLightRot(f32 xRot, f32 yRot, f32 zSrc, f32* dirX, f32* dirY, f32* dirZ) { + f32 xRotTarget; + f32 yRotTarget; + Vec3f dest; + Vec3f src; - sp18.x = 0.0f; - sp18.y = 0.0f; - sp18.z = arg2; + src.x = 0.0f; + src.y = 0.0f; + src.z = zSrc; - Title_80191798(&sp34, &sp30); + Title_GetCamRot(&xRotTarget, &yRotTarget); - Matrix_RotateX(gCalcMatrix, M_DTOR * -sp34, MTXF_NEW); - Matrix_RotateY(gCalcMatrix, M_DTOR * -sp30, MTXF_APPLY); - Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_APPLY); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * -xRotTarget, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, M_DTOR * -yRotTarget, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_APPLY); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - *arg3 = sp24.x; - *arg4 = sp24.y; - *arg5 = sp24.z; + *dirX = dest.x; + *dirY = dest.y; + *dirZ = dest.z; } -void Title_80191798(f32* arg0, f32* arg1) { - f32 temp_fv1 = gCsCamEyeX - gCsCamAtX; - f32 temp_fv2 = gCsCamEyeY - gCsCamAtY; - f32 temp_ft4 = gCsCamEyeZ - gCsCamAtZ; +void Title_GetCamRot(f32* xRot, f32* yRot) { + f32 x = gCsCamEyeX - gCsCamAtX; + f32 y = gCsCamEyeY - gCsCamAtY; + f32 z = gCsCamEyeZ - gCsCamAtZ; - *arg0 = -Math_Atan2F(temp_fv2, sqrtf(SQ(temp_fv1) + SQ(temp_ft4))) * M_RTOD; - *arg1 = Math_Atan2F(temp_fv1, temp_ft4) * M_RTOD; + *xRot = -Math_Atan2F(y, sqrtf(SQ(x) + SQ(z))) * M_RTOD; + *yRot = +Math_Atan2F(x, z) * M_RTOD; } -void Title_80191844(f32 arg0, f32 arg1) { - Vec3f sp24; - Vec3f sp18; +void Title_SetCamUp(f32 xRot, f32 yRot) { + Vec3f dest; + Vec3f src; - sp18.x = 0.0f; - sp18.y = 1.0f; - sp18.z = 0.0f; + src.x = 0.0f; + src.y = 1.0f; + src.z = 0.0f; - Matrix_RotateY(gCalcMatrix, M_DTOR * arg1, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, M_DTOR * arg0, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, M_DTOR * yRot, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, M_DTOR * xRot, MTXF_APPLY); - Matrix_MultVec3f(gCalcMatrix, &sp18, &sp24); + Matrix_MultVec3f(gCalcMatrix, &src, &dest); - D_menu_801B829C = sp24.x; - D_menu_801B82A0 = sp24.y; - D_menu_801B82A4 = sp24.z; + sTitleCamUpX = dest.x; + sTitleCamUpY = dest.y; + sTitleCamUpZ = dest.z; } -void Title_801918FC(void) { +void Title_Matrix_Push(void) { Matrix_Push(&gGfxMatrix); - Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, D_menu_801B829C, - D_menu_801B82A0, D_menu_801B82A4, MTXF_APPLY); + Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, sTitleCamUpX, + sTitleCamUpY, sTitleCamUpZ, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } -void Title_801919C4(u16** msgList, RadioCharacterId character) { +void Title_Radio_PlayMessage(u16** msgList, RadioCharacterId character) { gRadioMsgList = msgList; gRadioMsgListIndex = 0; gRadioMsg = msgList[gRadioMsgListIndex]; diff --git a/src/overlays/ovl_menu/fox_title.h b/src/overlays/ovl_menu/fox_title.h index e6064c41..f6f33717 100644 --- a/src/overlays/ovl_menu/fox_title.h +++ b/src/overlays/ovl_menu/fox_title.h @@ -3,16 +3,57 @@ #include "global.h" -typedef struct { - /* 0x00 */ f32 unk_0; - /* 0x04 */ f32 unk_4; - /* 0x08 */ f32 unk_8; -} UnkStruct_D_menu_801ADF54; // size = 0xC +typedef enum TitleStates { + /* 0 */ TITLE_IDLE, + /* 1 */ TITLE_SETUP, + /* 2 */ TITLE_UPDATE_ENTRY +} TitleStates; -typedef struct UnkStruct_D_801B8350 { - /* 0x00 */ Vec3f unk_00; +typedef enum TitleTeam { + /* 0 */ TEAM_FOX, + /* 1 */ TEAM_FALCO, + /* 2 */ TEAM_PEPPY, + /* 3 */ TEAM_SLIPPY +} TitleTeam; + +typedef enum TitleCsStates { + /* 0 */ TITLE_SCREEN, // In the Title Screen. + /* 1 */ TITLE_GREAT_FOX_TRAVELING, // Close up to the Great Fox while it's traveling to corneria. + /* 2 */ TITLE_CS_TEAM_RUNNING, // Team is running in Great Fox's the passage way before take-off. + /* 3 */ TITLE_GREAT_FOX_CLOSE_UP, // Closing up to the Great Fox before take-off. + /* 4 */ TITLE_TAKE_OFF, // Take-off cutscene. + /* 5 */ TITLE_TAKE_OFF_SPACE, // Arwings coming out of the Great Fox out to space. + /* 7 */ TITLE_RANKING = 7 // Show ranking +} TitleCsStates; + +typedef enum TitleCardStates { + /* 0 */ TITLE_CARD_NONE, + /* 1 */ TITLE_CARD_GREAT_FOX, + /* 2 */ TITLE_CARD_ARWING +} TitleCardStates; + +typedef enum TitleLogoStates { + /* -1 */ TITLE_LOGO_NONE = -1, + /* 0 */ TITLE_LOGO_STARFOX_IN, + /* 1 */ TITLE_LOGO_NINTENDO_64 +} TitleLogoStates; + +typedef struct AmbientRGB { + /* 0x00 */ f32 r; + /* 0x04 */ f32 g; + /* 0x08 */ f32 b; +} AmbientRGB; // size = 0xC + +typedef struct { + /* 0x00 */ Animation* cutscene; + /* 0x04 */ Animation* title; + /* 0x08 */ Limb** skeleton; +} TitleAnimation; // size = 0x0C + +typedef struct TitleTeamInfo { + /* 0x00 */ Vec3f pos; /* 0x0C */ f32 unk_0C; - /* 0x10 */ f32 unk_10; + /* 0x10 */ f32 shadowScale; /* 0x14 */ f32 unk_14; /* 0x18 */ f32 unk_18; /* 0x1C */ f32 unk_1C; @@ -29,49 +70,49 @@ typedef struct UnkStruct_D_801B8350 { /* 0x48 */ f32 unk_48; /* 0x4C */ f32 unk_4C; /* 0x50 */ f32 unk_50; - /* 0x54 */ s32 unk_54; - /* 0x58 */ s32 unk_58; + /* 0x54 */ bool unk_54; + /* 0x58 */ s32 frameCount; /* 0x5C */ s32 unk_5C; -} UnkStruct_D_801B8350; // size = 0x60 +} TitleTeamInfo; // size = 0x60 -typedef struct { - /* 0x00 */ Vec3f unk_00; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ f32 unk_10; +typedef struct TitleArwingInfo { + /* 0x00 */ Vec3f pos; + /* 0x0C */ f32 scale; + /* 0x10 */ f32 vel; // Assumption /* 0x14 */ char pad14[0x4]; - /* 0x18 */ f32 unk_18; - /* 0x1C */ f32 unk_1C; - /* 0x20 */ f32 unk_20; - /* 0x24 */ f32 unk_24; - /* 0x28 */ f32 unk_28; - /* 0x2C */ f32 unk_2C; - /* 0x30 */ f32 unk_30; - /* 0x34 */ s32 unk_34; - /* 0x38 */ s32 unk_38; - /* 0x3C */ s32 unk_3C; - /* 0x40 */ s32 unk_40; - /* 0x44 */ f32 unk_44; - /* 0x48 */ s32 unk_48; - /* 0x4C */ s32 unk_4C; - /* 0x50 */ f32 unk_50[3]; -} UnkStruct_D_menu_801B84E8; // size = 0x5C + /* 0x18 */ f32 xRot; + /* 0x1C */ f32 yRot; + /* 0x20 */ f32 zRot; + /* 0x24 */ f32 cockpitGlassXrot; + /* 0x28 */ f32 laserGunsYpos; + /* 0x2C */ f32 teamFaceXrot; + /* 0x30 */ f32 teamFaceYrot; + /* 0x34 */ s32 drawFace; + /* 0x38 */ s32 timer; // Used for closing the cockpit glass and take off + /* 0x3C */ s32 unk_3C; // Related to engine glow. Investigate + /* 0x40 */ s32 unk_40; // Related to engine glow. Investigate + /* 0x44 */ f32 unk_44; // Related to engine glow. Investigate + /* 0x48 */ bool drawShadow; + /* 0x4C */ bool draw; + /* 0x50 */ f32 sfxSource[3]; +} TitleArwingInfo; // size = 0x5C typedef struct { /* 0x00 */ Vec3f pos; /* 0x0C */ char pad0C[0x4]; - /* 0x10 */ f32 angleX; - /* 0x14 */ f32 angleY; - /* 0x18 */ f32 angleZ; + /* 0x10 */ f32 xRot; + /* 0x14 */ f32 yRot; + /* 0x18 */ f32 zRot; /* 0x1C */ f32 scale; /* 0x20 */ char pad20[0x4]; - /* 0x24 */ f32 unk_24[3]; -} UnkStruct_D_menu_801B8658; // size = 0x30 + /* 0x24 */ f32 sfxSource[3]; +} TitleGreatFoxInfo; // size = 0x30 typedef struct { /* 0x00 */ Vec3f pos; - /* 0x0C */ s32 unk_0C; + /* 0x0C */ bool draw; /* 0x10 */ f32 scale; -} UnkStruct_D_menu_801B8688; // size = 0x14 +} TitleCorneria; // size = 0x14 extern CameraPoint D_menu_801B6B40[]; extern CameraPoint D_menu_801B6C60[]; @@ -81,22 +122,22 @@ extern f32 D_menu_801B7BB8; extern f32 D_menu_801B7BBC; extern f32 D_menu_801B7BC0; extern f32 D_menu_801B7BC4; -extern f32 D_menu_801B7BC8; -extern f32 D_menu_801B7BCC; +extern f32 sTitleTextPrimCol; +extern f32 sTitleTextPrimColTarget; extern s32 D_menu_801B7BD0; -extern s32 D_menu_801B7BD4; +extern TitleLogoStates sTitleLogoState; extern s32 D_menu_801B7BD8; -extern f32 D_menu_801B7BDC; -extern f32 D_menu_801B7BE0; +extern f32 sStarfoxLogoAlpha; +extern f32 sInAlpha; extern s32 D_menu_801B7BE4; extern f32 D_menu_801B7BE8; extern s32 D_menu_801B7BEC; -extern s32 D_menu_801B7BF0; +extern TitleCardStates sTitleCardState; extern f32 D_menu_801B7BF8[10]; extern f32 D_menu_801B7C20[10]; extern f32 D_menu_801B7C48[10]; extern f32 D_menu_801B7C70[10]; -extern s32 D_menu_801B7C98; +extern s32 sMaxExplosions; extern s32 D_menu_801B7CA0[10]; extern s32 D_menu_801B7CC8[10]; extern s32 D_menu_801B7CF0[10]; @@ -109,30 +150,30 @@ extern f32 D_menu_801B7FC0[40]; extern f32 D_menu_801B8060[40]; extern s32 D_menu_801B8100; extern s32 D_menu_801B8108[40]; -extern s32 D_menu_801B81A8[10][3]; -extern s32 D_menu_801B8220[10]; -extern u8 D_menu_801B8248[10][4]; +extern s32 gRankingTeamAlive[10][3]; +extern s32 gTotalHitsRanking[10]; +extern u8 sRankNameEntry[10][4]; extern UNK_TYPE D_menu_801B8270[3]; -extern s32 D_menu_801B827C; -extern s32 D_menu_801B8280; -extern s32 D_menu_801B8284; -extern s32 D_menu_801B8288; +extern bool gGoToTitle; +extern bool sLevelStartState; +extern s32 sWipeHeight; +extern s32 sTitleRankMaxRecords; extern f32 D_menu_801B828C; extern f32 D_menu_801B8290; extern CameraPoint* D_menu_801B8294; extern s32 D_menu_801B8298; -extern f32 D_menu_801B829C; -extern f32 D_menu_801B82A0; -extern f32 D_menu_801B82A4; -extern s32 D_menu_801B82A8; -extern s32 D_menu_801B82AC; +extern f32 sTitleCamUpX; +extern f32 sTitleCamUpY; +extern f32 sTitleCamUpZ; +extern s32 sTimer1; +extern s32 sTimer2; extern s32 D_menu_801B82B0; -extern s32 D_menu_801B82B4; -extern s32 D_menu_801B82B8; +extern s32 sTimer3; +extern s32 sTitleMsgFrameCount; extern s32 D_menu_801B82BC; -extern s32 D_menu_801B82C0; -extern s32 D_menu_801B82C4; -extern f32 D_menu_801B82C8; +extern s32 sSceneState; +extern s32 sCutsceneState; +extern f32 sPassageWayZoffset; extern f32 D_menu_801B82CC; extern f32 D_menu_801B82D0; extern f32 D_menu_801B82D4; @@ -156,24 +197,24 @@ extern s32 D_menu_801B8318; extern s32 D_menu_801B831C; extern s32 D_menu_801B8320; extern s32 D_menu_801B8324; -extern f32 D_menu_801B8328; -extern f32 D_menu_801B832C; -extern f32 D_menu_801B8330; +extern f32 sAmbientR; +extern f32 sAmbientG; +extern f32 sAmbientB; extern s32 D_menu_801B8334; extern bool D_menu_801B8338; extern f32 D_menu_801B833C; -extern s32 D_menu_801B8340; -extern s32 D_menu_801B8344; -extern s32 D_menu_801B8348; -extern UnkStruct_D_801B8350 D_menu_801B8350[4]; +extern TitleTeam D_menu_801B8340; +extern bool sDrawTeamName; +extern bool D_menu_801B8348; +extern TitleTeamInfo sTitleTeam[4]; extern f32 D_menu_801B84D0; extern f32 D_menu_801B84D4; extern f32 D_menu_801B84D8[3]; -extern UnkStruct_D_menu_801B84E8 D_menu_801B84E8[4]; -extern UnkStruct_D_menu_801B8658 D_menu_801B8658; -extern UnkStruct_D_menu_801B8688 D_menu_801B8688; +extern TitleArwingInfo sTitleArwing[4]; +extern TitleGreatFoxInfo sTitleGreatFox; +extern TitleCorneria sTitleCorneria; extern s32 D_menu_801B869C; -extern s32 D_menu_801B86A0; +extern bool sDrawTakeOffSpace; extern s32 D_menu_801B86A4; extern f32 D_menu_801B86A8; extern f32 D_menu_801B86AC; @@ -189,14 +230,14 @@ extern f32 D_menu_801B86D0; extern f32 D_menu_801B86D4; extern f32 D_menu_801B86D8; extern f32 D_menu_801B86DC; -extern Vec3f D_menu_801B86E0[4][50]; -extern s32 D_menu_801B9040; -extern f32 D_menu_801B9044; +extern Vec3f sCharFrameTable[4][50]; +extern bool D_menu_801B9040; +extern f32 sTitleDeckLauncherZpos; extern f32 D_menu_801B9048; extern f32 D_menu_801B904C; extern f32 D_menu_801B9050; -extern f32 D_menu_801B9054; -extern f32 D_menu_801B9058; +extern f32 sTitleStarfoxLogoXpos; +extern f32 sTitleStarfoxLogoYpos; extern f32 D_menu_801B905C; extern f32 D_menu_801B9060; extern f32 D_menu_801B9064; @@ -209,66 +250,65 @@ extern f32 D_menu_801B907C; extern f32 D_menu_801B9080; extern f32 D_menu_801B9084; -void Title_8019111C(void); -void Title_8018CC30(CameraPoint*, s32, f32); -void Title_8018CD9C(CameraPoint *pos, CameraPoint *arg1, f32 weight, s32 arg3); -void Title_8018D510(s32); -void Title_8018D80C(s32); -void Title_8018DDB8(s32); -void Title_8018DF0C(f32 arg0); -void Title_8018E058(void); -void Title_8018E200(void); -bool Title_8018EDC8(s32, Gfx **, Vec3f *, Vec3f *, void *); -void Title_8018E67C(s32); -void Title_8018F438(void); -void Title_80190144(void); -void Title_801903B8(void); -void Title_80190950(void); -void Title_80190A98(void); -void Title_80190B30(s32 arg0); -void Title_80190EA4(void); -void Title_80190FD0(void); -void Title_801912A0(void); -void Title_80191320(s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32 arg7, - f32 arg8, f32 arg9); -void Title_801914AC(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32* arg7, f32* arg8, - f32* arg9, f32 argA, f32 argB, f32 argC); -void Title_80191798(f32* arg0, f32* arg1); -void Title_80191844(f32 arg0, f32 arg1); -void Title_801918FC(void); -void Title_801919C4(u16** msgList, RadioCharacterId character); -s32 Title_80188010(void); -void Title_80190C9C(void); -void Title_8018D2B8(s32); -void Title_8018EA78(s32); -void Title_801906A0(void); +void Title_Screen_Input(void); +void Title_Cutscene_SetCamera(CameraPoint*, s32, f32); +void Title_Camera_Calc(CameraPoint* pos, CameraPoint* arg1, f32 weight, s32 arg3); +void Title_Arwing_DrawEngineGlow(TitleTeam); +void Title_EngineGlowParticles_Draw(TitleTeam); +void Title_ArwingShadow_Draw(s32); +void Title_Corneria_Draw(f32 zPos); +void Title_GreatFox_Draw(void); +void Title_CorneriaExplosions_Draw(void); +bool Title_Team_OverrideLimbDraw(s32, Gfx**, Vec3f*, Vec3f*, void*); +void Title_TeamRunning_Draw(TitleTeam); +void Title_Passage_Draw(void); +void Title_Sun_Draw(void); +void Title_SunGlare2_Draw(void); +void Title_GreatFoxDeck_Draw(void); +void Title_GreatFoxDeckPlatform_Draw(void); +void Title_GreatFoxDeckLauncher_Draw(TitleTeam teamidx); +void Title_NextState_TitleScreen(void); +void Title_NextState_OptionMenu(void); +void Title_ScreenFade_Update(void); +void Title_SetCamUp3(bool arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32 arg7, f32 arg8, + f32 arg9); +void Title_SetCamUp2(f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32 arg6, f32* arg7, f32* arg8, + f32* arg9, f32 argA, f32 argB, f32 argC); +void Title_GetCamRot(f32* xRot, f32* yRot); +void Title_SetCamUp(f32 xRot, f32 yRot); +void Title_Matrix_Push(void); +void Title_Radio_PlayMessage(u16** msgList, RadioCharacterId character); +s32 Title_GetRankTotalHits(void); +void Title_TitleCard_Draw(void); +void Title_Arwing_Draw(TitleTeam); +void Title_Team_Draw(TitleTeam); +void Title_Logos_Draw(void); void Title_UpdateEntry(void); - s32 Title_80187ABC(void); -void Title_80187B00(void); -void Title_80187E28(void); -void Title_801888E8(void); -void Title_8018994C(void); -void Title_8018A644(void); -void Title_8018ACEC(void); -void Title_8018B5C4(void); -void Title_8018C644(void); -void Title_80187CA8(void); -s32 Title_80188010(void); -void Title_80189208(void); -void Title_8018A2F8(void); -void Title_8018A990(void); -void Title_8018B038(void); -void Title_8018C114(void); -void Title_8018CB90(void); -void Title_8018F680(void); -void Title_8018F77C(void); -void Title_8018F85C(void); -void Title_8018F8E4(void); -void Title_8018FC14(void); -void Title_8018FD08(void); -void Title_8018FF74(void); -void Title_80190E64(void); -void Title_80191674(f32, f32, f32, f32*, f32*, f32*); - +s32 Title_CheckControllers(void); +void Title_Ranking_Update(void); +void Title_RankingData_Draw(void); +void Title_Screen_Update(void); +void Title_CsGreatFoxTraveling_Update(void); +void Title_CsTeamRunning_Update(void); +void Title_CsGreatFoxCloseUp_Update(void); +void Title_CsTakeOff_Update(void); +void Title_CsTakeOffSpace_Update(void); +void Title_Ranking_Draw(void); +s32 Title_GetRankTotalHits(void); +void Title_Screen_Draw(void); +void Title_CsGreatFoxTraveling_Draw(void); +void Title_CsTeamRunning_Draw(void); +void Title_CsGreatFoxCloseUp_Draw(void); +void Title_CsTakeOff_Draw(void); +void Title_CsTakeOffSpace_Draw(void); +void Title_StarfoxLogo_Draw(void); +void Title_64Logo_Draw(void); +void Title_CopyrightSymbol_Draw(void); +void Title_PressStart_Draw(void); +void Title_Copyright_Draw(void); +void Title_TeamName_Draw(void); +void Title_SunGlare_Draw(void); +void Title_NextState_Check(void); +void Title_SetLightRot(f32, f32, f32, f32*, f32*, f32*); #endif diff --git a/yamls/jp/rev1/assets.yaml b/yamls/jp/rev1/assets.yaml new file mode 100644 index 00000000..89e749c1 --- /dev/null +++ b/yamls/jp/rev1/assets.yaml @@ -0,0 +1,444 @@ + - name: audio_seq + type: bin + start: 0xE9950 + + - name: audio_bank + type: bin + start: 0x124920 + + - name: audio_table + type: bin + start: 0x143A40 + + - name: ast_common + exclusive_ram_id: segment_01 + type: code + dir: assets + start: 0x844660 + vram: 0x01000000 + subsegments: + - [0x844660, bin, ast_common/ast_common] + + - name: ast_bg_space + exclusive_ram_id: segment_02 + type: code + dir: assets + start: 0x8763F0 + vram: 0x02000000 + subsegments: + - [0x8763F0, bin, ast_bg_space/ast_bg_space] + + - name: ast_bg_planet + exclusive_ram_id: segment_02 + type: code + dir: assets + start: 0x87DBD0 + vram: 0x02000000 + subsegments: + - [0x87DBD0, bin, ast_bg_planet/ast_bg_planet] + + - name: ast_arwing + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x88F730 + vram: 0x03000000 + subsegments: + - [0x88F730, bin, ast_arwing/ast_arwing] + + - name: ast_landmaster + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8A9520 + vram: 0x03000000 + subsegments: + - [0x8A9520, bin, ast_landmaster/ast_landmaster] + + - name: ast_blue_marine + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8B1AB0 + vram: 0x03000000 + subsegments: + - [0x8B1AB0, bin, ast_blue_marine/ast_blue_marine] + + - name: ast_versus + exclusive_ram_id: segment_03 + type: code + dir: assets + start: 0x8B8E00 + vram: 0x03000000 + subsegments: + - [0x8B8E00, bin, ast_versus/ast_versus] + + - name: ast_enmy_planet + exclusive_ram_id: segment_04 + type: code + dir: assets + start: 0x8E8AE0 + vram: 0x04000000 + subsegments: + - [0x8E8AE0, bin, ast_enmy_planet/ast_enmy_planet] + + - name: ast_enmy_space + exclusive_ram_id: segment_04 + type: code + dir: assets + start: 0x8F2DE0 + vram: 0x04000000 + subsegments: + - [0x8F2DE0, bin, ast_enmy_space/ast_enmy_space] + + - name: ast_great_fox + exclusive_ram_id: segment_0E + type: code + dir: assets + start: 0x8FF2F0 + vram: 0x0E000000 + subsegments: + - [0x8FF2F0, bin, ast_great_fox/ast_great_fox] + + - name: ast_star_wolf + exclusive_ram_id: segment_0F + type: code + dir: assets + start: 0x911000 + vram: 0x0F000000 + subsegments: + - [0x911000, bin, ast_star_wolf/ast_star_wolf] + + - name: ast_allies + exclusive_ram_id: segment_0D + type: code + dir: assets + start: 0x9257A0 + vram: 0x0D000000 + subsegments: + - [0x9257A0, bin, ast_allies/ast_allies] + + - name: ast_corneria + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x932200 + vram: 0x06000000 + subsegments: + - [0x932200, bin, ast_corneria/ast_corneria] + + - name: ast_meteo + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x971980 + vram: 0x06000000 + subsegments: + - [0x971980, bin, ast_meteo/ast_meteo] + + - name: ast_titania + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0x9A3370 + subsegments: + - [0x9A3370, bin, ast_titania/ast_titania] + + - name: ast_7_ti_2 + exclusive_ram_id: segment_07 + type: code + dir: assets + vram: 0x07000000 + start: 0x9AD730 + subsegments: + - [0x9AD730, bin, ast_7_ti_2/ast_7_ti_2] + + - name: ast_8_ti + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0x9BB980 + vram: 0x08000000 + subsegments: + - [0x9BB980, bin, ast_8_ti/ast_8_ti] + + - name: ast_9_ti + exclusive_ram_id: segment_09 + type: code + dir: assets + start: 0x9C4C20 + vram: 0x09000000 + subsegments: + - [0x9C4C20, bin, ast_9_ti/ast_9_ti] + + - name: ast_A_ti + type: code + dir: assets + exclusive_ram_id: segment_0A + start: 0x9D4D40 + vram: 0x0A000000 + subsegments: + - [0x9D4D40, bin, ast_A_ti/ast_A_ti] + + - name: ast_7_ti_1 + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0x9DE6E0 + vram: 0x07000000 + subsegments: + - [0x9DE6E0, bin, ast_7_ti_1/ast_7_ti_1] + + - name: ast_sector_x + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0x9ED490 + vram: 0x06000000 + subsegments: + - [0x9ED490, bin, ast_sector_x/ast_sector_x] + + - name: ast_sector_z + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA1FCD0 + vram: 0x06000000 + subsegments: + - [0xA1FCD0, bin, ast_sector_z/ast_sector_z] + + - name: ast_aquas + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA28E60 + vram: 0x06000000 + subsegments: + - [0xA28E60, bin, ast_aquas/ast_aquas] + + - name: ast_area_6 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA5B8F0 + vram: 0x06000000 + subsegments: + - [0xA5B8F0, bin, ast_area_6/ast_area_6] + + - name: ast_venom_1 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA84390 + vram: 0x06000000 + subsegments: + - [0xA84390, bin, ast_venom_1/ast_venom_1] + + - name: ast_venom_2 + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xA9E570 + vram: 0x06000000 + subsegments: + - [0xA9E570, bin, ast_venom_2/ast_venom_2] + + - name: ast_ve1_boss + # exclusive_ram_id: segment_06 + exclusive_ram_id: segment_09 + type: code + dir: assets + start: 0xAB36F0 + vram: 0x09000000 + subsegments: + - [0xAB36F0, bin, ast_ve1_boss/ast_ve1_boss] + + - name: ast_bolse + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAD8050 + vram: 0x06000000 + subsegments: + - [0xAD8050, bin, ast_bolse/ast_bolse] + + - name: ast_fortuna + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAE9DC0 + vram: 0x06000000 + subsegments: + - [0xAE9DC0, bin, ast_fortuna/ast_fortuna] + + - name: ast_sector_y + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xAF9DC0 + vram: 0x06000000 + subsegments: + - [0xAF9DC0, bin, ast_sector_y/ast_sector_y] + + - name: ast_solar + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB2E3F0 + vram: 0x06000000 + subsegments: + - [0xB2E3F0, bin, ast_solar/ast_solar] + + - name: ast_zoness + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB51670 + vram: 0x06000000 + subsegments: + - [0xB51670, bin, ast_zoness/ast_zoness] + + - name: ast_katina + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xB7E0B0 + vram: 0x06000000 + subsegments: + - [0xB7E0B0, bin, ast_katina/ast_katina] + + - name: ast_macbeth + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0xB8F2B0 + subsegments: + - [0xB8F2B0, bin, ast_macbeth/ast_macbeth] + + - name: ast_warp_zone + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xBC7460 + vram: 0x07000000 + subsegments: + - [0xBC7460, bin, ast_warp_zone/ast_warp_zone] + + - name: ast_title + exclusive_ram_id: segment_06 + type: code + dir: assets + vram: 0x06000000 + start: 0xBC9230 + subsegments: + - [0xBC9230, bin, ast_title/ast_title] + + - name: ast_map + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xC12690 + vram: 0x06000000 + subsegments: + - [0xC12690, bin, ast_map/ast_map] + + - name: ast_option + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xC6FA00 + vram: 0x08000000 + subsegments: + - [0xC6FA00, bin, ast_option/ast_option] + + - name: ast_vs_menu + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xC83960 + vram: 0x07000000 + subsegments: + - [0xC83960, bin, ast_vs_menu/ast_vs_menu] + + - name: ast_text + exclusive_ram_id: segment_05 + type: code + dir: assets + vram: 0x05000000 + start: 0xC98590 + subsegments: + - [0xC98590, bin, ast_text/ast_text] + + - name: ast_font_3d + exclusive_ram_id: segment_09 + type: code + dir: assets + vram: 0x09000000 + start: 0xCA2860 + subsegments: + - [0xCA2860, bin, ast_font_3d/ast_font_3d] + + - name: ast_andross + exclusive_ram_id: segment_0C + type: code + dir: assets + vram: 0x0C000000 + start: 0xCAEA30 + subsegments: + - [0xCAEA30, bin, ast_andross/ast_andross] + + - name: ast_logo + exclusive_ram_id: segment_0F + type: code + dir: assets + start: 0xCE8EC0 + vram: 0x0F000000 + subsegments: + - [0xCE8EC0, bin, ast_logo/ast_logo] + + - name: ast_ending + exclusive_ram_id: segment_07 + type: code + dir: assets + start: 0xCEB3C0 + vram: 0x07000000 + subsegments: + - [0xCEB3C0, bin, ast_ending/ast_ending] + + - name: ast_ending_award_front + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD071C0 + vram: 0x08000000 + subsegments: + - [0xD071C0, bin, ast_ending_award_front/ast_ending_award_front] + + - name: ast_ending_award_back + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD2C240 + vram: 0x08000000 + subsegments: + - [0xD2C240, bin, ast_ending_award_back/ast_ending_award_back] + + - name: ast_ending_expert + exclusive_ram_id: segment_08 + type: code + dir: assets + start: 0xD55CD0 + vram: 0x08000000 + subsegments: + - [0xD55CD0, bin, ast_ending_expert/ast_ending_expert] + + - name: ast_training + exclusive_ram_id: segment_06 + type: code + dir: assets + start: 0xD9FDD0 + vram: 0x06000000 + subsegments: + - [0xD9FDD0, bin, ast_training/ast_training] diff --git a/yamls/jp/rev1/header.yaml b/yamls/jp/rev1/header.yaml new file mode 100644 index 00000000..a501bfeb --- /dev/null +++ b/yamls/jp/rev1/header.yaml @@ -0,0 +1,70 @@ +name: Starfox64 JAP REV 1 (v1.1) +sha1: af2875bb8c0ef8135cae75f55e98b6ae44ec7925 +options: + basename: starfox64 + target_path: baserom.jp.rev1.uncompressed.z64 + elf_path: build/starfox64.jp.rev1.elf + ld_script_path: linker_scripts/jp/rev1/starfox64.ld + base_path: . + compiler: IDO + find_file_boundaries: True + header_encoding: ASCII + platform: n64 + undefined_funcs_auto_path: linker_scripts/jp/rev1/auto/undefined_funcs_auto.ld + undefined_syms_auto_path: linker_scripts/jp/rev1/auto/undefined_syms_auto.ld + + symbol_addrs_path: + - linker_scripts/jp/rev1/symbol_addrs.txt + - linker_scripts/jp/rev1/symbol_addrs_fix.txt + - linker_scripts/jp/rev1/symbol_addrs_assets.txt + + asm_path: asm/jp/rev1 + src_path: srcjp + asset_path: bin/jp/rev1 + + build_path: build + + extensions_path: tools/splat_ext + mips_abi_float_regs: o32 + create_asm_dependencies: True + do_c_func_detection: True + o_as_suffix: True + gfx_ucode: f3dex + mnemonic_ljust: 12 + rom_address_padding: True + dump_symbols: True + include_macro_inc: False + libultra_symbols: True + hardware_regs: True + + ld_dependencies: True + + + use_legacy_include_asm: False + + asm_function_macro: glabel + asm_jtbl_label_macro: jlabel + asm_data_macro: dlabel + + ld_legacy_generation: True + check_consecutive_segment_types: False + + # section_order: [".text", ".data", ".rodata", ".bss"] + # auto_all_sections: [".data", ".rodata", ".bss"] + + + + + mips_abi_float_regs: o32 + + + disasm_unknown: True + # string_encoding: ASCII + # data_string_encoding: ASCII + rodata_string_guesser_level: 2 + data_string_guesser_level: 2 + # libultra_symbols: True + # hardware_regs: True + # gfx_ucode: # one of [f3d, f3db, f3dex, f3dexb, f3dex2] +segments: + diff --git a/yamls/jp/rev1/main.yaml b/yamls/jp/rev1/main.yaml new file mode 100644 index 00000000..fe89dba5 --- /dev/null +++ b/yamls/jp/rev1/main.yaml @@ -0,0 +1,37 @@ + - name: makerom + type: code + start: 0x0 + subsegments: + - {start: 0x0, type: header, name: header} + - {start: 0x40, type: textbin, name: ipl3} + - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} + + - name: main + type: code + start: 0x1050 + vram: 0x80000450 + bss_size: 0x95A50 + subsegments: + # Microcode + - [0x01050, textbin, rspboot] + - [0x01120, textbin, aspmain] + - [0x02020, textbin, f3dex] + + # Nintendo libraries + - [0x03450, asm] + + - name: dma_table + type: code + start: 0xE93C0 + vram: 0x8017E210 + follows_vram: main + subsegments: + - [0xE93C0, .data, dmatable] + + - name: buffers + exclusive_ram_id: buffer + type: code + vram: 0x80281000 + bss_size: 0x17F000 + subsegments: + - { type: .bss, vram: 0x80281000, name: buffers } diff --git a/yamls/jp/rev1/overlays.yaml b/yamls/jp/rev1/overlays.yaml new file mode 100644 index 00000000..925cc2db --- /dev/null +++ b/yamls/jp/rev1/overlays.yaml @@ -0,0 +1,234 @@ + - name: ovl_i1 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i1 + start: 0xDA9680 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0xA10 + symbol_name_format: i1_$VRAM + subsegments: + - [0xDA9680, c, fox_i1] + - [0xDA9690, c, fox_co] + - [0xDB4240, c, fox_ve1] + - [0xDBAA40, c, fox_tr] + - [0xDBADB0, c, fox_tr360] + - [0xDBB930, data, fox_i1] + - [0xDBB940, data, fox_co] + - [0xDBBCA0, data, fox_ve1] + - [0xDBCFB0, data, fox_tr360] + - [0xDBD050, .rodata, fox_co] + - [0xDBD410, .rodata, fox_ve1] + - [0xDBD7A0, .rodata, fox_tr] + - [0xDBD7E0, .rodata, fox_tr360] + - { type: bss, vram: 0x80192940, name: fox_i1 } + - { type: bss, vram: 0x80192950, name: fox_co } + - { type: bss, vram: 0x80192A70, name: fox_ve1 } + + - name: ovl_i2 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i2 + start: 0xDBD820 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x30 + symbol_name_format: i2_$VRAM + subsegments: + - [0xDBD820, c, fox_i2] + - [0xDBD830, c, fox_me] + - [0xDC52D0, c, fox_sx] + - [0xDCB6D0, data, fox_i2] + - [0xDCB6E0, data, fox_me] + - [0xDCB8F0, data, fox_sx] + - [0xDCBA40, .rodata, fox_me] + - [0xDCBD00, .rodata, fox_sx] + - { type: bss, vram: 0x8018CFA0, name: fox_i2 } + - { type: bss, vram: 0x8018CFB0, name: fox_sx } + + - name: ovl_i3 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i3 + start: 0xDCC020 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x2220 + symbol_name_format: i3_$VRAM + subsegments: + - [0xDCC020, c, fox_i3] + - [0xDCC030, c, fox_a6] + - [0xDD4A50, c, fox_zo] + - [0xDE3300, c, fox_so] + - [0xDED940, c, fox_aq] + - [0xE037D0, data, fox_i3] + - [0xE037E0, data, fox_a6] + - [0xE04090, data, fox_zo] + - [0xE04410, data, fox_so] + - [0xE04690, data, fox_aq] + - [0xE05430, .rodata, fox_a6] + - [0xE058E0, .rodata, fox_zo] + - [0xE06000, .rodata, fox_so] + - [0xE06560, .rodata, fox_aq] + - { type: bss, vram: 0x801B94F0, name: fox_i3 } + - { type: bss, vram: 0x801B9500, name: fox_a6 } + - { type: bss, vram: 0x801B95E0, name: fox_zo } + - { type: bss, vram: 0x801B99F0, name: fox_so } + - { type: bss, vram: 0x801B9A70, name: fox_aq } + + + - name: ovl_i4 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i4 + start: 0xE06D70 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x1B0 + symbol_name_format: i4_$VRAM + subsegments: + - [0xE06D70, c, fox_i4] + - [0xE06E40, c, fox_fo] + - [0xE0B580, c, fox_bo] + - [0xE11FD0, c, fox_ka] + - [0xE18DD0, c, fox_sz] + - [0xE1E2A0, data, fox_i4] + - [0xE1E2B0, data, fox_fo] + - [0xE1E350, data, fox_bo] + - [0xE1E5C0, data, fox_ka] + - [0xE1E980, data, fox_sz] + - [0xE1EBA0, .rodata, fox_i4] + - [0xE1EBE0, .rodata, fox_fo] + - [0xE1EDE0, .rodata, fox_bo] + - [0xE1F1E0, .rodata, fox_ka] + - [0xE1F570, .rodata, fox_sz] + - { type: bss, vram: 0x801972A0, name: fox_i4 } + - { type: bss, vram: 0x801972B0, name: fox_bo } + - { type: bss, vram: 0x80197420, name: fox_ka } + - { type: bss, vram: 0x80197440, name: fox_sz } + + + - name: ovl_i5 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i5 + start: 0xE1F870 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0xAF70 + symbol_name_format: i5_$VRAM + subsegments: + - [0xE1F870, c, fox_i5] + - [0xE1F880, c, fox_ti_cs] + - [0xE21280, c, fox_ti] + - [0xE31C90, c, fox_ma] + - [0xE4CDB0, c, fox_ground] + - [0xE4F670, data, fox_i5] + - [0xE4F680, data, fox_ti_cs] + - [0xE4F740, data, fox_ti] + - [0xE51230, data, fox_ma] + - [0xE52CF0, data, fox_ground] + - [0xE52DC0, .rodata, fox_i5] + - [0xE52DD0, .rodata, fox_ti_cs] + - [0xE52E30, .rodata, fox_ti] + - [0xE53690, .rodata, fox_ma] + - [0xE541D0, .rodata, fox_ground] + - { type: bss, vram: 0x801B31F0, name: fox_i5 } + - { type: bss, vram: 0x801B3200, name: fox_ti } + - { type: bss, vram: 0x801B5540, name: fox_ma } + - { type: bss, vram: 0x801B5A40, name: fox_ground } + + + - name: ovl_i6 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i6 + start: 0xE542C0 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x520 + symbol_name_format: i6_$VRAM + subsegments: + - [0xE542C0, c, fox_i6] + - [0xE542D0, c, fox_andross] + - [0xE62FF0, c, fox_ve2] + - [0xE648F0, c, fox_sy] + - [0xE72330, c, fox_turret] + - [0xE73520, data, fox_i6] + - [0xE73530, data, fox_andross] + - [0xE73680, data, fox_ve2] + - [0xE736E0, data, fox_sy] + - [0xE73950, data, fox_turret] + - [0xE73960, .rodata, fox_i6] + - [0xE73970, .rodata, fox_andross] + - [0xE74210, .rodata, fox_ve2] + - [0xE74250, .rodata, fox_sy] + - [0xE74CA0, .rodata, fox_turret] + - { type: bss, vram: 0x8019F1E0, name: fox_i6 } + - { type: bss, vram: 0x8019F1F0, name: fox_andross } + - { type: bss, vram: 0x8019F6E0, name: fox_sy } + + + - name: ovl_menu + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_menu + start: 0xE74D00 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x17570 + symbol_name_format: menu_$VRAM + subsegments: + - [0xE74D00, c, fox_i_menu] + - [0xE74DC0, c, fox_title] + - [0xE7F410, c, fox_option] + - [0xE8C1E0, c, fox_map] + - [0xE9B3E0, data, fox_i_menu] + - [0xE9B3F0, data, fox_title] + - [0xE9BF60, data, fox_option] + - [0xE9CE00, data, fox_map] + - [0xEA4740, .rodata, fox_i_menu] + - [0xEA4760, .rodata, fox_title] + - [0xEA4B00, .rodata, fox_option] + - [0xEA4F00, .rodata, fox_map] + - { type: bss, vram: 0x801AF0B0, name: fox_menu } + - { type: bss, vram: 0x801AF0C0, name: fox_title } + - { type: bss, vram: 0x801B05A0, name: fox_option } + - { type: bss, vram: 0x801B0910, name: fox_map } + + + - name: ovl_ending + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_ending + start: 0xEA5610 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x2710 + symbol_name_format: ending_$VRAM + subsegments: + - [0xEA5610, c, fox_end1] + - [0xEAAF10, c, fox_end2] + - [0xEB0800, data, fox_end1] + - [0xEB0E50, data, fox_end2] + - [0xEB41A0, .rodata, fox_end1] + - [0xEB45A0, .rodata, fox_end2] + - { type: bss, vram: 0x8018DD90, name: fox_end1 } + - { type: bss, vram: 0x8018F620, name: fox_end2 } + + + - name: ovl_unused + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_unused + start: 0xEB4C00 + vram: 0x8017E7A0 + follows_vram: dma_table + bss_size: 0x10 + symbol_name_format: unused_$VRAM + subsegments: + - [0xEB4C00, c, fox_unused] + - [0xEB4C10, data, fox_unused] + - { type: bss, vram: 0x8017E840, name: fox_unused } + + - [0xEB4CA0] \ No newline at end of file diff --git a/yamls/us/rev0/assets.yaml b/yamls/us/rev0/assets.yaml new file mode 100644 index 00000000..1bacd757 --- /dev/null +++ b/yamls/us/rev0/assets.yaml @@ -0,0 +1,453 @@ + + - name: audio_seq + type: bin + start: 0xDA030 + +# - name: audio_bank +# type: bin +# start: 0x114D20 +# +# - name: audio_table +# type: bin +# start: 0x132D40 +# +# - name: ast_common +# type: bin +# start: 0x86F2C0 +# +# - name: assets_in_between # start of ast_bg_space +# type: bin +# start: 0x8A1ED0 + +# - name: ast_bg_space +# exclusive_ram_id: segment_02 +# type: code +# dir: assets +# start: 0x8A1ED0 +# vram: 0x02000000 +# subsegments: +# - [0x8A68C0, .data, ast_bg_space/ast_bg_space] +# +# - name: ast_bg_planet +# exclusive_ram_id: segment_02 +# type: code +# dir: assets +# start: 0x8AE0A0 +# vram: 0x02000000 +# subsegments: +# - [0x8AE0A0, .data, ast_bg_planet/ast_bg_planet] +# +# - name: ast_arwing +# exclusive_ram_id: segment_03 +# type: code +# dir: assets +# start: 0x8BFC00 +# vram: 0x03000000 +# subsegments: +# - [0x8BFC00, .data, ast_arwing/ast_arwing] +# +# - name: ast_landmaster +# exclusive_ram_id: segment_03 +# type: code +# dir: assets +# start: 0x8D99F0 +# vram: 0x03000000 +# subsegments: +# - [0x8D99F0, .data, ast_landmaster/ast_landmaster] +# +# - name: ast_blue_marine +# exclusive_ram_id: segment_03 +# type: code +# dir: assets +# start: 0x8E1F80 +# vram: 0x03000000 +# subsegments: +# - [0x8E1F80, .data, ast_blue_marine/ast_blue_marine] +# +# - name: ast_versus +# exclusive_ram_id: segment_03 +# type: code +# dir: assets +# start: 0x8E92D0 +# vram: 0x03000000 +# subsegments: +# - [0x8E92D0, .data, ast_versus/ast_versus] +# +# - name: ast_enmy_planet +# exclusive_ram_id: segment_04 +# type: code +# dir: assets +# start: 0x918430 +# vram: 0x04000000 +# subsegments: +# - [0x918430, .data, ast_enmy_planet/ast_enmy_planet] +# +# - name: ast_enmy_space +# exclusive_ram_id: segment_04 +# type: code +# dir: assets +# start: 0x922730 +# vram: 0x04000000 +# subsegments: +# - [0x922730, .data, ast_enmy_space/ast_enmy_space] +# +# - name: ast_great_fox +# exclusive_ram_id: segment_0E +# type: code +# dir: assets +# start: 0x92EC40 +# vram: 0x0E000000 +# subsegments: +# - [0x92EC40, .data, ast_great_fox/ast_great_fox] +# +# - name: ast_star_wolf +# exclusive_ram_id: segment_0F +# type: code +# dir: assets +# start: 0x940AD0 +# vram: 0x0F000000 +# subsegments: +# - [0x940AD0, .data, ast_star_wolf/ast_star_wolf] +# +# - name: ast_allies +# exclusive_ram_id: segment_0D +# type: code +# dir: assets +# start: 0x955270 +# vram: 0x0D000000 +# subsegments: +# - [0x955270, .data, ast_allies/ast_allies] +# +# - name: ast_corneria +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0x961CE0 +# vram: 0x06000000 +# subsegments: +# - [0x961CE0, .data, ast_corneria/ast_corneria] +# +# - name: ast_meteo +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0x9A1460 +# vram: 0x06000000 +# subsegments: +# - [0x9A1460, .data, ast_meteo/ast_meteo] +# +# - name: ast_titania +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# vram: 0x06000000 +# start: 0x9D2FD0 +# subsegments: +# - [0x9D2FD0, .data, ast_titania/ast_titania] +# +# - name: ast_7_ti_2 +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# vram: 0x07000000 +# start: 0x9DD390 +# subsegments: +# - [0x9DD390, .data, ast_7_ti_2/ast_7_ti_2] +# +# - name: ast_8_ti +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0x9EB5E0 +# vram: 0x08000000 +# subsegments: +# - [0x9EB5E0, .data, ast_8_ti/ast_8_ti] +# +# - name: ast_9_ti +# exclusive_ram_id: segment_09 +# type: code +# dir: assets +# start: 0x9F4880 +# vram: 0x09000000 +# subsegments: +# - [0x9F4880, .data, ast_9_ti/ast_9_ti] +# +# - name: ast_A_ti +# type: code +# dir: assets +# exclusive_ram_id: segment_0A +# start: 0xA049A0 +# vram: 0x0A000000 +# subsegments: +# - [0xA049A0, .data, ast_A_ti/ast_A_ti] +# +# - name: ast_7_ti_1 +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# start: 0xA0E340 +# vram: 0x07000000 +# subsegments: +# - [0xA0E340, .data, ast_7_ti_1/ast_7_ti_1] +# +# - name: ast_sector_x +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xA1D0F0 +# vram: 0x06000000 +# subsegments: +# - [0xA1D0F0, .data, ast_sector_x/ast_sector_x] +# +# - name: ast_sector_z +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xA4FBB0 +# vram: 0x06000000 +# subsegments: +# - [0xA4FBB0, .data, ast_sector_z/ast_sector_z] +# +# - name: ast_aquas +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xA58F60 +# vram: 0x06000000 +# subsegments: +# - [0xA58F60, .data, ast_aquas/ast_aquas] +# +# - name: ast_area_6 +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xA8B470 +# vram: 0x06000000 +# subsegments: +# - [0xA8B470, .data, ast_area_6/ast_area_6] +# +# - name: ast_venom_1 +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xAB4000 +# vram: 0x06000000 +# subsegments: +# - [0xA4FBB0, .data, ast_venom_1/ast_venom_1] +# +# - name: ast_venom_2 +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xACF960 +# vram: 0x06000000 +# subsegments: +# - [0xA4FBB0, .data, ast_venom_2/ast_venom_2] +# +# - name: ast_ve1_boss +# # exclusive_ram_id: segment_06 +# exclusive_ram_id: segment_09 +# type: code +# dir: assets +# start: 0xAE60A0 +# vram: 0x09000000 +# subsegments: +# - [0xAE60A0, .data, ast_ve1_boss/ast_ve1_boss] +# +# - name: ast_bolse +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB0AA00 +# vram: 0x06000000 +# subsegments: +# - [0xB0AA00, .data, ast_bolse/ast_bolse] +# +# - name: ast_fortuna +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB1CA50 +# vram: 0x06000000 +# subsegments: +# - [0xB1CA50, .data, ast_fortuna/ast_fortuna] +# +# - name: ast_sector_y +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB2CA50 +# vram: 0x06000000 +# subsegments: +# - [0xB2CA50, .data, ast_sector_y/ast_sector_y] +# +# - name: ast_solar +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB612E0 +# vram: 0x06000000 +# subsegments: +# - [0xB612E0, .data, ast_solar/ast_solar] +# +# - name: ast_zoness +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xB84560 +# vram: 0x06000000 +# subsegments: +# - [0xB84560, .data, ast_zoness/ast_zoness] +# +# - name: ast_katina +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xBB11D0 +# vram: 0x06000000 +# subsegments: +# - [0xBB11D0, .data, ast_katina/ast_katina] +# +# - name: ast_macbeth +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# vram: 0x06000000 +# start: 0xBC23D0 +# subsegments: +# - [0xBC23D0, .data, ast_macbeth/ast_macbeth] +# +# - name: ast_warp_zone +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# start: 0xBFA740 +# vram: 0x07000000 +# subsegments: +# - [0xBFA740, .data, ast_warp_zone/ast_warp_zone] +# +# - name: ast_title +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# vram: 0x06000000 +# start: 0xBFC510 +# subsegments: +# - [0xBFC510, .data, ast_title/ast_title] +# +# - name: ast_map +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xC48F40 +# vram: 0x06000000 +# subsegments: +# - [0xC48F40, .data, ast_map/ast_map] +# +# - name: ast_option +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0xCA9DE0 +# vram: 0x08000000 +# subsegments: +# - [0xCA9DE0, .data, ast_option/ast_option] +# +# - name: ast_vs_menu +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# start: 0xCBFE70 +# vram: 0x07000000 +# subsegments: +# - [0xCBFE70, .data, ast_vs_menu/ast_vs_menu] +# +# - name: ast_text +# exclusive_ram_id: segment_05 +# type: code +# dir: assets +# vram: 0x05000000 +# start: 0xCD2410 +# subsegments: +# - [0xCD2410, .data, ast_text/ast_text] +# +# - name: ast_font_3d +# exclusive_ram_id: segment_09 +# type: code +# dir: assets +# vram: 0x09000000 +# start: 0xCDDCA0 +# subsegments: +# - [0xCDDCA0, .data, ast_font_3d/ast_font_3d] +# +# - name: ast_andross +# exclusive_ram_id: segment_0C +# type: code +# dir: assets +# vram: 0x0C000000 +# start: 0xCE9E70 +# subsegments: +# - [0xCE9E70, .data, ast_andross/ast_andross] +# +# - name: ast_logo +# exclusive_ram_id: segment_0F +# type: code +# dir: assets +# start: 0xD25100 +# vram: 0x0F000000 +# subsegments: +# - [0xD25100, .data, ast_logo/ast_logo] +# +# - name: ast_ending +# exclusive_ram_id: segment_07 +# type: code +# dir: assets +# start: 0xD27600 +# vram: 0x07000000 +# subsegments: +# - [0xD27600, .data, ast_ending/ast_ending] +# +# - name: ast_ending_award_front +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0xD43400 +# vram: 0x08000000 +# subsegments: +# - [0xD43400, .data, ast_ending_award_front/ast_ending_award_front] +# +# - name: ast_ending_award_back +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0xD68480 +# vram: 0x08000000 +# subsegments: +# - [0xD68480, .data, ast_ending_award_back/ast_ending_award_back] +# +# - name: ast_ending_expert +# exclusive_ram_id: segment_08 +# type: code +# dir: assets +# start: 0xD91F10 +# vram: 0x08000000 +# subsegments: +# - [0xD91F10, .data, ast_ending_expert/ast_ending_expert] +# +# - name: ast_training +# exclusive_ram_id: segment_06 +# type: code +# dir: assets +# start: 0xDDC010 +# vram: 0x06000000 +# subsegments: +# - [0xDDC010, .data, ast_training/ast_training] +# +# - name: ast_radio +# type: code +# dir: assets +# start: 0xDE5D50 +# vram: 0x80179010 +# follows_vram: dma_table +# subsegments: +# - [0xDE5D50, .data, ast_radio/ast_radio] diff --git a/yamls/us/rev0/header.yaml b/yamls/us/rev0/header.yaml new file mode 100644 index 00000000..a616da0a --- /dev/null +++ b/yamls/us/rev0/header.yaml @@ -0,0 +1,77 @@ +name: Starfox64 US REV 0 (v1.0) +sha1: 63b69f0ef36306257481afc250f9bc304c7162b2 +options: + basename: starfox64 + target_path: baserom.us.rev0.uncompressed.z64 + elf_path: build/starfox64.us.rev0.elf + ld_script_path: linker_scripts/us/rev0/starfox64.ld + base_path: . + compiler: IDO + find_file_boundaries: True + header_encoding: ASCII + platform: n64 + undefined_funcs_auto_path: linker_scripts/us/rev0/auto/undefined_funcs_auto.ld + undefined_syms_auto_path: linker_scripts/us/rev0/auto/undefined_syms_auto.ld + + symbol_addrs_path: + - linker_scripts/us/rev0/symbol_addrs.txt + - linker_scripts/us/rev0/symbol_addrs_engine.txt + - linker_scripts/us/rev0/symbol_addrs_libultra.txt + - linker_scripts/us/rev0/symbol_addrs_nlib_funcs.txt + - linker_scripts/us/rev0/symbol_addrs_nlib_vars.txt + - linker_scripts/us/rev0/symbol_addrs_assets.txt + - linker_scripts/us/rev0/symbol_addrs_mesg.txt + - linker_scripts/us/rev0/symbol_addrs_audio.txt + - linker_scripts/us/rev0/symbol_addrs_overlays.txt + - linker_scripts/us/rev0/symbol_addrs_EBFBE0.txt + - linker_scripts/us/rev0/ignored_addresses.txt + + asm_path: asm/us/rev0 + src_path: srcusrev0 + asset_path: bin/us/rev0 + + build_path: build + + extensions_path: tools/splat_ext + mips_abi_float_regs: o32 + create_asm_dependencies: True + do_c_func_detection: True + o_as_suffix: True + gfx_ucode: f3dex + mnemonic_ljust: 12 + rom_address_padding: True + dump_symbols: True + include_macro_inc: False + libultra_symbols: True + hardware_regs: True + + ld_dependencies: True + + + use_legacy_include_asm: False + + asm_function_macro: glabel + asm_jtbl_label_macro: jlabel + asm_data_macro: dlabel + + ld_legacy_generation: True + check_consecutive_segment_types: False + + # section_order: [".text", ".data", ".rodata", ".bss", "bin"] + # auto_all_sections: [".data", ".rodata", ".bss"] + + asm_emit_size_directive: True # REC + + + mips_abi_float_regs: o32 + + + disasm_unknown: True + # string_encoding: ASCII + # data_string_encoding: ASCII + rodata_string_guesser_level: 2 + data_string_guesser_level: 2 + # libultra_symbols: True + # hardware_regs: True + # gfx_ucode: # one of [f3d, f3db, f3dex, f3dexb, f3dex2] +segments: diff --git a/yamls/us/rev0/main.yaml b/yamls/us/rev0/main.yaml new file mode 100644 index 00000000..653bb608 --- /dev/null +++ b/yamls/us/rev0/main.yaml @@ -0,0 +1,168 @@ + - name: makerom + type: code + start: 0x0 + subsegments: + - {start: 0x0, type: header, name: header} + - {start: 0x40, type: textbin, name: ipl3} + - {start: 0x1000, type: asm, vram: 0x80000400, name: entry} + + - name: main + type: code + start: 0x1050 + vram: 0x80000450 + bss_size: 0x9B1F0 + subsegments: + # Microcode + - [0x01050, textbin, rspboot] + - [0x01120, textbin, aspmain] # vram: 0x04001080 + - [0x02010, textbin, f3dex] + + # Nintendo libraries + - [0x03440, asm] + - [0x3A80, asm] + - [0x41D0, asm] + - [0x4650, asm] + - [0x5A20, asm] + - [0x7B20, asm] + - [0x7D30, asm] + - [0x7FC0, asm] + - [0x8CC0, asm] + - [0xC870, asm] + - [0xF0A0, asm] + - [0x12490, asm] + - [0x14AA0, asm] + - [0x17650, asm] + - [0x1EB50, asm] + - [0x1FA60, asm] + - [0x1FA70, asm] + - [0x1FB10, asm] + - [0x205E0, asm] + - [0x206B0, asm] + - [0x20A60, asm] + - [0x20F80, asm] + - [0x211E0, asm] + - [0x21320, asm] + - [0x21470, asm] + - [0x21520, asm] + - [0x21B40, asm] + - [0x21DD0, asm] + - [0x222C0, asm] + - [0x22340, asm] + - [0x223F0, asm] + - [0x22500, asm] + - [0x225A0, asm] + - [0x226C0, asm] + - [0x22730, asm] + - [0x228F0, asm] + - [0x22920, asm] + - [0x22990, asm] + - [0x22A00, asm] + - [0x22D90, asm] + - [0x22DA0, asm] + - [0x22EF0, asm] + - [0x233A0, asm] + - [0x23530, asm] + - [0x238A0, asm] + - [0x23930, asm] + - [0x23C60, asm] + - [0x23C70, asm] + - [0x23D50, asm] + - [0x24050, asm] + - [0x24860, asm] + - [0x24900, asm] + - [0x255C0, asm] + - [0x255F0, asm] + - [0x25600, asm] + - [0x25850, asm] + - [0x25930, asm] + - [0x25940, asm] + - [0x259F0, asm] + - [0x25A00, asm] + - [0x25AB0, asm] + - [0x25BB0, asm] + - [0x26870, asm] + - [0x27100, asm] + - [0x27370, asm] + - [0x274F0, asm] + - [0x27630, asm] + - [0x27640, asm] + - [0x27650, asm] + - [0x279E0, asm] + - [0x27A60, asm] + - [0x27AA0, asm] + - [0x27B30, asm] + - [0x27B60, asm] + - [0x27F80, asm] + - [0x27F90, asm] + - [0x282F0, asm] + - [0x283F0, asm] + - [0x287C0, asm] + - [0x28C70, asm] + - [0x28D20, asm] + - [0x28D80, asm] + - [0x28DE0, asm] + - [0x28E80, asm] + - [0x29120, asm] + - [0x29BE0, asm] + - [0x29C40, asm] + - [0x2A4C0, asm] + - [0x2A660, asm] + - [0x2A770, asm] + - [0x2A830, asm] + - [0x2A840, asm] + - [0x2A8A0, asm] + - [0x2A8F0, asm] + - [0x2A990, asm] + - [0x2A9E0, asm] + - [0x2AB70, asm] + - [0x324C0, asm] + - [0x3F650, asm] + - [0x3FA10, asm] + - [0x45250, asm] + - [0x4E2C0, asm] + - [0x55310, asm] + - [0x55E50, asm] + - [0x66F40, asm] + - [0x739D0, asm] + - [0x80B00, asm] + - [0x810C0, asm] + - [0x93B10, asm] + - [0x96110, asm] + - [0x9E040, asm] + - [0xA0430, asm] + - [0xA06E0, asm] + - [0xB5550, asm] + - [0xB6EE0, asm] + - [0xB8EE0, asm] + - [0xBEFB0, asm] + - [0xBFA60, data] + + # dma_table + - [0xD9A90, data, dma_table] + + # - [0xDA030, bin] # assets (ast_audioseq) + + + # last overlay data + # - [0xDE1360, bin, ast_radio] + + # overlay vram: 0x80187520 + + # - [0xDEF870, asm, ovl_i1] + # - [0xE039D0, asm, ovl_i2] + # - [0xE12220, asm, ovl_i3] + # - [0xE4CF40, asm, ovl_i4] + # - [0xE65DE0, asm, ovl_i5] + # - [0xE9A7A0, asm, ovl_i6] + # - [0xEBB1B0, asm, ovl_menu] + # - [0xEEB830, asm, fox_ending] + # - [0xEFB010, asm, fox_unused] + +# - name: dma_table +# type: code +# start: 0xD9A90 +# vram: 0x80178A70 +# follows_vram: main +# subsegments: +# - [0xD9A90, data, dmatable] + diff --git a/yamls/us/rev0/overlays.yaml b/yamls/us/rev0/overlays.yaml new file mode 100644 index 00000000..8e60e0ac --- /dev/null +++ b/yamls/us/rev0/overlays.yaml @@ -0,0 +1,139 @@ + - name: ovl_i1 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i1 + start: 0xDEF870 + vram: 0x80187520 + follows_vram: main + # bss_size: 0xA10 + symbol_name_format: i1_$VRAM + subsegments: + - [0xDEF870, asm, fox_i1] + - [0xDEF880, asm, fox_co] + - [0xDFA440, asm, fox_ve1] + - [0xE00BF0, asm, fox_tr] + - [0xE00F60, asm, fox_tr360] + + - name: ovl_i2 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i2 + start: 0xE039D0 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x40 + symbol_name_format: i2_$VRAM + subsegments: + - [0xE039D0, asm, fox_i2] + - [0xE039E0, asm, fox_me] + - [0xE118E0, asm, fox_sx] + + - name: ovl_i3 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i3 + start: 0xE12220 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x2220 + symbol_name_format: i3_$VRAM + subsegments: + - [0xE12220, asm, fox_i3] + - [0xE1AC50, asm, fox_a6] + - [0xE294F0, asm, fox_zo] + - [0xE33B30, asm, fox_so] + - [0xE499B0, asm, fox_aq] + + - name: ovl_i4 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i4 + start: 0xE4CF40 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x1B0 + symbol_name_format: i4_$VRAM + subsegments: + - [0xE4CF40, asm, fox_i4] + - [0xE4D010, asm, fox_fo] + - [0xE51780, asm, fox_bo] + - [0xE58200, asm, fox_ka] + - [0xE5F320, asm, fox_sz] + - [0xE64800, data] + + - name: ovl_i5 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i5 + start: 0xE65DE0 + vram: 0x80187520 + follows_vram: main + # bss_size: 0xAF80 + symbol_name_format: i5_$VRAM + subsegments: + # should be one more file split here + - [0xE65DE0, asm, fox_i5] + - [0xE65DF0, asm] + - [0xE677F0, asm] + - [0xE93290, asm] + - [0xE95B60, asm] + + - name: ovl_i6 + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_i6 + start: 0xE9A7A0 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x520 + symbol_name_format: i6_$VRAM + subsegments: + - [0xE9A7A0, asm, fox_i6] + - [0xEA9490, asm, fox_andross] + - [0xEAADB0, asm, fox_ve2] + - [0xEB87E0, asm, fox_sy] + - [0xEB99E0, asm, fox_turret] + + - name: ovl_menu + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_menu + start: 0xEBB1B0 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x17590 + symbol_name_format: menu_$VRAM + subsegments: + - [0xEBB1B0, asm, fox_i_menu] + - [0xEBB270, asm, fox_title] + - [0xEC57B0, asm, fox_option] + - [0xEE1690, asm, fox_map] + + - name: ovl_ending + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_ending + start: 0xEEB830 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x2710 + symbol_name_format: ending_$VRAM + subsegments: + - [0xEEB830, asm, fox_end1] + - [0xEF1130, asm, fox_end2] + - [0xEF6B30, data] + + - name: ovl_unused + exclusive_ram_id: overlay + type: code + dir: overlays/ovl_unused + start: 0xEFB010 + vram: 0x80187520 + follows_vram: main + # bss_size: 0x10 + symbol_name_format: unused_$VRAM + subsegments: + - [0xEFB010, asm, fox_unused] + - [0xEFB040, asm] + + - [0xEFB0B0] diff --git a/yamls/us/rev1/main.yaml b/yamls/us/rev1/main.yaml index b7895c70..bca97f06 100644 --- a/yamls/us/rev1/main.yaml +++ b/yamls/us/rev1/main.yaml @@ -14,7 +14,7 @@ subsegments: # Microcode - [0x01050, textbin, rspboot] - - [0x01120, textbin, aspmain] + - [0x01120, textbin, aspmain] # vram: 0x04001080 - [0x02010, textbin, f3dex] # Nintendo libraries