diff --git a/assets/yaml/jp/rev0/ast_aquas.yaml b/assets/yaml/jp/rev0/ast_aquas.yaml index 30c547e8..e8709e48 100644 --- a/assets/yaml/jp/rev0/ast_aquas.yaml +++ b/assets/yaml/jp/rev0/ast_aquas.yaml @@ -410,8 +410,8 @@ D_AQ_601F830: D_AQ_601FD70: { type: GFX, offset: 0x601FD70, symbol: D_AQ_601FD70 } -D_AQ_6020A40: - { type: SF64:ANIM, offset: 0x6020A40, symbol: D_AQ_6020A40 } +aAqSeaweedAnim: + { type: SF64:ANIM, offset: 0x6020A40, symbol: aAqSeaweedAnim } aAqSeaweedSkel: { type: SF64:SKELETON, offset: 0x6020C6C, symbol: aAqSeaweedSkel } diff --git a/assets/yaml/jp/rev0/ast_common.yaml b/assets/yaml/jp/rev0/ast_common.yaml index d7f7b08c..d84b5613 100644 --- a/assets/yaml/jp/rev0/ast_common.yaml +++ b/assets/yaml/jp/rev0/ast_common.yaml @@ -944,8 +944,8 @@ D_102CD50: D_102DD50: { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x102DD50, symbol: D_102DD50 } -D_102ED50: - { type: GFX, offset: 0x102ED50, symbol: D_102ED50 } +aBlueSphereDL: + { type: GFX, offset: 0x102ED50, symbol: aBlueSphereDL } D_102EDD8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102EDD8, symbol: D_102EDD8 } diff --git a/assets/yaml/jp/rev0/ast_corneria.yaml b/assets/yaml/jp/rev0/ast_corneria.yaml index 0916880d..10081e3f 100644 --- a/assets/yaml/jp/rev0/ast_corneria.yaml +++ b/assets/yaml/jp/rev0/ast_corneria.yaml @@ -369,8 +369,8 @@ D_CO_6031130: D_CO_6031280: { type: GFX, offset: 0x6031280, symbol: D_CO_6031280 } -D_CO_60329C0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: D_CO_60329C0 } +aCoGarudaTracksTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: aCoGarudaTracksTex } CoMoleMissileDL: { type: GFX, offset: 0x6032BC0, symbol: CoMoleMissileDL } diff --git a/assets/yaml/jp/rev0/ast_enmy_space.yaml b/assets/yaml/jp/rev0/ast_enmy_space.yaml index 0ba24a61..e718d610 100644 --- a/assets/yaml/jp/rev0/ast_enmy_space.yaml +++ b/assets/yaml/jp/rev0/ast_enmy_space.yaml @@ -29,17 +29,17 @@ D_ENMY_SPACE_4001108: aAttacker2DL: { type: GFX, offset: 0x4001310, symbol: aAttacker2DL } -D_ENMY_SPACE_4001A30: - { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001A30 } +aCommanderTex1: + { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex1 } -D_ENMY_SPACE_4001C30: - { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001C30 } +aCommanderTex2: + { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex2 } -D_ENMY_SPACE_4001E30: - { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001E30 } +aCommanderTex3: + { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex3 } -D_ENMY_SPACE_4002030: - { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002030 } +aCommanderTex4: + { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: aCommanderTex4 } D_ENMY_SPACE_4002230: { type: GFX, offset: 0x4002230, symbol: D_ENMY_SPACE_4002230 } @@ -50,8 +50,8 @@ D_ENMY_SPACE_4002C50: D_ENMY_SPACE_4002E50: { type: TEXTURE, format: RGBA16, offset: 0x04002E50, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002E50 } -D_ENMY_SPACE_4003050: - { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003050 } +aCommanderTex6: + { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: aCommanderTex6 } D_ENMY_SPACE_4003250: { type: TEXTURE, format: RGBA16, offset: 0x04003250, width: 4, height: 4, ctype: u16, symbol: D_ENMY_SPACE_4003250 } @@ -59,8 +59,8 @@ D_ENMY_SPACE_4003250: D_ENMY_SPACE_4003270: { type: TEXTURE, format: RGBA16, offset: 0x04003270, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003270 } -D_ENMY_SPACE_4003470: - { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003470 } +aCommanderTex5: + { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: aCommanderTex5 } D_ENMY_SPACE_4003670: { type: TEXTURE, format: RGBA16, offset: 0x04003670, width: 8, height: 8, ctype: u16, symbol: D_ENMY_SPACE_4003670 } diff --git a/assets/yaml/jp/rev0/ast_katina.yaml b/assets/yaml/jp/rev0/ast_katina.yaml index 485e8816..404f5fd0 100644 --- a/assets/yaml/jp/rev0/ast_katina.yaml +++ b/assets/yaml/jp/rev0/ast_katina.yaml @@ -23,8 +23,8 @@ D_KA_6001260: aKaDestroyedHatchDL: { type: GFX, offset: 0x60012A0, symbol: aKaDestroyedHatchDL } -aKaEnemy1DL: - { type: GFX, offset: 0x6001530, symbol: aKaEnemy1DL } +aKaEnemyDL: + { type: GFX, offset: 0x6001530, symbol: aKaEnemyDL } D_KA_6001968: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6001968, ctype: u16, symbol: D_KA_6001968 } @@ -136,8 +136,8 @@ D_KA_600EBE8: D_KA_600EDE8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600EDE8, ctype: u16, symbol: D_KA_600EDE8 } -aKaEnemy1LowPolyDL: - { type: GFX, offset: 0x600EFF0, symbol: aKaEnemy1LowPolyDL } +aKaEnemyLowPolyDL: + { type: GFX, offset: 0x600EFF0, symbol: aKaEnemyLowPolyDL } D_KA_600F1D0: { type: GFX, offset: 0x600F1D0, symbol: D_KA_600F1D0 } diff --git a/assets/yaml/jp/rev0/ast_meteo.yaml b/assets/yaml/jp/rev0/ast_meteo.yaml index c214e7f7..3a6dd382 100644 --- a/assets/yaml/jp/rev0/ast_meteo.yaml +++ b/assets/yaml/jp/rev0/ast_meteo.yaml @@ -23,8 +23,8 @@ D_ME_6000A80: D_ME_6000B10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06000B10, symbol: D_ME_6000B10 } -D_ME_6001310: - { type: GFX, offset: 0x6001310, symbol: D_ME_6001310 } +aMeCrusherDL: + { type: GFX, offset: 0x6001310, symbol: aMeCrusherDL } D_ME_6004738: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004738, symbol: D_ME_6004738 } @@ -207,14 +207,14 @@ D_ME_601FF80: D_ME_6020008: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06020008, symbol: D_ME_6020008 } -D_ME_6020810: - { type: GFX, offset: 0x06020810, symbol: D_ME_6020810 } +aMeCorneriaBgDL: + { type: GFX, offset: 0x06020810, symbol: aMeCorneriaBgDL } -D_ME_6020920: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: D_ME_6020920 } +aMeCorneriaBg1Tex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: aMeCorneriaBg1Tex } -D_ME_6021920: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: D_ME_6021920 } +aMeCorneriaBg2Tex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: aMeCorneriaBg2Tex } aMeLaserCannon1DL: { type: GFX, offset: 0x06022920, symbol: aMeLaserCannon1DL } diff --git a/assets/yaml/jp/rev0/ast_sector_z.yaml b/assets/yaml/jp/rev0/ast_sector_z.yaml index bac95644..3cb0f2db 100644 --- a/assets/yaml/jp/rev0/ast_sector_z.yaml +++ b/assets/yaml/jp/rev0/ast_sector_z.yaml @@ -103,20 +103,20 @@ aSzSpaceJunk4DL: D_SZ_60047E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } -D_SZ_6004FE0: - { type: GFX, offset: 0x6004FE0, symbol: D_SZ_6004FE0 } +aSzInvaderIIIDL: + { type: GFX, offset: 0x6004FE0, symbol: aSzInvaderIIIDL } -D_SZ_60054E0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: D_SZ_60054E0, tlut: 0x060058E0 } +aSzInvaderIIITex2: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: aSzInvaderIIITex2, tlut: 0x060058E0 } -D_SZ_60058E0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: D_SZ_60058E0 } +aSzInvaderIIITex2TLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: aSzInvaderIIITex2TLUT } -D_SZ_6005AC0: - { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: D_SZ_6005AC0, tlut: 0x06005BC0 } +aSzInvaderIIITex1: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: aSzInvaderIIITex1, tlut: 0x06005BC0 } -D_SZ_6005BC0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: D_SZ_6005BC0 } +aSzInvaderIIITex1TLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: aSzInvaderIIITex1TLUT } D_SZ_6005BF0: { type: GFX, offset: 0x6005BF0, symbol: D_SZ_6005BF0 } diff --git a/assets/yaml/jp/rev0/ast_zoness.yaml b/assets/yaml/jp/rev0/ast_zoness.yaml index 2a2091eb..917fab23 100644 --- a/assets/yaml/jp/rev0/ast_zoness.yaml +++ b/assets/yaml/jp/rev0/ast_zoness.yaml @@ -48,8 +48,8 @@ D_ZO_6002810: D_ZO_6002A10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x6002A10, symbol: D_ZO_6002A10} -D_ZO_6002E10: - { type: GFX, offset: 0x6002E10, symbol: D_ZO_6002E10} +aZoRadarBuoyDL: + { type: GFX, offset: 0x6002E10, symbol: aZoRadarBuoyDL} D_ZO_6003288: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6003288, symbol: D_ZO_6003288} @@ -363,8 +363,8 @@ D_ZO_601F940: D_ZO_601FBC4: { type: SF64:ANIM, offset: 0x601FBC4, symbol: D_ZO_601FBC4} -D_ZO_601FC90: - { type: SF64:SKELETON, offset: 0x601FC90, symbol: D_ZO_601FC90} +aZoBarrierSkel: + { type: SF64:SKELETON, offset: 0x601FC90, symbol: aZoBarrierSkel} aZoIslandDL: { type: GFX, offset: 0x601FCB0, symbol: aZoIslandDL} @@ -529,8 +529,8 @@ aZoObnemaHitbox: aZoBarrierHitbox: { type: SF64:HITBOX, offset: 0x602BFC4, symbol: aZoBarrierHitbox} -D_ZO_602C028: - { type: SF64:HITBOX, offset: 0x602C028, symbol: D_ZO_602C028} +aZoBarrierHitbox2: + { type: SF64:HITBOX, offset: 0x602C028, symbol: aZoBarrierHitbox2} aZoSarumarineHitbox: { type: SF64:HITBOX, offset: 0x602C044, symbol: aZoSarumarineHitbox} @@ -538,8 +538,8 @@ aZoSarumarineHitbox: aZoSarumarinePeriscopeHitbox: { type: SF64:HITBOX, offset: 0x602C1A0, symbol: aZoSarumarinePeriscopeHitbox} -aZoCargoShipHitbox: - { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoCargoShipHitbox} +aZoTankerHitbox: + { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoTankerHitbox} aZoContainerHitbox: { type: SF64:HITBOX, offset: 0x602C218, symbol: aZoContainerHitbox} diff --git a/assets/yaml/us/rev1/ast_aquas.yaml b/assets/yaml/us/rev1/ast_aquas.yaml index 1bcc5582..cc828208 100644 --- a/assets/yaml/us/rev1/ast_aquas.yaml +++ b/assets/yaml/us/rev1/ast_aquas.yaml @@ -410,8 +410,8 @@ D_AQ_601F830: D_AQ_601FD70: { type: GFX, offset: 0x601FD70, symbol: D_AQ_601FD70 } -D_AQ_6020A40: - { type: SF64:ANIM, offset: 0x6020A40, symbol: D_AQ_6020A40 } +aAqSeaweedAnim: + { type: SF64:ANIM, offset: 0x6020A40, symbol: aAqSeaweedAnim } aAqSeaweedSkel: { type: SF64:SKELETON, offset: 0x6020C6C, symbol: aAqSeaweedSkel } diff --git a/assets/yaml/us/rev1/ast_common.yaml b/assets/yaml/us/rev1/ast_common.yaml index 4ae37bd0..5fa0ca74 100644 --- a/assets/yaml/us/rev1/ast_common.yaml +++ b/assets/yaml/us/rev1/ast_common.yaml @@ -944,8 +944,8 @@ D_102CD50: D_102DD50: { type: TEXTURE, format: RGBA16, width: 32, height: 64, ctype: u16, offset: 0x102DD50, symbol: D_102DD50 } -D_102ED50: - { type: GFX, offset: 0x102ED50, symbol: D_102ED50 } +aBlueSphereDL: + { type: GFX, offset: 0x102ED50, symbol: aBlueSphereDL } D_102EDD8: { type: TEXTURE, format: RGBA16, width: 32, height: 32, ctype: u16, offset: 0x102EDD8, symbol: D_102EDD8 } diff --git a/assets/yaml/us/rev1/ast_corneria.yaml b/assets/yaml/us/rev1/ast_corneria.yaml index b7448683..7eadcb7b 100644 --- a/assets/yaml/us/rev1/ast_corneria.yaml +++ b/assets/yaml/us/rev1/ast_corneria.yaml @@ -369,8 +369,8 @@ D_CO_6031130: D_CO_6031280: { type: GFX, offset: 0x6031280, symbol: D_CO_6031280 } -D_CO_60329C0: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: D_CO_60329C0 } +aCoGarudaTracksTex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x060329C0, symbol: aCoGarudaTracksTex } CoMoleMissileDL: { type: GFX, offset: 0x6032BC0, symbol: CoMoleMissileDL } diff --git a/assets/yaml/us/rev1/ast_enmy_space.yaml b/assets/yaml/us/rev1/ast_enmy_space.yaml index 959efde9..3cc28023 100644 --- a/assets/yaml/us/rev1/ast_enmy_space.yaml +++ b/assets/yaml/us/rev1/ast_enmy_space.yaml @@ -29,17 +29,17 @@ D_ENMY_SPACE_4001108: aAttacker2DL: { type: GFX, offset: 0x4001310, symbol: aAttacker2DL } -D_ENMY_SPACE_4001A30: - { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001A30 } +aCommanderTex1: + { type: TEXTURE, format: RGBA16, offset: 0x4001A30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex1 } -D_ENMY_SPACE_4001C30: - { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001C30 } +aCommanderTex2: + { type: TEXTURE, format: RGBA16, offset: 0x04001C30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex2 } -D_ENMY_SPACE_4001E30: - { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4001E30 } +aCommanderTex3: + { type: TEXTURE, format: RGBA16, offset: 0x04001E30, width: 16, height: 16, ctype: u16, symbol: aCommanderTex3 } -D_ENMY_SPACE_4002030: - { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002030 } +aCommanderTex4: + { type: TEXTURE, format: RGBA16, offset: 0x04002030, width: 16, height: 16, ctype: u16, symbol: aCommanderTex4 } D_ENMY_SPACE_4002230: { type: GFX, offset: 0x4002230, symbol: D_ENMY_SPACE_4002230 } @@ -50,8 +50,8 @@ D_ENMY_SPACE_4002C50: D_ENMY_SPACE_4002E50: { type: TEXTURE, format: RGBA16, offset: 0x04002E50, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4002E50 } -D_ENMY_SPACE_4003050: - { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003050 } +aCommanderTex6: + { type: TEXTURE, format: RGBA16, offset: 0x04003050, width: 16, height: 16, ctype: u16, symbol: aCommanderTex6 } D_ENMY_SPACE_4003250: { type: TEXTURE, format: RGBA16, offset: 0x04003250, width: 4, height: 4, ctype: u16, symbol: D_ENMY_SPACE_4003250 } @@ -59,8 +59,8 @@ D_ENMY_SPACE_4003250: D_ENMY_SPACE_4003270: { type: TEXTURE, format: RGBA16, offset: 0x04003270, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003270 } -D_ENMY_SPACE_4003470: - { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: D_ENMY_SPACE_4003470 } +aCommanderTex5: + { type: TEXTURE, format: RGBA16, offset: 0x04003470, width: 16, height: 16, ctype: u16, symbol: aCommanderTex5 } D_ENMY_SPACE_4003670: { type: TEXTURE, format: RGBA16, offset: 0x04003670, width: 8, height: 8, ctype: u16, symbol: D_ENMY_SPACE_4003670 } diff --git a/assets/yaml/us/rev1/ast_katina.yaml b/assets/yaml/us/rev1/ast_katina.yaml index 9aee758d..19941a9b 100644 --- a/assets/yaml/us/rev1/ast_katina.yaml +++ b/assets/yaml/us/rev1/ast_katina.yaml @@ -23,8 +23,8 @@ D_KA_6001260: aKaDestroyedHatchDL: { type: GFX, offset: 0x60012A0, symbol: aKaDestroyedHatchDL } -aKaEnemy1DL: - { type: GFX, offset: 0x6001530, symbol: aKaEnemy1DL } +aKaEnemyDL: + { type: GFX, offset: 0x6001530, symbol: aKaEnemyDL } D_KA_6001968: { type: TEXTURE, format: RGBA16, width: 32, height: 32, offset: 0x6001968, ctype: u16, symbol: D_KA_6001968 } @@ -136,8 +136,8 @@ D_KA_600EBE8: D_KA_600EDE8: { type: TEXTURE, format: RGBA16, width: 16, height: 16, offset: 0x600EDE8, ctype: u16, symbol: D_KA_600EDE8 } -aKaEnemy1LowPolyDL: - { type: GFX, offset: 0x600EFF0, symbol: aKaEnemy1LowPolyDL } +aKaEnemyLowPolyDL: + { type: GFX, offset: 0x600EFF0, symbol: aKaEnemyLowPolyDL } D_KA_600F1D0: { type: GFX, offset: 0x600F1D0, symbol: D_KA_600F1D0 } diff --git a/assets/yaml/us/rev1/ast_meteo.yaml b/assets/yaml/us/rev1/ast_meteo.yaml index 89e45169..f7bc3a50 100644 --- a/assets/yaml/us/rev1/ast_meteo.yaml +++ b/assets/yaml/us/rev1/ast_meteo.yaml @@ -23,8 +23,8 @@ D_ME_6000A80: D_ME_6000B10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06000B10, symbol: D_ME_6000B10 } -D_ME_6001310: - { type: GFX, offset: 0x6001310, symbol: D_ME_6001310 } +aMeCrusherDL: + { type: GFX, offset: 0x6001310, symbol: aMeCrusherDL } D_ME_6004738: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06004738, symbol: D_ME_6004738 } @@ -207,14 +207,14 @@ D_ME_601FF80: D_ME_6020008: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x06020008, symbol: D_ME_6020008 } -D_ME_6020810: - { type: GFX, offset: 0x06020810, symbol: D_ME_6020810 } +aMeCorneriaBgDL: + { type: GFX, offset: 0x06020810, symbol: aMeCorneriaBgDL } -D_ME_6020920: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: D_ME_6020920 } +aMeCorneriaBg1Tex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06020920, symbol: aMeCorneriaBg1Tex } -D_ME_6021920: - { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: D_ME_6021920 } +aMeCorneriaBg2Tex: + { type: TEXTURE, ctype: u16, format: RGBA16, width: 64, height: 32, offset: 0x06021920, symbol: aMeCorneriaBg2Tex } aMeLaserCannon1DL: { type: GFX, offset: 0x06022920, symbol: aMeLaserCannon1DL } diff --git a/assets/yaml/us/rev1/ast_sector_z.yaml b/assets/yaml/us/rev1/ast_sector_z.yaml index 0038ef9e..621ffc6d 100644 --- a/assets/yaml/us/rev1/ast_sector_z.yaml +++ b/assets/yaml/us/rev1/ast_sector_z.yaml @@ -103,20 +103,20 @@ aSzSpaceJunk4DL: D_SZ_60047E0: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 32, offset: 0x60047E0, symbol: D_SZ_60047E0 } -D_SZ_6004FE0: - { type: GFX, offset: 0x6004FE0, symbol: D_SZ_6004FE0 } +aSzInvaderIIIDL: + { type: GFX, offset: 0x6004FE0, symbol: aSzInvaderIIIDL } -D_SZ_60054E0: - { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: D_SZ_60054E0, tlut: 0x060058E0 } +aSzInvaderIIITex2: + { type: TEXTURE, ctype: u8, format: CI8, width: 32, height: 32, offset: 0x060054E0, symbol: aSzInvaderIIITex2, tlut: 0x060058E0 } -D_SZ_60058E0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: D_SZ_60058E0 } +aSzInvaderIIITex2TLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 240, offset: 0x060058E0, symbol: aSzInvaderIIITex2TLUT } -D_SZ_6005AC0: - { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: D_SZ_6005AC0, tlut: 0x06005BC0 } +aSzInvaderIIITex1: + { type: TEXTURE, ctype: u8, format: CI8, width: 16, height: 16, offset: 0x06005AC0, symbol: aSzInvaderIIITex1, tlut: 0x06005BC0 } -D_SZ_6005BC0: - { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: D_SZ_6005BC0 } +aSzInvaderIIITex1TLUT: + { type: TEXTURE, ctype: u16, format: TLUT, colors: 24, offset: 0x06005BC0, symbol: aSzInvaderIIITex1TLUT } D_SZ_6005BF0: { type: GFX, offset: 0x6005BF0, symbol: D_SZ_6005BF0 } diff --git a/assets/yaml/us/rev1/ast_zoness.yaml b/assets/yaml/us/rev1/ast_zoness.yaml index efe86f24..b71cba7f 100644 --- a/assets/yaml/us/rev1/ast_zoness.yaml +++ b/assets/yaml/us/rev1/ast_zoness.yaml @@ -48,8 +48,8 @@ D_ZO_6002810: D_ZO_6002A10: { type: TEXTURE, ctype: u16, format: RGBA16, width: 32, height: 16, offset: 0x6002A10, symbol: D_ZO_6002A10} -D_ZO_6002E10: - { type: GFX, offset: 0x6002E10, symbol: D_ZO_6002E10} +aZoRadarBuoyDL: + { type: GFX, offset: 0x6002E10, symbol: aZoRadarBuoyDL} D_ZO_6003288: { type: TEXTURE, ctype: u16, format: RGBA16, width: 16, height: 16, offset: 0x6003288, symbol: D_ZO_6003288} @@ -363,8 +363,8 @@ D_ZO_601F940: D_ZO_601FBC4: { type: SF64:ANIM, offset: 0x601FBC4, symbol: D_ZO_601FBC4} -D_ZO_601FC90: - { type: SF64:SKELETON, offset: 0x601FC90, symbol: D_ZO_601FC90} +aZoBarrierSkel: + { type: SF64:SKELETON, offset: 0x601FC90, symbol: aZoBarrierSkel} aZoIslandDL: { type: GFX, offset: 0x601FCB0, symbol: aZoIslandDL} @@ -529,8 +529,8 @@ aZoObnemaHitbox: aZoBarrierHitbox: { type: SF64:HITBOX, offset: 0x602BFC4, symbol: aZoBarrierHitbox} -D_ZO_602C028: - { type: SF64:HITBOX, offset: 0x602C028, symbol: D_ZO_602C028} +aZoBarrierHitbox2: + { type: SF64:HITBOX, offset: 0x602C028, symbol: aZoBarrierHitbox2} aZoSarumarineHitbox: { type: SF64:HITBOX, offset: 0x602C044, symbol: aZoSarumarineHitbox} @@ -538,8 +538,8 @@ aZoSarumarineHitbox: aZoSarumarinePeriscopeHitbox: { type: SF64:HITBOX, offset: 0x602C1A0, symbol: aZoSarumarinePeriscopeHitbox} -aZoCargoShipHitbox: - { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoCargoShipHitbox} +aZoTankerHitbox: + { type: SF64:HITBOX, offset: 0x602C1D4, symbol: aZoTankerHitbox} aZoContainerHitbox: { type: SF64:HITBOX, offset: 0x602C218, symbol: aZoContainerHitbox} diff --git a/include/i3.h b/include/i3.h index 73036185..433b533d 100644 --- a/include/i3.h +++ b/include/i3.h @@ -54,9 +54,9 @@ void Zoness_ZoCraneMagnet_Update(Actor* this); void Zoness_ZoCraneMagnet_Draw(Actor* this); void Zoness_ZoSpikeBall_Update(Actor* this); void Zoness_ZoSpikeBall_Draw(Actor* this); -void Zoness_ZoCargoShip_Init(Actor* actor); -void Zoness_ZoCargoShip_Update(Actor* this); -void Zoness_ZoCargoShip_Draw(Actor* actor); +void Zoness_ZoTanker_Init(Actor* actor); +void Zoness_ZoTanker_Update(Actor* this); +void Zoness_ZoTanker_Draw(Actor* actor); void Zoness_ZoContainer_Init(Actor* this); void Zoness_ZoContainer_Update(Actor* this); void Zoness_ZoContainer_Draw(Actor* this); @@ -127,12 +127,12 @@ void Aquas_AqSquid_Update(Actor*); void Aquas_AqSquid_Draw(Actor*); void Aquas_AqSeaweed_Update(Actor*); void Aquas_AqSeaweed_Draw(Actor*); -void Venom1_AqBoulder_Init(Actor *); +void Aquas_AqBoulder_Init(Actor *); void Aquas_AqBoulder_Update(Actor*); void Aquas_AqBoulder_Draw(Actor*); void Aquas_AqCoral_Update(Actor*); void Aquas_AqCoral_Draw(Actor*); -void Venom1_AqJellyfish_Init(Actor *); +void Aquas_AqJellyfish_Init(Actor *); void Aquas_AqJellyfish_Update(Actor*); void Aquas_AqJellyfish_Draw(Actor*); void Aquas_AqStoneColumn_Update(Actor*); diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index c0d50d89..2d25120c 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -1,7 +1,7 @@ #ifndef PREVENT_CONTEXT_REORDERING_H #define PREVENT_CONTEXT_REORDERING_H -extern int Dummyhalf; +// extern int Dummyhalf; // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; @@ -16,7 +16,7 @@ extern int Dummyhalf; // struct Dummy11 {int x;}; // struct Dummy12 {int x;}; // struct Dummy13 {int x;}; -struct Dummy14 {int x;}; +// struct Dummy14 {int x;}; struct Dummy15 {int x;}; struct Dummy16 {int x;}; struct Dummy17 {int x;}; diff --git a/include/sf64object.h b/include/sf64object.h index c31f3cc1..3fe085f3 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -462,7 +462,7 @@ typedef enum ObjectId { /* 153 */ OBJ_SCENERY_BO_BUILDING, /* 154 */ OBJ_SCENERY_KA_FLBASE, /* 155 */ OBJ_SCENERY_UNK_155, - /* 156 */ OBJ_SCENERY_UNK_156, + /* 156 */ OBJ_SCENERY_SY_SHOGUN_SHIP, /* 157 */ OBJ_SCENERY_SZ_SPACE_JUNK_3, /* 158 */ OBJ_SCENERY_SZ_SPACE_JUNK_1, /* 159 */ OBJ_SCENERY_VE2_TOWER, @@ -556,7 +556,7 @@ typedef enum ObjectId { /* 247 */ OBJ_ACTOR_ZO_BARRIER, // Barrier with opening rudders on the sides. /* 248 */ OBJ_ACTOR_ZO_CRANE_MAGNET, /* 249 */ OBJ_ACTOR_SPIKEBALL, // Spikeball shot by Zoness boss. - /* 250 */ OBJ_ACTOR_ZO_CARGOSHIP, + /* 250 */ OBJ_ACTOR_ZO_TANKER, // Cargo ship, usually carries contaners. /* 251 */ OBJ_ACTOR_ZO_CONTAINER, /* 252 */ OBJ_ACTOR_ZO_RADARBUOY, // Zoness searchlight. /* 253 */ OBJ_ACTOR_ZO_SUPPLYCRANE, @@ -779,6 +779,37 @@ typedef enum AllRangeAi { /* 200 */ AI360_EVENT_HANDLER = 1000, } AllRangeAi; +typedef enum ActorCutsceneModels { + /* 0 */ ACTOR_CS_TEAM_ARWING, + /* 1 */ ACTOR_CS_GREAT_FOX, + /* 10 */ ACTOR_CS_ME_CORNERIA_BG = 10, // Planet Corneria in the background of level start CS. + /* 11 */ ACTOR_CS_FO_EXPLOSION, // Fortuna explosion in a mission complete ending. + /* 20 */ ACTOR_CS_COMMANDER = 20, + /* 24 */ ACTOR_CS_KATT = 24, + /* 25 */ ACTOR_CS_SZ_SPACE_JUNK, + /* 26 */ ACTOR_CS_SZ_INVADER, + /* 28 */ ACTOR_CS_COMMANDER_GLOW = 28, // Commander with Engine Glow. + /* 30 */ ACTOR_CS_30 = 30, // Related to LEVEL_BOLSE + /* 31 */ ACTOR_CS_31, + /* 32 */ ACTOR_CS_32, + /* 33 */ ACTOR_CS_CORNERIAN_FIGHTER, // Bill's ship when actor->index is 3. + /* 34 */ ACTOR_CS_KA_ENEMY, + /* 35 */ ACTOR_CS_SY_SHIP_1_SHRINK, // Scale Matrix by 1/8. + /* 36 */ ACTOR_CS_SY_SHIP_2, + /* 37 */ ACTOR_CS_37, + /* 38 */ ACTOR_CS_38, // Related to Sector Y + /* 39 */ ACTOR_CS_SY_SHIP_1 = 39, + /* 40 */ ACTOR_CS_40, + /* 41 */ ACTOR_CS_AQ_FISHGROUP, + /* 42 */ ACTOR_CS_42, // Related to Sector Y + /* 43 */ ACTOR_CS_43, // Related to Sector Y + /* 44 */ ACTOR_CS_AQ_SEAWEED, + /* 45 */ ACTOR_CS_AQ_BUMP_2, + /* 46 */ ACTOR_CS_AQ_CORAL_REEF_2, + /* 47 */ ACTOR_CS_AQ_ROCK, + /* 1000 */ ACTOR_CS_1000 = 1000 // James? Is that you? +} ActorCutsceneModels; + Actor* Game_SpawnActor(ObjectId); // template enums for boss work buffers @@ -1185,7 +1216,7 @@ typedef Actor ZoMine; typedef Actor ZoBarrier; typedef Actor ZoCraneMagnet; typedef Actor ZoSpikeBall; -typedef Actor ZoCargoShip; +typedef Actor ZoTanker; typedef Actor ZoContainer; typedef Actor ZoRadarBuoy; typedef Actor ZoSupplyCrane; diff --git a/include/variables.h b/include/variables.h index dff14fc4..ea946e71 100644 --- a/include/variables.h +++ b/include/variables.h @@ -193,7 +193,7 @@ extern s32 sUnlockOnFoot; // sUnlockOnFoot extern s32 gVsCountdown[]; // gfx_data -extern u16 D_Tex_800DACB8[][32]; +extern u16 D_Tex_800DACB8[]; extern u16 D_Tex_800D99F8[]; extern u16 gTextCharPalettes[]; extern Gfx gRcpInitDL[]; diff --git a/linker_scripts/us/rev1/symbol_addrs_overlays.txt b/linker_scripts/us/rev1/symbol_addrs_overlays.txt index 3e8124c4..ec00441f 100644 --- a/linker_scripts/us/rev1/symbol_addrs_overlays.txt +++ b/linker_scripts/us/rev1/symbol_addrs_overlays.txt @@ -85,7 +85,7 @@ Zoness_801991D0 = 0x801991D0;//segment:ovl_i3 Zoness_80199394 = 0x80199394;//segment:ovl_i3 Zoness_80199470 = 0x80199470;//segment:ovl_i3 Zoness_8019962C = 0x8019962C;//segment:ovl_i3 -Zoness_ZoCargoShip_Init = 0x8019B1F0;//segment:ovl_i3 +Zoness_ZoTanker_Init = 0x8019B1F0;//segment:ovl_i3 Zoness_ZoContainer_Init = 0x8019B810;//segment:ovl_i3 Zoness_ZoSupplyCrane_Init = 0x8019C200;//segment:ovl_i3 Zoness_ZoBarrier_Init = 0x8019D060;//segment:ovl_i3 @@ -108,8 +108,8 @@ Aquas_AqAnglerFish_Update = 0x801B638C;//segment:ovl_i3 Aquas_AqSpindlyFish_Init = 0x801B6E54;//segment:ovl_i3 Aquas_AqSpindlyFish_Update = 0x801B6FF8;//segment:ovl_i3 Aquas_AqGaroa_Init = 0x801B7AF0;//segment:ovl_i3 -Venom1_AqBoulder_Init = 0x801BA57C;//segment:ovl_i3 -Venom1_AqJellyfish_Init = 0x801BB26C;//segment:ovl_i3 +Aquas_AqBoulder_Init = 0x801BA57C;//segment:ovl_i3 +Aquas_AqJellyfish_Init = 0x801BB26C;//segment:ovl_i3 D_i3_801C2240 = 0x801C2240;//segment:ovl_i3 D_AQ_801C4188 = 0x801C4188;//segment:ovl_i3 D_i3_801C2250 = 0x801C2250;//size:0xA0 segment:ovl_i3 diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index a283479b..8f86dd96 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -2313,12 +2313,12 @@ void ActorAllRange_Update(ActorAllRange* this) { void ActorAllRange_DrawShield(ActorAllRange* this) { f32 sp24; - s32 sp20; + s32 alpha; if (this->fwork[22] > 0) { Matrix_Push(&gGfxMatrix); sp24 = 3.5f; - sp20 = (s32) (this->fwork[22] * 60.0f); + alpha = (s32) (this->fwork[22] * 60.0f); if (gCurrentLevel == LEVEL_VENOM_2) { sp24 *= 1.5f; } @@ -2328,11 +2328,11 @@ void ActorAllRange_DrawShield(ActorAllRange* this) { Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, SETUPDL_41); if (gCurrentLevel == LEVEL_KATINA) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 255, 255, sp20); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 255, 255, alpha); } else if (gCurrentLevel == LEVEL_BOLSE) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, sp20); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 128, 128, alpha); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 48, 255, 255, sp20); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 48, 255, 255, alpha); } gSPDisplayList(gMasterDisp++, D_1031630); Matrix_Pop(&gGfxMatrix); @@ -2367,7 +2367,7 @@ void ActorAllRange_DrawBarrelRoll(ActorAllRange* this) { } bool ActorAllRange_MissileOverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = thisx; + ActorAllRange* this = (ActorAllRange*) thisx; if ((this->timer_0C6 % 2) != 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_34); @@ -2482,7 +2482,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { } else if (gCurrentLevel == LEVEL_KATINA) { switch (this->animFrame) { case 0: - gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL); + gSPDisplayList(gMasterDisp++, aKaEnemyLowPolyDL); break; case 1: gSPDisplayList(gMasterDisp++, aKaCornerianFighterDL); @@ -2490,13 +2490,13 @@ void ActorAllRange_Draw(ActorAllRange* this) { Actor_DrawEngineGlow(this, EG_RED); break; case 3: - gSPDisplayList(gMasterDisp++, aKaEnemy1DL); + gSPDisplayList(gMasterDisp++, aKaEnemyDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, 30.0f, MTXF_APPLY); ActorAllRange_DrawShield(this); break; } } else if (gCurrentLevel == LEVEL_SECTOR_Z) { - gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); + gSPDisplayList(gMasterDisp++, aSzInvaderIIIDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); Actor_DrawEngineGlow(this, EG_GREEN); } else if (gCurrentLevel == LEVEL_BOLSE) { diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index ffe9c215..5d79a369 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -764,7 +764,7 @@ void PlayerShot_CollisionCheck(PlayerShot* shot) { } } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status >= OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { switch (actor->obj.id) { case OBJ_ACTOR_ME_MOLAR_ROCK: @@ -1716,7 +1716,7 @@ bool PlayerShot_FindLockTarget(PlayerShot* shot) { } else { lockRange = 200.0f; } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && ((actor->lockOnTimers[shot->sourceId] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= lockRange) && (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.targetOffset)) <= lockRange) && @@ -1898,7 +1898,7 @@ void PlayerShot_ApplyExplosionDamage(PlayerShot* shot, s32 damage) { } } } - actor = gActors; + actor = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0) && !((gCurrentLevel == LEVEL_MACBETH) && (OBJ_ACTOR_MA_LOCOMOTIVE <= actor->obj.id) && @@ -2112,7 +2112,7 @@ void PlayerShot_UpdateLockOnShot(PlayerShot* shot) { } else { var_a3 = 0; if (shot->unk_60 == 0) { - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.targetOffset != 0.0f) && (actor->lockOnTimers[shot->sourceId] != 0)) { var_a3 = 1; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 224c0e8e..5e40b643 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -96,7 +96,7 @@ void func_demo_80048CC4(ActorCutscene* this, s32 index) { if (index == 3) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; } else { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); @@ -330,7 +330,7 @@ f32 D_demo_800C9FF0[] = { -100.0f, 0.0f, 100.0f, 500.0f }; f32 D_demo_800CA000[] = { -150.0f, 150.0f, 0.0f, 0.0f }; f32 D_demo_800CA010[] = { 0.0f, 0.0f, 80.0f, 1000.0f }; f32 D_demo_800CA020[] = { 45.0f, -45.0f, 10.0f, 0.0f }; -s32 D_demo_800CA030[] = { 0, 0, 0, 1 }; +s32 D_demo_800CA030[] = { ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, ACTOR_CS_GREAT_FOX }; s32 D_demo_800CA040[] = { 0, 0, 0, 0 }; void func_demo_80049968(ActorCutscene* this, s32 index) { @@ -2125,7 +2125,7 @@ void func_demo_8004F05C(ActorCutscene* this) { switch (gCurrentLevel) { case LEVEL_BOLSE: switch (this->animFrame) { - case 0: + case ACTOR_CS_TEAM_ARWING: if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { this->rot_0F4.z += this->rot_0F4.y; this->vel.x = SIN_DEG(this->rot_0F4.z) * 10.0f; @@ -2155,20 +2155,20 @@ void func_demo_8004F05C(ActorCutscene* this) { } break; - case 31: + case ACTOR_CS_31: if (this->timer_0BC == 0) { Object_Kill(&this->obj, this->sfxSource); } break; - case 32: + case ACTOR_CS_32: this->obj.rot.z += this->rot_0F4.z; if (this->timer_0BC == 0) { Object_Kill(&this->obj, this->sfxSource); } break; - case 30: + case ACTOR_CS_30: break; } break; @@ -2179,11 +2179,11 @@ void func_demo_8004F05C(ActorCutscene* this) { case LEVEL_SECTOR_Y: switch (this->animFrame) { - case 0: + case ACTOR_CS_TEAM_ARWING: SectorY_8019FF00(this); break; - case 42: + case ACTOR_CS_42: if (this->timer_0BC == 0) { if (this->obj.pos.x >= -3500.0f) { if (this->obj.pos.z <= 3000.0f) { @@ -2196,7 +2196,7 @@ void func_demo_8004F05C(ActorCutscene* this) { } break; - case 43: + case ACTOR_CS_43: if (this->timer_0BC == 0) { Object_Kill(&this->obj, this->sfxSource); } @@ -2451,7 +2451,7 @@ Vec3f D_demo_800CA0EC[] = { { 295.0, -92.0, -1301.0 }, { -295.0, -92.0, -1301.0 }, }; -Vec3f D_demo_800CA110[8] = { +Vec3f sCsSyShipPos[8] = { { 170.0f, -35.0f, -380.0f }, { -170.0f, -40.0f, -380.0f }, { 170.0f, -130.0f, -380.0f }, { -170.0f, -140.0f, -380.0f }, { 140.0f, 40.0f, -250.0f }, { -150.0f, 40.0f, -250.0f }, { 140.0f, 0.0f, -250.0f }, { -150.0f, 0.0f, -250.0f }, @@ -2473,7 +2473,7 @@ Animation* D_demo_800CA1F4[] = { &D_SY_60265B4, &D_SY_602B8DC, &D_SY_60034C4, &D_SY_602A2CC, &D_SY_602CEB4, &D_SY_602B778, &D_SY_601F3B8, }; -void func_demo_8004FCB8(ActorCutscene* this, s32 arg1) { +void ActorCutscene_SyShip_Setup(ActorCutscene* this, s32 idx) { f32 angle; f32 scale; s32 i; @@ -2491,11 +2491,11 @@ void func_demo_8004FCB8(ActorCutscene* this, s32 arg1) { gDPSetEnvColor(gMasterDisp++, 16, 16, 240, 255); angle = Math_Atan2F(gPlayer[0].cam.eye.x - gPlayer[0].cam.at.x, gPlayer[0].cam.eye.z - gPlayer[0].cam.at.z); - for (i = arg1; i < (arg1 + 4); i++) { + for (i = idx; i < (idx + 4); i++) { Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_demo_800CA110[i].x + this->obj.pos.x, D_demo_800CA110[i].y + this->obj.pos.y, - D_demo_800CA110[i].z + this->obj.pos.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sCsSyShipPos[i].x + this->obj.pos.x, sCsSyShipPos[i].y + this->obj.pos.y, + sCsSyShipPos[i].z + this->obj.pos.z, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, angle, MTXF_APPLY); Matrix_Scale(gGfxMatrix, scale, scale, scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -2525,7 +2525,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { f32 x; switch (this->animFrame) { - case 1000: + case ACTOR_CS_1000: RCP_SetupDL(&gMasterDisp, SETUPDL_45); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->work_046); gSPDisplayList(gMasterDisp++, D_ENMY_PLANET_40018A0); @@ -2535,11 +2535,11 @@ void ActorCutscene_Draw(ActorCutscene* this) { } break; - case 0: + case ACTOR_CS_TEAM_ARWING: ActorTeamArwing_Draw(this); break; - case 1: + case ACTOR_CS_GREAT_FOX: if (gCurrentLevel == LEVEL_SECTOR_Z) { gSPFogPosition(gMasterDisp++, gFogNear, 1005); } @@ -2547,14 +2547,14 @@ void ActorCutscene_Draw(ActorCutscene* this) { Cutscene_DrawGreatFox(); break; - case 10: + case ACTOR_CS_ME_CORNERIA_BG: RCP_SetupDL_40(); Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_ME_6020810); + gSPDisplayList(gMasterDisp++, aMeCorneriaBgDL); break; - case 11: + case ACTOR_CS_FO_EXPLOSION: RCP_SetupDL_64_2(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); Matrix_Scale(gGfxMatrix, 60.0f, 60.0f, 1.0f, MTXF_APPLY); @@ -2568,16 +2568,16 @@ void ActorCutscene_Draw(ActorCutscene* this) { gSPDisplayList(gMasterDisp++, aOrbDL); break; - case 20: + case ACTOR_CS_COMMANDER: gSPDisplayList(gMasterDisp++, aCommanderDL); break; - case 24: + case ACTOR_CS_KATT: gSPDisplayList(gMasterDisp++, aKattShipDL); Actor_DrawEngineAndContrails(this); break; - case 25: + case ACTOR_CS_SZ_SPACE_JUNK: if ((this->index % 2) != 0) { gSPDisplayList(gMasterDisp++, aSzSpaceJunk3DL); } else { @@ -2585,19 +2585,19 @@ void ActorCutscene_Draw(ActorCutscene* this) { } break; - case 26: - gSPDisplayList(gMasterDisp++, D_SZ_6004FE0); + case ACTOR_CS_SZ_INVADER: + gSPDisplayList(gMasterDisp++, aSzInvaderIIIDL); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -60.0f, MTXF_APPLY); Actor_DrawEngineGlow(this, EG_GREEN); break; - case 28: + case ACTOR_CS_COMMANDER_GLOW: gSPDisplayList(gMasterDisp++, aCommanderDL); Matrix_Translate(gGfxMatrix, 0.f, 0.f, -60.0f, MTXF_APPLY); Actor_DrawEngineGlow(this, EG_GREEN); break; - case 30: + case ACTOR_CS_30: Display_SetSecondLight(&this->obj.pos); if (this->work_046 != 0) { @@ -2717,18 +2717,18 @@ void ActorCutscene_Draw(ActorCutscene* this) { } break; - case 31: + case ACTOR_CS_31: RCP_SetupDL_21(); Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 2.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_101ABD0); break; - case 32: + case ACTOR_CS_32: gSPDisplayList(gMasterDisp++, D_BO_6008770); break; - case 33: + case ACTOR_CS_CORNERIAN_FIGHTER: if ((this->index == 3) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { gSPDisplayList(gMasterDisp++, aBillShipDL); } else { @@ -2738,27 +2738,27 @@ void ActorCutscene_Draw(ActorCutscene* this) { Actor_DrawEngineGlow(this, EG_RED); break; - case 34: - gSPDisplayList(gMasterDisp++, aKaEnemy1DL); + case ACTOR_CS_KA_ENEMY: + gSPDisplayList(gMasterDisp++, aKaEnemyDL); break; - case 35: + case ACTOR_CS_SY_SHIP_1_SHRINK: Matrix_Scale(gGfxMatrix, 0.125f, 0.125f, 0.125f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); /* fallthrough */ - case 39: + case ACTOR_CS_SY_SHIP_1: gSPDisplayList(gMasterDisp++, aSyShip1DL); - func_demo_8004FCB8(this, 4); + ActorCutscene_SyShip_Setup(this, 4); break; - case 36: + case ACTOR_CS_SY_SHIP_2: Matrix_Scale(gGfxMatrix, this->scale, this->scale, this->scale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, aSyShip2DL); - func_demo_8004FCB8(this, 0); + ActorCutscene_SyShip_Setup(this, 0); break; - case 37: + case ACTOR_CS_37: RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, this->iwork[0], this->iwork[1], this->iwork[2], this->iwork[3]); gDPSetEnvColor(gMasterDisp++, this->iwork[4], this->iwork[5], this->iwork[6], this->iwork[7]); @@ -2767,7 +2767,7 @@ void ActorCutscene_Draw(ActorCutscene* this) { gSPDisplayList(gMasterDisp++, aOrbDL); break; - case 38: + case ACTOR_CS_38: animFrameData = Animation_GetFrameData(D_demo_800CA1F4[this->iwork[4]], this->iwork[5], sp144); Math_SmoothStepToVec3fArray(sp144, this->vwork, 1, animFrameData, this->fwork[2], 100.0f, .0f); RCP_SetupDL_30(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); @@ -2831,19 +2831,19 @@ void ActorCutscene_Draw(ActorCutscene* this) { } break; - case 40: + case ACTOR_CS_40: gSPDisplayList(gMasterDisp++, D_SY_60132A0); break; - case 41: + case ACTOR_CS_AQ_FISHGROUP: Aquas_801BE0F0(this); break; - case 42: + case ACTOR_CS_42: gSPDisplayList(gMasterDisp++, D_SY_6014A40); break; - case 43: + case ACTOR_CS_43: RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, this->iwork[0]); @@ -2864,24 +2864,24 @@ void ActorCutscene_Draw(ActorCutscene* this) { this->fwork[0] += 0.2f; break; - case 44: - Animation_GetFrameData(&D_AQ_6020A40, this->iwork[0], this->vwork); + case ACTOR_CS_AQ_SEAWEED: + Animation_GetFrameData(&aAqSeaweedAnim, this->iwork[0], this->vwork); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_DrawSkeleton(1, aAqSeaweedSkel, this->vwork, 0, 0, &this->index, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); break; - case 45: + case ACTOR_CS_AQ_BUMP_2: Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, aAqBump2DL); break; - case 46: + case ACTOR_CS_AQ_CORAL_REEF_2: gSPDisplayList(gMasterDisp++, aAqCoralReef2DL); break; - case 47: + case ACTOR_CS_AQ_ROCK: gSPDisplayList(gMasterDisp++, aAqRockDL); break; } diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index 77927cd2..a1cf1c50 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -1207,7 +1207,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { f32 sp58 = -18.0f; f32 sp54; f32 sp50; - f32 var_fs0; + f32 yRot; if (player->wingPosition == 2) { sp5C = 108.0f; @@ -1220,16 +1220,16 @@ void Display_ArwingWingTrail_Draw(Player* player) { sp54 = 180.0f; } - var_fs0 = player->rot.y; - if (var_fs0 > 90.0f) { - var_fs0 -= 180.0f; + yRot = player->rot.y; + if (yRot > 90.0f) { + yRot -= 180.0f; } - var_fs0 = var_fs0 * 0.25f; + yRot *= 0.25f; sp50 = player->rot.x * 0.25f; if (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - var_fs0 = 0.0f; + yRot = 0.0f; sp50 = 0.0f; } @@ -1240,7 +1240,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -(M_DTOR * yRot), MTXF_APPLY); Matrix_Scale(gGfxMatrix, player->contrailScale, 1.0f, 50.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); @@ -1253,7 +1253,7 @@ void Display_ArwingWingTrail_Draw(Player* player) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, -sp5C, sp58, -100.0f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_DTOR * sp50, MTXF_APPLY); - Matrix_RotateY(gGfxMatrix, -(M_DTOR * var_fs0), MTXF_APPLY); + Matrix_RotateY(gGfxMatrix, -(M_DTOR * yRot), MTXF_APPLY); Matrix_Scale(gGfxMatrix, player->contrailScale, 1.0f, 50.0f, MTXF_APPLY); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -17.5f, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); @@ -1451,16 +1451,16 @@ f32 D_display_800CA388 = -300.0f; f32 D_display_800CA38C[] = { 0.0f, -300.0f, -150.0f, -50.0f }; void Display_PlayerShadow_Update(Player* player) { - f32 sp34; - f32 sp30; - f32 sp2C; + f32 xScale; + f32 zScale; + f32 angle; if (player->draw && !player->hideShadow) { - sp34 = D_display_800CA334[gGameFrameCount % 8U]; - sp30 = D_display_800CA334[(gGameFrameCount + 4) % 8U]; + xScale = D_display_800CA334[gGameFrameCount % 8U]; + zScale = D_display_800CA334[(gGameFrameCount + 4) % 8U]; if (player->grounded) { - sp34 = sp30 = 0.0f; + xScale = zScale = 0.0f; } Matrix_Push(&gGfxMatrix); @@ -1482,12 +1482,12 @@ void Display_PlayerShadow_Update(Player* player) { Matrix_RotateX(gGfxMatrix, player->shadowRotX, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, player->shadowRotZ, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 0.8f + sp34, 0.0f, 0.8f + sp30, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 0.8f + xScale, 0.0f, 0.8f + zScale, MTXF_APPLY); if ((player->form == FORM_ARWING) || (player->form == FORM_BLUE_MARINE) || (player->form == FORM_ON_FOOT)) { - sp2C = player->bankAngle + player->rockAngle + player->damageShake; - if (((sp2C > 70.0f) && (sp2C < 110.0f)) || ((sp2C < -70.0f) && (sp2C > -110.0f))) { - sp2C = 70.0f; + angle = player->bankAngle + player->rockAngle + player->damageShake; + if (((angle > 70.0f) && (angle < 110.0f)) || ((angle < -70.0f) && (angle > -110.0f))) { + angle = 70.0f; } Matrix_RotateY(gGfxMatrix, -player->groundRotY, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, (player->yRot_114 + player->rot.y + player->damageShake) * M_DTOR, MTXF_APPLY); @@ -1495,7 +1495,7 @@ void Display_PlayerShadow_Update(Player* player) { gGfxMatrix, -((player->xRot_120 + player->rot.x + player->aerobaticPitch + player->damageShake) * M_DTOR), MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, M_DTOR * sp2C, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, M_DTOR * angle, MTXF_APPLY); } else { Matrix_RotateY(gGfxMatrix, player->yRot_114 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, (player->rot.x + player->aerobaticPitch + player->damageShake) * M_DTOR, diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index cad96ccd..71b324cf 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -272,7 +272,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_SCENERY_BO_BUILDING */ {(void*) aBoBuildingDL, 0, (ObjectFunc) NULL, aBoBuildingHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_KA_FLBASE */ {(void*) aKaFLBaseDL, 0, (ObjectFunc) NULL, aKaFrontlineBaseHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_UNK_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SCENERY_UNK_156 */ {(void*) SectorY_Scenery156_Draw, 1, (ObjectFunc) NULL, aSyScenery156Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_SY_SHOGUN_SHIP */ {(void*) SectorY_Scenery156_Draw, 1, (ObjectFunc) NULL, aSyScenery156Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_SZ_SPACE_JUNK_3 */ {(void*) aSzSpaceJunk3DL, 0, (ObjectFunc) NULL, aSzSpaceJunk3Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_SZ_SPACE_JUNK_1 */ {(void*) aSzSpaceJunk1DL, 0, (ObjectFunc) NULL, aSzSpaceJunk1Hitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SCENERY_VE2_TOWER */ {(void*) aVe2TowerDL, 0, (ObjectFunc) NULL, aVe2TowerHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -366,7 +366,7 @@ ObjectInfo gObjectInfo[] = { /* OBJ_ACTOR_ZO_BARRIER */ {(void*) Zoness_ZoBarrier_Draw, 1, (ObjectFunc) Zoness_ZoBarrier_Update, aZoBarrierHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_ZO_CRANE_MAGNET */ {(void*) Zoness_ZoCraneMagnet_Draw, 1, (ObjectFunc) Zoness_ZoCraneMagnet_Update, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_SPIKEBALL */ {(void*) Zoness_ZoSpikeBall_Draw, 1, (ObjectFunc) Zoness_ZoSpikeBall_Update, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_ZO_CARGOSHIP */ {(void*) Zoness_ZoCargoShip_Draw, 1, (ObjectFunc) Zoness_ZoCargoShip_Update, aZoCargoShipHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_ZO_TANKER */ {(void*) Zoness_ZoTanker_Draw, 1, (ObjectFunc) Zoness_ZoTanker_Update, aZoTankerHitbox, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_ZO_CONTAINER */ {(void*) Zoness_ZoContainer_Draw, 2, (ObjectFunc) Zoness_ZoContainer_Update, aZoContainerHitbox, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_ZO_RADARBUOY */ {(void*) Zoness_ZoRadarBuoy_Draw, 1, (ObjectFunc) Zoness_ZoRadarBuoy_Update, aZoRadarBuoyHitbox, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, /* OBJ_ACTOR_ZO_SUPPLYCRANE */ {(void*) Zoness_ZoSupplyCrane_Draw, 1, (ObjectFunc) Zoness_ZoSupplyCrane_Update, aZoSupplyCraneHitbox, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index 0fc75bd5..7534ccfd 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -1537,7 +1537,7 @@ void Scenery360_Draw(Scenery360* this) { f32 sp3C = 2000.0f; f32 sp38 = 0.5f; - if (this->obj.id == OBJ_SCENERY_UNK_156) { + if (this->obj.id == OBJ_SCENERY_SY_SHOGUN_SHIP) { sp44 = 4000.0f; sp40 = -13000.0f; sp3C = 4500.0f; @@ -1751,7 +1751,7 @@ void Object_DrawAll(s32 arg0) { } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if (actor->obj.status >= OBJ_ACTIVE) { if ((actor->timer_0C6 % 2) == 0) { if (gCurrentLevel == LEVEL_UNK_15) { diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 4133d968..a64f8914 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -461,7 +461,7 @@ void func_effect_80078AE0(Effect* this) { void Effect_Effect355_Draw(Effect355* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 180); Graphics_SetScaleMtx(this->scale2 * (13.0f + ((s32) (gGameFrameCount % 2U) * 2.5f))); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); } void Effect_Effect353_Draw(Effect353* this) { diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index 431df8af..2ad93532 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -1341,8 +1341,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_BOSS_ZO_SARUMARINE: Zoness_ZoSarumarine_Init(&gBosses[index]); break; - case OBJ_ACTOR_ZO_CARGOSHIP: - Zoness_ZoCargoShip_Init(&gActors[index]); + case OBJ_ACTOR_ZO_TANKER: + Zoness_ZoTanker_Init(&gActors[index]); break; case OBJ_ACTOR_ZO_CONTAINER: Zoness_ZoContainer_Init(&gActors[index]); @@ -1391,10 +1391,10 @@ void Object_Init(s32 index, ObjectId objId) { Venom1_Ve1MonkeyStatue_Init(&gActors[index]); break; case OBJ_ACTOR_AQ_BOULDER: - Venom1_AqBoulder_Init(&gActors[index]); + Aquas_AqBoulder_Init(&gActors[index]); break; case OBJ_ACTOR_AQ_JELLYFISH: - Venom1_AqJellyfish_Init(&gActors[index]); + Aquas_AqJellyfish_Init(&gActors[index]); break; } } @@ -1757,7 +1757,7 @@ void Actor_Despawn(Actor* this) { if (this->itemDrop) { if (D_enmy_800CFE5C[this->itemDrop] < 0.0f) { otherActor = &gActors[0]; - for (i = 0, otherActor = gActors; i < ARRAY_COUNT(gActors); i++, otherActor++) { + for (i = 0, otherActor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((otherActor->obj.status != OBJ_FREE) && (otherActor->index != this->index) && (otherActor->iwork[15] == this->iwork[15])) { return; diff --git a/src/engine/fox_fade.c b/src/engine/fox_fade.c index adca18a9..449cf264 100644 --- a/src/engine/fox_fade.c +++ b/src/engine/fox_fade.c @@ -11,15 +11,15 @@ void Wipe_Vertical(s32 frame) { } void Wipe_Circular(s32 frame) { - s32 var_s1; + s32 angle; RCP_SetupDL_12(); Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -150.0f, MTXF_NEW); - for (var_s1 = 0; var_s1 < MIN(360, frame * 15); var_s1 += 15) { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((frame - (var_s1 / 15)) * 15, 255)); + for (angle = 0; angle < MIN(360, frame * 15); angle += 15) { + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 0, 0, MIN((frame - (angle / 15)) * 15, 255)); Matrix_Push(&gGfxMatrix); - Matrix_RotateZ(gGfxMatrix, var_s1 * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, angle * M_DTOR, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 0.53f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800D9688); diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index 81ed9d83..4efbd2c9 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -626,7 +626,7 @@ void Game_Update(void) { #endif Actor* Game_SpawnActor(ObjectId objId) { - Actor* actor = gActors; + Actor* actor = &gActors[0]; s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index f94ab410..861ef5bf 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -4846,7 +4846,7 @@ void Aquas_CsIntroGreatFox_Init(void) { actor->obj.pos.x = 0.0f; actor->obj.pos.y += 1700.0f; actor->obj.pos.z -= 5000.0f; - actor->animFrame = 1; + actor->animFrame = ACTOR_CS_GREAT_FOX; actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index bf0a8986..a8806c42 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -2025,7 +2025,7 @@ void Player_CollisionCheck(Player* player) { } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { if (actor->obj.id == OBJ_ACTOR_ME_MOLAR_ROCK) { temp_v0 = Player_CheckPolyCollision(player, actor->obj.id, actor->obj.pos.x, actor->obj.pos.y, @@ -3166,7 +3166,7 @@ bool Player_CanLockOn(s32 playerNum) { Actor* actor; s32 i; - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->lockOnTimers[playerNum] != 0)) { return false; } diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index 967aed0b..3e3211b3 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -491,7 +491,7 @@ void func_tank_80044868(Player* player) { func_tank_80043280(D_landmaster_3005EA8, D_TI_6009BB8, gGameFrameCount * -55.0f); } if ((gCurrentLevel == LEVEL_MACBETH) && (player->state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - func_tank_80043280(D_landmaster_3005EA8, *D_Tex_800DACB8, gGameFrameCount * -55.0f); + func_tank_80043280(D_landmaster_3005EA8, D_Tex_800DACB8, gGameFrameCount * -55.0f); } } if (player->baseSpeed > 10.0f) { @@ -506,6 +506,7 @@ void func_tank_80044868(Player* player) { void func_tank_80045130(Player* player) { Math_SmoothStepToF(&player->unk_170, 0.0f, 1.0f, 0.2f, 0.0f); Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); + if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; if ((player->rollInputTimerL != 0) && (player->zRotBank > 0.0f) && (player->boostMeter < 10.0f)) { @@ -519,6 +520,7 @@ void func_tank_80045130(Player* player) { player->rollInputTimerL = 10; } } + if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; if ((player->rollInputTimerR != 0) && (player->zRotBank < 0.0f) && (player->boostMeter < 10.0f)) { @@ -790,7 +792,7 @@ void func_tank_80046260(Player* player) { Scenery* scenery; s32 i; - for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + for (i = 0, scenery = &gScenery[0]; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_TI_BRIDGE) && ((player->trueZpos - 2000.0f) < scenery->obj.pos.z) && (scenery->obj.pos.y < player->pos.y)) { func_tank_800460E0(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, @@ -843,6 +845,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, sp84 = sp64.x + arg2; sp80 = sp64.y + arg3; sp7C = sp64.z + arg4; + if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { if (D_MA_801BE250[27] < arg3 + sp58.y) { D_MA_801BE250[27] = arg3 + sp58.y; @@ -863,6 +866,7 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, player->rollRate = player->baseRollRate = -20; } } + if (Play_CheckPolyCollision(arg1, arg2, arg3, arg4, sp84, arg3, sp7C, &sp58, &sp4C) && (D_800C9F10 <= arg3 + sp58.y)) { D_800C9F10 = arg3 + sp58.y; @@ -1344,7 +1348,7 @@ void func_tank_800481F4(Player* player) { Player_UpdateHitbox(player); func_tank_800444BC(player); if (player->mercyTimer == 0) { - for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + for (i = 0, scenery = &gScenery[0]; i < ARRAY_COUNT(gScenery); i++, scenery++) { if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_TI_BRIDGE) && (scenery->obj.id != OBJ_SCENERY_MA_TRAIN_TRACK_13) && (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_1) && (scenery->obj.id != OBJ_SCENERY_MA_BUILDING_2) && (scenery->obj.id != OBJ_SCENERY_GUILLOTINE_HOUSING) && @@ -1386,7 +1390,7 @@ void func_tank_800481F4(Player* player) { } } - for (i = 0, boss = gBosses; i < ARRAY_COUNT(gBosses); i++, boss++) { + for (i = 0, boss = &gBosses[0]; i < ARRAY_COUNT(gBosses); i++, boss++) { if (boss->obj.status == OBJ_ACTIVE) { temp_v0 = Player_CheckHitboxCollision(player, boss->info.hitbox, &sp98, boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, boss->obj.rot.x, @@ -1397,7 +1401,7 @@ void func_tank_800481F4(Player* player) { } } - for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { + for (i = 0, actor = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0C2 == 0)) { if (actor->obj.id == OBJ_ACTOR_EVENT) { temp_v0 = Player_CheckHitboxCollision(player, actor->info.hitbox, &sp98, actor->obj.pos.x, @@ -1454,6 +1458,7 @@ void func_tank_800481F4(Player* player) { player->vel.x = 0.0f; player->vel.y = 30.0f; player->pos.x = player->basePos.x; + actor->dmgType = DMG_COLLISION; if (actor->info.damage != 0) { Player_ApplyDamage(player, 0, 20); @@ -1482,7 +1487,7 @@ void func_tank_800481F4(Player* player) { } } } - for (i = 0, sprite = gSprites; i < ARRAY_COUNT(gSprites); i++, sprite++) { + for (i = 0, sprite = &gSprites[0]; i < ARRAY_COUNT(gSprites); i++, sprite++) { if (sprite->obj.status == OBJ_ACTIVE) { if ((player->trueZpos - 200.0f) < sprite->obj.pos.z) { temp_v0 = Player_CheckHitboxCollision(player, sprite->info.hitbox, &sp98, sprite->obj.pos.x, diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index 27e93a9e..5ee274b8 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -5,6 +5,7 @@ #include "assets/ast_allies.h" #include "assets/ast_great_fox.h" #include "assets/ast_ending.h" +#include "prevent_bss_reordering.h" void Ending_8018CE20(s32); void Ending_801926D4(void); diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 3eed01e7..14e51264 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -1336,7 +1336,7 @@ void Corneria_CoGaruda1_Update(CoGaruda1* this) { switch (this->state) { case 0: this->fwork[1] += 20.0f; - Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(aCoGarudaTracksTex, 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; - Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(aCoGarudaTracksTex, 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; - Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(aCoGarudaTracksTex, 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; - Lib_Texture_Scroll(D_CO_60329C0, 16, 16, 1); + Lib_Texture_Scroll(aCoGarudaTracksTex, 16, 16, 1); this->animFrame++; if (this->animFrame >= Animation_GetFrameCount(&aCoGaruda3Anim)) { this->animFrame = 0; diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index 4b4bd7da..c863e1db 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -323,7 +323,7 @@ void Venom1_Ve1TempleEntrance_Update(Ve1TempleEntrance* this) { } } -void Venom1_Ve1Pillar1_Init(Actor* this) { +void Venom1_Ve1Pillar1_Init(Ve1Pillar1* this) { } void Venom1_Ve1Pillar1_Update(Ve1Pillar1* this) { @@ -880,7 +880,7 @@ void Venom1_Ve1Golemech_Init(Ve1Golemech* this) { } bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Boss* this = thisx; + Ve1Golemech* this = (Ve1Golemech*) thisx; bool override; s32 i; s32 lum; @@ -975,7 +975,7 @@ bool Venom1_801937F4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* t void Venom1_80193D64(s32 limbIndex, Vec3f* rot, void* thisx) { s32 spBC; - Boss* this = thisx; + Ve1Golemech* this = (Ve1Golemech*) thisx; Vec3f spAC; UnkStruct_i1_8019A058* var_s1; UnkStruct_i1_8019B838* var_s7; diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index 9536c9ff..7973cde3 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -21,20 +21,21 @@ f32 D_i2_80195534[] = { 0.15f, 0.45f, 0.75f, 1.3f, 0.75f, 0.45f, 0.15f, 0.0f }; f32 D_i2_80195554[] = { 101.0f, 96.0f, 85.0f, 80.0f, 69.0f, 64.0f, 53.0f, 48.0f, 37.0f, 32.0f, 21.0f, 16.0f }; -f32 D_i2_80195584[] = { 180.0f, -180.0f, 0.0f, -1500.0f }; +f32 sMeLevelStartTeamSetupXpos[] = { 180.0f, -180.0f, 0.0f, -1500.0f }; -f32 D_i2_80195594[] = { 50.0f, 100.0f, -50.0f, 0.0f }; +f32 sMeLevelStartTeamSetupYpos[] = { 50.0f, 100.0f, -50.0f, 0.0f }; -f32 D_i2_801955A4[] = { 240.0f, 480.0f, 720.0f, -5000.0f }; +f32 sMeLevelStartTeamSetupZpos[] = { 240.0f, 480.0f, 720.0f, -5000.0f }; -s32 D_i2_801955B4[] = { 0, 0, 0, 1 }; +s32 sMeLevelStartTeamSetupModel[] = { ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, + ACTOR_CS_GREAT_FOX }; Vec3f D_i2_801955C4 = { 0.0f, 0.0f, 100.0f }; -Vec3f D_i2_801955D0[] = { 2000.0f, 2000.0f, 2000.0f, -2000.0f, 2000.0f, 2000.0f, - 0.0f, -3000.0f, 3000.0f, 5000.0f, -3000.0f, -3000.0f }; +Vec3f sMeLevelCompleteTeamSetupPos[] = { 2000.0f, 2000.0f, 2000.0f, -2000.0f, 2000.0f, 2000.0f, + 0.0f, -3000.0f, 3000.0f, 5000.0f, -3000.0f, -3000.0f }; -f32 D_i2_80195600[] = { 75.0f, -80.0f, 85.0f, 0.0f }; +f32 sMeLevelCompleteTeamSetupModel[] = { 75.0f, -80.0f, 85.0f, 0.0f }; Vec3f D_i2_80195610[] = { { 200.0f, -10.0f, 200.0f }, @@ -230,7 +231,7 @@ void Meteo_80187D08(f32 x, f32 y, f32 z, f32 arg3, f32 xRot, f32 yRot, s32 arg6, } } -void Meteo_80187D98(Effect369* this, f32 x, f32 y, f32 z, f32 arg4, bool arg5) { +void Meteo_80187D98(Effect369* this, f32 x, f32 y, f32 z, f32 arg4, bool rotate) { Effect_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_EFFECT_369; @@ -240,10 +241,10 @@ void Meteo_80187D98(Effect369* this, f32 x, f32 y, f32 z, f32 arg4, bool arg5) { this->obj.pos.z = z; this->unk_60.z = arg4; - this->unk_48 = arg5; + this->unk_48 = rotate; this->obj.rot.x = 45.0f; - if (arg5) { + if (rotate) { this->obj.rot.x = -45.0f; } @@ -1500,8 +1501,8 @@ void Meteo_MeCrusher_Update(MeCrusher* this) { } } -void Meteo_8018B7C4(s32 arg0) { - f32 xScale = arg0 * 0.83333f; // approx 5 / 6 +void Meteo_MeCrusherEngineGlow_Draw(s32 scale) { + f32 xScale = scale * 0.83333f; // approx 5 / 6 if ((gGameFrameCount % 2) != 0) { xScale *= 1.1f; @@ -1514,7 +1515,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_Scale(gGfxMatrix, 10.0f * xScale, 10.0f * xScale, 10.0f * xScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 70); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1523,7 +1524,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 60); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1532,7 +1533,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 50); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); @@ -1541,7 +1542,7 @@ void Meteo_8018B7C4(s32 arg0) { Matrix_SetGfxMtx(&gMasterDisp); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 40); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } @@ -1552,7 +1553,8 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { f32 var_fs1; s32 pad; - gSPDisplayList(gMasterDisp++, D_ME_6001310); + gSPDisplayList(gMasterDisp++, aMeCrusherDL); + RCP_SetupDL_64(); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); @@ -1591,12 +1593,12 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 32, 32, 128); Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); } else { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 128); Matrix_Scale(gGfxMatrix, var_fs1 * 6.0f, var_fs1 * 6.0f, var_fs1 * 6.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); } Matrix_Pop(&gGfxMatrix); } @@ -1687,7 +1689,7 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); Matrix_RotateX(gGfxMatrix, -M_PI / 6, MTXF_APPLY); @@ -1713,7 +1715,7 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { Matrix_Scale(gGfxMatrix, var_fs1, var_fs1, var_fs1, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); } @@ -1761,7 +1763,7 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, 650.0f, 600.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Meteo_8018B7C4(this->swork[0] - 1); + Meteo_MeCrusherEngineGlow_Draw(this->swork[0] - 1); Matrix_Pop(&gGfxMatrix); } @@ -1769,23 +1771,23 @@ void Meteo_MeCrusher_Draw(MeCrusher* this) { Matrix_Push(&gGfxMatrix); Matrix_Translate(gGfxMatrix, 0.0f, -650.0f, 600.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - Meteo_8018B7C4(this->swork[1] - 1); + Meteo_MeCrusherEngineGlow_Draw(this->swork[1] - 1); Matrix_Pop(&gGfxMatrix); } gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Meteo_8018C77C(ActorCutscene* this, s32 arg1) { +void Meteo_LevelStart_SetupTeam(ActorCutscene* this, s32 teamIdx) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos.x = D_i2_80195584[arg1] + gPlayer[0].pos.x; - this->obj.pos.y = D_i2_80195594[arg1] + gPlayer[0].pos.y; - this->obj.pos.z = D_i2_801955A4[arg1] + gPlayer[0].trueZpos; + this->obj.pos.x = sMeLevelStartTeamSetupXpos[teamIdx] + gPlayer[0].pos.x; + this->obj.pos.y = sMeLevelStartTeamSetupYpos[teamIdx] + gPlayer[0].pos.y; + this->obj.pos.z = sMeLevelStartTeamSetupZpos[teamIdx] + gPlayer[0].trueZpos; - this->animFrame = D_i2_801955B4[arg1]; + this->animFrame = sMeLevelStartTeamSetupModel[teamIdx]; this->obj.rot.y = 180.0f; Object_SetInfo(&this->info, this->obj.id); this->info.cullDistance = 200.0f; @@ -1800,38 +1802,38 @@ void Meteo_8018C77C(ActorCutscene* this, s32 arg1) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); } -void Meteo_8018C8F4(MeMeteor2* actor182, ActorCutscene* actorCs) { - Actor_Initialize(actor182); - actor182->obj.status = OBJ_INIT; - actor182->obj.id = OBJ_ACTOR_ME_METEOR_2; +void Meteo_8018C8F4(MeMeteor2* this, ActorCutscene* actorCs) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_ME_METEOR_2; - actor182->obj.pos.x = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.x; - actor182->obj.pos.y = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.y; - actor182->obj.pos.z = RAND_FLOAT_CENTERED_SEEDED(500.0f) + actorCs->obj.pos.z - 9000.0f; + this->obj.pos.x = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.x; + this->obj.pos.y = RAND_FLOAT_CENTERED_SEEDED(2000.0f) + actorCs->obj.pos.y; + this->obj.pos.z = RAND_FLOAT_CENTERED_SEEDED(500.0f) + actorCs->obj.pos.z - 9000.0f; - actor182->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); - actor182->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); + this->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); + this->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); - actor182->timer_0C2 = 10000; - actor182->vel.z = 30.0f; - Object_SetInfo(&actor182->info, actor182->obj.id); + this->timer_0C2 = 10000; + this->vel.z = 30.0f; + Object_SetInfo(&this->info, this->obj.id); } -void Meteo_8018CA10(Actor* actor182, ActorCutscene* actorCs, f32 x, f32 y, f32 z) { - Actor_Initialize(actor182); - actor182->obj.status = OBJ_INIT; - actor182->obj.id = OBJ_ACTOR_ME_METEOR_2; +void Meteo_8018CA10(MeMeteor2* this, ActorCutscene* actorCs, f32 x, f32 y, f32 z) { + Actor_Initialize(this); + this->obj.status = OBJ_INIT; + this->obj.id = OBJ_ACTOR_ME_METEOR_2; - actor182->obj.pos.x = actorCs->obj.pos.x + x; - actor182->obj.pos.y = actorCs->obj.pos.y + y; - actor182->obj.pos.z = actorCs->obj.pos.x + z; + this->obj.pos.x = actorCs->obj.pos.x + x; + this->obj.pos.y = actorCs->obj.pos.y + y; + this->obj.pos.z = actorCs->obj.pos.x + z; - actor182->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); - actor182->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); + this->obj.rot.y = RAND_FLOAT_SEEDED(360.0f); + this->obj.rot.x = RAND_FLOAT_SEEDED(360.0f); - actor182->timer_0C2 = 10000; - actor182->vel.z = 30.0f; - Object_SetInfo(&actor182->info, actor182->obj.id); + this->timer_0C2 = 10000; + this->vel.z = 30.0f; + Object_SetInfo(&this->info, this->obj.id); } void Meteo_8018CAD8(void) { @@ -1845,7 +1847,7 @@ void Meteo_8018CAD8(void) { actorCs->obj.pos.y = 0.0f; actorCs->obj.pos.z = 9000.0f; - actorCs->animFrame = 10; + actorCs->animFrame = ACTOR_CS_ME_CORNERIA_BG; Object_SetInfo(&actorCs->info, actorCs->obj.id); } @@ -1875,7 +1877,7 @@ void Meteo_Effect346_Spawn(ActorEvent* this) { Effect_SpawnTimedSfxAtPos(&this->obj.pos, NA_SE_EN_EXPLOSION_S); - for (i = 0; i < 25; ++i) { + for (i = 0; i < 25; i++) { for (j = 0; j < ARRAY_COUNT(gEffects); j++) { if (gEffects[j].obj.status == OBJ_FREE) { Meteo_Effect346_Setup(&gEffects[j], this); @@ -1888,10 +1890,10 @@ void Meteo_Effect346_Spawn(ActorEvent* this) { void Meteo_LevelStart(Player* player) { u8 sp8F; s32 i; - Actor* actor0 = &gActors[0]; - Actor* actor1 = &gActors[1]; - Actor* actor2 = &gActors[2]; - Actor* actor3 = &gActors[3]; + Actor* falco = &gActors[0]; + Actor* slippy = &gActors[1]; + Actor* peppy = &gActors[2]; + Actor* greatFox = &gActors[3]; f32 x; f32 y; f32 z; @@ -1909,20 +1911,20 @@ void Meteo_LevelStart(Player* player) { gCsFrameCount = 0; if (gTeamShields[TEAM_ID_FALCO] > 0) { - Meteo_8018C77C(actor0, 0); + Meteo_LevelStart_SetupTeam(falco, 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Meteo_8018C77C(actor1, 1); + Meteo_LevelStart_SetupTeam(slippy, 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Meteo_8018C77C(actor2, 2); + Meteo_LevelStart_SetupTeam(peppy, 2); } - Meteo_8018C77C(actor3, 3); + Meteo_LevelStart_SetupTeam(greatFox, 3); Meteo_8018CAD8(); for (i = 5; i < 15; i++) { - Meteo_8018C8F4(&gActors[i], actor3); + Meteo_8018C8F4(&gActors[i], greatFox); } D_ctx_80177A48[1] = -13000.0f; @@ -1942,7 +1944,7 @@ void Meteo_LevelStart(Player* player) { D_ctx_80177A48[3] = 1.0f; case 1: - actor3->vel.z = 4.0f; + greatFox->vel.z = 4.0f; gCsCamEyeX = player->pos.x + 100.0f; gCsCamEyeY = player->pos.y; gCsCamEyeZ = D_ctx_80177A48[1] + player->trueZpos; @@ -1956,16 +1958,16 @@ void Meteo_LevelStart(Player* player) { D_ctx_80177A48[0] = 0.1f; if (gCsFrameCount == 680) { - actor3->state = 10; + greatFox->state = 10; } if (gCsFrameCount == 720) { - actor0->state = 11; + falco->state = 11; } if (gCsFrameCount == 750) { - actor2->state = 12; + peppy->state = 12; } if (gCsFrameCount == 780) { - actor1->state = 13; + slippy->state = 13; } if (gCsFrameCount > 810) { player->csState = 2; @@ -1995,27 +1997,27 @@ void Meteo_LevelStart(Player* player) { sp8F = true; } if (gCsFrameCount == 600) { - Meteo_8018CA10(&gActors[16], actor3, 100.0f, 500.0f, 1500.0f); - Meteo_8018CA10(&gActors[17], actor3, 300.0f, 400.0f, 2000.0f); + Meteo_8018CA10(&gActors[16], greatFox, 100.0f, 500.0f, 1500.0f); + Meteo_8018CA10(&gActors[17], greatFox, 300.0f, 400.0f, 2000.0f); } if (gCsFrameCount == 660) { for (i = 4; i < 15; i++) { gActors[i].obj.status = OBJ_FREE; } - actor3->obj.pos.x += 1000.0f; - actor3->obj.pos.z += 4000.0f; + greatFox->obj.pos.x += 1000.0f; + greatFox->obj.pos.z += 4000.0f; for (i = 4; i < 9; i++) { - Meteo_8018C8F4(&gActors[i], actor3); + Meteo_8018C8F4(&gActors[i], greatFox); } - actor3->obj.pos.x -= 1000.0f; - actor3->obj.pos.z -= 4000.0f; + greatFox->obj.pos.x -= 1000.0f; + greatFox->obj.pos.z -= 4000.0f; - Meteo_8018CA10(&gActors[13], actor3, 1500.0f, 200.0f, 100.0f); - Meteo_8018CA10(&gActors[14], actor3, 1200.0f, -200.0f, -500.0f); - Meteo_8018CA10(&gActors[15], actor3, 2000.0f, -100.0f, -1000.0f); + Meteo_8018CA10(&gActors[13], greatFox, 1500.0f, 200.0f, 100.0f); + Meteo_8018CA10(&gActors[14], greatFox, 1200.0f, -200.0f, -500.0f); + Meteo_8018CA10(&gActors[15], greatFox, 2000.0f, -100.0f, -1000.0f); gActors[50].obj.status = gActors[16].obj.status = gActors[17].obj.status = OBJ_FREE; } @@ -2034,9 +2036,9 @@ void Meteo_LevelStart(Player* player) { if (sp8F != 0) { sp58 = D_i2_801955C4; D_ctx_80177A48[3] *= -1.0f; - x = gActors[player->meTargetIndex].obj.pos.x - (actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f)); - y = gActors[player->meTargetIndex].obj.pos.y - (actor3->obj.pos.y - 232.0f); - z = gActors[player->meTargetIndex].obj.pos.z - (actor3->obj.pos.z - 1190.0f); + x = gActors[player->meTargetIndex].obj.pos.x - (greatFox->obj.pos.x + (D_ctx_80177A48[3] * 74.0f)); + y = gActors[player->meTargetIndex].obj.pos.y - (greatFox->obj.pos.y - 232.0f); + z = gActors[player->meTargetIndex].obj.pos.z - (greatFox->obj.pos.z - 1190.0f); sp64 = Math_RadToDeg(Math_Atan2F(x, z)); x = sqrtf(SQ(x) + SQ(z)); @@ -2046,9 +2048,9 @@ void Meteo_LevelStart(Player* player) { Matrix_RotateX(gCalcMatrix, M_DTOR * sp68, MTXF_APPLY); Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp58, &sp4C); - Actor_SpawnGreatFoxLaser(100, actor3->obj.pos.x + (D_ctx_80177A48[3] * 74.0f) + (sp4C.x * 0.6f), - actor3->obj.pos.y - 232.0f + (sp4C.y * 0.8f), - actor3->obj.pos.z - 1190.0f + (sp4C.z * 0.8f), sp4C.x, sp4C.y, sp4C.z, + Actor_SpawnGreatFoxLaser(100, greatFox->obj.pos.x + (D_ctx_80177A48[3] * 74.0f) + (sp4C.x * 0.6f), + greatFox->obj.pos.y - 232.0f + (sp4C.y * 0.8f), + greatFox->obj.pos.z - 1190.0f + (sp4C.z * 0.8f), sp4C.x, sp4C.y, sp4C.z, sp68, sp64, 0.0f); } if (player->csEventTimer == 1) { @@ -2190,24 +2192,24 @@ void Meteo_Effect371_Draw(Effect371* this) { } } -void Meteo_8018DF08(ActorCutscene* this, s32 idx) { +void Meteo_LevelComplete_SetupTeam(ActorCutscene* this, s32 teamIdx) { Actor_Initialize(this); this->obj.status = OBJ_INIT; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos.x = D_i2_801955D0[idx].x + gPlayer[0].pos.x; - this->obj.pos.y = D_i2_801955D0[idx].y + gPlayer[0].pos.y; - this->obj.pos.z = D_i2_801955D0[idx].z + gPlayer[0].trueZpos; + this->obj.pos.x = sMeLevelCompleteTeamSetupPos[teamIdx].x + gPlayer[0].pos.x; + this->obj.pos.y = sMeLevelCompleteTeamSetupPos[teamIdx].y + gPlayer[0].pos.y; + this->obj.pos.z = sMeLevelCompleteTeamSetupPos[teamIdx].z + gPlayer[0].trueZpos; this->rot_0F4.y = 0.0f; - this->rot_0F4.z = D_i2_80195600[idx]; + this->rot_0F4.z = sMeLevelCompleteTeamSetupModel[teamIdx]; Object_SetInfo(&this->info, this->obj.id); - if (idx == 3) { + if (teamIdx == 3) { AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; } else { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); @@ -2356,15 +2358,15 @@ void Meteo_LevelComplete(Player* player) { Object_Kill(&gActors[2].obj, gActors[2].sfxSource); if (gTeamShields[TEAM_ID_FALCO] > 0) { - Meteo_8018DF08(&gActors[0], 0); + Meteo_LevelComplete_SetupTeam(&gActors[0], 0); } if (gTeamShields[TEAM_ID_SLIPPY] > 0) { - Meteo_8018DF08(&gActors[1], 1); + Meteo_LevelComplete_SetupTeam(&gActors[1], 1); } if (gTeamShields[TEAM_ID_PEPPY] > 0) { - Meteo_8018DF08(&gActors[2], 2); + Meteo_LevelComplete_SetupTeam(&gActors[2], 2); } - Meteo_8018DF08(&gActors[3], 3); + Meteo_LevelComplete_SetupTeam(&gActors[3], 3); break; case 370: diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index e892400e..4f8399d3 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -17,21 +17,21 @@ void SectorX_SxSpyborg_PostLimbDraw(s32, Vec3f*, void*); void SectorX_8018F030(void) { s32 i; - Actor* actor = &gActors[0]; + SxSlippy* slippy = &gActors[0]; - for (i = 0; i < ARRAY_COUNT(gActors); i++, actor++) { - if (actor->obj.status == OBJ_FREE) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_SX_SLIPPY; - actor->animFrame = 1; - actor->obj.rot.y = 180.0f; - actor->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f; - actor->obj.pos.y = gPlayer[0].cam.eye.y + 200.0f; - actor->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + 300.0f; - actor->iwork[11] = 1; - actor->aiType = AI360_SLIPPY; - Object_SetInfo(&actor->info, actor->obj.id); + for (i = 0; i < ARRAY_COUNT(gActors); i++, slippy++) { + if (slippy->obj.status == OBJ_FREE) { + Actor_Initialize(slippy); + slippy->obj.status = OBJ_INIT; + slippy->obj.id = OBJ_ACTOR_SX_SLIPPY; + slippy->animFrame = 1; + slippy->obj.rot.y = 180.0f; + slippy->obj.pos.x = gPlayer[0].cam.eye.x - 300.0f; + slippy->obj.pos.y = gPlayer[0].cam.eye.y + 200.0f; + slippy->obj.pos.z = gPlayer[0].cam.eye.z - gPathProgress + 300.0f; + slippy->iwork[11] = 1; + slippy->aiType = AI360_SLIPPY; + Object_SetInfo(&slippy->info, slippy->obj.id); Radio_PlayMessage(gMsg_ID_5475, RCID_SLIPPY); break; } @@ -193,7 +193,7 @@ void SectorX_SxSlippy_Draw(SxSlippy* this) { void SectorX_8018FA04(f32 x, f32 y, f32 z) { s32 i; - Actor* actor; + Actor* slippy; f32 yRot; f32 xRot; f32 pad; @@ -201,16 +201,16 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { Vec3f dest; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - actor = &gActors[i]; - if (actor->obj.status == OBJ_FREE) { - Actor_Initialize(actor); - actor->obj.status = OBJ_INIT; - actor->obj.id = OBJ_ACTOR_SX_SLIPPY; - actor->obj.pos.x = x; - actor->obj.pos.y = y; - actor->obj.pos.z = z; - Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(aSxBaseWallTile1Hitbox); + slippy = &gActors[i]; + if (slippy->obj.status == OBJ_FREE) { + Actor_Initialize(slippy); + slippy->obj.status = OBJ_INIT; + slippy->obj.id = OBJ_ACTOR_SX_SLIPPY; + slippy->obj.pos.x = x; + slippy->obj.pos.y = y; + slippy->obj.pos.z = z; + Object_SetInfo(&slippy->info, slippy->obj.id); + slippy->info.hitbox = SEGMENTED_TO_VIRTUAL(aSxBaseWallTile1Hitbox); xRot = Math_Atan2F(gPlayer[0].pos.x - x, gPlayer[0].trueZpos - z); pad = sqrtf(SQ(gPlayer[0].pos.x - x) + SQ(gPlayer[0].trueZpos - z)); yRot = -Math_Atan2F(gPlayer[0].pos.y - y, pad); @@ -220,9 +220,9 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { src.y = 0.0f; src.z = 60.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.y = dest.y; - actor->vel.z = dest.z - gPathVelZ; + slippy->vel.x = dest.x; + slippy->vel.y = dest.y; + slippy->vel.z = dest.z - gPathVelZ; break; } } @@ -230,36 +230,36 @@ void SectorX_8018FA04(f32 x, f32 y, f32 z) { void SectorX_8018FBBC(Vec3f* pos) { s32 i; - Actor* actor; + Actor* slippy; f32 xRot; f32 yRot; Vec3f src; Vec3f dest; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - actor = &gActors[i]; - if ((actor->obj.status >= OBJ_ACTIVE) && (fabsf(pos->x - actor->obj.pos.x) < 2500.0f) && - (fabsf(pos->z - actor->obj.pos.z) < 2500.0f) && (actor->state != 1000) && (actor->timer_0C2 == 0) && - (actor->scale < 0.0f) && - Object_CheckHitboxCollision(pos, actor->info.hitbox, &actor->obj, actor->vwork[29].x, actor->vwork[29].y, - actor->vwork[29].z + actor->rot_0F4.z)) { - Play_PlaySfxFirstPlayer(actor->sfxSource, NA_SE_SLIPPY_HIT); - actor->state = 1000; - xRot = Math_Atan2F(actor->obj.pos.x - pos->x, actor->obj.pos.z - pos->z); - yRot = -Math_Atan2F(actor->obj.pos.y - pos->y, - sqrtf(SQ(actor->obj.pos.x - pos->x) + SQ(actor->obj.pos.z - pos->z))); + slippy = &gActors[i]; + if ((slippy->obj.status >= OBJ_ACTIVE) && (fabsf(pos->x - slippy->obj.pos.x) < 2500.0f) && + (fabsf(pos->z - slippy->obj.pos.z) < 2500.0f) && (slippy->state != 1000) && (slippy->timer_0C2 == 0) && + (slippy->scale < 0.0f) && + Object_CheckHitboxCollision(pos, slippy->info.hitbox, &slippy->obj, slippy->vwork[29].x, + slippy->vwork[29].y, slippy->vwork[29].z + slippy->rot_0F4.z)) { + Play_PlaySfxFirstPlayer(slippy->sfxSource, NA_SE_SLIPPY_HIT); + slippy->state = 1000; + xRot = Math_Atan2F(slippy->obj.pos.x - pos->x, slippy->obj.pos.z - pos->z); + yRot = -Math_Atan2F(slippy->obj.pos.y - pos->y, + sqrtf(SQ(slippy->obj.pos.x - pos->x) + SQ(slippy->obj.pos.z - pos->z))); Matrix_RotateY(gCalcMatrix, xRot, MTXF_NEW); Matrix_RotateX(gCalcMatrix, yRot, MTXF_APPLY); src.x = 0.0f; src.y = 0.0f; src.z = 20.0f; Matrix_MultVec3f(gCalcMatrix, &src, &dest); - actor->vel.x = dest.x; - actor->vel.z = 10.0f; - actor->vel.y = dest.y; - actor->fwork[15] = actor->vel.x * 0.2f; - actor->fwork[16] = actor->vel.y * -0.2f; - actor->timer_0C6 = 10; + slippy->vel.x = dest.x; + slippy->vel.z = 10.0f; + slippy->vel.y = dest.y; + slippy->fwork[15] = slippy->vel.x * 0.2f; + slippy->fwork[16] = slippy->vel.y * -0.2f; + slippy->timer_0C6 = 10; } } } @@ -1162,10 +1162,10 @@ void SectorX_SxSpyborg_Update(SxSpyborg* this) { } } -bool SectorX_SxSpyborg_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { +bool SectorX_SxSpyborg_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { Vec3f src = { 0.0f, 0.0f, 0.0f }; Vec3f dest; - SxSpyborg* boss = (SxSpyborg*) data; + SxSpyborg* boss = (SxSpyborg*) thisx; if (D_i2_80195640 != 0) { *dList = NULL; @@ -1284,14 +1284,14 @@ bool SectorX_SxSpyborg_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, return false; } -void SectorX_SxSpyborg_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* data) { +void SectorX_SxSpyborg_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp64 = { 87.0f, -323.0f, 200.0f }; Vec3f sp58 = { 87.0f, -323.0f, -200.0f }; Vec3f sp4C = { 87.0f, -323.0f, 200.0f }; Vec3f sp40 = { 87.0f, -323.0f, -200.0f }; Vec3f src; Vec3f dest; - Boss* boss = (Boss*) data; + SxSpyborg* boss = (SxSpyborg*) thisx; src.x = 0.0f; src.y = 0.0f; @@ -1386,7 +1386,7 @@ void SectorX_SxSpyborg_Draw(SxSpyborg* this) { Matrix_Translate(gGfxMatrix, this->fwork[35], this->fwork[36], this->fwork[37], MTXF_APPLY); Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); } @@ -1402,7 +1402,7 @@ void SectorX_SxSpyborg_Draw(SxSpyborg* this) { Matrix_Translate(gGfxMatrix, this->fwork[38], this->fwork[39], this->fwork[40], MTXF_APPLY); Matrix_Scale(gGfxMatrix, fwork, fwork, fwork, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_102ED50); + gSPDisplayList(gMasterDisp++, aBlueSphereDL); Matrix_Pop(&gGfxMatrix); } @@ -1699,7 +1699,7 @@ void SectorX_801944D4(ActorCutscene* this, s32 index) { Object_SetInfo(&this->info, this->obj.id); if (index == 3) { - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 20; this->obj.rot.x = -player->rot.x - 10.0f; this->obj.rot.y = (player->rot.y + 180.0f) - 10.0f; diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 5e3c9cb2..8b1230f9 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2137,7 +2137,7 @@ void Area6_8018D4E0(Actor* this) { } void Area6_8018D5C8(void) { - s32 i = 0; + s32 i = 0; // Fake ? Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; @@ -2146,16 +2146,17 @@ void Area6_8018D5C8(void) { gActors[i].obj.pos.y = 3750.0f; gActors[i].obj.pos.z = 13000.0f; - gActors[i].animFrame = 1; + gActors[i].animFrame = ACTOR_CS_GREAT_FOX; gActors[i].state = 90; gActors[i].fwork[0] = 0.0f; gActors[i].obj.id = OBJ_ACTOR_CUTSCENE; + Object_SetInfo(&gActors[i].info, gActors[i].obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, gActors[i].sfxSource, 0); } void Area6_8018D694(ActorCutscene* this, s32 index) { - Vec3f sp2C[5] = { + Vec3f commanderSetupPos[5] = { { -150.0f, 0.0f, 200.0f }, { 0.0f, 50.0f, 0.0f }, { 150.0f, -50.0f, 100.0f }, { -350.0f, 100.0f, 300.0f }, { 100.0f, -300.0f, 100.0f }, }; @@ -2164,18 +2165,19 @@ void Area6_8018D694(ActorCutscene* this, s32 index) { this->obj.status = OBJ_ACTIVE; this->obj.id = OBJ_ACTOR_CUTSCENE; - this->obj.pos.x = sp2C[index].x + 100.0f; - this->obj.pos.y = sp2C[index].y + 350.0f; - this->obj.pos.z = sp2C[index].z + 1000.0f; + this->obj.pos.x = commanderSetupPos[index].x + 100.0f; + this->obj.pos.y = commanderSetupPos[index].y + 350.0f; + this->obj.pos.z = commanderSetupPos[index].z + 1000.0f; this->state = 1; - this->animFrame = 28; + this->animFrame = ACTOR_CS_COMMANDER_GLOW; this->iwork[11] = 1; this->rot_0F4.y = 90.0f; this->fwork[0] = 1.5f; this->fwork[7] = RAND_FLOAT_SEEDED(360.0f); this->fwork[8] = RAND_FLOAT_SEEDED(360.0f); this->fwork[9] = RAND_FLOAT_SEEDED(360.0f); + Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); } @@ -2575,7 +2577,7 @@ void Area6_8018EA88(ActorCutscene* this) { this->obj.pos.x = 0.0f; this->obj.pos.y = 0.0f; this->obj.pos.z = gBosses[0].obj.pos.z + 500.0f; - this->animFrame = 37; + this->animFrame = ACTOR_CS_37; this->state = 100; this->iwork[0] = 255; this->iwork[1] = 255; @@ -2599,9 +2601,10 @@ void Area6_8018EB3C(ActorCutscene* this) { this->obj.pos.x = player->pos.x; this->obj.pos.y = player->pos.y + 600.0f; this->obj.pos.z = player->pos.z + 2800.0f; - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 100; this->fwork[0] = 0.0f; + Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 21e3cb9c..39455786 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -801,20 +801,20 @@ void Aquas_801AA4BC(Player* player) { } void Aquas_UpdateCamera(Player* player) { - f32 var_fv0 = gInputPress->stick_x; - f32 var_fv1 = -gInputPress->stick_y; - f32 temp; + f32 stickX = +gInputPress->stick_x; + f32 stickY = -gInputPress->stick_y; + f32 zRot; if (player->state_1C8 != PLAYERSTATE_1C8_ACTIVE) { - var_fv0 = var_fv1 = 0.0f; + stickX = stickY = 0.0f; } - Math_SmoothStepToF(&player->unk_030, var_fv0, 0.05f, 1.0f, 0.05f); + Math_SmoothStepToF(&player->unk_030, stickX, 0.05f, 1.0f, 0.05f); if (player->pos.y < (gGroundHeight + 50.0f)) { - Math_SmoothStepToF(&player->unk_02C, var_fv1 * 0.3f, 0.05f, 1.0f, 0.05f); + Math_SmoothStepToF(&player->unk_02C, stickY * 0.3f, 0.05f, 1.0f, 0.05f); } else { - Math_SmoothStepToF(&player->unk_02C, var_fv1, 0.05f, 2.0f, 0.05f); + Math_SmoothStepToF(&player->unk_02C, stickY, 0.05f, 2.0f, 0.05f); } gCsCamEyeX = (player->pos.x - player->xPath) * (600.0f / player->pathWidth); @@ -852,9 +852,9 @@ void Aquas_UpdateCamera(Player* player) { Math_SmoothStepToF(&player->unk_014, 1.0f, 1.0f, 0.05f, 0.0f); - temp = -player->rot.z; + zRot = -player->rot.z; - Math_SmoothStepToF(&player->camRoll, temp * 0.3f, 0.1f, 1.5f, 0.0f); + Math_SmoothStepToF(&player->camRoll, zRot * 0.3f, 0.1f, 1.5f, 0.0f); } void Aquas_BlueMarineMove(Player* player) { @@ -862,9 +862,9 @@ void Aquas_BlueMarineMove(Player* player) { Vec3f sp80; Vec3f sp74; Vec3f sp68; - f32 sp64; + f32 stickX; f32 sp60; - f32 sp5C; + f32 stickY; f32 sp58; f32 var_fa0; f32 var_fa1; @@ -875,12 +875,12 @@ void Aquas_BlueMarineMove(Player* player) { Aquas_801A99D4(player); Aquas_801A8E30(); - sp64 = -gInputPress->stick_x; - sp5C = gInputPress->stick_y; + stickX = -gInputPress->stick_x; + stickY = +gInputPress->stick_y; gPlayerTurnStickMod = 0.68f; - Math_SmoothStepToF(&player->unk_180, sp64 * gPlayerTurnStickMod, 1.0f, 10.0f, 0.0001f); + Math_SmoothStepToF(&player->unk_180, stickX * gPlayerTurnStickMod, 1.0f, 10.0f, 0.0001f); var_fa0 = fabsf(player->unk_180 * 0.5f); if (var_fa0 > 2.0f) { @@ -917,7 +917,7 @@ void Aquas_BlueMarineMove(Player* player) { Math_SmoothStepToF(&D_i3_801C41B8[9], 0.0f, 0.1f, 20.0f, 0.0001f); } - Math_SmoothStepToF(&player->unk_17C, sp5C * gPlayerTurnStickMod, 1.0f, 7.0f, 0.0001f); + Math_SmoothStepToF(&player->unk_17C, stickY * gPlayerTurnStickMod, 1.0f, 7.0f, 0.0001f); var_fa1 = fabsf(player->unk_17C * 0.05f); if (var_fa1 > 2.0f) { @@ -963,7 +963,7 @@ void Aquas_BlueMarineMove(Player* player) { Math_SmoothStepToF(&player->rot.x, sp58, 1.0f, gPlayerTurnRate, 0.00001f); var_fv1_2 = 2.0f; - if (sp64 == 0.0f) { + if (stickX == 0.0f) { var_fv1_2 = 1.0f; } @@ -3677,7 +3677,7 @@ f32 D_i3_801C0224[11] = { Vec3f D_i3_801C0250 = { 0.0f, 0.0f, 0.0f }; bool Aquas_AqSculpin_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = (Actor*) thisx; + AqSculpin* this = (AqSculpin*) thisx; if ((this->timer_0C6 % 2) == 0) { RCP_SetupDL(&gMasterDisp, SETUPDL_57); @@ -3693,7 +3693,7 @@ bool Aquas_AqSculpin_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Ve void Aquas_AqSculpin_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = D_i3_801C0250; - Actor* this = (Actor*) thisx; + AqSculpin* this = (AqSculpin*) thisx; if (this->health == 0) { switch (limbIndex) { @@ -4411,7 +4411,7 @@ bool Aquas_AqSpindlyFish_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos void Aquas_AqSpindlyFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp24 = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + AqSpindlyFish* this = (AqSpindlyFish*) thisx; if (this->health == -100) { switch (limbIndex) { @@ -4493,7 +4493,7 @@ void Aquas_AqSpindlyFish_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Aquas_AqSpindlyFish_Draw(Actor* this) { +void Aquas_AqSpindlyFish_Draw(AqSpindlyFish* this) { Vec3f frameTable[30]; RCP_SetupDL(&gMasterDisp, SETUPDL_57); @@ -4832,7 +4832,7 @@ void Aquas_AqGaroa_Update(AqGaroa* this) { } bool Aquas_AqGaroa_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* thisx) { - Actor* this = thisx; + AqGaroa* this = (AqGaroa*) thisx; RCP_SetupDL(&gMasterDisp, SETUPDL_58); if ((this->timer_0C6 % 2) != 0) { @@ -4853,7 +4853,7 @@ void Aquas_AqGaroa_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp40 = { 108.0f, 0.0f, 24.0f }; Vec3f sp34 = { 102.0f, 14.0f, -21.0f }; Vec3f sp28 = { 0.0f, 0.0f, 0.0f }; - Actor* this = (Actor*) thisx; + AqGaroa* this = (AqGaroa*) thisx; switch (limbIndex) { case 1: @@ -5099,7 +5099,7 @@ void Aquas_AqSquid_Update(AqSquid* this) { if (this->animFrame >= 37) { this->obj.rot.y += 20.0f; this->fwork[2] += 20.0f; - if (((gGameFrameCount % 4) == 0)) { + if ((gGameFrameCount % 4) == 0) { Matrix_RotateY(gCalcMatrix, this->fwork[2] * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, this->vwork[27].x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gCalcMatrix, this->vwork[27].z * M_DTOR, MTXF_APPLY); @@ -5137,7 +5137,7 @@ void Aquas_AqSquid_Update(AqSquid* this) { void Aquas_AqSquid_PostLimbDraw(s32 limbIndex, Vec3f* rot, void* thisx) { Vec3f sp34 = { 0.0f, 0.0f, 0.0f }; Vec3f sp28 = { -27.0f, 7.0f, 5.0f }; - Actor* this = (Actor*) thisx; + AqSquid* this = (AqSquid*) thisx; if ((this->health == 0) || (limbIndex == 12)) { switch (limbIndex) { @@ -5250,11 +5250,11 @@ void Aquas_AqSeaweed_Update(AqSeaweed* this) { /* fallthrough */ case 1: this->animFrame += 2; - if (this->animFrame >= Animation_GetFrameCount(&D_AQ_6020A40)) { + if (this->animFrame >= Animation_GetFrameCount(&aAqSeaweedAnim)) { this->animFrame = 0; } - sp3E = Animation_GetFrameData(&D_AQ_6020A40, this->animFrame, frameTable); + sp3E = Animation_GetFrameData(&aAqSeaweedAnim, this->animFrame, frameTable); if ((fabsf(this->obj.pos.x - gPlayer[0].pos.x) < 150.0f) && (fabsf(this->obj.pos.y - gPlayer[0].pos.y) < 500.0f) && @@ -5288,7 +5288,7 @@ void Aquas_AqSeaweed_Draw(AqSeaweed* this) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -void Venom1_AqBoulder_Init(AqBoulder* this) { +void Aquas_AqBoulder_Init(AqBoulder* this) { if (this->state == 0) { this->scale = 1.0f; this->gravity = 0.3f; @@ -5507,7 +5507,7 @@ s32 D_i3_801C04A0[6] = { 15, -15, 10, -10, 7, -7, }; -void Venom1_AqJellyfish_Init(AqJellyfish* this) { +void Aquas_AqJellyfish_Init(AqJellyfish* this) { s32 sp64; s32 sp60; Vec3f sp54; diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 23705049..e0fd89b4 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -3286,7 +3286,7 @@ void Zoness_801989FC(ZoSarumarine* this) { for (i = 0; i < 2; i++) { if (sZoSwork[ZO_BSS_11 + i] != 0) { - for (j = 0, actor246 = gActors; j < ARRAY_COUNT(gActors); j++, actor246++) { + for (j = 0, actor246 = &gActors[0]; j < ARRAY_COUNT(gActors); j++, actor246++) { if (actor246->obj.status == OBJ_FREE) { Actor_Initialize(actor246); actor246->obj.status = OBJ_INIT; @@ -4010,7 +4010,7 @@ s32 D_i3_801BF78C[30] = { }; f32 D_i3_801BF804[8] = { 0.0f, 0.0f, 270.0f, 90.0f, 0.0f, 180.0f, 400.0f, 400.0f }; -void Zoness_ZoCargoShip_Init(Actor* actor) { +void Zoness_ZoTanker_Init(ZoTanker* actor) { s32 temp_v1; s32 var_s3; s32 i; @@ -4080,38 +4080,38 @@ void Zoness_ZoCargoShip_Init(Actor* actor) { AUDIO_PLAY_SFX(NA_SE_EN_SHIP_ENGINE_L, actor->sfxSource, 4); } -void Zoness_ZoCargoShip_Update(Actor* this) { +void Zoness_ZoTanker_Update(ZoTanker* this) { f32 sp6C; s32 sp68; s32 i; Vec3f sp58; - Actor* otherActor; + Actor* actor; Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); switch (this->state) { case 0: for (i = 1; i < 3; i++) { - otherActor = &gActors[this->iwork[i]]; - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->iwork[1] == this->index) && - (otherActor->obj.id == OBJ_ACTOR_ZO_CONTAINER)) { + actor = &gActors[this->iwork[i]]; + if ((actor->obj.status != OBJ_FREE) && (actor->iwork[1] == this->index) && + (actor->obj.id == OBJ_ACTOR_ZO_CONTAINER)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF744[i], &sp58); - otherActor->obj.pos.x = this->obj.pos.x + sp58.x; - otherActor->obj.pos.y = this->obj.pos.y + sp58.y; - otherActor->obj.pos.z = this->obj.pos.z + sp58.z; + actor->obj.pos.x = this->obj.pos.x + sp58.x; + actor->obj.pos.y = this->obj.pos.y + sp58.y; + actor->obj.pos.z = this->obj.pos.z + sp58.z; } } break; case 1: for (i = 1; i < 3; i++) { - otherActor = &gActors[this->iwork[i]]; - if ((otherActor->obj.status != OBJ_FREE) && (otherActor->obj.id == OBJ_ACTOR_ZO_SUPPLYCRANE) && - (otherActor->iwork[1] == this->index)) { + actor = &gActors[this->iwork[i]]; + if ((actor->obj.status != OBJ_FREE) && (actor->obj.id == OBJ_ACTOR_ZO_SUPPLYCRANE) && + (actor->iwork[1] == this->index)) { Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF768[i], &sp58); - otherActor->obj.pos.x = this->obj.pos.x + sp58.x; - otherActor->obj.pos.y = this->obj.pos.y + sp58.y; - otherActor->obj.pos.z = this->obj.pos.z + sp58.z; + actor->obj.pos.x = this->obj.pos.x + sp58.x; + actor->obj.pos.y = this->obj.pos.y + sp58.y; + actor->obj.pos.z = this->obj.pos.z + sp58.z; } } break; @@ -4123,11 +4123,11 @@ void Zoness_ZoCargoShip_Update(Actor* this) { } } -void Zoness_ZoCargoShip_Draw(Actor* this) { +void Zoness_ZoTanker_Draw(ZoTanker* this) { gSPDisplayList(gMasterDisp++, D_ZO_6006360); } -void Zoness_ZoContainer_Init(Actor* this) { +void Zoness_ZoContainer_Init(ZoContainer* this) { if (this->iwork[3] == 0) { this->iwork[0] = this->obj.rot.z / 10.0f; this->obj.rot.z = 0.0f; @@ -4260,7 +4260,7 @@ void Zoness_ZoRadarBuoy_Update(ZoRadarBuoy* this) { switch (this->state) { case 0: - for (i = 0, searchLight = gActors; i < ARRAY_COUNT(gActors); i++, searchLight++) { + for (i = 0, searchLight = &gActors[0]; i < ARRAY_COUNT(gActors); i++, searchLight++) { if (searchLight->obj.status == OBJ_FREE) { Actor_Initialize(searchLight); searchLight->obj.status = OBJ_INIT; @@ -4329,18 +4329,18 @@ void Zoness_ZoRadarBuoy_Update(ZoRadarBuoy* this) { } } -void Zoness_ZoRadarBuoy_Draw(Actor* this) { - gSPDisplayList(gMasterDisp++, D_ZO_6002E10); +void Zoness_ZoRadarBuoy_Draw(ZoRadarBuoy* this) { + gSPDisplayList(gMasterDisp++, aZoRadarBuoyDL); } Vec3f D_i3_801BF8AC = { 230.0f, -50.0f, 0.0f }; Vec3f D_i3_801BF8B8 = { 230.0f, -250.0f, 0.0f }; -void Zoness_ZoSupplyCrane_Init(Actor* this) { +void Zoness_ZoSupplyCrane_Init(ZoSupplyCrane* this) { s32 i; s32 sp38; Vec3f dest; - ZoContainer* actor251; + ZoContainer* container; this->scale = -1.0f; @@ -4372,24 +4372,24 @@ void Zoness_ZoSupplyCrane_Init(Actor* this) { Matrix_RotateY(gCalcMatrix, this->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_i3_801BF8B8, &dest); - for (i = 0, actor251 = &gActors[0]; i < ARRAY_COUNT(gActors); i++, actor251++) { - if (actor251->obj.status == OBJ_FREE) { - Actor_Initialize(actor251); - actor251->obj.status = OBJ_INIT; - actor251->obj.id = OBJ_ACTOR_ZO_CONTAINER; - actor251->obj.pos.x = this->obj.pos.x + dest.x; - actor251->obj.pos.y = this->obj.pos.y + dest.y + this->fwork[2]; - actor251->obj.pos.z = this->obj.pos.z + dest.z + this->fwork[0]; - actor251->obj.rot.y = this->obj.rot.y; - actor251->iwork[0] = sp38; - actor251->iwork[3] = 777; - Object_SetInfo(&actor251->info, actor251->obj.id); + for (i = 0, container = &gActors[0]; i < ARRAY_COUNT(gActors); i++, container++) { + if (container->obj.status == OBJ_FREE) { + Actor_Initialize(container); + container->obj.status = OBJ_INIT; + container->obj.id = OBJ_ACTOR_ZO_CONTAINER; + container->obj.pos.x = this->obj.pos.x + dest.x; + container->obj.pos.y = this->obj.pos.y + dest.y + this->fwork[2]; + container->obj.pos.z = this->obj.pos.z + dest.z + this->fwork[0]; + container->obj.rot.y = this->obj.rot.y; + container->iwork[0] = sp38; + container->iwork[3] = 777; + Object_SetInfo(&container->info, container->obj.id); this->iwork[3] = i; break; } } if (i >= ARRAY_COUNT(gActors)) { - actor251->obj.status = OBJ_FREE; + container->obj.status = OBJ_FREE; } } @@ -4622,7 +4622,7 @@ void Zoness_ZoBarrier_Init(ZoBarrier* this) { this->work_046 = i + 1; Object_SetInfo(&gActors[i].info, gActors[i].obj.id); - gActors[i].info.hitbox = SEGMENTED_TO_VIRTUAL(D_ZO_602C028); + gActors[i].info.hitbox = SEGMENTED_TO_VIRTUAL(aZoBarrierHitbox2); break; } } @@ -4687,11 +4687,11 @@ bool Zoness_ZoBarrier_OverrideLimbDraw(s32 limbIndex, Gfx** dList, Vec3f* pos, V return false; } -void Zoness_ZoBarrier_Draw(Actor* this) { +void Zoness_ZoBarrier_Draw(ZoBarrier* this) { Vec3f frameTable[10]; Animation_GetFrameData(&D_ZO_601FBC4, 0, frameTable); - Animation_DrawSkeleton(1, D_ZO_601FC90, frameTable, Zoness_ZoBarrier_OverrideLimbDraw, NULL, this, + Animation_DrawSkeleton(1, aZoBarrierSkel, frameTable, Zoness_ZoBarrier_OverrideLimbDraw, NULL, this, &gIdentityMatrix); } diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 7d11e33c..69051b10 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -1030,7 +1030,7 @@ void Bolse_BoBase_Draw(BoBase* this) { f32 D_i4_8019EFDC[] = { 180.0f, -180.0f, 0.0f }; f32 D_i4_8019EFE8[] = { 100.0f, 200.0f, -80.0f }; f32 D_i4_8019EFF4[] = { 400.0f, 800.0f, 1200.0f }; -s32 D_i4_8019F000[] = { 0, 0, 0 }; +s32 D_i4_8019F000[] = { ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING, ACTOR_CS_TEAM_ARWING }; f32 D_i4_8019F00C[] = { 0.0f, 80.0f, 150.0f }; f32 D_i4_8019F018[] = { 3.0f, -4.0f, 5.0f, 700.0f, 300.0f, 1000.0f }; @@ -1059,7 +1059,7 @@ void Bolse_8018EC1C(void) { actor->obj.pos.x = 0; actor->obj.pos.y = 0.0f; actor->obj.pos.z = -9000.0f; - actor->animFrame = 30; + actor->animFrame = ACTOR_CS_30; actor->fwork[20] = 1.0f; actor->obj.id = OBJ_ACTOR_CUTSCENE; Object_SetInfo(&actor->info, actor->obj.id); @@ -1093,7 +1093,7 @@ void Bolse_8018ED44(void) { actor->obj.pos.y = gActors[50].obj.pos.y + RAND_FLOAT(100.0f); actor->obj.pos.z = -9000.0f; actor->timer_0BC = 50; - actor->animFrame = 31; + actor->animFrame = ACTOR_CS_31; actor->vel.z = 200.0f; Object_SetInfo(&actor->info, actor->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_SHOT_0, actor->sfxSource, 4); @@ -1115,7 +1115,7 @@ void Bolse_8018EE4C(f32 x, f32 y) { actor->obj.pos.y = gActors[50].obj.pos.y + y; actor->obj.pos.z = -9000.0f; actor->timer_0BC = 200; - actor->animFrame = 32; + actor->animFrame = ACTOR_CS_32; actor->vel.z = 80.0f; actor->obj.rot.z = RAND_FLOAT_CENTERED(120.0f); actor->rot_0F4.z = RAND_FLOAT_CENTERED(1.0f); diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index 81799cb2..c548facc 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -609,7 +609,7 @@ void Fortuna_CsExplosion(void) { actor->obj.pos.x = 0.0f; actor->obj.pos.y = 0.0f; actor->obj.pos.z = -9000.0f; - actor->animFrame = 11; + actor->animFrame = ACTOR_CS_FO_EXPLOSION; actor->scale = 0.0f; Object_SetInfo(&actor->info, actor->obj.id); } @@ -636,7 +636,7 @@ void Fortuna_LevelComplete_CsSpawnTeam(ActorCutscene* this, s32 actorIdx) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { this->obj.pos.z = -9500.0f; - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->vel.z = 22.0f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index 87fad000..a231b690 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -11,7 +11,7 @@ Vec3f D_i4_8019F0F0[] = { { 7000.0f, 500.0f, -50 }, { 7700.0f, 550.0f, -50.0f }, { 6000.0f, 300.0f, 1950.0f } }; Vec3f D_i4_8019F114[] = { { -30.0f, 0.0f, 0.0f }, { -30.0f, 0.0f, 0.0f }, { 0.0f, 5.0f, -40.0f } }; Vec3f D_i4_8019F138[] = { { 0.0f, -135.0f, -5.0f }, { 0.0f, -135.0f, 15.0f }, { -10.0f, 135.0f, 0.0f } }; -s32 D_i4_8019F15C[] = { 33, 34, 33 }; +s32 sKaStartCsModels[] = { ACTOR_CS_CORNERIAN_FIGHTER, ACTOR_CS_KA_ENEMY, ACTOR_CS_CORNERIAN_FIGHTER }; Vec3f D_i4_8019F168[] = { { 700.0f, 50.0f, -700.0f }, { -500.0f, 150.0f, -500 }, { 100.0f, 100.0f, -1200.0f } }; f32 D_i4_8019F18C[] = { 200.0f, 160.0f, 185.0f }; u8 D_i4_8019F198[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -338,7 +338,7 @@ void Katina_StartCutsceneUpdate(void) { actor->vel.x = dest.x; actor->vel.y = dest.y; actor->vel.z = dest.z; - actor->animFrame = D_i4_8019F15C[i]; + actor->animFrame = sKaStartCsModels[i]; actor->drawShadow = true; actor->iwork[KA_ACTOR_IWORK_11] = 1; Object_SetInfo(&actor->info, actor->obj.id); @@ -1781,7 +1781,7 @@ void Katina_SFTeam_LevelComplete_Update(void) { actor->state = 1; if (i >= 3) { - actor->animFrame = 33; + actor->animFrame = ACTOR_CS_CORNERIAN_FIGHTER; } Object_SetInfo(&actor->info, actor->obj.id); @@ -2643,9 +2643,9 @@ void Katina_EnemyDraw(ActorAllRange* this) { switch (this->animFrame) { case 0: if (this->iwork[KA_ACTOR_LOW_POLY]) { - gSPDisplayList(gMasterDisp++, aKaEnemy1LowPolyDL); + gSPDisplayList(gMasterDisp++, aKaEnemyLowPolyDL); } else { - gSPDisplayList(gMasterDisp++, aKaEnemy1DL); + gSPDisplayList(gMasterDisp++, aKaEnemyDL); } break; diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index 2bcbf72a..dbadf9d5 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -698,7 +698,7 @@ void SectorZ_CsObjectInit(void) { Actor_Initialize(actor); actor->obj.status = OBJ_INIT; actor->obj.id = OBJ_ACTOR_CUTSCENE; - actor->animFrame = 25; + actor->animFrame = ACTOR_CS_SZ_SPACE_JUNK; actor->obj.pos.x = sInitialCsObjectPos[i].x; actor->obj.pos.y = sInitialCsObjectPos[i].y; actor->obj.pos.z = sInitialCsObjectPos[i].z; @@ -718,7 +718,7 @@ void SectorZ_CsGreatFoxInit(void) { greatFox->obj.pos.y = 0.0f; greatFox->obj.pos.z = 0.0f; greatFox->obj.rot.y = 270.0f; - greatFox->animFrame = 1; + greatFox->animFrame = ACTOR_CS_GREAT_FOX; greatFox->vel.x = -20.0f; Object_SetInfo(&greatFox->info, greatFox->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, greatFox->sfxSource, 0); @@ -747,7 +747,7 @@ void SectorZ_CsEnemies(ActorCutscene* this, s32 index) { this->obj.rot.x = 10.0f; this->obj.rot.z = sInitialCsEnemyZrot[index]; - this->animFrame = 26; + this->animFrame = ACTOR_CS_SZ_INVADER; this->iwork[11] = 1; Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_EN_ENGINE_01, this->sfxSource, 4); @@ -1097,7 +1097,7 @@ void SectorZ_CsLevelCompleteTeamInit(ActorCutscene* this, s32 index) { this->iwork[11] = 1; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->fwork[0] = 20.0f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); AUDIO_PLAY_SFX(NA_SE_GREATFOX_BURNER, this->sfxSource, 0); @@ -1124,7 +1124,7 @@ void SectorZ_CsLevelCompleteKattInit(void) { katt->obj.rot.z = -katt->rot_0F4.z; katt->fwork[0] = 30.0f; - katt->animFrame = 24; + katt->animFrame = ACTOR_CS_KATT; katt->iwork[11] = 1; katt->state = 10; katt->timer_0BC = 130; @@ -1656,7 +1656,7 @@ void SectorZ_LevelCompleteCsUpdate(ActorCutscene* this) { break; } - if (this->animFrame == 24) { + if (this->animFrame == ACTOR_CS_KATT) { switch (gCsFrameCount) { case 290: if (gTeamShields[TEAM_ID_FALCO] > 0) { diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 063862c2..d519b371 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -5509,7 +5509,7 @@ void Macbeth_801AC6B4(ActorCutscene* this) { this->obj.rot.y = 180.0f; Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; } f32 D_i5_801BA768 = 0.0f; @@ -6355,7 +6355,7 @@ void Macbeth_801AF27C(ActorCutscene* this, s32 arg1) { this->state = 30; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 21; this->obj.rot.z = 32.5f; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); @@ -6391,7 +6391,7 @@ void Macbeth_801AF44C(void) { actor->obj.rot.z = -330.0f; actor->fwork[0] = 0.0f; - actor->animFrame = 24; + actor->animFrame = ACTOR_CS_KATT; actor->iwork[11] = 1; actor->state = 15; actor->fwork[3] = D_i5_801BA820[4]; @@ -6415,7 +6415,7 @@ void Macbeth_801AF628(ActorCutscene* this, s32 index) { this->obj.pos.x = gPlayer[0].xPath + D_i5_801BA834[index].x; this->obj.pos.y = D_i5_801BA834[index].y; this->obj.pos.z = D_i5_801BA834[index].z - gPathProgress; - this->animFrame = 37; + this->animFrame = ACTOR_CS_37; this->obj.rot.y = D_i5_801BA84C[index]; this->iwork[4] = this->iwork[5] = 192; this->iwork[0] = this->iwork[1] = this->iwork[2] = this->iwork[7] = this->iwork[3] = 255; @@ -7466,7 +7466,7 @@ void Macbeth_LevelComplete1_TeamSetup(Actor* this, s32 teamIndex) { AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); return; } - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 20; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); this->fwork[9] = 20.0f; @@ -7500,7 +7500,7 @@ void Macbeth_801B3718(void) { actor->obj.rot.z = -actor->rot_0F4.z; actor->fwork[0] = 30.0f; - actor->animFrame = 24; + actor->animFrame = ACTOR_CS_KATT; actor->iwork[11] = 1; actor->state = 10; actor->fwork[3] = D_i5_801BA900; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 19212502..3fc15072 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -770,7 +770,7 @@ void Titania_8018B1B4(s32 limbIndex, Vec3f* rot, void* thisx) { } } -void Titania_TiRasco_Update(Actor* this) { +void Titania_TiRasco_Update(TiRasco* this) { Vec3f src; Vec3f dest; Actor* sp3C = this->iwork[0]; @@ -1724,7 +1724,7 @@ void Titania_TiDelphor_Init(TiDelphor* this) { Ground_801B6E20(this->obj.pos.x, this->obj.pos.z + gPathProgress, &sp40, &this->obj.pos.y, &sp40); this->obj.pos.y -= 20.0f; - delphorHead = gActors; + delphorHead = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, delphorHead++) { if (delphorHead->obj.status == OBJ_FREE) { diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 90678564..871d6425 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -20,7 +20,7 @@ void Titania_80187530(ActorCutscene* this) { this->obj.rot.y = 180.0f; Object_SetInfo(&this->info, this->obj.id); AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; } void Titania_801875D0(ActorCutscene* this, s32 arg1) { @@ -276,7 +276,7 @@ void Titania_80188108(Actor* this, s32 index) { this->state = 30; AUDIO_PLAY_SFX(NA_SE_ARWING_ENGINE_FG, this->sfxSource, 4); } else { - this->animFrame = 1; + this->animFrame = ACTOR_CS_GREAT_FOX; this->state = 20; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, this->sfxSource, 0); this->fwork[9] = 20.0f; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index 79e89930..5092f2d8 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -3582,7 +3582,7 @@ void Andross_AndLaserEmitter_Update(AndLaserEmitter* this) { break; case 1: - otherActor = gActors; + otherActor = &gActors[0]; for (i = 0; i < ARRAY_COUNT(gActors); i++, otherActor++) { if ((i != this->index) && (otherActor->obj.status == OBJ_ACTIVE) && (otherActor->obj.id == OBJ_ACTOR_AND_LASER_EMITTER) && @@ -3773,8 +3773,8 @@ void Andross_80193710(void) { Object_SetInfo(&boss->info, boss->obj.id); } -void Andross_801939A0(s32 actorIndex) { - Actor* actor = &gActors[actorIndex]; +void Andross_801939A0(s32 actorIdx) { + Actor* actor = &gActors[actorIdx]; Actor_Initialize(actor); actor->obj.status = OBJ_ACTIVE; @@ -3787,13 +3787,13 @@ void Andross_801939A0(s32 actorIndex) { actor->fwork[0] = 50.0f; actor->fwork[1] = 6.5f; - if (actorIndex == 10) { + if (actorIdx == 10) { actor->iwork[14] = 1; } - if (actorIndex == 1) { + if (actorIdx == 1) { actor->state = 1; actor->work_046 = 255; - actor->animFrame = 1000; + actor->animFrame = ACTOR_CS_1000; } Object_SetInfo(&actor->info, actor->obj.id); @@ -3823,7 +3823,7 @@ void Andross_80193AE4(s32 actorIndex) { if (actorIndex == 0) { actor->state = 200; - actor->animFrame = 1; + actor->animFrame = ACTOR_CS_GREAT_FOX; AUDIO_PLAY_SFX(NA_SE_GREATFOX_ENGINE, actor->sfxSource, 0); } else { actor->iwork[11] = 1; diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 13946c8c..b5f3a9a0 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -7,6 +7,8 @@ #include "global.h" #include "assets/ast_sector_y.h" +#define SHOGUN_SHIP (0) + typedef void (*BossFuncs)(SyShogun*); void SectorY_80198244(SyShogun*); @@ -83,7 +85,7 @@ void SectorY_SyShogun_Init(SyShogun* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_START_360) { this->obj.pos.z = -28900.0f; - gScenery360[0].obj.pos.z = -30000.0f; + gScenery360[SHOGUN_SHIP].obj.pos.z = -30000.0f; } this->rot_078.y = 0.0f; @@ -626,8 +628,8 @@ void SectorY_80199438(SyShogun* this) { Object_Kill(&gActors[D_ctx_80177A10[9]].obj, gActors[D_ctx_80177A10[9]].sfxSource); if ((gBosses[1].obj.status == OBJ_FREE) || (gBosses[2].obj.status == OBJ_FREE)) { gBosses[0].work_04A = 1; - gScenery360[0].info.dList = aSySaruzinDL; - gScenery360[0].info.drawType = 0; + gScenery360[SHOGUN_SHIP].info.dList = aSySaruzinDL; + gScenery360[SHOGUN_SHIP].info.drawType = 0; } else { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; Camera_UpdateArwing360(&gPlayer[0], true); @@ -1091,7 +1093,7 @@ void SectorY_8019AEEC(SyShogun* this) { this->vel.z = 80.0f; this->fwork[13] = 80.0f; this->obj.pos.z = -12000.0f; - gScenery360[0].obj.pos.z = -20000.0f; + gScenery360[SHOGUN_SHIP].obj.pos.z = -20000.0f; this->fwork[43] = 0.0f; this->vel.y = 0.0f; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -1133,9 +1135,9 @@ bool SectorY_8019B5CC(SyShogun* this) { Math_Vec3fFromAngles(&pos, this->rot_078.x, this->rot_078.y, 700.0f); - if ((fabsf(gScenery360[0].obj.pos.x - (this->obj.pos.x + pos.x)) < 2500.0f) && - (fabsf(gScenery360[0].obj.pos.z - (this->obj.pos.z + pos.z)) < 5000.0f) && - (fabsf(gScenery360[0].obj.pos.y - (this->obj.pos.y + pos.y)) < 1800.0f)) { + if ((fabsf(gScenery360[SHOGUN_SHIP].obj.pos.x - (this->obj.pos.x + pos.x)) < 2500.0f) && + (fabsf(gScenery360[SHOGUN_SHIP].obj.pos.z - (this->obj.pos.z + pos.z)) < 5000.0f) && + (fabsf(gScenery360[SHOGUN_SHIP].obj.pos.y - (this->obj.pos.y + pos.y)) < 1800.0f)) { return true; } @@ -1410,9 +1412,9 @@ void SectorY_SyShogun_Update(SyShogun* this) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { if (this->swork[34] == 1) { if (this->health > 0) { - gScenery360[0].obj.pos.z += 20.0f; + gScenery360[SHOGUN_SHIP].obj.pos.z += 20.0f; } - if (gScenery360[0].obj.pos.z == 0.0f) { + if (gScenery360[SHOGUN_SHIP].obj.pos.z == 0.0f) { this->swork[34]++; } } @@ -2058,11 +2060,11 @@ void SectorY_8019EB80(void) { Object_SetInfo(&actor->info, actor->obj.id); if (i >= 3) { - actor->animFrame = 35; + actor->animFrame = ACTOR_CS_SY_SHIP_1_SHRINK; actor->rot_0F4.z = 0.0f; } if (i >= 7) { - actor->animFrame = 36; + actor->animFrame = ACTOR_CS_SY_SHIP_2; actor->scale = 0.125f; } actor->iwork[11] = 1; @@ -2529,13 +2531,13 @@ void SectorY_801A0510(ActorCutscene* this, s32 arg1) { case 1: case 2: case 8: - this->animFrame = 38; + this->animFrame = ACTOR_CS_38; this->obj.rot.y = 90.0f; Object_SetInfo(&this->info, this->obj.id); break; case 3: - this->animFrame = 36; + this->animFrame = ACTOR_CS_SY_SHIP_2; this->vel.z = -5.0f; this->scale = 1.0f; this->obj.rot.y = 180.0f; @@ -2543,27 +2545,27 @@ void SectorY_801A0510(ActorCutscene* this, s32 arg1) { break; case 4: - this->animFrame = 37; + this->animFrame = ACTOR_CS_37; this->obj.rot.y = 90.0f; Object_SetInfo(&this->info, this->obj.id); break; case 5: case 9: - this->animFrame = 39; + this->animFrame = ACTOR_CS_SY_SHIP_1; this->obj.rot.y = 180.0f; Object_SetInfo(&this->info, this->obj.id); break; case 6: - this->animFrame = 36; + this->animFrame = ACTOR_CS_SY_SHIP_2; this->obj.rot.y = 180.0f; this->scale = 1.0f; Object_SetInfo(&this->info, this->obj.id); break; case 7: - this->animFrame = 40; + this->animFrame = ACTOR_CS_40; Object_SetInfo(&this->info, this->obj.id); break; @@ -2629,7 +2631,7 @@ void SectorY_801A07FC(Actor* actor0, ActorCutscene* actor1) { actor1->vel.z = dest.z; actor1->obj.rot.x = actor0->obj.rot.x; actor1->obj.rot.y = actor0->obj.rot.y; - actor1->animFrame = 42; + actor1->animFrame = ACTOR_CS_42; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, actor1->sfxSource, 4); } @@ -2645,7 +2647,7 @@ void SectorY_801A0A08(ActorCutscene* this, f32 xPos, f32 yPos, f32 zPos, f32 arg Object_SetInfo(&this->info, this->obj.id); this->timer_0BC = 35; this->iwork[0] = 255; - this->animFrame = 43; + this->animFrame = ACTOR_CS_43; AUDIO_PLAY_SFX(NA_SE_EN_MS_SHOT_S, this->sfxSource, 4); }