diff --git a/assets/yaml/us/ast_7_ti_1.yaml b/assets/yaml/us/ast_7_ti_1.yaml index b99ca779..011b4ff0 100644 --- a/assets/yaml/us/ast_7_ti_1.yaml +++ b/assets/yaml/us/ast_7_ti_1.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_AST_7_TI_1_7000000: { type: TEXTURE, ctype: u8, format: IA8, width: 96, height: 28, offset: 0x07000000, symbol: D_AST_7_TI_1_7000000, tlut: 0x07001108 } diff --git a/assets/yaml/us/ast_7_ti_2.yaml b/assets/yaml/us/ast_7_ti_2.yaml index 1ee91f1b..8d2238e2 100644 --- a/assets/yaml/us/ast_7_ti_2.yaml +++ b/assets/yaml/us/ast_7_ti_2.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_TI2_7003EE8: { type: SF64:ANIM, offset: 0x7003EE8, symbol: D_TI2_7003EE8 } diff --git a/assets/yaml/us/ast_8_ti.yaml b/assets/yaml/us/ast_8_ti.yaml index 973cf1d5..cbf2016a 100644 --- a/assets/yaml/us/ast_8_ti.yaml +++ b/assets/yaml/us/ast_8_ti.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_TI_8000708: { type: SF64:ANIM, offset: 0x8000708, symbol: D_TI_8000708 } diff --git a/assets/yaml/us/ast_9_ti.yaml b/assets/yaml/us/ast_9_ti.yaml index 9c0e0710..913cf7cb 100644 --- a/assets/yaml/us/ast_9_ti.yaml +++ b/assets/yaml/us/ast_9_ti.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_TI_9004288: { type: SF64:ANIM, offset: 0x9004288, symbol: D_TI_9004288 } diff --git a/assets/yaml/us/ast_A_ti.yaml b/assets/yaml/us/ast_A_ti.yaml index 42e5ae85..e4fcb1ab 100644 --- a/assets/yaml/us/ast_A_ti.yaml +++ b/assets/yaml/us/ast_A_ti.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_TI_A000000: {type: GFX, offset: 0xA000000, symbol: D_TI_A000000} diff --git a/assets/yaml/us/ast_allies.yaml b/assets/yaml/us/ast_allies.yaml index d30fbd17..3f9594f5 100644 --- a/assets/yaml/us/ast_allies.yaml +++ b/assets/yaml/us/ast_allies.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_D000000: { type: GFX, offset: 0xD000000, symbol: D_D000000 } diff --git a/assets/yaml/us/ast_andross.yaml b/assets/yaml/us/ast_andross.yaml index 002f2646..01c7f267 100644 --- a/assets/yaml/us/ast_andross.yaml +++ b/assets/yaml/us/ast_andross.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_aquas.yaml b/assets/yaml/us/ast_aquas.yaml index df2aec6c..e72f5b0c 100644 --- a/assets/yaml/us/ast_aquas.yaml +++ b/assets/yaml/us/ast_aquas.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_area_6.yaml b/assets/yaml/us/ast_area_6.yaml index 474696ce..097776ca 100644 --- a/assets/yaml/us/ast_area_6.yaml +++ b/assets/yaml/us/ast_area_6.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_arwing.yaml b/assets/yaml/us/ast_arwing.yaml index 1c9a823a..43443489 100644 --- a/assets/yaml/us/ast_arwing.yaml +++ b/assets/yaml/us/ast_arwing.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_arwing_3000000: { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_arwing_3000000 } diff --git a/assets/yaml/us/ast_bg_planet.yaml b/assets/yaml/us/ast_bg_planet.yaml index 2f664cad..69ee7ae3 100644 --- a/assets/yaml/us/ast_bg_planet.yaml +++ b/assets/yaml/us/ast_bg_planet.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_BG_PLANET_2000000: { type: GFX, offset: 0x2000000, symbol: D_BG_PLANET_2000000 } diff --git a/assets/yaml/us/ast_bg_space.yaml b/assets/yaml/us/ast_bg_space.yaml index 430121a2..32f1e5c8 100644 --- a/assets/yaml/us/ast_bg_space.yaml +++ b/assets/yaml/us/ast_bg_space.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_BG_SPACE_2000000: { type: GFX, offset: 0x2000000, symbol: D_BG_SPACE_2000000 } diff --git a/assets/yaml/us/ast_blue_marine.yaml b/assets/yaml/us/ast_blue_marine.yaml index 8c6adb12..8889e909 100644 --- a/assets/yaml/us/ast_blue_marine.yaml +++ b/assets/yaml/us/ast_blue_marine.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_blue_marine_3000000: { type: TEXTURE, ctype: u8, format: CI4, width: 16, height: 16, offset: 0x3000000, symbol: D_blue_marine_3000000, tlut: 0x3000080 } diff --git a/assets/yaml/us/ast_bolse.yaml b/assets/yaml/us/ast_bolse.yaml index a5c8ff17..9a00e883 100644 --- a/assets/yaml/us/ast_bolse.yaml +++ b/assets/yaml/us/ast_bolse.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_common.yaml b/assets/yaml/us/ast_common.yaml index e3ab6d29..5717aba9 100644 --- a/assets/yaml/us/ast_common.yaml +++ b/assets/yaml/us/ast_common.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_1000000: { type: TEXTURE, format: IA8, width: 64, height: 10, ctype: u8, offset: 0x1000000, symbol: D_1000000 } diff --git a/assets/yaml/us/ast_corneria.yaml b/assets/yaml/us/ast_corneria.yaml index abfe041b..e63d263b 100644 --- a/assets/yaml/us/ast_corneria.yaml +++ b/assets/yaml/us/ast_corneria.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_ending.yaml b/assets/yaml/us/ast_ending.yaml index 502506d7..4bd1b0b2 100644 --- a/assets/yaml/us/ast_ending.yaml +++ b/assets/yaml/us/ast_ending.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_END_7000000: { type: GFX, offset: 0x7000000, symbol: D_END_7000000} diff --git a/assets/yaml/us/ast_ending_award_back.yaml b/assets/yaml/us/ast_ending_award_back.yaml index 2fd23278..4cc3746f 100644 --- a/assets/yaml/us/ast_ending_award_back.yaml +++ b/assets/yaml/us/ast_ending_award_back.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' ending_award_back: { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 270, offset: 0x8000000, symbol: gEndingAwardBack } diff --git a/assets/yaml/us/ast_ending_award_front.yaml b/assets/yaml/us/ast_ending_award_front.yaml index 0f8ac3ef..81908bf9 100644 --- a/assets/yaml/us/ast_ending_award_front.yaml +++ b/assets/yaml/us/ast_ending_award_front.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' ending_award_front: { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 240, offset: 0x8000000, symbol: gEndingAwardFront } \ No newline at end of file diff --git a/assets/yaml/us/ast_ending_expert.yaml b/assets/yaml/us/ast_ending_expert.yaml index f0458247..7963c318 100644 --- a/assets/yaml/us/ast_ending_expert.yaml +++ b/assets/yaml/us/ast_ending_expert.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' ending_expert_reward: { type: TEXTURE, ctype: u16, format: RGBA16, width: 316, height: 240, offset: 0x8000000, symbol: gEndingExpertReward } diff --git a/assets/yaml/us/ast_enmy_planet.yaml b/assets/yaml/us/ast_enmy_planet.yaml index 83bb6e1e..9ea49f50 100644 --- a/assets/yaml/us/ast_enmy_planet.yaml +++ b/assets/yaml/us/ast_enmy_planet.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # Seems unused D_ENMY_PLANET_4000290: diff --git a/assets/yaml/us/ast_enmy_space.yaml b/assets/yaml/us/ast_enmy_space.yaml index 3ea12588..9bfb991f 100644 --- a/assets/yaml/us/ast_enmy_space.yaml +++ b/assets/yaml/us/ast_enmy_space.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_ENMY_SPACE_4000080: { type: SF64:ANIM, offset: 0x4000080, symbol: D_ENMY_SPACE_4000080 } diff --git a/assets/yaml/us/ast_font.yaml b/assets/yaml/us/ast_font.yaml index 76f1a96d..a3ba59cf 100644 --- a/assets/yaml/us/ast_font.yaml +++ b/assets/yaml/us/ast_font.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # 0 (small) D_5000000: diff --git a/assets/yaml/us/ast_font_3d.yaml b/assets/yaml/us/ast_font_3d.yaml index a498f6fc..745d6518 100644 --- a/assets/yaml/us/ast_font_3d.yaml +++ b/assets/yaml/us/ast_font_3d.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_FONT3D_9000000: { type: GFX, offset: 0x9000000, symbol: D_FONT3D_9000000 } diff --git a/assets/yaml/us/ast_fortuna.yaml b/assets/yaml/us/ast_fortuna.yaml index e782ea7c..3c19cbff 100644 --- a/assets/yaml/us/ast_fortuna.yaml +++ b/assets/yaml/us/ast_fortuna.yaml @@ -11,7 +11,6 @@ - '#include "sf64event.h"' - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - - '#include "structs.h"' # Fortuna # Former Defense Post diff --git a/assets/yaml/us/ast_great_fox.yaml b/assets/yaml/us/ast_great_fox.yaml index 039941a6..03ad5207 100644 --- a/assets/yaml/us/ast_great_fox.yaml +++ b/assets/yaml/us/ast_great_fox.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # Great Fox Model D_GREAT_FOX_E000000: diff --git a/assets/yaml/us/ast_katina.yaml b/assets/yaml/us/ast_katina.yaml index 74660f94..ff3851d5 100644 --- a/assets/yaml/us/ast_katina.yaml +++ b/assets/yaml/us/ast_katina.yaml @@ -11,7 +11,6 @@ - '#include "sf64event.h"' - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - - '#include "structs.h"' # Katina # Frontline Base diff --git a/assets/yaml/us/ast_landmaster.yaml b/assets/yaml/us/ast_landmaster.yaml index 7d078761..ff5ebaa7 100644 --- a/assets/yaml/us/ast_landmaster.yaml +++ b/assets/yaml/us/ast_landmaster.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_landmaster_3000000: { type: TEXTURE, format: CI4, offset: 0x3000000, width: 16, height: 16, ctype: u8, tlut: 0x3000080, symbol: D_landmaster_3000000 } diff --git a/assets/yaml/us/ast_logo.yml b/assets/yaml/us/ast_logo.yml index bbe5d5c7..7cfee369 100644 --- a/assets/yaml/us/ast_logo.yml +++ b/assets/yaml/us/ast_logo.yml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' nintendo_logo: type: TEXTURE diff --git a/assets/yaml/us/ast_macbeth.yaml b/assets/yaml/us/ast_macbeth.yaml index c95f7f61..3bef80ff 100644 --- a/assets/yaml/us/ast_macbeth.yaml +++ b/assets/yaml/us/ast_macbeth.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_map.yaml b/assets/yaml/us/ast_map.yaml index 65807934..44747cae 100644 --- a/assets/yaml/us/ast_map.yaml +++ b/assets/yaml/us/ast_map.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # Restart Game (Game Over) D_MAP_6000000: diff --git a/assets/yaml/us/ast_meteo.yaml b/assets/yaml/us/ast_meteo.yaml index 190ed367..f5f2e485 100644 --- a/assets/yaml/us/ast_meteo.yaml +++ b/assets/yaml/us/ast_meteo.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_option.yaml b/assets/yaml/us/ast_option.yaml index 55643835..b3f3637a 100644 --- a/assets/yaml/us/ast_option.yaml +++ b/assets/yaml/us/ast_option.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' # Invoice D_OPT_8000000: diff --git a/assets/yaml/us/ast_sector_x.yaml b/assets/yaml/us/ast_sector_x.yaml index 97cd69c7..ee45e5d0 100644 --- a/assets/yaml/us/ast_sector_x.yaml +++ b/assets/yaml/us/ast_sector_x.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_sector_y.yaml b/assets/yaml/us/ast_sector_y.yaml index 22420b11..e4929929 100644 --- a/assets/yaml/us/ast_sector_y.yaml +++ b/assets/yaml/us/ast_sector_y.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_sector_z.yaml b/assets/yaml/us/ast_sector_z.yaml index 9021db0a..3abdb8cd 100644 --- a/assets/yaml/us/ast_sector_z.yaml +++ b/assets/yaml/us/ast_sector_z.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_solar.yaml b/assets/yaml/us/ast_solar.yaml index 1a1f05e8..328f9724 100644 --- a/assets/yaml/us/ast_solar.yaml +++ b/assets/yaml/us/ast_solar.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_star_wolf.yaml b/assets/yaml/us/ast_star_wolf.yaml index 9d9ffc77..3bdb8ae4 100644 --- a/assets/yaml/us/ast_star_wolf.yaml +++ b/assets/yaml/us/ast_star_wolf.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_STAR_WOLF_F000000: { type: TEXTURE, ctype: u16, format: RGBA16, width: 44, height: 44, offset: 0x0F000000, symbol: D_STAR_WOLF_F000000 } diff --git a/assets/yaml/us/ast_titania.yaml b/assets/yaml/us/ast_titania.yaml index 129571c0..8973854c 100644 --- a/assets/yaml/us/ast_titania.yaml +++ b/assets/yaml/us/ast_titania.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_title.yaml b/assets/yaml/us/ast_title.yaml index 1312d94c..a369b62e 100644 --- a/assets/yaml/us/ast_title.yaml +++ b/assets/yaml/us/ast_title.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' starfox_logo: { type: TEXTURE, ctype: u16, format: RGBA16, width: 236, height: 60, offset: 0x6000000, symbol: gTitleStarfoxLogo } diff --git a/assets/yaml/us/ast_training.yaml b/assets/yaml/us/ast_training.yaml index 501c80c6..bf9795eb 100644 --- a/assets/yaml/us/ast_training.yaml +++ b/assets/yaml/us/ast_training.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_ve1_boss.yaml b/assets/yaml/us/ast_ve1_boss.yaml index 6a5f2c07..14a29c08 100644 --- a/assets/yaml/us/ast_ve1_boss.yaml +++ b/assets/yaml/us/ast_ve1_boss.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_VE1_9000000: {type: GFX, offset: 0x9000000, symbol: D_VE1_9000000} diff --git a/assets/yaml/us/ast_venom_1.yaml b/assets/yaml/us/ast_venom_1.yaml index 7f63b7fa..ea462404 100644 --- a/assets/yaml/us/ast_venom_1.yaml +++ b/assets/yaml/us/ast_venom_1.yaml @@ -11,7 +11,6 @@ - '#include "sf64event.h"' - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - - '#include "structs.h"' - '#include "sf64mesg.h"' D_VE1_6000000: diff --git a/assets/yaml/us/ast_venom_2.yaml b/assets/yaml/us/ast_venom_2.yaml index d3f3e6b0..c7aa4b27 100644 --- a/assets/yaml/us/ast_venom_2.yaml +++ b/assets/yaml/us/ast_venom_2.yaml @@ -11,7 +11,6 @@ - '#include "sf64event.h"' - '#include "sf64player.h"' - '#include "sf64audio_external.h"' - - '#include "structs.h"' D_VE2_6000000: { type: TEXTURE, format: IA8, width: 96, height: 28, offset: 0x6000000, ctype: u8, symbol: D_VE2_6000000 } diff --git a/assets/yaml/us/ast_versus.yaml b/assets/yaml/us/ast_versus.yaml index 8d9bb09b..199cd473 100644 --- a/assets/yaml/us/ast_versus.yaml +++ b/assets/yaml/us/ast_versus.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/assets/yaml/us/ast_vs_menu.yaml b/assets/yaml/us/ast_vs_menu.yaml index e1fd57bf..28cd189e 100644 --- a/assets/yaml/us/ast_vs_menu.yaml +++ b/assets/yaml/us/ast_vs_menu.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_VS_MENU_7000000: { type: TEXTURE, ctype: u8, format: IA8, width: 16, height: 13, offset: 0x7000000, symbol: D_VS_MENU_7000000} diff --git a/assets/yaml/us/ast_warp_zone.yaml b/assets/yaml/us/ast_warp_zone.yaml index 9460bb05..67dc362d 100644 --- a/assets/yaml/us/ast_warp_zone.yaml +++ b/assets/yaml/us/ast_warp_zone.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' D_WZ_7000000: { type: GFX, offset: 0x7000000, symbol: D_WZ_7000000 } diff --git a/assets/yaml/us/ast_zoness.yaml b/assets/yaml/us/ast_zoness.yaml index 8696c932..7cc4e5c7 100644 --- a/assets/yaml/us/ast_zoness.yaml +++ b/assets/yaml/us/ast_zoness.yaml @@ -7,7 +7,6 @@ header: - '#include "gfx.h"' - '#include "sf64object.h"' - - '#include "structs.h"' - '#include "sf64level.h"' - '#include "sf64event.h"' - '#include "sf64player.h"' diff --git a/include/context.h b/include/context.h index c9acd625..69b40f0b 100644 --- a/include/context.h +++ b/include/context.h @@ -6,8 +6,8 @@ #include "sf64object.h" #include "sf64player.h" -extern s32 gOverlaySetup; -extern s32 gOverlayStage; +extern s32 gSceneId; +extern s32 gSceneSetup; extern s32 D_ctx_80177824; // some sort of flag extern s32 D_ctx_8017782C; // some sort of flag. all range related? extern GameState gGameState; @@ -22,10 +22,10 @@ extern s32 gPlayerNum; extern s32 gCamCount; extern s32 gTeamShields[6]; extern s32 gSavedTeamShields[6]; -extern UNK_TYPE gPrevPlanetSavedTeamShields[6]; +extern s32 gPrevPlanetSavedTeamShields[6]; extern s32 gTeamDamage[6]; extern u8 gNextPlanetPath; // next planet path -extern f32 gGroundLevel; +extern f32 gGroundHeight; extern f32 D_ctx_80177950; extern f32 D_ctx_80177968; extern f32 D_ctx_80177970; @@ -43,11 +43,11 @@ extern f32 D_ctx_80177A48[10]; extern s32 gCsFrameCount; extern u8 D_ctx_80177A98; extern u8 D_ctx_80177AB0; -extern u8 D_ctx_80177AC8; +extern u8 gAqDrawMode; extern s32 D_ctx_80177AE0; extern s32 gMainController; extern s32 D_ctx_80177B40; -extern PlanetId gCurrentPlanet; // D_ctx_80177B48 // Arrow pointer? +extern PlanetId gMissionNumber; // D_ctx_80177B48 // Arrow pointer? extern s32 D_ctx_80177B50[7]; extern s32 D_ctx_80177B70[7]; extern PlanetId D_ctx_80177B90[7]; @@ -55,7 +55,7 @@ extern s32 D_ctx_80177BB0[7]; extern s32 gPlanetPathStatus[]; // overruns D_ctx_80177C30? extern s32 gPrevPlanetTeamShields[6]; extern s32 D_ctx_80177C58[6]; -extern u8 gSoundMode; +extern u8 gOptionSoundMode; extern s32 gVolumeSettings[3]; extern u16 gBgmSeqId; extern u8 gLevelType; @@ -83,7 +83,7 @@ extern Vec3f D_ctx_80177F10; extern UNK_TYPE F_80178020; extern s32 D_ctx_8017812C; extern LevelId gCurrentLevel; -extern s32 gLevelStage; +extern s32 gLevelPhase; extern s32 gBossActive; extern s32 D_ctx_8017828C; extern s32 D_ctx_80178294; @@ -112,31 +112,31 @@ extern s32 gFillScreenGreen; // green something extern s32 gFillScreenBlue; // blue something extern s32 gFillScreenAlphaTarget; // alpha target extern s32 gFillScreenAlphaStep; // alpha step -extern s32 D_ctx_80178360; // 2 lights second color -extern s32 D_ctx_80178364; -extern s32 D_ctx_80178368; -extern f32 D_ctx_8017836C; // 2 lights second color brightness -extern f32 D_ctx_80178370; // Vec3f? -extern f32 D_ctx_80178374; -extern f32 D_ctx_80178378; -extern s32 D_ctx_8017837C; -extern u32 gPlayerFillScreenAlphas[4]; // player alphas -extern s32 gPlayerFillScreenReds[4]; // player reds -extern s32 gPlayerFillScreenGreens[4]; // player greens -extern s32 gPlayerFillScreenBlues[4]; // player blues +extern s32 gLight3R; // 2 lights second color +extern s32 gLight3G; +extern s32 gLight3B; +extern f32 gLight3Brightness; // 2 lights second color brightness +extern f32 gLight3x; // Vec3f? +extern f32 gLight3y; +extern f32 gLight3z; +extern s32 gFadeoutType; +extern u32 gPlayerGlareAlphas[4]; // player alphas +extern s32 gPlayerGlareReds[4]; // player reds +extern s32 gPlayerGlareGreens[4]; // player greens +extern s32 gPlayerGlareBlues[4]; // player blues extern s32 D_ctx_801783C0[4]; -extern f32 D_ctx_801783D0; // something x translate -extern f32 D_ctx_801783D4; // something y translate +extern f32 gSunViewX; // something x translate +extern f32 gSunViewY; // something y translate extern s32 gFogNear; //near extern s32 gFogFar; //far extern UNK_TYPE F_801783E0[12]; -extern s32 D_ctx_80178410; -extern f32 D_ctx_80178414; +extern s32 gStarCount; +extern f32 gStarWarpDistortion; extern f32 D_ctx_80178418; extern UNK_TYPE F_8017841C; -extern f32 D_ctx_80178420; -extern f32 D_ctx_80178424; -extern f32 D_ctx_80178428; +extern f32 gStarfieldX; +extern f32 gStarfieldY; +extern f32 gStarfieldRoll; extern f32 D_ctx_8017842C; extern f32 D_ctx_80178430; extern UNK_TYPE F_80178434; @@ -228,7 +228,7 @@ extern s16 gLifeCount[4]; extern LaserStrength gLaserStrength[4]; extern s32 D_ctx_80161AB8; extern UNK_TYPE F_80161AC0[16]; -extern Object_80 gObjects80[50]; +extern Scenery gScenery[50]; extern Sprite gSprites[40]; extern Actor gActors[60]; extern Boss gBosses[4]; @@ -246,13 +246,13 @@ extern f32 gActor194xRot[2][100]; extern f32 gActor194yRot[2][100]; extern f32 gActor194zRot[2][100]; extern u16 gEnemyShotSpeed; // enemy shot speed? -extern u8 D_ctx_80177830; // show level complete status overlay -extern s32 gLevelStatusScreenTimer; // level clear related +extern u8 gShowLevelClearStatusScreen; // show level complete status overlay +extern s32 gLevelStartStatusScreenTimer; // level clear related extern s32 gLevelClearScreenTimer; // timer for mission accomplished scrren extern s32 gBossHealthBar; extern s32 D_ctx_80177850; // bonus text related. set to 15 but never read extern s32 D_ctx_80177858[4]; -extern s32 D_ctx_80177870[4]; +extern s32 gPlayerForms[4]; extern s32 gHandicap[4]; extern VsStage gVersusStage; extern s32 D_ctx_801778A4; @@ -279,15 +279,15 @@ extern s32 D_Timer_80177A38[4]; extern s32 D_Timer_80177A70[4]; extern s32 D_Timer_80177A88[4]; extern f32 D_ctx_80177AA0[4]; -extern f32 D_ctx_80177AB8[4]; -extern s32 D_ctx_80177AD0[4]; -extern s32 D_ctx_80177AE8[4]; -extern s32 D_ctx_80177B00[4][4]; -extern u8 D_Timer_80177B44; -extern u8 D_ctx_80177B4C; -extern u8 D_ctx_80177B6C; -extern u8 gGreatFoxIntact; -extern u8 D_ctx_80177BAC; +extern f32 gShieldAlpha[4]; +extern s32 gHasShield[4]; +extern s32 gShieldTimer[4]; +extern s32 gVsLockOnTimers[4][4]; +extern u8 gStartAndrossFightTimer; +extern u8 gSoShieldsEmpty; +extern u8 gCoUturnCount; +extern u8 gGreatFoxIntact; +extern u8 gTiStartLandmaster; extern u16 gControllerRumbleTimers[4]; extern u16 D_ctx_80177C30[4]; extern s32 D_ctx_80177C50; @@ -321,11 +321,11 @@ extern f32 D_ctx_80178028[65]; extern f32 D_ctx_80178130[65]; extern u8 D_ctx_80178238[65]; extern Player* gPlayer; -extern f32* D_ctx_80178288; -extern f32* D_ctx_80178290; -extern u32* D_ctx_80178298; +extern f32* gStarOffsetsX; +extern f32* gStarOffsetsY; +extern u32* gStarFillColors; extern UNK_TYPE F_801782A0; -extern Object_58* gObjects58; +extern Scenery360* gScenery360; extern UNK_TYPE F_801782B0; extern s32 D_ctx_801782B8; extern s32 D_ctx_801782BC; diff --git a/include/fox_option.h b/include/fox_option.h index 5078e561..cefc10c5 100644 --- a/include/fox_option.h +++ b/include/fox_option.h @@ -57,7 +57,7 @@ typedef struct { } UnkStruct_D_menu_801B9250; typedef enum OptionId { - OPTION_MAIN = 1000, + OPTION_MAIN_MENU = 1000, OPTION_VERSUS_STAGE = 2000, OPTION_MAP = 0, OPTION_TRAINING = 1, @@ -81,7 +81,7 @@ extern u8* D_menu_801B68B0[]; extern u8* D_menu_801B68D4[]; extern s32 D_menu_801B8220[]; // total hits ranking? see Option_80197DE4 -extern s32 D_menu_801B827C; +extern s32 D_menu_801B827C; // engine extern s32 D_menu_801B8280; extern s32 D_menu_801B8284; extern s32 D_menu_801B8288; @@ -97,7 +97,7 @@ extern u8 D_menu_801C6C10[96 * 96]; extern u8 D_menu_801C9010[96 * 96]; extern u8 D_menu_801CB410[96 * 96]; -void Title_801877F0(void); +void Title_UpdateEntry(void); s32 Title_80187ABC(void); void Title_80187B00(void); void Title_80187E28(void); @@ -219,7 +219,7 @@ void Option_8019DF64(void); void Option_InvoiceUpdate(void); void Option_InvoiceDraw(void); -void Map_8019E8D0(void); +void Map_Main(void); void Map_801A07E8(u8*, u8*, f32*); void Map_801AD7EC(s32, s32, s32); void Map_801A9FD4(s32); diff --git a/include/functions.h b/include/functions.h index 939370b7..94669d15 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2,7 +2,6 @@ #define FUNCTIONS_H #include "sys.h" -#include "structs.h" #include "sf64object.h" #include "sf64player.h" #include "sf64mesg.h" @@ -42,13 +41,13 @@ void PlayerShot_Update(void); void PlayerShot_Draw(void); // fox_bg -void func_bg_8003DAF0(void); -void func_bg_8003DE68(s32, s32); -void func_bg_8003E1E8(void); -void func_bg_80040450(void); -void func_bg_80040954(void); +void Background_DrawStarfield(void); +void Background_DrawPartialStarfield(s32, s32); +void Background_DrawBackdrop(void); +void Background_DrawSun(void); +void Background_DrawLensFlare(void); void func_bg_80040CDC(void); -void func_bg_80040CE4(void); +void Background_DrawGround(void); void func_bg_80042D38(void); // fox_boss @@ -94,8 +93,8 @@ void func_display_80057814(Player*); void Play_Draw(void); // fox_edata -void func_edata_800594F0(Object_80*); -void func_edata_800595D0(Object_80*); +void func_edata_800594F0(Scenery*); +void func_edata_800595D0(Scenery*); void func_edisplay_800596C0(void); void func_edata_800596B0(Actor*); @@ -104,14 +103,14 @@ void Graphics_SetScaleMtx(f32); void Sprite168_Draw(Sprite*); void Actor201_Draw(Actor*); void Actor202_Draw(Actor*); -void Obj39_Draw(Object_80*); -void func_edisplay_80059B20(Object_80*); -void Obj42_Draw(Object_80*); +void Obj39_Draw(Scenery*); +void func_edisplay_80059B20(Scenery*); +void Obj42_Draw(Scenery*); void Actor196_Draw(Actor*); void Sprite167_Draw(Sprite*); void FogShadow_Draw(Sprite*); -void func_edisplay_80059F68(Object_80*); -void func_edisplay_80059FDC(Object_80*); +void func_edisplay_80059F68(Scenery*); +void func_edisplay_80059FDC(Scenery*); void Actor189_Draw(Actor*); void Actor_DrawEngineAndContrails(Actor*); void Actor_DrawEngineGlow(Actor*, s32); @@ -133,7 +132,7 @@ void Object_ClampSfxSource(f32*); void func_edisplay_8005F0E8(f32*, Vec3f*); void func_edisplay_8005F1EC(f32*); void func_edisplay_8005F290(f32*, Vec3f*); -void func_edisplay_8005F670(Vec3f*); +void Display_SetSecondLight(Vec3f*); bool func_edisplay_8005F9DC(Vec3f*); // fox_enmy @@ -145,7 +144,7 @@ void func_enmy_80060F30(f32* , u32 , s32 ); void Object_Kill(Object*, f32*); bool func_enmy_80060FE4(Vec3f*, f32); void Object_SetInfo(ObjectInfo* info, u32 objId); -void Object_80_Initialize(Object_80*); +void Scenery_Initialize(Scenery*); void Sprite_Initialize(Sprite*); void Actor_Initialize(Actor*); void Boss_Initialize(Boss*); @@ -163,7 +162,7 @@ bool Object_CheckHitboxCollision(Vec3f* pos, f32* hitboxData, Object* obj, f32 x bool Object_CheckSingleHitbox(Vec3f*, f32*, Vec3f*); bool Object_CheckPolyCollision(Vec3f* , Vec3f* , ObjectId , Object* ); s32 Object_CheckCollision(s32 , Vec3f* , Vec3f* , s32 ); -void func_enmy_800652CC(Object_80*); +void func_enmy_800652CC(Scenery*); void func_enmy_800654E4(Object*); void func_enmy_800656D4(Actor*); void func_enmy_800660F0(Actor*); @@ -172,10 +171,10 @@ void func_enmy_8006654C(Actor*); void func_enmy_8006684C(Actor*); void func_enmy_800669A0(Actor*); void func_enmy_80066A80(Actor*); -void func_enmy_80066C00(Object_80*); -void func_enmy_80066D5C(Object_80*); +void func_enmy_80066C00(Scenery*); +void func_enmy_80066D5C(Scenery*); void Sprite167_Update(Sprite*); -void func_enmy_80066EA8(Object_80*); +void func_enmy_80066EA8(Scenery*); void func_enmy_80066EF0(Item*); void func_enmy_800671D0(Item*); void func_enmy_800674B4(f32, f32, f32, f32, f32, f32, f32, f32); @@ -198,12 +197,12 @@ void Object_Dying(s32, ObjectId); void Effect_Move(Effect*); void Actor_Move(Actor*); void Boss_Move(Boss*); -void Object80_Move(Object_80*); +void Scenery_Move(Scenery*); void Sprite_Move(Sprite*); void Item_Move(Item*); void Actor_Update(Actor*); void Boss_Update(Boss*); -void Object_80_Update(Object_80*); +void Scenery_Update(Scenery*); void Sprite_Update(Sprite*); void Item_Update(Item*); void Effect_Update(Effect*); @@ -214,16 +213,16 @@ void Object_Update(void); //fox_enmy2 void Actor237_Update(Actor*); void Actor237_Draw(Actor*); -void Obj54_Update(Object_80*); +void Obj54_Update(Scenery*); void Actor201_Update(Actor*); void Actor202_Update(Actor*); void Actor194_Update(Actor*); void Actor194_Init(Actor*); void Actor194_Draw(Actor*); -void Obj42_Update(Object_80*); +void Obj42_Update(Scenery*); void Actor196_Update(Actor*); void Actor189_Update(Actor*); -void Obj39_Update(Object_80*); +void Obj39_Update(Scenery*); void func_enmy2_8006ECBC(PlayerShotId, PlayerShot*, s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void func_enmy2_8006EEFC(s32, f32, f32, f32, f32, f32, f32, f32, f32, f32); void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 yVel, f32 zVel, f32 xRot, f32 yRot, @@ -231,7 +230,7 @@ void func_enmy2_8006EFA0(s32 unk0E4, f32 xPos, f32 yPos, f32 zPos, f32 xVel, f32 void ActorEvent_8006F0D8(f32 xPos, f32 yPos, f32 zPos, f32 scale1); void ActorEvent_8006F254(Actor*); void ActorEvent_Update(Actor*); -s32 Obj111_Draw(Object_80*); +s32 Obj111_Draw(Scenery*); void ActorEvent_Draw(Actor*); void func_enmy2_800763A4(Actor*); void ActorEvent_Dying(Actor*); @@ -419,11 +418,11 @@ bool func_hud_800924E0(Actor*); void ActorTeamBoss_Init(Actor*); void ActorTeamBoss_Update(Actor* this); void func_hud_80093164(Actor*); -void func_hud_800935E8(Player*); +void HUD_AquasStart(Player*); void func_hud_800953A0(Actor*, s32); void func_hud_8009546C(Actor*, s32); void func_hud_80095538(Actor*, s32); -void func_hud_80095604(Player*); +void HUD_AquasComplete(Player*); void func_hud_80094954(Effect*); void func_hud_80094BBC(Effect*); void func_hud_80094D20(f32, f32); @@ -446,10 +445,10 @@ bool Play_CheckMedalStatus(u16); void func_play_800A3FB0(void); s32 Play_GetMaxShields(void); void func_play_800A6028(f32*, u32); -void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 arg5); +void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 speed); void Play_Setup(void); void func_play_800A594C(void); -void func_play_800A5D6C(void); +void Play_SetupStarfield(void); void func_play_800A5EBC(void); void func_play_800A5FA0(f32* , u32 , s32 ); void func_play_800A6070(f32* , u32 ); @@ -491,22 +490,20 @@ void func_play_800A887C(Player* player); s32 func_play_800A7974(Player* player, f32* hitboxData, s32* index, f32 xPos, f32 yPos, f32 zPos, f32 xRot, f32 yRot, f32 zRot, f32 arg9, f32 argA, f32 argB); bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, Vec3f* arg7, Vec3f* arg8); -void Object_58_Initialize(Object_58*); +void Scenery360_Initialize(Scenery360*); // fox_versus s32 func_versus_800C1E9C(void); void func_versus_800C1ED4(void); -void func_versus_800C20B0(void); +void Versus_StartMatch(void); void func_versus_800C2190(void); void func_versus_800C26C8(void); void OvlMenu_CallFunction(u32, void*); -void Map_8019E8D0(void); +void Map_Main(void); -void Venom1_80198414(void); - -void Ending_8018A96C(void); -void Ending_8018AAC4(void); +void Ending_Main(void); +void Ending_Draw(void); // sf_i5_5 bool Ground_801B49D0(Actor* actor); diff --git a/include/global.h b/include/global.h index a17e6200..faabf9c4 100644 --- a/include/global.h +++ b/include/global.h @@ -27,7 +27,6 @@ typedef enum OverlayCalls { #include "functions.h" #include "variables.h" #include "context.h" -#include "structs.h" #include "sf64mesg.h" #include "assets/ast_radio.h" #include "sf64object.h" diff --git a/include/i1.h b/include/i1.h index 90c56785..5316bb5d 100644 --- a/include/i1.h +++ b/include/i1.h @@ -2,7 +2,6 @@ #define I1_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -11,9 +10,9 @@ extern Gfx* D_VE1_8019A008[]; extern f32 D_VE1_8019A9B8[]; -extern void Corneria_8018F880(Player*); -extern void Corneria_80191160(Player*); -extern void Venom1_801988B8(Player*); +extern void Corneria_LevelStart(Player*); +extern void Corneria_LevelComplete1(Player*); +extern void Venom1_LevelStart(Player*); void Corneria_801875A4(Sprite*); void Corneria_80189058(Boss*); @@ -34,8 +33,8 @@ void Corneria_8018ECAC(Boss*); void Corneria_8018ED78(Boss*); void Corneria_8018EE84(Boss*); void Corneria_8018EF90(Boss*); -void Corneria_8018F044(Object_80*); -void Corneria_8018F31C(Object_80*); +void Corneria_8018F044(Scenery*); +void Corneria_8018F31C(Scenery*); void Venom1_BossTrigger1_Update(Sprite*); void Venom1_BossTrigger2_Update(Sprite*); void Venom1_BossTrigger3_Update(Sprite*); @@ -46,19 +45,19 @@ void Venom1_80192E2C(Actor*); void Venom1_80192EB0(Actor*); void Venom1_801933DC(Actor*); void Venom1_801934D0(Actor*); -void Venom1_80193540(Object_80*); +void Venom1_80193540(Scenery*); void Venom1_80194398(Boss*); void Venom1_801985E4(Boss*); void Training_ItemRing_Update(Item*); void OvlI1_CallFunction(s32, void*); -void Corneria_80187530(Object_80*); -void Corneria_8018753C(Object_80*); +void Corneria_80187530(Scenery*); +void Corneria_8018753C(Scenery*); void Corneria_Boss292_Init(Boss *); void Corneria_8018B0B4(Actor *); void Corneria_Boss293_Init(Boss *); void Corneria_8018ED78(Boss*); -void Venom1_801924A8(Object_80* ); +void Venom1_801924A8(Scenery* ); void Venom1_8019250C(Actor *); void Venom1_80192CB0(Actor *); void Venom1_80192EA4(Actor *); diff --git a/include/i2.h b/include/i2.h index c4f43be6..326cfe64 100644 --- a/include/i2.h +++ b/include/i2.h @@ -2,17 +2,16 @@ #define I2_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" #include "sf64mesg.h" -void Meteo_8018CD8C(Player*); -void Meteo_8018E084(Player*); +void Meteo_LevelStart(Player*); +void Meteo_LevelComplete(Player*); void Meteo_8018ED9C(Actor*); -void SectorX_80193A30(Player*); -void SectorX_80194728(Player*); +void SectorX_LevelStart(Player*); +void SectorX_LevelComplete(Player*); void OvlI2_CallFunction(s32, void*); void Meteo_80187B08(Actor *); diff --git a/include/i3.h b/include/i3.h index 75acfa8d..94a5c041 100644 --- a/include/i3.h +++ b/include/i3.h @@ -2,7 +2,6 @@ #define I3_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -22,8 +21,8 @@ void OvlI3_CallFunction(s32, void*); void Area6_BossA6_Init(Boss *); void Area6_80187944(Boss*); void Area6_8018C54C(Boss*); -void Area6_8018DF74(Player *player); -void Area6_8018ED78(Player*); +void Area6_LevelStart(Player *player); +void Area6_LevelComplete(Player*); void Zoness_801900FC(Vec3f*, Vec3f*, f32, f32, f32, s32, f32, s32, s32); void Zoness_80190430(Actor* actor); @@ -72,8 +71,8 @@ void Zoness_8019CE58(Actor* actor); void Zoness_Actor247_Init(Actor* this); void Zoness_8019D15C(Actor* actor); void Zoness_8019D3C4(Actor* actor); -void Zoness_8019D428(Player* player); -void Zoness_8019D76C(Player* player); +void Zoness_LevelStart(Player* player); +void Zoness_LevelComplete(Player* player); void Solar_8019E8B8(f32, f32, f32, f32); void Solar_8019E9F4(f32, f32, f32, f32, f32, f32, f32, s32); @@ -83,11 +82,11 @@ void Solar_8019F7AC(Actor*); void Solar_801A003C(Actor*); void Solar_801A0120(Effect*); void Solar_801A0AF0(Effect*); -void Solar_801A10F4(Player* player); +void Solar_LevelStart(Player* player); void Solar_801A5B3C(Boss*); void Solar_801A71B8(Boss*); void Solar_801A8BE8(Actor*); -void Solar_801A7930(Player* player); +void Solar_LevelComplete(Player* player); void Aquas_801A9824(void); void Aquas_801AA20C(void); @@ -142,7 +141,7 @@ void Aquas_801BD264(Actor*); void Aquas_801BD54C(Actor*); void Aquas_801BDE6C(Actor*); void Aquas_801BDF14(void); -void Aquas_801BE1FC(Object_80*); +void Aquas_801BE1FC(Scenery*); void Aquas_801BE3F8(Actor*); void Aquas_801BEB1C(Actor*); void Aquas_801BEC50(Boss*); diff --git a/include/i4.h b/include/i4.h index 17756715..ee344aad 100644 --- a/include/i4.h +++ b/include/i4.h @@ -2,7 +2,6 @@ #define I4_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -11,21 +10,21 @@ extern s32 D_BO_801A03DC; extern Matrix D_BO_8019EE80; -void Bolse_8018EF6C(Player*); -void Bolse_8018F94C(Player*); -void Katina_80192E20(Player*); -void Katina_80197290(Player*); +void Bolse_LevelStart(Player*); +void Bolse_LevelComplete(Player*); +void Katina_LevelStart(Player*); +void Katina_LevelComplete(Player*); void Katina_80197F10(Actor*); -void SectorZ_8019BA64(Player*); -void SectorZ_8019C85C(Player*); +void SectorZ_LevelStart(Player*); +void SectorZ_LevelComplete(Player*); void SectorZ_8019DD20(Actor*); void OvlI4_CallFunction(u32, void*); void Fortuna_80187960(Actor*); void Fortuna_8018BA2C(void); -void Bolse_8018C158(Actor*); +void Bolse_UpdateEventHandler(Actor*); void Bolse_80191ED8(void); -void Bolse_80192264(void); +void Bolse_DrawDynamicGround(void); void Katina_Boss316_Init(Boss *); void Katina_80198594(Actor*); void Katina_80198930(void); diff --git a/include/i5.h b/include/i5.h index a711acd7..c73f6513 100644 --- a/include/i5.h +++ b/include/i5.h @@ -2,7 +2,6 @@ #define I5_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -17,15 +16,15 @@ extern u8 D_MA_801BA1E8; extern f32 D_MA_801BE250[40]; extern s16 D_MA_801BE2F0[9]; -void Titania_8018769C(Player*); -void Titania_801882CC(Player*); -void Macbeth_801AC754(Player*); -void Macbeth_801AF8F4(Player*); +void Titania_LevelStart(Player*); +void Titania_LevelComplete(Player*); +void Macbeth_LevelStart(Player*); +void Macbeth_LevelComplete2(Player*); void Macbeth_801B28BC(Actor*); -void Macbeth_801B3D04(Player*); +void Macbeth_LevelComplete1(Player*); void OvlI5_CallFunction(u32 mode, void* ptr); -void Titania_8018769C(Player *); +void Titania_LevelStart(Player *); void Titania_80188F30(void); void Titania_80189B80(Actor *); void Titania_8018ADC4(Actor *); @@ -36,7 +35,7 @@ void Titania_8018E3B0(Actor *); void Titania_8018E3CC(Actor *); void Titania_8018E5E8(Actor *); void Titania_8018EFF0(Sprite *); -void Titania_8018F0D8(Object_80 *); +void Titania_8018F0D8(Scenery *); void Titania_Boss306_Init(Boss *); void Titania_801990DC(Boss *); void Macbeth_80199920(void); @@ -46,7 +45,7 @@ void Macbeth_801A4660(Actor *); void Macbeth_801A4AF8(Actor *); void Macbeth_801A5E2C(Actor *); void Macbeth_801A6134(Actor *); -void Macbeth_801A65E0(Object_80 *); +void Macbeth_801A65E0(Scenery *); void Macbeth_801A7D98(Actor *); void Macbeth_801ACFBC(void); void Macbeth_801AD080(void); @@ -81,8 +80,8 @@ void Titania_8018E5B4(Actor*); void Titania_8018E5F8(Actor*); void Titania_8018EF14(Actor*); void Titania_Cactus_Update(Sprite*); -void Titania_8018F4D8(Object_80*); -void Titania_8018F8B8(Object_80*); +void Titania_8018F4D8(Scenery*); +void Titania_8018F8B8(Scenery*); void Titania_80197A94(Boss*); void Titania_801982A8(Boss*); void Macbeth_8019C778(Actor*); @@ -92,13 +91,13 @@ void Macbeth_8019E410(Actor*); void Macbeth_8019EA60(Actor*); void Macbeth_8019EE68(Actor*); void Macbeth_8019FF9C(Actor*); -void Macbeth_801A0BD8(Object_80*); +void Macbeth_801A0BD8(Scenery*); void Macbeth_801A12C4(Actor*); -void Macbeth_801A23AC(Object_80*); -void Macbeth_801A2A78(Object_80*); -void Macbeth_801A2B24(Object_80*); -void Macbeth_801A2DD8(Object_80*); -void Macbeth_801A3240(Object_80*); +void Macbeth_801A23AC(Scenery*); +void Macbeth_801A2A78(Scenery*); +void Macbeth_801A2B24(Scenery*); +void Macbeth_801A2DD8(Scenery*); +void Macbeth_801A3240(Scenery*); void Macbeth_801A3E98(Actor*); void Macbeth_801A43BC(Actor*); void Macbeth_801A46A0(Actor*); @@ -115,7 +114,7 @@ void Macbeth_801A5FD0(Actor*); void Macbeth_801A6100(Actor*); void Macbeth_801A6144(Actor*); void Macbeth_801A6540(Actor*); -void Macbeth_801A6608(Object_80*); +void Macbeth_801A6608(Scenery*); void Macbeth_801A67C8(Actor*); void Macbeth_801A68EC(Actor*); void Macbeth_801A7E7C(Actor*); diff --git a/include/i6.h b/include/i6.h index aac0db72..c2b998bf 100644 --- a/include/i6.h +++ b/include/i6.h @@ -2,7 +2,6 @@ #define I6_H #include "libc/stdbool.h" -#include "structs.h" #include "sf64object.h" #include "sf64thread.h" #include "sf64player.h" @@ -17,9 +16,9 @@ extern f32 D_Andross_801A7F78; void Andross_80187530(Actor*); void Andross_80193C4C(Player*); void Andross_80195E44(Actor*); -void Venom2_80196BF8(Player*); -void Venom2_80196D88(Player*); -void SectorY_8019EE60(Player*); +void Venom2_LevelStart(Player*); +void Venom2_LevelComplete(Player*); +void SectorY_LevelComplete(Player*); void SectorY_8019FF00(Actor*); void SectorY_801A0AC0(Player*); @@ -57,17 +56,17 @@ void Andross_8018DBF0(Boss*); void Andross_801928C8(Boss*); void Andross_80192E94(Actor*); void Andross_80193244(Actor*); -void Andross_80193380(Object_80*); -void Andross_8019350C(Object_80*); -void Andross_8019356C(Object_80*); -void Andross_801935D4(Object_80*); +void Andross_80193380(Scenery*); +void Andross_8019350C(Scenery*); +void Andross_8019356C(Scenery*); +void Andross_801935D4(Scenery*); void Venom2_80196210(Boss*); void Venom2_80196288(Boss*); void SectorY_80197C64(Effect*); -void SectorY_80197CB8(Object_80*); +void SectorY_80197CB8(Scenery*); void SectorY_8019C888(Boss*); void SectorY_8019E2C4(Boss*); -void SectorY_801A4E44(Object_80*); -void SectorY_801A52B8(Object_80*); +void SectorY_801A4E44(Scenery*); +void SectorY_801A52B8(Scenery*); #endif diff --git a/include/prevent_context_reordering.h b/include/prevent_context_reordering.h index 84c18cfc..9da5e25d 100644 --- a/include/prevent_context_reordering.h +++ b/include/prevent_context_reordering.h @@ -5,11 +5,11 @@ // struct Dummy0 {int x;}; // struct Dummy1 {int x;}; // struct Dummy2 {int x;}; -// struct Dummy3 {int x;}; -// struct Dummy4 {int x;}; -// struct Dummy5 {int x;}; -// struct Dummy6 {int x;}; -// struct Dummy7 {int x;}; +struct Dummy3 {int x;}; +struct Dummy4 {int x;}; +struct Dummy5 {int x;}; +struct Dummy6 {int x;}; +struct Dummy7 {int x;}; struct Dummy8 {int x;}; struct Dummy9 {int x;}; struct Dummy10 {int x;}; diff --git a/include/sf64audio_external.h b/include/sf64audio_external.h index 190f09be..51e9e3e9 100644 --- a/include/sf64audio_external.h +++ b/include/sf64audio_external.h @@ -9,6 +9,12 @@ #define AUDIO_SET_SPEC(sfxLayout, spec) Audio_SetAudioSpec(0, ((sfxLayout) << 8) | (spec)) #define AUDIO_SET_SPEC_ALT(sfxLayout, spec) Audio_SetAudioSpec((sfxLayout), ((sfxLayout) << 8) | (spec)) +typedef enum AudioType { + /* 0 */ AUDIO_TYPE_MUSIC, + /* 1 */ AUDIO_TYPE_VOICE, + /* 2 */ AUDIO_TYPE_SFX, +} AudioType; + typedef enum { /* 0 */ SFXCHAN_0, /* 1 */ SFXCHAN_1, @@ -147,7 +153,7 @@ s32 Audio_GetCurrentVoice(void); s32 Audio_GetCurrentVoiceStatus(void); void func_8001AF40(u8 unkVoiceParam); u8* Audio_UpdateFrequencyAnalysis(void); -void func_8001C8B8(u8 playerId); +void Audio_StartPlayerNoise(u8 playerId); void func_8001CA24(u8 playerId); void func_8001CB80(u8 playerId, u8 arg1); void func_8001CCDC(u8 playerId, f32* sfxSource); @@ -168,7 +174,7 @@ void Audio_PlayFanfare(u16 seqId, u8 bgmVolume, u8 bgmFadeoutTime, u8 bgmFadeinT void func_8001D520(void); void func_8001D638(u8 arg0); void func_8001D6DC(u8 arg0); -void func_8001D8A8(u8 audioType, u8 volume); +void Audio_SetVolume(u8 audioType, u8 volume); void Audio_PlaySoundTest(u8 enable); void Audio_PlaySequenceDistorted(u8 seqPlayId, u16 seqId, u16 distortion, u8 fadeinTime, u8 unused); void Audio_PlaySoundTestTrack(u8 trackNumber); diff --git a/include/sf64dma.h b/include/sf64dma.h index f17af54d..64447681 100644 --- a/include/sf64dma.h +++ b/include/sf64dma.h @@ -64,8 +64,8 @@ #define SEGMENT_BSS_END(segment) (segment ## _BSS_END) #define SEGMENT_BSS_SIZE(segment) ((uintptr_t)SEGMENT_BSS_END(segment) - (uintptr_t)SEGMENT_BSS_START(segment)) -u8 Overlay_Load(u8, u8); -void Overlay_InitDma(void); +u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup); +void Load_InitDmaAndMsg(void); typedef struct { /* 0x0 */ void* start; @@ -82,7 +82,7 @@ typedef struct { typedef struct { /* 0x00 */ OverlayOffsets ovl; /* 0x20 */ SegmentOffset assets[15]; -} OverlayInit; // size = 0x98 +} Scene; // size = 0x98 typedef struct { /* 0x0 */ void* vRomAddress; @@ -92,35 +92,6 @@ typedef struct { extern DmaEntry gDmaTable[]; // 178A70 -extern OverlayInit sNoOvl_Logo[1]; // sets segment 15 with no overlay -extern OverlayInit sOvlending_Ending[6]; // overlay EF0260 -extern OverlayInit sOvlmenu_Title[1]; // EBFBE0 -extern OverlayInit sOvlmenu_Option[1]; // EBFBE0 -extern OverlayInit sOvlmenu_Map[1]; // EBFBE0 -extern OverlayInit sOvlmenu_GameOver[1]; // EBFBE0 -extern OverlayInit sOvli1_Corneria[1]; // fox_i1 -extern OverlayInit sOvli2_Meteo[2]; // fox_i2 -extern OverlayInit sOvli5_Titania[6]; // E6A810 -extern OverlayInit sOvli2_SectorX[2]; // fox_i2 -extern OverlayInit sOvli4_SectorZ[1]; // i4 -extern OverlayInit sOvli3_Aquas[1]; // i3 -extern OverlayInit sOvli3_Area6[1]; // i3 -extern OverlayInit sOvli4_Fortuna[2]; // i4 -extern OverlayInit sOvli3_Unk4[1]; // i3 -extern OverlayInit sOvli6_SectorY[1]; // E9F1D0 -extern OverlayInit sOvli3_Solar[1]; // i3 -extern OverlayInit sOvli3_Zoness[1]; // i3 -extern OverlayInit sOvli1_Venom1[1]; // fox_i1 -extern OverlayInit sOvli6_Andross[1]; // E9F1D0 -extern OverlayInit sOvli6_Venom2[2]; // E9F1D0 -extern OverlayInit sOvli2_Setup20[1]; // fox_i2 -extern OverlayInit sOvli4_Bolse[1]; // i4 -extern OverlayInit sOvli4_Katina[1]; // i4 -extern OverlayInit sOvli5_Macbeth[2]; // E6A810 -extern OverlayInit sOvli1_Training[1]; // fox_i1 -extern OverlayInit sOvli2_Versus[2]; // fox_i2 -extern OverlayInit sUnused_Overlay[1]; // EFFA40 - DECLARE_SEGMENT(makerom); DECLARE_SEGMENT(main); DECLARE_SEGMENT(dma_table); diff --git a/include/sf64level.h b/include/sf64level.h index 4591fa92..24f7aaeb 100644 --- a/include/sf64level.h +++ b/include/sf64level.h @@ -1,8 +1,6 @@ #ifndef SF64_LEVEL #define SF64_LEVEL -#include "structs.h" - #define SAVE_SLOT_SOLAR 13 #define SAVE_SLOT_VENOM_1 14 #define SAVE_SLOT_VENOM_2 15 @@ -33,35 +31,35 @@ typedef struct { /* 0x40 */ s32 ambB; } EnvSettings; // size = 0x44 -typedef enum { - /* 0 */ OVL_SETUP_TITLE, - /* 1 */ OVL_SETUP_MENU, - /* 2 */ OVL_SETUP_MAP, - /* 3 */ OVL_SETUP_GAME_OVER, - /* 4 */ OVL_SETUP_CREDITS, - /* 5 */ OVL_SETUP_CORNERIA, - /* 6 */ OVL_SETUP_METEO, - /* 7 */ OVL_SETUP_TITANIA, - /* 8 */ OVL_SETUP_SECTOR_X, - /* 9 */ OVL_SETUP_AQUAS, - /* 10 */ OVL_SETUP_AREA_6, - /* 11 */ OVL_SETUP_FORTUNA, - /* 12 */ OVL_SETUP_UNK_4, - /* 13 */ OVL_SETUP_SECTOR_Y, - /* 14 */ OVL_SETUP_SOLAR, - /* 15 */ OVL_SETUP_ZONESS, - /* 16 */ OVL_SETUP_VENOM_ANDROSS, - /* 17 */ OVL_SETUP_TRAINING, - /* 18 */ OVL_SETUP_VENOM_1, - /* 19 */ OVL_SETUP_KATINA, - /* 10 */ OVL_SETUP_20, - /* 11 */ OVL_SETUP_MACBETH, - /* 12 */ OVL_SETUP_BOLSE, - /* 13 */ OVL_SETUP_SECTOR_Z, - /* 14 */ OVL_SETUP_VENOM_2, - /* 50 */ OVL_SETUP_VERSUS = 50, - /* 99 */ OVL_SETUP_LOGO = 99, -} OverlaySetups; +typedef enum SceneId { + /* 0 */ SCENE_TITLE, + /* 1 */ SCENE_MENU, + /* 2 */ SCENE_MAP, + /* 3 */ SCENE_GAME_OVER, + /* 4 */ SCENE_CREDITS, + /* 5 */ SCENE_CORNERIA, + /* 6 */ SCENE_METEO, + /* 7 */ SCENE_TITANIA, + /* 8 */ SCENE_SECTOR_X, + /* 9 */ SCENE_AQUAS, + /* 10 */ SCENE_AREA_6, + /* 11 */ SCENE_FORTUNA, + /* 12 */ SCENE_UNK_4, + /* 13 */ SCENE_SECTOR_Y, + /* 14 */ SCENE_SOLAR, + /* 15 */ SCENE_ZONESS, + /* 16 */ SCENE_VENOM_ANDROSS, + /* 17 */ SCENE_TRAINING, + /* 18 */ SCENE_VENOM_1, + /* 19 */ SCENE_KATINA, + /* 10 */ SCENE_20, + /* 11 */ SCENE_MACBETH, + /* 12 */ SCENE_BOLSE, + /* 13 */ SCENE_SECTOR_Z, + /* 14 */ SCENE_VENOM_2, + /* 50 */ SCENE_VERSUS = 50, + /* 99 */ SCENE_LOGO = 99, +} SceneId; typedef enum LevelId { /* -1 */ LEVEL_UNK_M1 = -1, diff --git a/include/sf64math.h b/include/sf64math.h index 7fe5a7c2..ec05b23c 100644 --- a/include/sf64math.h +++ b/include/sf64math.h @@ -23,6 +23,11 @@ typedef struct { /* 0x0C */ Vec3f rot; } PosRot; // size = 0x18 +typedef struct { + /* 0x00 */ Vec3f eye; + /* 0x0C */ Vec3f at; +} CameraPoint; // size = 0x18 + typedef struct { /* 0x0 */ s16 vtx[3]; } Triangle; // size = 0x6 diff --git a/include/sf64object.h b/include/sf64object.h index b840aac4..9fb29722 100644 --- a/include/sf64object.h +++ b/include/sf64object.h @@ -42,12 +42,12 @@ typedef struct { typedef enum { /* 0 */ COL1_0, // OBJ_ACTOR_180 - /* 1 */ COL1_1, // OBJ_80_39 + /* 1 */ COL1_1, // OBJ_SCENERY_39 /* 2 */ COL1_2, /* 3 */ COL1_3, // ACTOR_EVENT_ID /* 4 */ COL1_4, // OBJ_BOSS_308 - /* 5 */ COL1_5, // OBJ_80_149 - /* 6 */ COL1_6, // OBJ_80_150 + /* 5 */ COL1_5, // OBJ_SCENERY_149 + /* 6 */ COL1_6, // OBJ_SCENERY_150 /* 7 */ COL1_7, // OBJ_BOSS_309 /* 8 */ COL1_8, // OBJ_BOSS_313 /* 9 */ COL1_9, // OBJ_BOSS_312 @@ -55,24 +55,24 @@ typedef enum { typedef enum { /* 0 */ COL2_0, // default - /* 1 */ COL2_1, // OBJ_80_4, OBJ_80_5 - /* 2 */ COL2_2, // OBJ_80_2 - /* 3 */ COL2_3, // OBJ_80_3, OBJ_80_69 - /* 4 */ COL2_4, // OBJ_80_140 + /* 1 */ COL2_1, // OBJ_SCENERY_4, OBJ_SCENERY_5 + /* 2 */ COL2_2, // OBJ_SCENERY_2 + /* 3 */ COL2_3, // OBJ_SCENERY_3, OBJ_SCENERY_69 + /* 4 */ COL2_4, // OBJ_SCENERY_140 /* 5 */ COL2_5, // PLAYERSHOT_7 ? - /* 6 */ COL2_6, // OBJ_80_141 - /* 7 */ COL2_7, // OBJ_80_47 - /* 8 */ COL2_8, // OBJ_80_70 - /* 9 */ COL2_9, // OBJ_80_72 - /* 10 */ COL2_10, // OBJ_80_71 - /* 11 */ COL2_11, // OBJ_80_73 - /* 12 */ COL2_12, // OBJ_80_67 - /* 13 */ COL2_13, // OBJ_80_74 - /* 14 */ COL2_14, // OBJ_80_117 - /* 15 */ COL2_15, // OBJ_80_124 - /* 16 */ COL2_16, // OBJ_80_126 - /* 17 */ COL2_17, // OBJ_80_143 - /* 18 */ COL2_18, // OBJ_80_120 + /* 6 */ COL2_6, // OBJ_SCENERY_141 + /* 7 */ COL2_7, // OBJ_SCENERY_47 + /* 8 */ COL2_8, // OBJ_SCENERY_70 + /* 9 */ COL2_9, // OBJ_SCENERY_72 + /* 10 */ COL2_10, // OBJ_SCENERY_71 + /* 11 */ COL2_11, // OBJ_SCENERY_73 + /* 12 */ COL2_12, // OBJ_SCENERY_67 + /* 13 */ COL2_13, // OBJ_SCENERY_74 + /* 14 */ COL2_14, // OBJ_SCENERY_117 + /* 15 */ COL2_15, // OBJ_SCENERY_124 + /* 16 */ COL2_16, // OBJ_SCENERY_126 + /* 17 */ COL2_17, // OBJ_SCENERY_143 + /* 18 */ COL2_18, // OBJ_SCENERY_120 } CollisionId_2; typedef struct { @@ -85,18 +85,39 @@ typedef struct { } ObjectInit; // size = 0x14 typedef struct { - /* 0x00 */ Gfx* dList; - /* 0x04 */ f32* hitbox; - /* 0x08 */ f32 scale; - /* 0x0C */ f32 info_unk_10; + /* 0x00 */ u8 status; + /* 0x02 */ u16 type; + /* 0x04 */ Vec3f pos; /* 0x10 */ f32 unk_10; - /* 0x14 */ u8 info_unk_16; - /* 0x15 */ u8 info_unk_14; - /* 0x16 */ u8 sfx; - /* 0x17 */ u8 info_unk_19; - /* 0x18 */ f32 info_unk_1C; - /* 0x1C */ u8 bonus; -} UnkStruct_D003C; // size = 0x20 + /* 0x14 */ char pad14[0x14]; +} RadarMark; // size = 0x28 + +typedef struct { + /* 0x00 */ u8 mode; + /* 0x02 */ u16 timer; + /* 0x04 */ Vec3f unk_04; + /* 0x10 */ Vec3f unk_10; + /* 0x1C */ f32 unk_1C; + /* 0x20 */ f32 unk_20; + /* 0x24 */ f32 unk_24; + /* 0x28 */ f32 unk_28; + /* 0x2C */ u8 unk_2C; // possibly a color struct + /* 0x2D */ u8 unk_2D; + /* 0x2E */ u8 unk_2E; + /* 0x2F */ u8 unk_2F; +} TexturedLine; // size = 0x30 + +typedef struct { + /* 0x00 */ u8 hits; + /* 0x04 */ Vec3f pos; + /* 0x10 */ f32 unk_10; + /* 0x14 */ char pad14[0x4]; + /* 0x18 */ u16 timer; +} BonusText; // size = 0x1C + +#define BONUS_TEXT_FREE 0 +#define BONUS_TEXT_GREAT 100 +#define BONUS_TEXT_1UP 101 typedef enum ObjectStatus { /* 0 */ OBJ_FREE, @@ -127,8 +148,8 @@ typedef struct { /* 0x16 */ s16 unk_16; // can be 0, 1, 2 /* 0x18 */ u8 damage; /* 0x19 */ u8 unk_19; // can be 0, 1, 2 - /* 0x1C */ f32 unk_1C; // y offset of something - /* 0x20 */ u8 bonus; + /* 0x1C */ f32 unk_1C; // target lock y offset. 0.0f can't be targeted + /* 0x20 */ u8 bonus; // bonus hits when killed. 0 means no } ObjectInfo; // size = 0x24 typedef struct { @@ -138,7 +159,7 @@ typedef struct { /* 0x41 */ char unk_41[7]; /* 0x48 */ f32 sfxSource[3]; /* 0x54 */ f32 unk_54; -} Object_58; // size = 0x58 +} Scenery360; // size = 0x58 typedef struct { /* 0x00 */ Object obj; @@ -155,7 +176,7 @@ typedef struct { /* 0x64 */ Vec3f vel; /* 0x70 */ f32 sfxSource[3]; /* 0x7C */ char pad7C[4]; -} Object_80; // size = 0x80 +} Scenery; // size = 0x80 typedef struct { /* 0x00 */ Object obj; @@ -268,13 +289,13 @@ typedef struct { /* 0x0C6 */ u16 timer_0C6; /* 0x0C8 */ u8 unk_0C8; /* 0x0C9 */ u8 unk_0C9; - /* 0x0CA */ u8 timer_0CA[4]; + /* 0x0CA */ u8 lockOnTimers[4]; /* 0x0CE */ s16 health; /* 0x0D0 */ s8 unk_0D0; /* 0x0D2 */ s16 unk_0D2; /* 0x0D4 */ s16 unk_0D4; /* 0x0D6 */ u16 damage; - /* 0x0D8 */ Vec3f unk_0D8; + /* 0x0D8 */ Vec3f hitPos; /* 0x0E4 */ s16 aiType; /* 0x0E6 */ s16 aiIndex; /* 0x0E8 */ Vec3f vel; @@ -288,167 +309,167 @@ typedef struct { typedef enum ObjectId { /* -1 */ OBJ_INVALID=-1, - /* 0 */ OBJ_80_0, - /* 1 */ OBJ_80_1, - /* 2 */ OBJ_80_2, - /* 3 */ OBJ_80_3, - /* 4 */ OBJ_80_4, - /* 5 */ OBJ_80_5, - /* 6 */ OBJ_80_6, - /* 7 */ OBJ_80_7, - /* 8 */ OBJ_80_8, - /* 9 */ OBJ_80_9, - /* 10 */ OBJ_80_10, - /* 11 */ OBJ_80_11, - /* 12 */ OBJ_80_12, - /* 13 */ OBJ_80_13, - /* 14 */ OBJ_80_14, - /* 15 */ OBJ_80_15, - /* 16 */ OBJ_80_16, - /* 17 */ OBJ_80_17, - /* 18 */ OBJ_80_18, - /* 19 */ OBJ_80_19, - /* 20 */ OBJ_80_20, - /* 21 */ OBJ_80_21, - /* 22 */ OBJ_80_22, - /* 23 */ OBJ_80_23, - /* 24 */ OBJ_80_24, - /* 25 */ OBJ_80_25, - /* 26 */ OBJ_80_26, - /* 27 */ OBJ_80_27, - /* 28 */ OBJ_80_28, - /* 29 */ OBJ_80_29, - /* 30 */ OBJ_80_30, - /* 31 */ OBJ_80_31, - /* 32 */ OBJ_80_32, - /* 33 */ OBJ_80_33, - /* 34 */ OBJ_80_34, - /* 35 */ OBJ_80_35, - /* 36 */ OBJ_80_36, - /* 37 */ OBJ_80_37, - /* 38 */ OBJ_80_38, - /* 39 */ OBJ_80_39, - /* 40 */ OBJ_80_40, - /* 41 */ OBJ_80_41, - /* 42 */ OBJ_80_42, - /* 43 */ OBJ_80_43, - /* 44 */ OBJ_80_44, - /* 45 */ OBJ_80_45, - /* 46 */ OBJ_80_46, - /* 47 */ OBJ_80_47, - /* 48 */ OBJ_80_48, - /* 49 */ OBJ_80_49, - /* 50 */ OBJ_80_50, - /* 51 */ OBJ_80_51, - /* 52 */ OBJ_80_52, - /* 53 */ OBJ_80_53, - /* 54 */ OBJ_80_54, - /* 55 */ OBJ_80_55, - /* 56 */ OBJ_80_56, - /* 57 */ OBJ_80_57, - /* 58 */ OBJ_80_58, - /* 59 */ OBJ_80_59, - /* 60 */ OBJ_80_60, - /* 61 */ OBJ_80_61, - /* 62 */ OBJ_80_62, - /* 63 */ OBJ_80_63, - /* 64 */ OBJ_80_64, - /* 65 */ OBJ_80_65, - /* 66 */ OBJ_80_66, - /* 67 */ OBJ_80_67, - /* 68 */ OBJ_80_68, - /* 69 */ OBJ_80_69, - /* 70 */ OBJ_80_70, - /* 71 */ OBJ_80_71, - /* 72 */ OBJ_80_72, - /* 73 */ OBJ_80_73, - /* 74 */ OBJ_80_74, - /* 75 */ OBJ_80_75, - /* 76 */ OBJ_80_76, - /* 77 */ OBJ_80_77, - /* 78 */ OBJ_80_78, - /* 79 */ OBJ_80_79, - /* 80 */ OBJ_80_80, - /* 81 */ OBJ_80_81, - /* 82 */ OBJ_80_82, - /* 83 */ OBJ_80_83, - /* 84 */ OBJ_80_84, - /* 85 */ OBJ_80_85, - /* 86 */ OBJ_80_86, - /* 87 */ OBJ_80_87, - /* 88 */ OBJ_80_88, - /* 89 */ OBJ_80_89, - /* 90 */ OBJ_80_90, - /* 91 */ OBJ_80_91, - /* 92 */ OBJ_80_92, - /* 93 */ OBJ_80_93, - /* 94 */ OBJ_80_94, - /* 95 */ OBJ_80_95, - /* 96 */ OBJ_80_96, - /* 97 */ OBJ_80_97, - /* 98 */ OBJ_80_98, - /* 99 */ OBJ_80_99, - /* 100 */ OBJ_80_100, - /* 101 */ OBJ_80_101, - /* 102 */ OBJ_80_102, - /* 103 */ OBJ_80_103, - /* 104 */ OBJ_80_104, - /* 105 */ OBJ_80_105, - /* 106 */ OBJ_80_106, - /* 107 */ OBJ_80_107, - /* 108 */ OBJ_80_108, - /* 109 */ OBJ_80_109, - /* 110 */ OBJ_80_110, - /* 111 */ OBJ_80_111, - /* 112 */ OBJ_80_112, - /* 113 */ OBJ_80_113, - /* 114 */ OBJ_80_114, - /* 115 */ OBJ_80_115, - /* 116 */ OBJ_80_116, - /* 117 */ OBJ_80_117, - /* 118 */ OBJ_80_118, - /* 119 */ OBJ_80_119, - /* 120 */ OBJ_80_120, - /* 121 */ OBJ_80_121, - /* 122 */ OBJ_80_122, - /* 123 */ OBJ_80_123, - /* 124 */ OBJ_80_124, - /* 125 */ OBJ_80_125, - /* 126 */ OBJ_80_126, - /* 127 */ OBJ_80_127, - /* 128 */ OBJ_80_128, - /* 129 */ OBJ_80_129, - /* 130 */ OBJ_80_130, - /* 131 */ OBJ_80_131, - /* 132 */ OBJ_80_132, - /* 133 */ OBJ_80_133, - /* 134 */ OBJ_80_134, - /* 135 */ OBJ_80_135, - /* 136 */ OBJ_80_136, - /* 137 */ OBJ_80_137, - /* 138 */ OBJ_80_138, - /* 139 */ OBJ_80_139, - /* 140 */ OBJ_80_140, - /* 141 */ OBJ_80_141, - /* 142 */ OBJ_80_142, - /* 143 */ OBJ_80_143, - /* 144 */ OBJ_80_144, - /* 145 */ OBJ_80_145, - /* 146 */ OBJ_80_146, - /* 147 */ OBJ_80_147, - /* 148 */ OBJ_80_148, - /* 149 */ OBJ_80_149, - /* 150 */ OBJ_80_150, - /* 151 */ OBJ_80_151, - /* 152 */ OBJ_80_152, - /* 153 */ OBJ_80_153, - /* 154 */ OBJ_80_154, - /* 155 */ OBJ_80_155, - /* 156 */ OBJ_80_156, - /* 157 */ OBJ_80_157, - /* 158 */ OBJ_80_158, - /* 159 */ OBJ_80_159, - /* 160 */ OBJ_80_160, + /* 0 */ OBJ_SCENERY_0, + /* 1 */ OBJ_SCENERY_1, + /* 2 */ OBJ_SCENERY_2, + /* 3 */ OBJ_SCENERY_3, + /* 4 */ OBJ_SCENERY_4, + /* 5 */ OBJ_SCENERY_5, + /* 6 */ OBJ_SCENERY_6, + /* 7 */ OBJ_SCENERY_7, + /* 8 */ OBJ_SCENERY_8, + /* 9 */ OBJ_SCENERY_9, + /* 10 */ OBJ_SCENERY_10, + /* 11 */ OBJ_SCENERY_11, + /* 12 */ OBJ_SCENERY_12, + /* 13 */ OBJ_SCENERY_13, + /* 14 */ OBJ_SCENERY_14, + /* 15 */ OBJ_SCENERY_15, + /* 16 */ OBJ_SCENERY_16, + /* 17 */ OBJ_SCENERY_17, + /* 18 */ OBJ_SCENERY_18, + /* 19 */ OBJ_SCENERY_19, + /* 20 */ OBJ_SCENERY_20, + /* 21 */ OBJ_SCENERY_21, + /* 22 */ OBJ_SCENERY_22, + /* 23 */ OBJ_SCENERY_23, + /* 24 */ OBJ_SCENERY_24, + /* 25 */ OBJ_SCENERY_25, + /* 26 */ OBJ_SCENERY_26, + /* 27 */ OBJ_SCENERY_27, + /* 28 */ OBJ_SCENERY_28, + /* 29 */ OBJ_SCENERY_29, + /* 30 */ OBJ_SCENERY_30, + /* 31 */ OBJ_SCENERY_31, + /* 32 */ OBJ_SCENERY_32, + /* 33 */ OBJ_SCENERY_33, + /* 34 */ OBJ_SCENERY_34, + /* 35 */ OBJ_SCENERY_35, + /* 36 */ OBJ_SCENERY_36, + /* 37 */ OBJ_SCENERY_37, + /* 38 */ OBJ_SCENERY_38, + /* 39 */ OBJ_SCENERY_39, + /* 40 */ OBJ_SCENERY_40, + /* 41 */ OBJ_SCENERY_41, + /* 42 */ OBJ_SCENERY_42, + /* 43 */ OBJ_SCENERY_43, + /* 44 */ OBJ_SCENERY_44, + /* 45 */ OBJ_SCENERY_45, + /* 46 */ OBJ_SCENERY_46, + /* 47 */ OBJ_SCENERY_47, + /* 48 */ OBJ_SCENERY_48, + /* 49 */ OBJ_SCENERY_49, + /* 50 */ OBJ_SCENERY_50, + /* 51 */ OBJ_SCENERY_51, + /* 52 */ OBJ_SCENERY_52, + /* 53 */ OBJ_SCENERY_53, + /* 54 */ OBJ_SCENERY_54, + /* 55 */ OBJ_SCENERY_55, + /* 56 */ OBJ_SCENERY_56, + /* 57 */ OBJ_SCENERY_57, + /* 58 */ OBJ_SCENERY_58, + /* 59 */ OBJ_SCENERY_59, + /* 60 */ OBJ_SCENERY_60, + /* 61 */ OBJ_SCENERY_61, + /* 62 */ OBJ_SCENERY_62, + /* 63 */ OBJ_SCENERY_63, + /* 64 */ OBJ_SCENERY_64, + /* 65 */ OBJ_SCENERY_65, + /* 66 */ OBJ_SCENERY_66, + /* 67 */ OBJ_SCENERY_67, + /* 68 */ OBJ_SCENERY_68, + /* 69 */ OBJ_SCENERY_69, + /* 70 */ OBJ_SCENERY_70, + /* 71 */ OBJ_SCENERY_71, + /* 72 */ OBJ_SCENERY_72, + /* 73 */ OBJ_SCENERY_73, + /* 74 */ OBJ_SCENERY_74, + /* 75 */ OBJ_SCENERY_75, + /* 76 */ OBJ_SCENERY_76, + /* 77 */ OBJ_SCENERY_77, + /* 78 */ OBJ_SCENERY_78, + /* 79 */ OBJ_SCENERY_79, + /* 80 */ OBJ_SCENERY_80, + /* 81 */ OBJ_SCENERY_81, + /* 82 */ OBJ_SCENERY_82, + /* 83 */ OBJ_SCENERY_83, + /* 84 */ OBJ_SCENERY_84, + /* 85 */ OBJ_SCENERY_85, + /* 86 */ OBJ_SCENERY_86, + /* 87 */ OBJ_SCENERY_87, + /* 88 */ OBJ_SCENERY_88, + /* 89 */ OBJ_SCENERY_89, + /* 90 */ OBJ_SCENERY_90, + /* 91 */ OBJ_SCENERY_91, + /* 92 */ OBJ_SCENERY_92, + /* 93 */ OBJ_SCENERY_93, + /* 94 */ OBJ_SCENERY_94, + /* 95 */ OBJ_SCENERY_95, + /* 96 */ OBJ_SCENERY_96, + /* 97 */ OBJ_SCENERY_97, + /* 98 */ OBJ_SCENERY_98, + /* 99 */ OBJ_SCENERY_99, + /* 100 */ OBJ_SCENERY_100, + /* 101 */ OBJ_SCENERY_101, + /* 102 */ OBJ_SCENERY_102, + /* 103 */ OBJ_SCENERY_103, + /* 104 */ OBJ_SCENERY_104, + /* 105 */ OBJ_SCENERY_105, + /* 106 */ OBJ_SCENERY_106, + /* 107 */ OBJ_SCENERY_107, + /* 108 */ OBJ_SCENERY_108, + /* 109 */ OBJ_SCENERY_109, + /* 110 */ OBJ_SCENERY_110, + /* 111 */ OBJ_SCENERY_111, + /* 112 */ OBJ_SCENERY_112, + /* 113 */ OBJ_SCENERY_113, + /* 114 */ OBJ_SCENERY_114, + /* 115 */ OBJ_SCENERY_115, + /* 116 */ OBJ_SCENERY_116, + /* 117 */ OBJ_SCENERY_117, + /* 118 */ OBJ_SCENERY_118, + /* 119 */ OBJ_SCENERY_119, + /* 120 */ OBJ_SCENERY_120, + /* 121 */ OBJ_SCENERY_121, + /* 122 */ OBJ_SCENERY_122, + /* 123 */ OBJ_SCENERY_123, + /* 124 */ OBJ_SCENERY_124, + /* 125 */ OBJ_SCENERY_125, + /* 126 */ OBJ_SCENERY_126, + /* 127 */ OBJ_SCENERY_127, + /* 128 */ OBJ_SCENERY_128, + /* 129 */ OBJ_SCENERY_129, + /* 130 */ OBJ_SCENERY_130, + /* 131 */ OBJ_SCENERY_131, + /* 132 */ OBJ_SCENERY_132, + /* 133 */ OBJ_SCENERY_133, + /* 134 */ OBJ_SCENERY_134, + /* 135 */ OBJ_SCENERY_135, + /* 136 */ OBJ_SCENERY_136, + /* 137 */ OBJ_SCENERY_137, + /* 138 */ OBJ_SCENERY_138, + /* 139 */ OBJ_SCENERY_139, + /* 140 */ OBJ_SCENERY_140, + /* 141 */ OBJ_SCENERY_141, + /* 142 */ OBJ_SCENERY_142, + /* 143 */ OBJ_SCENERY_143, + /* 144 */ OBJ_SCENERY_144, + /* 145 */ OBJ_SCENERY_145, + /* 146 */ OBJ_SCENERY_146, + /* 147 */ OBJ_SCENERY_147, + /* 148 */ OBJ_SCENERY_148, + /* 149 */ OBJ_SCENERY_149, + /* 150 */ OBJ_SCENERY_150, + /* 151 */ OBJ_SCENERY_151, + /* 152 */ OBJ_SCENERY_152, + /* 153 */ OBJ_SCENERY_153, + /* 154 */ OBJ_SCENERY_154, + /* 155 */ OBJ_SCENERY_155, + /* 156 */ OBJ_SCENERY_156, + /* 157 */ OBJ_SCENERY_157, + /* 158 */ OBJ_SCENERY_158, + /* 159 */ OBJ_SCENERY_159, + /* 160 */ OBJ_SCENERY_160, /* 161 */ OBJ_SPRITE_CO_POLE, /* 162 */ OBJ_SPRITE_CO_TREE, /* 163 */ OBJ_SPRITE_FO_POLE, @@ -903,167 +924,167 @@ typedef enum { /* 50 */ LN_VWK_MAX, } BossLNvwork; -typedef Object_80 Object80_0; -typedef Object_80 Object80_1; -typedef Object_80 Object80_2; -typedef Object_80 Object80_3; -typedef Object_80 Object80_4; -typedef Object_80 Object80_5; -typedef Object_80 Object80_6; -typedef Object_80 Object80_7; -typedef Object_80 Object80_8; -typedef Object_80 Object80_9; -typedef Object_80 Object80_10; -typedef Object_80 Object80_11; -typedef Object_80 Object80_12; -typedef Object_80 Object80_13; -typedef Object_80 Object80_14; -typedef Object_80 Object80_15; -typedef Object_80 Object80_16; -typedef Object_80 Object80_17; -typedef Object_80 Object80_18; -typedef Object_80 Object80_19; -typedef Object_80 Object80_20; -typedef Object_80 Object80_21; -typedef Object_80 Object80_22; -typedef Object_80 Object80_23; -typedef Object_80 Object80_24; -typedef Object_80 Object80_25; -typedef Object_80 Object80_26; -typedef Object_80 Object80_27; -typedef Object_80 Object80_28; -typedef Object_80 Object80_29; -typedef Object_80 Object80_30; -typedef Object_80 Object80_31; -typedef Object_80 Object80_32; -typedef Object_80 Object80_33; -typedef Object_80 Object80_34; -typedef Object_80 Object80_35; -typedef Object_80 Object80_36; -typedef Object_80 Object80_37; -typedef Object_80 Object80_38; -typedef Object_80 Object80_39; -typedef Object_80 Object80_40; -typedef Object_80 Object80_41; -typedef Object_80 Object80_42; -typedef Object_80 Object80_43; -typedef Object_80 Object80_44; -typedef Object_80 Object80_45; -typedef Object_80 Object80_46; -typedef Object_80 Object80_47; -typedef Object_80 Object80_48; -typedef Object_80 Object80_49; -typedef Object_80 Object80_50; -typedef Object_80 Object80_51; -typedef Object_80 Object80_52; -typedef Object_80 Object80_53; -typedef Object_80 Object80_54; -typedef Object_80 Object80_55; -typedef Object_80 Object80_56; -typedef Object_80 Object80_57; -typedef Object_80 Object80_58; -typedef Object_80 Object80_59; -typedef Object_80 Object80_60; -typedef Object_80 Object80_61; -typedef Object_80 Object80_62; -typedef Object_80 Object80_63; -typedef Object_80 Object80_64; -typedef Object_80 Object80_65; -typedef Object_80 Object80_66; -typedef Object_80 Object80_67; -typedef Object_80 Object80_68; -typedef Object_80 Object80_69; -typedef Object_80 Object80_70; -typedef Object_80 Object80_71; -typedef Object_80 Object80_72; -typedef Object_80 Object80_73; -typedef Object_80 Object80_74; -typedef Object_80 Object80_75; -typedef Object_80 Object80_76; -typedef Object_80 Object80_77; -typedef Object_80 Object80_78; -typedef Object_80 Object80_79; -typedef Object_80 Object80_80; -typedef Object_80 Object80_81; -typedef Object_80 Object80_82; -typedef Object_80 Object80_83; -typedef Object_80 Object80_84; -typedef Object_80 Object80_85; -typedef Object_80 Object80_86; -typedef Object_80 Object80_87; -typedef Object_80 Object80_88; -typedef Object_80 Object80_89; -typedef Object_80 Object80_90; -typedef Object_80 Object80_91; -typedef Object_80 Object80_92; -typedef Object_80 Object80_93; -typedef Object_80 Object80_94; -typedef Object_80 Object80_95; -typedef Object_80 Object80_96; -typedef Object_80 Object80_97; -typedef Object_80 Object80_98; -typedef Object_80 Object80_99; -typedef Object_80 Object80_100; -typedef Object_80 Object80_101; -typedef Object_80 Object80_102; -typedef Object_80 Object80_103; -typedef Object_80 Object80_104; -typedef Object_80 Object80_105; -typedef Object_80 Object80_106; -typedef Object_80 Object80_107; -typedef Object_80 Object80_108; -typedef Object_80 Object80_109; -typedef Object_80 Object80_110; -typedef Object_80 Object80_111; -typedef Object_80 Object80_112; -typedef Object_80 Object80_113; -typedef Object_80 Object80_114; -typedef Object_80 Object80_115; -typedef Object_80 Object80_116; -typedef Object_80 Object80_117; -typedef Object_80 Object80_118; -typedef Object_80 Object80_119; -typedef Object_80 Object80_120; -typedef Object_80 Object80_121; -typedef Object_80 Object80_122; -typedef Object_80 Object80_123; -typedef Object_80 Object80_124; -typedef Object_80 Object80_125; -typedef Object_80 Object80_126; -typedef Object_80 Object80_127; -typedef Object_80 Object80_128; -typedef Object_80 Object80_129; -typedef Object_80 Object80_130; -typedef Object_80 Object80_131; -typedef Object_80 Object80_132; -typedef Object_80 Object80_133; -typedef Object_80 Object80_134; -typedef Object_80 Object80_135; -typedef Object_80 Object80_136; -typedef Object_80 Object80_137; -typedef Object_80 Object80_138; -typedef Object_80 Object80_139; -typedef Object_80 Object80_140; -typedef Object_80 Object80_141; -typedef Object_80 Object80_142; -typedef Object_80 Object80_143; -typedef Object_80 Object80_144; -typedef Object_80 Object80_145; -typedef Object_80 Object80_146; -typedef Object_80 Object80_147; -typedef Object_80 Object80_148; -typedef Object_80 Object80_149; -typedef Object_80 Object80_150; -typedef Object_80 Object80_151; -typedef Object_80 Object80_152; -typedef Object_80 Object80_153; -typedef Object_80 Object80_154; -typedef Object_80 Object80_155; -typedef Object_80 Object80_156; -typedef Object_80 Object80_157; -typedef Object_80 Object80_158; -typedef Object_80 Object80_159; -typedef Object_80 Object80_160; +typedef Scenery Scenery_0; +typedef Scenery Scenery_1; +typedef Scenery Scenery_2; +typedef Scenery Scenery_3; +typedef Scenery Scenery_4; +typedef Scenery Scenery_5; +typedef Scenery Scenery_6; +typedef Scenery Scenery_7; +typedef Scenery Scenery_8; +typedef Scenery Scenery_9; +typedef Scenery Scenery_10; +typedef Scenery Scenery_11; +typedef Scenery Scenery_12; +typedef Scenery Scenery_13; +typedef Scenery Scenery_14; +typedef Scenery Scenery_15; +typedef Scenery Scenery_16; +typedef Scenery Scenery_17; +typedef Scenery Scenery_18; +typedef Scenery Scenery_19; +typedef Scenery Scenery_20; +typedef Scenery Scenery_21; +typedef Scenery Scenery_22; +typedef Scenery Scenery_23; +typedef Scenery Scenery_24; +typedef Scenery Scenery_25; +typedef Scenery Scenery_26; +typedef Scenery Scenery_27; +typedef Scenery Scenery_28; +typedef Scenery Scenery_29; +typedef Scenery Scenery_30; +typedef Scenery Scenery_31; +typedef Scenery Scenery_32; +typedef Scenery Scenery_33; +typedef Scenery Scenery_34; +typedef Scenery Scenery_35; +typedef Scenery Scenery_36; +typedef Scenery Scenery_37; +typedef Scenery Scenery_38; +typedef Scenery Scenery_39; +typedef Scenery Scenery_40; +typedef Scenery Scenery_41; +typedef Scenery Scenery_42; +typedef Scenery Scenery_43; +typedef Scenery Scenery_44; +typedef Scenery Scenery_45; +typedef Scenery Scenery_46; +typedef Scenery Scenery_47; +typedef Scenery Scenery_48; +typedef Scenery Scenery_49; +typedef Scenery Scenery_50; +typedef Scenery Scenery_51; +typedef Scenery Scenery_52; +typedef Scenery Scenery_53; +typedef Scenery Scenery_54; +typedef Scenery Scenery_55; +typedef Scenery Scenery_56; +typedef Scenery Scenery_57; +typedef Scenery Scenery_58; +typedef Scenery Scenery_59; +typedef Scenery Scenery_60; +typedef Scenery Scenery_61; +typedef Scenery Scenery_62; +typedef Scenery Scenery_63; +typedef Scenery Scenery_64; +typedef Scenery Scenery_65; +typedef Scenery Scenery_66; +typedef Scenery Scenery_67; +typedef Scenery Scenery_68; +typedef Scenery Scenery_69; +typedef Scenery Scenery_70; +typedef Scenery Scenery_71; +typedef Scenery Scenery_72; +typedef Scenery Scenery_73; +typedef Scenery Scenery_74; +typedef Scenery Scenery_75; +typedef Scenery Scenery_76; +typedef Scenery Scenery_77; +typedef Scenery Scenery_78; +typedef Scenery Scenery_79; +typedef Scenery Scenery_80; +typedef Scenery Scenery_81; +typedef Scenery Scenery_82; +typedef Scenery Scenery_83; +typedef Scenery Scenery_84; +typedef Scenery Scenery_85; +typedef Scenery Scenery_86; +typedef Scenery Scenery_87; +typedef Scenery Scenery_88; +typedef Scenery Scenery_89; +typedef Scenery Scenery_90; +typedef Scenery Scenery_91; +typedef Scenery Scenery_92; +typedef Scenery Scenery_93; +typedef Scenery Scenery_94; +typedef Scenery Scenery_95; +typedef Scenery Scenery_96; +typedef Scenery Scenery_97; +typedef Scenery Scenery_98; +typedef Scenery Scenery_99; +typedef Scenery Scenery_100; +typedef Scenery Scenery_101; +typedef Scenery Scenery_102; +typedef Scenery Scenery_103; +typedef Scenery Scenery_104; +typedef Scenery Scenery_105; +typedef Scenery Scenery_106; +typedef Scenery Scenery_107; +typedef Scenery Scenery_108; +typedef Scenery Scenery_109; +typedef Scenery Scenery_110; +typedef Scenery Scenery_111; +typedef Scenery Scenery_112; +typedef Scenery Scenery_113; +typedef Scenery Scenery_114; +typedef Scenery Scenery_115; +typedef Scenery Scenery_116; +typedef Scenery Scenery_117; +typedef Scenery Scenery_118; +typedef Scenery Scenery_119; +typedef Scenery Scenery_120; +typedef Scenery Scenery_121; +typedef Scenery Scenery_122; +typedef Scenery Scenery_123; +typedef Scenery Scenery_124; +typedef Scenery Scenery_125; +typedef Scenery Scenery_126; +typedef Scenery Scenery_127; +typedef Scenery Scenery_128; +typedef Scenery Scenery_129; +typedef Scenery Scenery_130; +typedef Scenery Scenery_131; +typedef Scenery Scenery_132; +typedef Scenery Scenery_133; +typedef Scenery Scenery_134; +typedef Scenery Scenery_135; +typedef Scenery Scenery_136; +typedef Scenery Scenery_137; +typedef Scenery Scenery_138; +typedef Scenery Scenery_139; +typedef Scenery Scenery_140; +typedef Scenery Scenery_141; +typedef Scenery Scenery_142; +typedef Scenery Scenery_143; +typedef Scenery Scenery_144; +typedef Scenery Scenery_145; +typedef Scenery Scenery_146; +typedef Scenery Scenery_147; +typedef Scenery Scenery_148; +typedef Scenery Scenery_149; +typedef Scenery Scenery_150; +typedef Scenery Scenery_151; +typedef Scenery Scenery_152; +typedef Scenery Scenery_153; +typedef Scenery Scenery_154; +typedef Scenery Scenery_155; +typedef Scenery Scenery_156; +typedef Scenery Scenery_157; +typedef Scenery Scenery_158; +typedef Scenery Scenery_159; +typedef Scenery Scenery_160; typedef Sprite CoPole; typedef Sprite CoTree; typedef Sprite FoPole; diff --git a/include/sf64player.h b/include/sf64player.h index f00437c3..05ea3de9 100644 --- a/include/sf64player.h +++ b/include/sf64player.h @@ -77,7 +77,7 @@ typedef enum { /* 0 */ PLAYERSHOT_0, // single laser? /* 1 */ PLAYERSHOT_1, // twin laser? /* 2 */ PLAYERSHOT_2, - /* 3 */ PLAYERSHOT_3, // bomb? + /* 3 */ PLAYERSHOT_BOMB, // bomb? /* 4 */ PLAYERSHOT_4, /* 5 */ PLAYERSHOT_5, // landmaster shot /* 6 */ PLAYERSHOT_6, // on-foot shot @@ -295,9 +295,9 @@ typedef struct Player { /* 0x284 */ s32 unk_284; /* 0x288 */ s32 unk_288; /* 0x28C */ char pad28C[0x28]; - /* 0x2B4 */ bool unk_2B4; - /* 0x2B8 */ bool unk_2B8; - /* 0x2BC */ f32 unk_2BC; + /* 0x2B4 */ bool boostCooldown; + /* 0x2B8 */ bool boostActive; + /* 0x2BC */ f32 boostMeter; /* 0x2C0 */ f32 unk_2C0; /* 0x2C4 */ s32 unk_2C4; /* 0x2C8 */ Vec3f hit2; diff --git a/include/structs.h b/include/structs.h deleted file mode 100644 index 7bd35c8c..00000000 --- a/include/structs.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef STRUCTS_H -#define STRUCTS_H - -#include "libultra/ultra64.h" -#include "sf64math.h" - -typedef struct { - /* 0x00 */ u8 status; - /* 0x02 */ u16 type; - /* 0x04 */ Vec3f pos; - /* 0x10 */ f32 unk_10; - /* 0x14 */ char pad14[0x14]; -} RadarMark; // size = 0x28 - -typedef struct { - /* 0x00 */ u8 mode; - /* 0x02 */ u16 timer; - /* 0x04 */ Vec3f unk_04; - /* 0x10 */ Vec3f unk_10; - /* 0x1C */ f32 unk_1C; - /* 0x20 */ f32 unk_20; - /* 0x24 */ f32 unk_24; - /* 0x28 */ f32 unk_28; - /* 0x2C */ u8 unk_2C; // possibly a color struct - /* 0x2D */ u8 unk_2D; - /* 0x2E */ u8 unk_2E; - /* 0x2F */ u8 unk_2F; -} TexturedLine; // size = 0x30 - -typedef struct { - /* 0x00 */ u8 hits; - /* 0x04 */ Vec3f pos; - /* 0x10 */ f32 unk_10; - /* 0x14 */ char pad14[0x4]; - /* 0x18 */ u16 timer; -} BonusText; // size = 0x1C - -#define BONUS_TEXT_FREE 0 -#define BONUS_TEXT_GREAT 100 -#define BONUS_TEXT_1UP 101 - -typedef struct { - /* 0x00 */ Vec3f eye; - /* 0x0C */ Vec3f at; -} CameraPoint; // size = 0x18 - -typedef struct { - /* 0x00 */ f32 unk_00; - /* 0x04 */ f32 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ s16 unk_10; -} UnkStruct_D_i5_801B8E50; //size = 0x14 - -typedef struct { - /* 0x00 */ f32 unk_00; - /* 0x04 */ s16 unk_04; - /* 0x08 */ f32 unk_08; - /* 0x0C */ f32 unk_0C; - /* 0x10 */ s16 unk_10; -} UnkStruct_D_i5_801BA1EC; //size = 0x14 - -typedef enum OptionState { - OPTION_WAIT, - OPTION_SETUP, - OPTION_UPDATE -} OptionState; - -typedef enum OptionSoundMode { - OPTIONSOUND_STEREO, - OPTIONSOUND_MONO, - OPTIONSOUND_HEADSET, - OPTIONSOUND_MAX, -} OptionSoundMode; - -#endif diff --git a/include/sys.h b/include/sys.h index 04b1d522..4f39b97f 100644 --- a/include/sys.h +++ b/include/sys.h @@ -48,15 +48,28 @@ extern f32 D_game_80161A14; extern s32 gPlayerInactive[4]; extern s32 D_game_80161A28; extern u8 gShowHud; -extern u16 gNextLevelStage; +extern u16 gNextLevelPhase; extern u16 gNextLevel; extern u16 gNextGameState; extern u16 D_game_80161A34; extern u16 gBgColor; extern u8 gBlurAlpha; -extern u8 D_game_80161A39; +extern u8 gGameStandby; extern f32 gFovY; extern f32 gProjectNear; extern f32 gProjectFar; +typedef enum OptionState { + OPTION_WAIT, + OPTION_SETUP, + OPTION_UPDATE +} OptionState; + +typedef enum OptionSoundMode { + OPTIONSOUND_STEREO, + OPTIONSOUND_MONO, + OPTIONSOUND_HEADSET, + OPTIONSOUND_MAX, +} OptionSoundMode; + #endif diff --git a/include/variables.h b/include/variables.h index 62aade6d..5fbe0197 100644 --- a/include/variables.h +++ b/include/variables.h @@ -2,7 +2,6 @@ #define VARIABLES_H #include "sys.h" -#include "structs.h" #include "sf64level.h" #include "sf64object.h" #include "sf64player.h" @@ -11,7 +10,7 @@ extern s32 D_360_800C9B4C; // fox_bg -extern u16 D_bg_800C9C3C[16]; +extern u16 gStarColors[16]; // fox_boss extern s32 D_boss_800C9E90[]; @@ -27,21 +26,21 @@ extern s32 gTeamHelpTimer; // fox_edata extern f32 gActor241Hitbox[]; -extern f32 gDefaultCubeHitbox100[]; -extern f32 gDefaultCubeHitbox150[]; -extern f32 gDefaultCubeHitbox200[]; -extern f32 gDefaultCubeHitbox300[]; -extern f32 gDefaultCubeHitbox400[]; +extern f32 gCubeHitbox100[]; +extern f32 gCubeHitbox150[]; +extern f32 gCubeHitbox200[]; +extern f32 gCubeHitbox300[]; +extern f32 gCubeHitbox400[]; extern f32 gItemRingCheckHitbox[]; -extern f32 gHitboxNone[]; +extern f32 gNoHitbox[]; extern f32 gItemCheckpointHitbox[]; extern f32 gItemSupplyRingHitbox[]; extern f32 gMeteoWarpHitbox[]; -extern f32 D_edata_800CBF8C[]; +extern f32 gItemPathChangeHitbox[]; extern f32 gItemLasersHitbox[]; extern f32 gItemBombHitbox[]; extern f32 gActor190_191Hitbox[]; -extern f32 gActor194HItbox[]; +extern f32 gActor194Hitbox[]; extern f32 gTeamHitbox[]; extern f32 gActorAllRangeHItbox[]; extern f32 gWarpZoneEvent94Hitbox[]; @@ -89,7 +88,7 @@ extern CollisionHeader D_800D2B38[]; extern CollisionHeader2 D_800D2CA0[]; // fox_play -extern u8 D_play_800D2F68; +extern u8 gVenomHardClear; extern u8 D_play_800D3180[30]; // fox_radio @@ -114,9 +113,9 @@ extern s32 gAllRangeFrameCount; extern f32 gAllRangeCountdownScale; // fox_bg -extern f32 D_bg_800C9C30; -extern u16 D_bg_800C9C34; -extern f32 D_bg_8015F960; +extern f32 gAndrossUnkAlpha; +extern u16 gBolseDynamicGround; +extern f32 gWarpZoneBgAlpha; extern u8 D_bg_8015F964; extern f32 D_bg_8015F968; extern f32 D_bg_8015F96C; diff --git a/linker_scripts/us/symbol_addrs.txt b/linker_scripts/us/symbol_addrs.txt index 46b95202..b629a9f5 100644 --- a/linker_scripts/us/symbol_addrs.txt +++ b/linker_scripts/us/symbol_addrs.txt @@ -128,7 +128,7 @@ Save_Checksum = 0x800C2FB0; Save_Write = 0x800C3084; Save_Read = 0x800C3194; -sUnused_Overlay = 0x800CBD3C; +sOvlUnused_Unk = 0x800CBD3C; // hardcoded address used in sys_rdram D_A0300000 = 0xA0300000; diff --git a/linker_scripts/us/symbol_addrs_EBFBE0.txt b/linker_scripts/us/symbol_addrs_EBFBE0.txt index 2cc6611a..4fe5c3c2 100644 --- a/linker_scripts/us/symbol_addrs_EBFBE0.txt +++ b/linker_scripts/us/symbol_addrs_EBFBE0.txt @@ -7,7 +7,7 @@ sOptionCardList = 0x801AE638; // type:OptionEntry segment:ovl_menu size:0x240 D_menu_801AE99C = 0x801AE99C; // force_migration:True segment:ovl_menu sTimeTrialMinuteTextures = 0x801AF28C; // force_migration:True segment:ovl_menu sPlanetList = 0x801AF7E8;// segment:ovl_menu -spectrumAnalizerMode = 0x801B9318;// segment:ovl_menu +spectrumAnalyzerMode = 0x801B9318;// segment:ovl_menu D_menu_801AE998 = 0x801AE998; //size:4 segment:ovl_menu sPaths = 0x801AFD18; // segment:ovl_menu D_menu_801B6E50 = 0x801B6E50; // force_migration:True segment:ovl_menu diff --git a/linker_scripts/us/symbol_addrs_audio.txt b/linker_scripts/us/symbol_addrs_audio.txt index 865e8cb1..bf9f7536 100644 --- a/linker_scripts/us/symbol_addrs_audio.txt +++ b/linker_scripts/us/symbol_addrs_audio.txt @@ -467,7 +467,7 @@ Audio_ResetVoicesAndPlayers = 0x8001BC48; Audio_ProcessPlaylist = 0x8001BD0C; func_8001BFC0 = 0x8001BFC0; Audio_UpdateFrequencyAnalysis = 0x8001C3EC; -func_8001C8B8 = 0x8001C8B8; +Audio_StartPlayerNoise = 0x8001C8B8; func_8001CA24 = 0x8001CA24; func_8001CB80 = 0x8001CB80; func_8001CCDC = 0x8001CCDC; @@ -490,7 +490,7 @@ func_8001D520 = 0x8001D520; func_8001D638 = 0x8001D638; func_8001D6DC = 0x8001D6DC; func_8001D780 = 0x8001D780; -func_8001D8A8 = 0x8001D8A8; +Audio_SetVolume = 0x8001D8A8; Audio_PlaySoundTest = 0x8001D8F4; Audio_PlaySequenceDistorted = 0x8001D9E0; Audio_PlaySoundTestTrack = 0x8001DA90; diff --git a/linker_scripts/us/symbol_addrs_engine.txt b/linker_scripts/us/symbol_addrs_engine.txt index 86fb770e..2d93d445 100644 --- a/linker_scripts/us/symbol_addrs_engine.txt +++ b/linker_scripts/us/symbol_addrs_engine.txt @@ -150,10 +150,10 @@ Message_DisplayScrollingText = 0x800C2D3C; Message_IsPrintingChar = 0x800C2F30; // fox_bg -D_bg_800C9DBC = 0x800C9DBC;//size:39 -D_bg_800C9D94 = 0x800C9D94;//size:39 -D_bg_800C9CC4 = 0x800C9CC4; -D_bg_800C9CF8 = 0x800C9CF8; +sKaSunColors = 0x800C9DBC;//size:39 +sSunColors = 0x800C9D94;//size:39 +sSunShifts = 0x800C9CC4; +sKaSunShifts = 0x800C9CF8; // fox_boss func_boss_8004319C = 0x8004319C; @@ -208,7 +208,7 @@ ItemMeteoWarp_Draw = 0x8005CDA8; func_edisplay_8005D008 = 0x8005D008; func_edisplay_8005D1F0 = 0x8005D1F0; func_edisplay_8005D3CC = 0x8005D3CC; -Object_80_Draw = 0x8005D654; +Scenery_Draw = 0x8005D654; Sprite_Draw = 0x8005D8B8; Actor_DrawOnRails = 0x8005D954; Actor_DrawAllRange = 0x8005DBC0; @@ -222,8 +222,8 @@ Object_ClampSfxSource = 0x8005F030; func_edisplay_8005F0E8 = 0x8005F0E8; func_edisplay_8005F1EC = 0x8005F1EC; func_edisplay_8005F290 = 0x8005F290; -Object_58_Draw = 0x8005F2F4; -func_edisplay_8005F670 = 0x8005F670; +Scenery360_Draw = 0x8005F2F4; +Display_SetSecondLight = 0x8005F670; func_edisplay_8005F9DC = 0x8005F9DC; Object_DrawAll = 0x8005FB70; Effect_DrawAll = 0x8006046C; @@ -257,13 +257,13 @@ Object_Kill = 0x80060FBC; func_enmy_80060FE4 = 0x80060FE4; func_enmy_80061148 = 0x80061148; Object_SetInfo = 0x800612B8; -Object_80_Initialize = 0x80061364; +Scenery_Initialize = 0x80061364; Sprite_Initialize = 0x80061394; Actor_Initialize = 0x800613C4; Boss_Initialize = 0x80061404; Item_Initialize = 0x80061444; Effect_Initialize = 0x80061474; -Object_80_Load = 0x800614B4; +Scenery_Load = 0x800614B4; Sprite_Load = 0x800615A0; Actor_Load = 0x8006168C; Boss_Load = 0x80061778; @@ -333,13 +333,13 @@ Sprite_UpdateDoodad = 0x80068FE0; Object_Dying = 0x800690D0; Actor_Move = 0x800693E8; Boss_Move = 0x80069658; -Object80_Move = 0x800696F8; +Scenery_Move = 0x800696F8; Sprite_Move = 0x80069858; Effect_Move = 0x80069924; Item_Move = 0x80069A10; Actor_Update = 0x80069AAC; Boss_Update = 0x80069CBC; -Object_80_Update = 0x80069DF4; +Scenery_Update = 0x80069DF4; Sprite_Update = 0x80069E88; Item_Update = 0x80069F30; Effect_Update = 0x80069FD4; @@ -356,13 +356,13 @@ D_game_80161A14 = 0x80161A14; gPlayerInactive = 0x80161A18; //size:0x10 D_game_80161A28 = 0x80161A28; gShowHud = 0x80161A2C; -gNextLevelStage = 0x80161A2E; +gNextLevelPhase = 0x80161A2E; gNextLevel = 0x80161A30; gNextGameState = 0x80161A32; D_game_80161A34 = 0x80161A34; gBgColor = 0x80161A36; gBlurAlpha = 0x80161A38; -D_game_80161A39 = 0x80161A39; +gGameStandby = 0x80161A39; gFovY = 0x80161A3C; gProjectNear = 0x80161A40; gProjectFar = 0x80161A44; @@ -372,17 +372,17 @@ sVsCameraULx = 0x800D2874; sVsCameraLRx = 0x800D2884; sVsCameraULy = 0x800D2894; sVsCameraLRy = 0x800D28A4; -sOverlaySetups = 0x800D28B4; +sLevelSceneIds = 0x800D28B4; Game_Initialize = 0x800A18B0; Game_SetGameState = 0x800A1980; -func_game_800A1B6C = 0x800A1B6C; -func_game_800A1C14 = 0x800A1C14; -func_game_800A1E68 = 0x800A1E68; -func_game_800A1F44 = 0x800A1F44; -func_game_800A1FB0 = 0x800A1FB0; +Game_ChangeScene = 0x800A1B6C; +Game_InitMasterDL = 0x800A1C14; +Game_InitStandbyDL = 0x800A1E68; +Game_InitFullViewport = 0x800A1F44; +Game_InitViewport = 0x800A1FB0; Game_Draw = 0x800A24DC; -func_game_800A25DC = 0x800A25DC; +Game_SetScene = 0x800A25DC; Game_Update = 0x800A26C0; func_game_800A3608 = 0x800A3608; @@ -404,7 +404,7 @@ gScreenFlashTimer = 0x80161A60; gDropHitCountItem = 0x80161A62; D_play_80161A64 = 0x80161A64; sEnvSettings = 0x80161A68; -D_play_800D2F68 = 0x800D2F68; //type:u8 +gVenomHardClear = 0x800D2F68; //type:u8 // fox_context D_ctx_80161A70 = 0x80161A70; @@ -421,7 +421,7 @@ gSavedHitCount = 0x80161A9C; gLifeCount = 0x80161AA0; gLaserStrength = 0x80161AA8;//size:0x10 D_ctx_80161AB8 = 0x80161AB8; -gObjects80 = 0x80161B00; //size:0x1900 +gScenery = 0x80161B00; //size:0x1900 gSprites = 0x80163400; //size:0xBE0 gActors = 0x80163FE0; //size:0xB130 gBosses = 0x8016F110; //size:0x1020 @@ -437,15 +437,15 @@ gActor194yPos = 0x80176878; gActor194zPos = 0x80176B98; gActor194xRot = 0x80176EB8; gActor194yRot = 0x801771D8; -gOverlaySetup = 0x801774F8; +gSceneId = 0x801774F8; gActor194zRot = 0x80177500; -gOverlayStage = 0x80177820; +gSceneSetup = 0x80177820; D_ctx_80177824 = 0x80177824; gEnemyShotSpeed = 0x80177828; D_ctx_8017782C = 0x8017782C; -D_ctx_80177830 = 0x80177830; +gShowLevelClearStatusScreen = 0x80177830; gGameState = 0x80177834; -gLevelStatusScreenTimer = 0x80177838; +gLevelStartStatusScreenTimer = 0x80177838; gNextGameStateTimer = 0x8017783C; gLevelClearScreenTimer = 0x80177840; gOptionMenuStatus = 0x8017784C; //type:OptionState @@ -454,7 +454,7 @@ D_ctx_80177850 = 0x80177850; gPlayState = 0x80177854; D_ctx_80177858 = 0x80177858; D_ctx_80177868 = 0x80177868; -D_ctx_80177870 = 0x80177870; +gPlayerForms = 0x80177870; gLevelMode = 0x80177880; gHandicap = 0x80177888; gDrawMode = 0x80177898; @@ -474,7 +474,7 @@ gTeamDamage = 0x80177910; gBrakeButton = 0x80177928; gNextPlanetPath = 0x80177930; gShootButton = 0x80177938; -gGroundLevel = 0x80177940; +gGroundHeight = 0x80177940; gBombButton = 0x80177948; D_ctx_80177950 = 0x80177950; D_ctx_80177958 = 0x80177958; @@ -502,16 +502,16 @@ D_Timer_80177A88 = 0x80177A88;//size:0x10 D_ctx_80177A98 = 0x80177A98; D_ctx_80177AA0 = 0x80177AA0; D_ctx_80177AB0 = 0x80177AB0; -D_ctx_80177AB8 = 0x80177AB8; -D_ctx_80177AC8 = 0x80177AC8; -D_ctx_80177AD0 = 0x80177AD0; +gShieldAlpha = 0x80177AB8; +gAqDrawMode = 0x80177AC8; +gHasShield = 0x80177AD0; D_ctx_80177AE0 = 0x80177AE0; -D_ctx_80177AE8 = 0x80177AE8; +gShieldTimer = 0x80177AE8; gMainController = 0x80177AF8; -D_ctx_80177B00 = 0x80177B00; +gVsLockOnTimers = 0x80177B00; D_ctx_80177B40 = 0x80177B40; -D_Timer_80177B44 = 0x80177B44; -gCurrentPlanet = 0x80177B48; +gStartAndrossFightTimer = 0x80177B44; +gMissionNumber = 0x80177B48; D_ctx_80177B50 = 0x80177B50; D_ctx_80177B70 = 0x80177B70; D_ctx_80177B90 = 0x80177B90; @@ -521,7 +521,7 @@ gPlanetPathStatus = 0x80177BD8; D_ctx_80177C30 = 0x80177C30; D_ctx_80177C50 = 0x80177C50; D_ctx_80177C58 = 0x80177C58; -gSoundMode = 0x80177C74; +gOptionSoundMode = 0x80177C74; gVolumeSettings = 0x80177C80; gBgmSeqId = 0x80177C90; D_ctx_80177C94 = 0x80177C94; @@ -562,17 +562,17 @@ D_ctx_8017812C = 0x8017812C; D_ctx_80178130 = 0x80178130; //size:0xF4 gCurrentLevel = 0x80178234; D_ctx_80178238 = 0x80178238;//size:0x3D type:u8 -gLevelStage = 0x8017827C; +gLevelPhase = 0x8017827C; gPlayer = 0x80178280; gBossActive = 0x80178284; -D_ctx_80178288 = 0x80178288; +gStarOffsetsX = 0x80178288; D_ctx_8017828C = 0x8017828C; -D_ctx_80178290 = 0x80178290; +gStarOffsetsY = 0x80178290; D_ctx_80178294 = 0x80178294; -D_ctx_80178298 = 0x80178298; +gStarFillColors = 0x80178298; gRadioState = 0x8017829C; D_ctx_801782A4 = 0x801782A4; -gObjects58 = 0x801782A8; +gScenery360 = 0x801782A8; D_Timer_801782AC = 0x801782AC; D_Timer_801782B4 = 0x801782B4; D_ctx_801782B8 = 0x801782B8; @@ -597,23 +597,23 @@ gFillScreenGreen = 0x80178350; gFillScreenBlue = 0x80178354; gFillScreenAlphaTarget = 0x80178358; gFillScreenAlphaStep = 0x8017835C; -D_ctx_80178360 = 0x80178360; -D_ctx_80178364 = 0x80178364; -D_ctx_80178368 = 0x80178368; -D_ctx_8017836C = 0x8017836C; -D_ctx_80178370 = 0x80178370; -gPlayerFillScreenAlphas = 0x80178380; -gPlayerFillScreenReds = 0x80178390; -gPlayerFillScreenGreens = 0x801783A0; -gPlayerFillScreenBlues = 0x801783B0; -D_ctx_801783D0 = 0x801783D0; -D_ctx_801783D4 = 0x801783D4; +gLight3R = 0x80178360; +gLight3G = 0x80178364; +gLight3B = 0x80178368; +gLight3Brightness = 0x8017836C; +gLight3x = 0x80178370; +gPlayerGlareAlphas = 0x80178380; +gPlayerGlareReds = 0x80178390; +gPlayerGlareGreens = 0x801783A0; +gPlayerGlareBlues = 0x801783B0; +gSunViewX = 0x801783D0; +gSunViewY = 0x801783D4; gFogNear = 0x801783D8; gFogFar = 0x801783DC; -D_ctx_80178410 = 0x80178410; -D_ctx_80178420 = 0x80178420; -D_ctx_80178424 = 0x80178424; -D_ctx_80178428 = 0x80178428; +gStarCount = 0x80178410; +gStarfieldX = 0x80178420; +gStarfieldY = 0x80178424; +gStarfieldRoll = 0x80178428; D_ctx_8017842C = 0x8017842C; D_ctx_80178430 = 0x80178430; D_ctx_80178440 = 0x80178440; @@ -673,7 +673,7 @@ func_play_800A3FEC = 0x800A3FEC; func_play_800A4460 = 0x800A4460; func_play_800A46A0 = 0x800A46A0; func_play_800A4C40 = 0x800A4C40; -Object_58_Initialize = 0x800A4F4C; +Scenery360_Initialize = 0x800A4F4C; func_play_800A4F7C = 0x800A4F7C; func_play_800A5330 = 0x800A5330; func_play_800A5338 = 0x800A5338; @@ -681,7 +681,7 @@ func_play_800A55B0 = 0x800A55B0; func_play_800A57E0 = 0x800A57E0; Play_Setup = 0x800A5844; func_play_800A594C = 0x800A594C; -func_play_800A5D6C = 0x800A5D6C; +Play_SetupStarfield = 0x800A5D6C; func_play_800A5EBC = 0x800A5EBC; func_play_800A5FA0 = 0x800A5FA0; func_play_800A6028 = 0x800A6028; @@ -743,7 +743,7 @@ func_play_800B2C00 = 0x800B2C00; func_play_800B3010 = 0x800B3010; func_play_800B3314 = 0x800B3314; func_play_800B39E0 = 0x800B39E0; -func_play_800B40AC = 0x800B40AC; +Player_UpdateShields = 0x800B40AC; func_play_800B415C = 0x800B415C; func_play_800B41E0 = 0x800B41E0; func_play_800B41EC = 0x800B41EC; @@ -768,7 +768,7 @@ func_play_800B86A4 = 0x800B86A4; Play_Main = 0x800B86CC; D_tank_800C9F2C = 0x800C9F2C; -gHitboxNone = 0x800CBF34; +gNoHitbox = 0x800CBF34; D_bg_8015F970 = 0x8015F970; D_bg_8015F984 = 0x8015F984; D_ctx_8017796C = 0x8017796C; diff --git a/linker_scripts/us/symbol_addrs_overlays.txt b/linker_scripts/us/symbol_addrs_overlays.txt index bbf1054b..ed319ef1 100644 --- a/linker_scripts/us/symbol_addrs_overlays.txt +++ b/linker_scripts/us/symbol_addrs_overlays.txt @@ -89,7 +89,7 @@ Zoness_8019B1F0 = 0x8019B1F0;//segment:ovl_i3 Zoness_8019B810 = 0x8019B810;//segment:ovl_i3 Zoness_8019C200 = 0x8019C200;//segment:ovl_i3 Zoness_Actor247_Init = 0x8019D060;//segment:ovl_i3 -Solar_801A7930 = 0x801A7930;//segment:ovl_i3 +Solar_LevelComplete = 0x801A7930;//segment:ovl_i3 Aquas_801A9448 = 0x801A9448;//segment:ovl_i3 Aquas_801A94EC = 0x801A94EC;//segment:ovl_i3 Aquas_801A958C = 0x801A958C;//segment:ovl_i3 diff --git a/src/audio/audio_general.c b/src/audio/audio_general.c index 67f061fa..04ee7736 100644 --- a/src/audio/audio_general.c +++ b/src/audio/audio_general.c @@ -2451,7 +2451,7 @@ u8* Audio_UpdateFrequencyAnalysis(void) { return D_8014A958; } -void func_8001C8B8(u8 playerId) { +void Audio_StartPlayerNoise(u8 playerId) { u32 sfxId = 0x00000000; sPlayerNoise[playerId].form = gPlayer[playerId].sfx.form; @@ -2743,7 +2743,7 @@ void func_8001D780(u8 audioType) { } } -void func_8001D8A8(u8 audioType, u8 volume) { +void Audio_SetVolume(u8 audioType, u8 volume) { if (volume > 99) { volume = 99; } diff --git a/src/engine/fox_360.c b/src/engine/fox_360.c index 85cc6d41..566ab856 100644 --- a/src/engine/fox_360.c +++ b/src/engine/fox_360.c @@ -170,8 +170,8 @@ void AllRange_GreatFoxRepair(Player* player) { gCsFrameCount++; switch (player->unk_1D0) { case 0: - player->unk_1F4 = player->timer_498 = player->damage = player->unk_280 = player->unk_2BC = player->unk_2B4 = - player->somersault = gCsFrameCount = 0; + player->unk_1F4 = player->timer_498 = player->damage = player->unk_280 = player->boostMeter = + player->boostCooldown = player->somersault = gCsFrameCount = 0; player->unk_130 = player->camRoll = player->unk_110 = player->unk_08C = player->unk_0D8.x = player->unk_0D8.y = player->unk_0D8.z = player->unk_134 = player->unk_4D8 = 0.0f; gCsCamEyeX = 1673.0f; @@ -307,7 +307,7 @@ void AllRange_ClearRadio(void) { void func_360_8002EE64(Actor* this) { s32 i; s32 colId; - Object_58* obj58; + Scenery360* scenery360; Vec3f temp1; f32 temp4; f32 temp5; @@ -324,16 +324,17 @@ void func_360_8002EE64(Actor* this) { this->fwork[25] = this->fwork[26] = this->fwork[28] = this->fwork[27] = 0.0f; if ((this->unk_0C9 != 0) && (gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if ((obj58->obj.status == OBJ_ACTIVE) && - ((obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_148) || - (obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3)) && - (fabsf(obj58->obj.pos.x - this->obj.pos.x) < 2500.0f) && - (fabsf(obj58->obj.pos.z - this->obj.pos.z) < 2500.0f)) { - temp1.x = obj58->obj.pos.x; - temp1.y = obj58->obj.pos.y; - temp1.z = obj58->obj.pos.z; - temp4 = obj58->obj.rot.y; + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3)) && + (fabsf(scenery360->obj.pos.x - this->obj.pos.x) < 2500.0f) && + (fabsf(scenery360->obj.pos.z - this->obj.pos.z) < 2500.0f)) { + temp1.x = scenery360->obj.pos.x; + temp1.y = scenery360->obj.pos.y; + temp1.z = scenery360->obj.pos.z; + temp4 = scenery360->obj.rot.y; Matrix_RotateY(gCalcMatrix, -temp4 * M_DTOR, MTXF_NEW); spE4.x = this->obj.pos.x - temp1.x; @@ -347,8 +348,8 @@ void func_360_8002EE64(Actor* this) { spC0.z = temp1.z; // fake? weird ordering spCC.y = spD8.y + temp1.y; spCC.z = spD8.z + temp1.z; - if ((obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_150)) { - if (obj58->obj.id == OBJ_80_149) { + if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { + if (scenery360->obj.id == OBJ_SCENERY_149) { colId = COL1_5; } else { colId = COL1_6; @@ -361,7 +362,7 @@ void func_360_8002EE64(Actor* this) { } } else { colId = COL2_0; - if (obj58->obj.id == OBJ_80_3) { + if (scenery360->obj.id == OBJ_SCENERY_3) { colId = COL2_3; } if (func_col2_800A3690(&spCC, &spC0, colId, &spB4)) { @@ -706,7 +707,7 @@ void ActorAllRange_UpdateEvents(Actor* this) { Katina_80198594(this); break; case LEVEL_BOLSE: - Bolse_8018C158(this); + Bolse_UpdateEventHandler(this); break; case LEVEL_SECTOR_Z: SectorZ_8019AB8C(this); @@ -734,11 +735,11 @@ s32 func_360_800301F4(Actor* actor) { temp_ft4 = actor->fwork[9] * 10.0f + (sp1C * 650.0f); temp_ft5 = actor->fwork[9] * 10.0f + (sp18 * 650.0f); for (i = 0; i < 200; i++) { - if ((gObjects58[i].obj.status == OBJ_ACTIVE) && - (fabsf(gObjects58[i].obj.pos.x - (actor->obj.pos.x + temp_ft4)) < 1000.0f) && - (fabsf(gObjects58[i].obj.pos.z - (actor->obj.pos.z + temp_ft5)) < 1000.0f)) { - if (fabsf(gObjects58[i].obj.pos.y - actor->obj.pos.y) < 1000.0f) { - if (gObjects58[i].obj.pos.y < actor->obj.pos.y) { + if ((gScenery360[i].obj.status == OBJ_ACTIVE) && + (fabsf(gScenery360[i].obj.pos.x - (actor->obj.pos.x + temp_ft4)) < 1000.0f) && + (fabsf(gScenery360[i].obj.pos.z - (actor->obj.pos.z + temp_ft5)) < 1000.0f)) { + if (fabsf(gScenery360[i].obj.pos.y - actor->obj.pos.y) < 1000.0f) { + if (gScenery360[i].obj.pos.y < actor->obj.pos.y) { return 1; } else { return -1; @@ -761,7 +762,7 @@ s32 func_360_800301F4(Actor* actor) { } s32 func_360_8003049C(Actor* actor) { - Object_58* obj58; + Scenery360* scenery360; s32 i; f32 sp44; f32 sp40; @@ -783,10 +784,11 @@ s32 func_360_8003049C(Actor* actor) { temp_fa0 = actor->fwork[9] * 10.0f + (sp40 * 650.0f); temp_ft4 = actor->fwork[9] * 10.0f + (sp3C * 650.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + temp_fa0)) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + temp_ft4)) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + temp_fa0)) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + temp_ft4)) < 1200.0f) && + (actor->obj.pos.y < 650.0f)) { return 1; } } @@ -1245,8 +1247,8 @@ void ActorAllRange_Update(Actor* this) { this->iwork[16] = 0; } } - if ((this->timer_0CA[0] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && - (this->timer_0CA[0] < 5) && ((gGameFrameCount % 32) == 0)) { + if ((this->lockOnTimers[0] != 0) && (gCurrentLevel != LEVEL_VENOM_2) && (this->aiType < AI360_10) && + (this->lockOnTimers[0] < 5) && ((gGameFrameCount % 32) == 0)) { this->iwork[16] = 10; } if ((this->iwork[16] != 0) && (this->state < 7)) { @@ -1940,7 +1942,7 @@ void ActorAllRange_Update(Actor* this) { if (spD8 < 0.0f) { spD8 += 360.0f; } - } else if ((this->obj.pos.y < (gGroundLevel + 50.0f)) && (spD8 > 180.0f)) { + } else if ((this->obj.pos.y < (gGroundHeight + 50.0f)) && (spD8 > 180.0f)) { spD8 = 0.0f; this->unk_0F4.x = 0.0f; } @@ -1954,7 +1956,7 @@ void ActorAllRange_Update(Actor* this) { } if ((this->fwork[7] > 0.01f) && (this->fwork[7] < 359.9f)) { if ((((gGameFrameCount + 15) % 32) == 0) && (gCurrentLevel != LEVEL_VENOM_2)) { - this->timer_0CA[0] = 0; + this->lockOnTimers[0] = 0; } } else { Math_SmoothStepToAngle(&this->obj.rot.z, spD0, 0.1f, 3.0f, 0.01f); @@ -2003,8 +2005,8 @@ void ActorAllRange_Update(Actor* this) { this->fwork[13] -= (this->fwork[13] * 0.1f); this->fwork[14] -= (this->fwork[14] * 0.1f); this->fwork[12] -= (this->fwork[12] * 0.1f); - if ((this->obj.pos.y < gGroundLevel + 40.0f) && (this->vel.y < 0.0f)) { - this->obj.pos.y = gGroundLevel + 40.0f; + if ((this->obj.pos.y < gGroundHeight + 40.0f) && (this->vel.y < 0.0f)) { + this->obj.pos.y = gGroundHeight + 40.0f; this->vel.y = 0.0f; } if (this->iwork[0] != 0) { @@ -2261,7 +2263,7 @@ void ActorAllRange_Draw(ActorAllRange* this) { Actor_DrawEngineAndContrails(this); break; case AI360_GREAT_FOX: - func_edisplay_8005F670(&this->obj.pos); + Display_SetSecondLight(&this->obj.pos); this->unk_0B6 = 1; Actor195_Draw(this); break; diff --git a/src/engine/fox_A4290_colheaders.c b/src/engine/fox_A4290_colheaders.c index f3fe3eaa..506f7e30 100644 --- a/src/engine/fox_A4290_colheaders.c +++ b/src/engine/fox_A4290_colheaders.c @@ -1,4 +1,3 @@ -#include "structs.h" #include "macros.h" #include "variables.h" #include "assets/ast_aquas.h" diff --git a/src/engine/fox_beam.c b/src/engine/fox_beam.c index b25f6324..98ba98d2 100644 --- a/src/engine/fox_beam.c +++ b/src/engine/fox_beam.c @@ -58,16 +58,16 @@ void func_beam_80035E78(PlayerShot* shot) { shot->unk_58 = 150; func_8001CE28(shot->playerNum, shot->sfxSource); gScreenFlashTimer = 4; - if (shot->obj.pos.y < (gGroundLevel + 450.0f)) { + if (shot->obj.pos.y < (gGroundHeight + 450.0f)) { gCameraShake = 15; if (gGroundType == GROUNDTYPE_WATER) { - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 5); - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 10); - func_effect_8007ADF4(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, shot->unk_48 * 0.05f, + func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); func_effect_8007A6F0(&shot->obj.pos, 0x19000014); } else { @@ -83,8 +83,8 @@ void func_beam_80035E78(PlayerShot* shot) { if (var_fv1 > 2.0f) { var_fv1 = 2.0f; } - func_effect_8007B550(shot->obj.pos.x, gGroundLevel + 6.0f, shot->obj.pos.z, shot->unk_48 * (1.5f + var_fv1), - var_fv0); + func_effect_8007B550(shot->obj.pos.x, gGroundHeight + 6.0f, shot->obj.pos.z, + shot->unk_48 * (1.5f + var_fv1), var_fv0); } if (gVersusMode) { @@ -129,21 +129,21 @@ void func_beam_80036318(PlayerShot* shot) { shot->obj.pos.z = D_ctx_80178498; // strange order on the globals shot->obj.pos.y = D_ctx_801784A0; shot->obj.pos.x = D_ctx_8017849C; - if ((shot->obj.id == PLAYERSHOT_3) || + if ((shot->obj.id == PLAYERSHOT_BOMB) || ((gCurrentLevel != LEVEL_AQUAS) && (shot->obj.id == PLAYERSHOT_8) && (shot->unk_5C != 0))) { if (shot->obj.id == PLAYERSHOT_8) { - shot->obj.id = PLAYERSHOT_3; + shot->obj.id = PLAYERSHOT_BOMB; shot->unk_5C = 0; } func_beam_80035E78(shot); } else if (shot->obj.id == PLAYERSHOT_8) { shot->unk_44 = 7.5f; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - gActors[i].timer_0CA[shot->playerNum] = 0; + gActors[i].lockOnTimers[shot->playerNum] = 0; } shot->vel.x = shot->vel.y = shot->vel.z = 0.0f; if (gCurrentLevel == LEVEL_AQUAS) { - D_ctx_80178360 = D_ctx_80178364 = D_ctx_80178368 = 0; + gLight3R = gLight3G = gLight3B = 0; func_effect_8007B344(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 10.0f, 4); func_effect_8007C120(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.3f, 30); } else { @@ -303,12 +303,13 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { Object_Kill(&shot->obj, shot->sfxSource); return 0; } - if ((obj->id < 176) || (obj->id >= 292)) { + if ((obj->id <= OBJ_SPRITE_GFOX_TARGET) || (obj->id >= OBJ_BOSS_292)) { func_beam_80036318(shot); } - if ((obj->id == 15) || ((obj->id == 22) && (i == 0)) || ((obj->id == 10) && (i == 0)) || - ((obj->id == 13) && (i == 0)) || ((obj->id == 12) && (i < 3)) || (obj->id == 16) || - (obj->id == 14)) { + if ((obj->id == OBJ_SCENERY_15) || ((obj->id == OBJ_SCENERY_22) && (i == 0)) || + ((obj->id == OBJ_SCENERY_10) && (i == 0)) || ((obj->id == OBJ_SCENERY_13) && (i == 0)) || + ((obj->id == OBJ_SCENERY_12) && (i < 3)) || (obj->id == OBJ_SCENERY_16) || + (obj->id == OBJ_SCENERY_14)) { if (shot->obj.pos.x - (obj->pos.x + hitbox->x.offset) < -hitbox->x.size) { if (hitbox->z.size + (obj->pos.z + hitbox->z.offset) < shot->obj.pos.z) { shot->obj.pos.z = hitbox->z.size + (obj->pos.z + hitbox->z.offset) - 5.0f; @@ -335,7 +336,7 @@ s32 func_beam_80036874(PlayerShot* shot, f32* hitboxData, Object* obj) { obj->pos.z, 0.0f, 0.0f, 0.0f, 2.0f, 1, 20); return i + 1; } - if (obj->id < 161) { + if (obj->id <= OBJ_SCENERY_160) { func_effect_8007A6F0(&shot->obj.pos, 0x29121007); } return i + 1; @@ -485,7 +486,7 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { sp7C.z = obj->pos.z - shot->obj.pos.z; // undefined behavior: if this check fails, the function returns no value if (((fabsf(sp7C.x) < 1100.0f) && (fabsf(sp7C.z) < 1100.0f) && (shot->obj.pos.y < 900.0f)) || - (objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_80_39)) { + (objId == OBJ_BOSS_313) || (objId == ACTOR_EVENT_ID) || (objId == OBJ_SCENERY_39)) { Matrix_RotateY(gCalcMatrix, -obj->rot.y * M_DTOR, MTXF_NEW); sp7C.x = shot->obj.pos.x - obj->pos.x; sp7C.y = shot->obj.pos.y - obj->pos.y; @@ -506,15 +507,15 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { case OBJ_ACTOR_180: objId = COL1_0; break; - case OBJ_80_4: - case OBJ_80_5: + case OBJ_SCENERY_4: + case OBJ_SCENERY_5: objId = COL2_1; useCol2 = true; break; - case OBJ_80_149: + case OBJ_SCENERY_149: objId = COL1_5; break; - case OBJ_80_150: + case OBJ_SCENERY_150: objId = COL1_6; break; case OBJ_BOSS_308: @@ -532,71 +533,71 @@ bool func_beam_8003774C(PlayerShot* shot, ObjectId objId, Object* obj) { case OBJ_BOSS_313: objId = COL1_8; break; - case OBJ_80_39: + case OBJ_SCENERY_39: objId = COL1_1; break; - case OBJ_80_120: + case OBJ_SCENERY_120: objId = COL2_18; useCol2 = true; break; - case OBJ_80_143: + case OBJ_SCENERY_143: objId = COL2_17; useCol2 = true; break; - case OBJ_80_124: + case OBJ_SCENERY_124: objId = COL2_15; useCol2 = true; break; - case OBJ_80_126: + case OBJ_SCENERY_126: objId = COL2_16; useCol2 = true; break; - case OBJ_80_47: + case OBJ_SCENERY_47: objId = COL2_7; useCol2 = true; break; - case OBJ_80_2: + case OBJ_SCENERY_2: objId = COL2_2; useCol2 = true; break; - case OBJ_80_3: - case OBJ_80_69: + case OBJ_SCENERY_3: + case OBJ_SCENERY_69: objId = COL2_3; useCol2 = true; break; - case OBJ_80_140: + case OBJ_SCENERY_140: objId = COL2_4; useCol2 = true; break; - case OBJ_80_141: + case OBJ_SCENERY_141: objId = COL2_6; useCol2 = true; break; - case OBJ_80_117: + case OBJ_SCENERY_117: objId = COL2_14; useCol2 = true; break; - case OBJ_80_70: + case OBJ_SCENERY_70: objId = COL2_8; useCol2 = true; break; - case OBJ_80_72: + case OBJ_SCENERY_72: objId = COL2_9; useCol2 = true; break; - case OBJ_80_71: + case OBJ_SCENERY_71: objId = COL2_10; useCol2 = true; break; - case OBJ_80_73: + case OBJ_SCENERY_73: objId = COL2_11; useCol2 = true; break; - case OBJ_80_67: + case OBJ_SCENERY_67: objId = COL2_12; useCol2 = true; break; - case OBJ_80_74: + case OBJ_SCENERY_74: objId = COL2_13; useCol2 = true; break; @@ -678,13 +679,13 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { } else { actor->unk_0D0 = 2; actor->damage = 30; - actor->timer_0CA[shot->playerNum] = 0; + actor->lockOnTimers[shot->playerNum] = 0; } } actor->unk_0D4 = shot->playerNum + 1; - actor->unk_0D8.x = shot->obj.pos.x; - actor->unk_0D8.y = shot->obj.pos.y; - actor->unk_0D8.z = shot->obj.pos.z; + actor->hitPos.x = shot->obj.pos.x; + actor->hitPos.y = shot->obj.pos.y; + actor->hitPos.z = shot->obj.pos.z; if (((actor->obj.id == OBJ_ACTOR_EVENT) && (actor->unk_0D2 == 0) && ((actor->unk_0B4 == EINFO_48) || (actor->unk_0B4 == EINFO_49) || (actor->unk_0B4 == EINFO_50))) || ((actor->obj.id == OBJ_ACTOR_ALLRANGE) && (actor->fwork[23] > 1.0f)) || @@ -695,7 +696,7 @@ void func_beam_80037CF4(PlayerShot* shot, Actor* actor, s32 hitIndex) { if ((actor->obj.id == OBJ_ACTOR_261) && (actor->state < 2)) { actor->state = 2; } - if ((shot->obj.id == PLAYERSHOT_8) || (shot->obj.id == PLAYERSHOT_3)) { + if ((shot->obj.id == PLAYERSHOT_8) || (shot->obj.id == PLAYERSHOT_BOMB)) { func_beam_80036318(shot); } else { shot->unk_64 = 25; @@ -730,9 +731,9 @@ void func_beam_80038140(PlayerShot* shot) { Vec3f sp7C; Actor* actor; Boss* boss; - Object_58* obj58; + Scenery360* scenery360; Sprite* sprite; - Object_80* obj80; + Scenery* scenery; Effect* effect; bool sp60; Player* player; @@ -898,32 +899,35 @@ void func_beam_80038140(PlayerShot* shot) { } if ((gLevelMode == LEVELMODE_ALL_RANGE) && (shot->playerNum < 110)) { - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if (obj58->obj.status == OBJ_ACTIVE) { - if ((obj58->obj.id == OBJ_80_117) || (obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_149) || - (obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_143) || - (obj58->obj.id == OBJ_80_160) || (obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3) || - (obj58->obj.id == OBJ_80_140)) { - func_beam_8003774C(shot, obj58->obj.id, &obj58->obj); + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if (scenery360->obj.status == OBJ_ACTIVE) { + if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || + (scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_143) || + (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + func_beam_8003774C(shot, scenery360->obj.id, &scenery360->obj); } else { - func_beam_80036874(shot, obj58->info.hitbox, &obj58->obj); + func_beam_80036874(shot, scenery360->info.hitbox, &scenery360->obj); } } } } else { - for (i = 0, obj80 = gObjects80; i < 50; i++, obj80++) { - if (obj80->obj.status == OBJ_ACTIVE) { - if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_39) || (obj80->obj.id == OBJ_80_4) || - (obj80->obj.id == OBJ_80_5) || (obj80->obj.id == OBJ_80_120) || (obj80->obj.id == OBJ_80_124) || - (obj80->obj.id == OBJ_80_126) || (obj80->obj.id == OBJ_80_47) || (obj80->obj.id == OBJ_80_2) || - (obj80->obj.id == OBJ_80_3) || (obj80->obj.id == OBJ_80_67) || (obj80->obj.id == OBJ_80_74) || - (obj80->obj.id == OBJ_80_3)) { - func_beam_8003774C(shot, obj80->obj.id, &obj80->obj); + for (i = 0, scenery = gScenery; i < 50; i++, scenery++) { + if (scenery->obj.status == OBJ_ACTIVE) { + if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_39) || + (scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5) || + (scenery->obj.id == OBJ_SCENERY_120) || (scenery->obj.id == OBJ_SCENERY_124) || + (scenery->obj.id == OBJ_SCENERY_126) || (scenery->obj.id == OBJ_SCENERY_47) || + (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3) || + (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_74) || + (scenery->obj.id == OBJ_SCENERY_3)) { + func_beam_8003774C(shot, scenery->obj.id, &scenery->obj); } else { - temp_v0 = func_beam_80036874(shot, obj80->info.hitbox, &obj80->obj); + temp_v0 = func_beam_80036874(shot, scenery->info.hitbox, &scenery->obj); if (temp_v0 != 0) { - obj80->dmgType = 1; - obj80->dmgPart = temp_v0 - 1; + scenery->dmgType = 1; + scenery->dmgPart = temp_v0 - 1; } } } @@ -987,7 +991,7 @@ void func_beam_80038140(PlayerShot* shot) { break; } boss->dmgType = DMG_BEAM; - if (shot->obj.id == PLAYERSHOT_3) { + if (shot->obj.id == PLAYERSHOT_BOMB) { boss->dmgType = DMG_BOMB; boss->damage = 20; } else if (shot->obj.id == PLAYERSHOT_8) { @@ -1224,7 +1228,7 @@ void func_beam_80039A50(PlayerShot* shot) { } } if (!sp104) { - if ((shot->obj.id != PLAYERSHOT_3) && (shot->unk_64 < 10) && !gVersusMode) { + if ((shot->obj.id != PLAYERSHOT_BOMB) && (shot->unk_64 < 10) && !gVersusMode) { Object_Kill(&shot->obj, shot->sfxSource); } } else { @@ -1236,7 +1240,7 @@ void func_beam_80039A50(PlayerShot* shot) { Matrix_RotateY(gGfxMatrix, shot->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, shot->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, shot->obj.rot.z * M_DTOR, MTXF_APPLY); - if ((shot->obj.id == PLAYERSHOT_3) && (shot->unk_5C == 0)) { + if ((shot->obj.id == PLAYERSHOT_BOMB) && (shot->unk_5C == 0)) { Matrix_RotateZ(gGfxMatrix, shot->unk_34 * M_DTOR, MTXF_APPLY); Matrix_RotateY(gGfxMatrix, shot->unk_30 * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, shot->unk_2C * M_DTOR, MTXF_APPLY); @@ -1249,7 +1253,7 @@ void func_beam_80039A50(PlayerShot* shot) { case PLAYERSHOT_1: func_beam_80039210(shot); break; - case PLAYERSHOT_3: + case PLAYERSHOT_BOMB: if (shot->unk_5C == 0) { RCP_SetupDL(&gMasterDisp, 0x1D); gSPDisplayList(gMasterDisp++, D_10231A0); @@ -1395,7 +1399,7 @@ void func_beam_80039A50(PlayerShot* shot) { gSPDisplayList(gMasterDisp++, D_AQ_600DB80); Matrix_Pop(&gGfxMatrix); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundLevel, shot->obj.pos.z + D_ctx_80177D20, + Matrix_Translate(gGfxMatrix, shot->obj.pos.x, gGroundHeight, shot->obj.pos.z + D_ctx_80177D20, MTXF_APPLY); Matrix_Scale(gGfxMatrix, shot->unk_2C, shot->unk_30, shot->unk_34, MTXF_APPLY); RCP_SetupDL(&gMasterDisp, 0x31); @@ -1538,9 +1542,9 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { Matrix_Push(&gCalcMatrix); func_beam_80038140(shot); Matrix_Pop(&gCalcMatrix); - if (shot->obj.pos.y < gGroundLevel) { + if (shot->obj.pos.y < gGroundHeight) { shot->unk_5C = 0; - func_beam_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); break; } else if (shot->unk_5C == 2) { shot->unk_5C = 0; @@ -1579,9 +1583,9 @@ void func_beam_8003B00C(PlayerShot* shot, Player* player) { Object_Kill(&shot->obj, shot->sfxSource); } if (shot->unk_5C == 1) { - if (shot->obj.pos.y < gGroundLevel) { + if (shot->obj.pos.y < gGroundHeight) { func_beam_80036318(shot); - func_beam_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); if (gCurrentLevel == LEVEL_FORTUNA) { func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); func_effect_8007BC7C(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 3.0f); @@ -1596,13 +1600,13 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { Vec3f sp44; Vec3f sp38; - if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < (gGroundLevel + 50.0f)) && (index == 0)) { - func_effect_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); - func_effect_8007ACE0(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); + if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < (gGroundHeight + 50.0f)) && (index == 0)) { + func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y + 20.0f); + func_effect_8007ACE0(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, 0.1f, 1.5f, shot->obj.rot.y - 20.0f); } - if ((shot->obj.pos.y < gGroundLevel) && (D_ctx_801784AC != 4)) { + if ((shot->obj.pos.y < gGroundHeight) && (D_ctx_801784AC != 4)) { func_beam_80036318(shot); - shot->obj.pos.y = gGroundLevel + 2; + shot->obj.pos.y = gGroundHeight + 2; if (gCurrentLevel == LEVEL_BOLSE) { func_effect_8007A6F0(&shot->obj.pos, 0x29121007); } @@ -1615,14 +1619,14 @@ void func_beam_8003B55C(PlayerShot* shot, s32 index) { sp44.y = sp44.z = 0.0f; sp44.x = 40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundLevel + 2.0f, shot->obj.pos.z + sp38.z, + func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundHeight + 2.0f, shot->obj.pos.z + sp38.z, shot->obj.rot.y, 2.0f); sp44.x = -40.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp44, &sp38); - func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundLevel + 2.0f, shot->obj.pos.z + sp38.z, + func_beam_80036770(shot->obj.pos.x + sp38.x, gGroundHeight + 2.0f, shot->obj.pos.z + sp38.z, shot->obj.rot.y, 2.0f); } else { - func_beam_80036770(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); + func_beam_80036770(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->obj.rot.y, 2.0f); } } if (gGroundType == GROUNDTYPE_WATER) { @@ -1695,10 +1699,10 @@ bool func_beam_8003BB4C(PlayerShot* shot) { } for (i = 0, actor = gActors; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.unk_1C != 0.0f) && - ((actor->timer_0CA[shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) && + ((actor->lockOnTimers[shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - actor->obj.pos.x) <= var_fa0) && (fabsf(shot->obj.pos.y - (actor->obj.pos.y + actor->info.unk_1C)) <= var_fa0) && (fabsf(shot->obj.pos.z - actor->obj.pos.z) <= var_fa0))) { - actor->timer_0CA[shot->playerNum] = 20; + actor->lockOnTimers[shot->playerNum] = 20; func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { @@ -1713,13 +1717,13 @@ bool func_beam_8003BB4C(PlayerShot* shot) { if (gVersusMode) { for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && !player->somersault && - (player->form != FORM_ON_FOOT) && (i != shot->playerNum) && (D_ctx_80177B00[i][shot->playerNum] == 0) && - (fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) && + (player->form != FORM_ON_FOOT) && (i != shot->playerNum) && + (gVsLockOnTimers[i][shot->playerNum] == 0) && (fabsf(shot->obj.pos.x - player->pos.x) <= var_fa0) && (fabsf(shot->obj.pos.y - player->pos.y) <= var_fa0) && (fabsf(shot->obj.pos.z - player->unk_138) <= var_fa0)) { - D_ctx_80177B00[0][shot->playerNum] = D_ctx_80177B00[1][shot->playerNum] = - D_ctx_80177B00[2][shot->playerNum] = D_ctx_80177B00[3][shot->playerNum] = 0; - D_ctx_80177B00[i][shot->playerNum] = 20; + gVsLockOnTimers[0][shot->playerNum] = gVsLockOnTimers[1][shot->playerNum] = + gVsLockOnTimers[2][shot->playerNum] = gVsLockOnTimers[3][shot->playerNum] = 0; + gVsLockOnTimers[i][shot->playerNum] = 20; func_enmy_80060F30(gPlayer[shot->playerNum].sfxSource, 0x49008027, shot->playerNum); for (j = 0; j < ARRAY_COUNT(gPlayerShots); j++) { if (gPlayerShots[j].obj.id == PLAYERSHOT_4) { @@ -1737,12 +1741,12 @@ bool func_beam_8003BB4C(PlayerShot* shot) { void func_beam_8003BEF4(PlayerShot* shot) { if (gVersusMode) { - if ((shot->obj.pos.y < gGroundLevel) || func_beam_8003BB4C(shot) || + if ((shot->obj.pos.y < gGroundHeight) || func_beam_8003BB4C(shot) || !(gControllerHold[shot->playerNum].button & A_BUTTON) || (shot->unk_64 == 0)) { Object_Kill(&shot->obj, shot->sfxSource); } } else { - if ((shot->obj.pos.y < gGroundLevel) || func_beam_8003BB4C(shot) || + if ((shot->obj.pos.y < gGroundHeight) || func_beam_8003BB4C(shot) || !(gControllerHold[gMainController].button & A_BUTTON) || (shot->unk_64 == 0)) { Object_Kill(&shot->obj, shot->sfxSource); } @@ -1818,23 +1822,23 @@ void func_beam_8003C3D8(PlayerShot* shot) { static u8 D_800C9C20[4] = { 32, 32, 32, 255 }; f32 var_fv0; - D_ctx_80178370 = shot->obj.pos.x; - D_ctx_80178374 = shot->obj.pos.y; - D_ctx_80178378 = shot->obj.pos.z; + gLight3x = shot->obj.pos.x; + gLight3y = shot->obj.pos.y; + gLight3z = shot->obj.pos.z; if (gVersusMode) { - D_ctx_80178360 = D_800C9C18[shot->playerNum]; - D_ctx_80178364 = D_800C9C1C[shot->playerNum]; - D_ctx_80178368 = D_800C9C20[shot->playerNum]; + gLight3R = D_800C9C18[shot->playerNum]; + gLight3G = D_800C9C1C[shot->playerNum]; + gLight3B = D_800C9C20[shot->playerNum]; } else { - D_ctx_80178360 = 90; - D_ctx_80178364 = 90; - D_ctx_80178368 = 255; + gLight3R = 90; + gLight3G = 90; + gLight3B = 255; } var_fv0 = 0.7f; if (shot->unk_5C != 0) { var_fv0 = 1.0f; } - Math_SmoothStepToF(&D_ctx_8017836C, var_fv0, 1.0f, 0.08f, 0.001f); + Math_SmoothStepToF(&gLight3Brightness, var_fv0, 1.0f, 0.08f, 0.001f); } void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { @@ -1845,20 +1849,20 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { s32 pad[2]; Actor* actor; Sprite* sprite; - Object_80* obj80; + Scenery* scenery; Effect* effect; Player* player; f32 temp_fs2 = shot->unk_44 * 60.0f; - for (i = 0, obj80 = gObjects80; i < 50; i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_56)) { - sp68 = obj80->obj.pos.x - shot->obj.pos.x; - sp64 = obj80->obj.pos.y - shot->obj.pos.y; - sp60 = obj80->obj.pos.z - shot->obj.pos.z; + for (i = 0, scenery = gScenery; i < 50; i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_56)) { + sp68 = scenery->obj.pos.x - shot->obj.pos.x; + sp64 = scenery->obj.pos.y - shot->obj.pos.y; + sp60 = scenery->obj.pos.z - shot->obj.pos.z; if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { - obj80->dmgType = 2; + scenery->dmgType = 2; } - obj80->dmgPart = 0; + scenery->dmgPart = 0; } } for (i = 0, sprite = gSprites; i < 40; i++, sprite++) { @@ -1886,9 +1890,9 @@ void func_beam_8003C4D0(PlayerShot* shot, s32 damage) { if ((gLevelMode == 0) && (sp60 < 0.0f)) { sp60 *= 0.6f; } - actor->unk_0D8.x = shot->obj.pos.x; - actor->unk_0D8.y = shot->obj.pos.y; - actor->unk_0D8.z = shot->obj.pos.z; + actor->hitPos.x = shot->obj.pos.x; + actor->hitPos.y = shot->obj.pos.y; + actor->hitPos.z = shot->obj.pos.z; if (sqrtf(SQ(sp68) + SQ(sp64) + SQ(sp60)) < temp_fs2) { if ((actor->obj.id == OBJ_ACTOR_193) || (actor->obj.id == OBJ_ACTOR_186) || (actor->obj.id == OBJ_ACTOR_190) || (actor->obj.id == OBJ_ACTOR_202) || @@ -1998,7 +2002,7 @@ void func_beam_8003CC08(PlayerShot* shot) { func_beam_80035E78(shot); break; } - if ((shot->obj.pos.y < gGroundLevel) && (D_ctx_801784AC != 4)) { + if ((shot->obj.pos.y < gGroundHeight) && (D_ctx_801784AC != 4)) { func_beam_80035E78(shot); break; } @@ -2070,14 +2074,14 @@ void func_beam_8003CF90(PlayerShot* shot) { Actor* actor; Player* player; - if ((shot->obj.pos.y < gGroundLevel) || (shot->unk_64 == 1)) { - if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < gGroundLevel)) { + if ((shot->obj.pos.y < gGroundHeight) || (shot->unk_64 == 1)) { + if ((gGroundType == GROUNDTYPE_WATER) && (shot->obj.pos.y < gGroundHeight)) { shot->unk_48 = 10.0f; - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 0); - func_effect_8007D9DC(shot->obj.pos.x, gGroundLevel + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, + func_effect_8007D9DC(shot->obj.pos.x, gGroundHeight + 2.0f, shot->obj.pos.z, shot->unk_48 * 0.1f, shot->unk_48 * 3.0f, 5); - func_effect_8007ADF4(shot->obj.pos.x, gGroundLevel, shot->obj.pos.z, shot->unk_48 * 0.05f, + func_effect_8007ADF4(shot->obj.pos.x, gGroundHeight, shot->obj.pos.z, shot->unk_48 * 0.05f, shot->unk_48 * 0.5f); func_effect_8007A6F0(&shot->obj.pos, 0x19000014); } @@ -2087,18 +2091,18 @@ void func_beam_8003CF90(PlayerShot* shot) { if (shot->unk_60 == 0) { for (i = 0, actor = gActors; i < 60; i++, actor++) { if ((actor->obj.status == OBJ_ACTIVE) && (actor->info.unk_1C != 0.0f) && - (actor->timer_0CA[shot->playerNum] != 0)) { + (actor->lockOnTimers[shot->playerNum] != 0)) { var_a3 = 1; - actor->timer_0CA[shot->playerNum] = 2; + actor->lockOnTimers[shot->playerNum] = 2; D_800C9C24 = actor->obj.pos; D_800C9C24.y += actor->info.unk_1C; } } for (i = 0, player = gPlayer; i < gCamCount; i++, player++) { if (((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN)) && - (D_ctx_80177B00[i][shot->playerNum] != 0)) { + (gVsLockOnTimers[i][shot->playerNum] != 0)) { var_a3 = 1; - D_ctx_80177B00[i][shot->playerNum] = 2; + gVsLockOnTimers[i][shot->playerNum] = 2; D_800C9C24.x = player->pos.x; if (player->form == FORM_ARWING) { D_800C9C24.y = player->pos.y; @@ -2155,13 +2159,13 @@ void func_beam_8003CF90(PlayerShot* shot) { shot->vel.z = sp38.z; } func_beam_80038140(shot); - D_ctx_80178370 = shot->obj.pos.x; - D_ctx_80178374 = shot->obj.pos.y; - D_ctx_80178378 = shot->obj.pos.z; - D_ctx_80178360 = 90; - D_ctx_80178364 = 180; - D_ctx_80178368 = 90; - Math_SmoothStepToF(&D_ctx_8017836C, 0.6f, 1.0f, 0.08f, 0.001f); + gLight3x = shot->obj.pos.x; + gLight3y = shot->obj.pos.y; + gLight3z = shot->obj.pos.z; + gLight3R = 90; + gLight3G = 180; + gLight3B = 90; + Math_SmoothStepToF(&gLight3Brightness, 0.6f, 1.0f, 0.08f, 0.001f); } } @@ -2183,7 +2187,7 @@ void func_beam_8003D54C(PlayerShot* shot, s32 index) { case PLAYERSHOT_2: func_beam_8003B00C(shot, &gPlayer[shot->playerNum]); break; - case PLAYERSHOT_3: + case PLAYERSHOT_BOMB: func_beam_8003CC08(shot); break; case PLAYERSHOT_4: @@ -2286,7 +2290,7 @@ void func_beam_8003D854(PlayerShot* shot) { void PlayerShot_Update(void) { s32 i; - for (i = 0; i < 16; i++) { + for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { gPlayerShots[i].index = i; func_beam_8003D854(&gPlayerShots[i]); } @@ -2295,7 +2299,7 @@ void PlayerShot_Update(void) { void PlayerShot_Draw(void) { s32 i; - for (i = 0; i < 16; i++) { + for (i = 0; i < ARRAY_COUNT(gPlayerShots); i++) { gPlayerShots[i].index = i; if (gPlayerShots[i].obj.status != 0) { if (!((gReflectY < 0) && (gPlayerShots[i].obj.rot.x < -10.0f))) { diff --git a/src/engine/fox_bg.c b/src/engine/fox_bg.c index 4bdfc422..d185de70 100644 --- a/src/engine/fox_bg.c +++ b/src/engine/fox_bg.c @@ -24,142 +24,142 @@ #include "prevent_bss_reordering2.h" #include "prevent_bss_reordering3.h" -f32 D_bg_8015F960; -u8 D_bg_8015F964; -f32 D_bg_8015F968; -f32 D_bg_8015F96C; -f32 D_bg_8015F970; +f32 gWarpZoneBgAlpha; +u8 D_bg_8015F964; // related to water surfaces +f32 D_bg_8015F968; // heat shimmer effect for SO and TI? +f32 D_bg_8015F96C; // unused. some sort of starfield motion blur for meteo? +f32 D_bg_8015F970; // these next few vars seem to be related to aquas surface s32 D_bg_8015F974; s32 D_bg_8015F978; s32 D_bg_8015F97C; s32 D_bg_8015F980; -f32 D_bg_8015F984; +f32 D_bg_8015F984; // related to scale of venom in area 6 UNK_TYPE D_bg_8015F988[0x683]; // Unused? Close to being [13][0x80] -f32 D_bg_80161394; // can be static +f32 gAndrossUnkBrightness; // can be static -f32 D_bg_800C9C30 = 0.0f; -u16 D_bg_800C9C34 = 1; +f32 gAndrossUnkAlpha = 0.0f; +u16 gBolseDynamicGround = true; s32 D_bg_800C9C38 = 0; // unused? -u16 D_bg_800C9C3C[16] = { +u16 gStarColors[16] = { 0x108B, 0x108B, 0x1087, 0x1089, 0x39FF, 0x190D, 0x108B, 0x1089, 0x294B, 0x18DF, 0x294B, 0x1085, 0x39FF, 0x108B, 0x18CD, 0x108B, }; -Gfx* D_bg_800C9C5C[13] = { +Gfx* sSunDLs[13] = { D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_BG_PLANET_20112C0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_BG_PLANET_20112C0, D_102A8A0, }; -Gfx* D_bg_800C9C90[13] = { +Gfx* sKaSunDLs[13] = { D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, D_102A8A0, }; -f32 D_bg_800C9CC4[13] = { +f32 sSunShifts[13] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, 13.0f, 20.0f, 35.0f, 40.0f, 50.0f, 50.0f, 70.0f, }; -f32 D_bg_800C9CF8[13] = { +f32 sKaSunShifts[13] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, 10.0f, 16.0f, 20.0f, 30.0f, 45.0f, 60.0f, 70.0f, }; -f32 D_bg_800C9D2C[13] = { +f32 sSunScales[13] = { 0.7f, 1.0f, 1.2f, 1.4f, 1.8f, 2.0f, 0.4f, 0.6f, 0.8f, 1.7f, 0.8f, 4.0f, 2.0f, }; -f32 D_bg_800C9D60[13] = { +f32 sKaSunScales[13] = { 0.525f, 0.75f, 0.90000004f, 1.05f, 1.3499999f, 0.15f, 0.25f, 0.35f, 1.0f, 0.6f, 0.35f, 0.9f, 1.0f, }; -Color_RGB8 D_bg_800C9D94[13] = { +Color_RGB8 sSunColors[13] = { { 255, 255, 255 }, { 255, 255, 192 }, { 255, 255, 128 }, { 255, 255, 96 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, { 255, 255, 64 }, }; -Color_RGB8 D_bg_800C9DBC[13] = { +Color_RGB8 sKaSunColors[13] = { { 255, 128, 64 }, { 255, 128, 64 }, { 255, 128, 64 }, { 255, 128, 64 }, { 255, 128, 64 }, { 255, 255, 64 }, { 255, 128, 64 }, { 255, 128, 64 }, { 255, 255, 64 }, { 128, 128, 128 }, { 128, 128, 255 }, { 255, 255, 64 }, { 255, 128, 64 }, }; -s32 D_bg_800C9DE4[13] = { +s32 sSunAlphas[13] = { 255, 80, 64, 48, 32, 12, 32, 44, 32, 42, 36, 12, 38, }; -s32 D_bg_800C9E18[13] = { +s32 sKaSunAlphas[13] = { 80, 60, 40, 20, 10, 20, 30, 20, 15, 30, 20, 27, 20, }; -s32 D_bg_800C9E4C[2] = { 10, 4 }; -s32 D_bg_800C9E54[2] = { 140, 40 }; -f32 D_bg_800C9E5C[2] = { 1.2f, 0.5f }; -f32 D_bg_800C9E64[4] = { +s32 sSunGlareAlphaStep[2] = { 10, 4 }; +s32 sSunGlareMaxAlpha[2] = { 140, 40 }; +f32 sLensFlareAlphaMod[2] = { 1.2f, 0.5f }; +f32 sGroundPositions360x[4] = { 6000.0f, -6000.0f, 6000.0f, -6000.0f, }; -f32 D_bg_800C9E74[4] = { +f32 sGroundPositions360z[4] = { 6000.0f, 6000.0f, -6000.0f, -6000.0f, }; -void func_bg_8003DAF0(void) { - f32 var_fa0; - f32 var_fv1; - s16 temp_ft0; - s16 temp_ft2; +void Background_DrawStarfield(void) { + f32 by; + f32 bx; + s16 vy; + s16 vx; s32 i; - s32 var_s2; - f32 sp70; - f32 spf6C; - f32 spf68; - f32 spf64; - f32* sp60; - f32* sp5C; - u32* sp58; + s32 starCount; + f32 zCos; + f32 zSin; + f32 xField; + f32 yField; + f32* xStar; + f32* yStar; + u32* color; gDPPipeSync(gMasterDisp++); gDPSetCycleType(gMasterDisp++, G_CYC_FILL); gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE); gDPSetRenderMode(gMasterDisp++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - var_s2 = D_ctx_80178410; - if (var_s2 != 0) { - if (D_ctx_80178420 >= 1.5f * SCREEN_WIDTH) { - D_ctx_80178420 -= 1.5f * SCREEN_WIDTH; + starCount = gStarCount; + if (starCount != 0) { + if (gStarfieldX >= 1.5f * SCREEN_WIDTH) { + gStarfieldX -= 1.5f * SCREEN_WIDTH; } - if (D_ctx_80178424 >= 1.5f * SCREEN_HEIGHT) { - D_ctx_80178424 -= 1.5f * SCREEN_HEIGHT; + if (gStarfieldY >= 1.5f * SCREEN_HEIGHT) { + gStarfieldY -= 1.5f * SCREEN_HEIGHT; } - if (D_ctx_80178420 < 0.0f) { - D_ctx_80178420 += 1.5f * SCREEN_WIDTH; + if (gStarfieldX < 0.0f) { + gStarfieldX += 1.5f * SCREEN_WIDTH; } - if (D_ctx_80178424 < 0.0f) { - D_ctx_80178424 += 1.5f * SCREEN_HEIGHT; + if (gStarfieldY < 0.0f) { + gStarfieldY += 1.5f * SCREEN_HEIGHT; } - spf68 = D_ctx_80178420; - spf64 = D_ctx_80178424; + xField = gStarfieldX; + yField = gStarfieldY; - sp60 = D_ctx_80178288; - sp5C = D_ctx_80178290; - sp58 = D_ctx_80178298; + xStar = gStarOffsetsX; + yStar = gStarOffsetsY; + color = gStarFillColors; if (gGameState != GSTATE_PLAY) { - var_s2 = 1000; + starCount = 1000; } - sp70 = __cosf(D_ctx_80178428); - spf6C = __sinf(D_ctx_80178428); - for (i = 0; i < var_s2; i++, sp5C++, sp60++, sp58++) { - var_fv1 = *sp60 + spf68; - var_fa0 = *sp5C + spf64; - if (var_fv1 >= 1.25f * SCREEN_WIDTH) { - var_fv1 -= 1.5f * SCREEN_WIDTH; + zCos = __cosf(gStarfieldRoll); + zSin = __sinf(gStarfieldRoll); + for (i = 0; i < starCount; i++, yStar++, xStar++, color++) { + bx = *xStar + xField; + by = *yStar + yField; + if (bx >= 1.25f * SCREEN_WIDTH) { + bx -= 1.5f * SCREEN_WIDTH; } - var_fv1 -= SCREEN_WIDTH / 2.0f; + bx -= SCREEN_WIDTH / 2.0f; - if (var_fa0 >= 1.25f * SCREEN_HEIGHT) { - var_fa0 -= 1.5f * SCREEN_HEIGHT; + if (by >= 1.25f * SCREEN_HEIGHT) { + by -= 1.5f * SCREEN_HEIGHT; } - var_fa0 -= SCREEN_HEIGHT / 2.0f; + by -= SCREEN_HEIGHT / 2.0f; - temp_ft2 = (sp70 * var_fv1) + (spf6C * var_fa0) + SCREEN_WIDTH / 2.0f; - temp_ft0 = (-spf6C * var_fv1) + (sp70 * var_fa0) + SCREEN_HEIGHT / 2.0f; - if ((temp_ft2 >= 0) && (temp_ft2 < SCREEN_WIDTH) && (temp_ft0 > 0) && (temp_ft0 < SCREEN_HEIGHT)) { + vx = (zCos * bx) + (zSin * by) + SCREEN_WIDTH / 2.0f; + vy = (-zSin * bx) + (zCos * by) + SCREEN_HEIGHT / 2.0f; + if ((vx >= 0) && (vx < SCREEN_WIDTH) && (vy > 0) && (vy < SCREEN_HEIGHT)) { gDPPipeSync(gMasterDisp++); - gDPSetFillColor(gMasterDisp++, *sp58); - gDPFillRectangle(gMasterDisp++, temp_ft2, temp_ft0, temp_ft2, temp_ft0); + gDPSetFillColor(gMasterDisp++, *color); + gDPFillRectangle(gMasterDisp++, vx, vy, vx, vy); } } } @@ -167,15 +167,15 @@ void func_bg_8003DAF0(void) { gDPSetColorDither(gMasterDisp++, G_CD_MAGICSQ); } -void func_bg_8003DE68(s32 arg0, s32 arg1) { - f32 var_fa0; // 8C - f32 var_fv1; // 88 - s16 temp_ft0; // 84 - s16 temp_ft2; +void Background_DrawPartialStarfield(s32 yMin, s32 yMax) { + f32 by; // 8C + f32 bx; // 88 + s16 vy; // 84 + s16 vx; s32 i; // 80 s32 var_s2; // 7C - f32 sp70; // 78 - f32 spf6C; // 74 + f32 cos; // 78 + f32 sin; // 74 f32 spf68; // 70 f32 spf64; // 6C f32* sp60; // 68 @@ -187,47 +187,47 @@ void func_bg_8003DE68(s32 arg0, s32 arg1) { gDPSetCombineMode(gMasterDisp++, G_CC_SHADE, G_CC_SHADE); gDPSetRenderMode(gMasterDisp++, G_RM_OPA_SURF, G_RM_OPA_SURF2); - if (D_ctx_80178420 >= 1.5f * SCREEN_WIDTH) { - D_ctx_80178420 -= 1.5f * SCREEN_WIDTH; + if (gStarfieldX >= 1.5f * SCREEN_WIDTH) { + gStarfieldX -= 1.5f * SCREEN_WIDTH; } - if (D_ctx_80178424 >= 1.5f * SCREEN_HEIGHT) { - D_ctx_80178424 -= 1.5f * SCREEN_HEIGHT; + if (gStarfieldY >= 1.5f * SCREEN_HEIGHT) { + gStarfieldY -= 1.5f * SCREEN_HEIGHT; } - if (D_ctx_80178420 < 0.0f) { - D_ctx_80178420 += 1.5f * SCREEN_WIDTH; + if (gStarfieldX < 0.0f) { + gStarfieldX += 1.5f * SCREEN_WIDTH; } - if (D_ctx_80178424 < 0.0f) { - D_ctx_80178424 += 1.5f * SCREEN_HEIGHT; + if (gStarfieldY < 0.0f) { + gStarfieldY += 1.5f * SCREEN_HEIGHT; } - spf68 = D_ctx_80178420; - spf64 = D_ctx_80178424; + spf68 = gStarfieldX; + spf64 = gStarfieldY; - sp60 = D_ctx_80178288; - sp5C = D_ctx_80178290; - sp58 = D_ctx_80178298; + sp60 = gStarOffsetsX; + sp5C = gStarOffsetsY; + sp58 = gStarFillColors; var_s2 = 500; - sp70 = __cosf(D_ctx_80178428); - spf6C = __sinf(D_ctx_80178428); + cos = __cosf(gStarfieldRoll); + sin = __sinf(gStarfieldRoll); for (i = 0; i < var_s2; i++, sp5C++, sp60++, sp58++) { - var_fv1 = *sp60 + spf68; - var_fa0 = *sp5C + spf64; - if (var_fv1 >= SCREEN_WIDTH * 1.25f) { - var_fv1 -= 1.5f * SCREEN_WIDTH; + bx = *sp60 + spf68; + by = *sp5C + spf64; + if (bx >= SCREEN_WIDTH * 1.25f) { + bx -= 1.5f * SCREEN_WIDTH; } - var_fv1 -= SCREEN_WIDTH / 2.0f; - if (var_fa0 >= SCREEN_HEIGHT * 1.25f) { - var_fa0 -= 1.5f * SCREEN_HEIGHT; + bx -= SCREEN_WIDTH / 2.0f; + if (by >= SCREEN_HEIGHT * 1.25f) { + by -= 1.5f * SCREEN_HEIGHT; } - var_fa0 -= SCREEN_HEIGHT / 2.0f; + by -= SCREEN_HEIGHT / 2.0f; - temp_ft2 = (sp70 * var_fv1) + (spf6C * var_fa0) + SCREEN_WIDTH / 2.0f; - temp_ft0 = (-spf6C * var_fv1) + (sp70 * var_fa0) + SCREEN_HEIGHT / 2.0f; - if ((temp_ft2 >= 0) && (temp_ft2 < SCREEN_WIDTH) && (arg0 < temp_ft0) && (temp_ft0 < arg1)) { + vx = (cos * bx) + (sin * by) + SCREEN_WIDTH / 2.0f; + vy = (-sin * bx) + (cos * by) + SCREEN_HEIGHT / 2.0f; + if ((vx >= 0) && (vx < SCREEN_WIDTH) && (yMin < vy) && (vy < yMax)) { gDPPipeSync(gMasterDisp++); gDPSetFillColor(gMasterDisp++, *sp58); - gDPFillRectangle(gMasterDisp++, temp_ft2, temp_ft0, temp_ft2, temp_ft0); + gDPFillRectangle(gMasterDisp++, vx, vy, vx, vy); } } gDPPipeSync(gMasterDisp++); @@ -237,37 +237,38 @@ void func_bg_8003DE68(s32 arg0, s32 arg1) { void func_bg_8003E1E0(void) { } -void func_bg_8003E1E8(void) { +// TODO: use SCREEN_WIDTH and _HEIGHT +void Background_DrawBackdrop(void) { f32 sp13C; f32 sp138; f32 sp134; f32 sp130; f32 sp12C; f32 sp128; - s32 sp124; - u8 var_s0; - s32 sp11C; + s32 i; + u8 levelType; + s32 levelId; if (D_ctx_80177AB0 == 0) { return; } - var_s0 = gLevelType; + levelType = gLevelType; if ((gCurrentLevel == LEVEL_VERSUS) && (gVersusStage == VS_STAGE_SECTOR_Z)) { - var_s0 = LEVELTYPE_PLANET; + levelType = LEVELTYPE_PLANET; } if (gCurrentLevel == LEVEL_TRAINING) { - var_s0 = LEVELTYPE_SPACE; + levelType = LEVELTYPE_SPACE; } - sp11C = gCurrentLevel; + levelId = gCurrentLevel; Matrix_Push(&gGfxMatrix); if (D_ctx_80177C70 == 2) { Matrix_Scale(gGfxMatrix, 1.2f, 1.2f, 1.0f, MTXF_APPLY); } - switch (var_s0) { + switch (levelType) { case LEVELTYPE_PLANET: RCP_SetupDL(&gMasterDisp, 0x11); - switch (sp11C) { + switch (levelId) { case LEVEL_FORTUNA: case LEVEL_KATINA: case LEVEL_VENOM_2: @@ -362,15 +363,15 @@ void func_bg_8003E1E8(void) { RCP_SetupDL(&gMasterDisp, 0x3E); if (D_ctx_80177AB0 == 4) { if (!(gGameFrameCount & 8)) { - Math_SmoothStepToF(&D_bg_80161394, 0.0f, 1.0f, 30.0f, 0); + Math_SmoothStepToF(&gAndrossUnkBrightness, 0.0f, 1.0f, 30.0f, 0); } else { - Math_SmoothStepToF(&D_bg_80161394, 120.0f, 1.0f, 30.0f, 0); + Math_SmoothStepToF(&gAndrossUnkBrightness, 120.0f, 1.0f, 30.0f, 0); } } else { - D_bg_80161394 = 255.0f; + gAndrossUnkBrightness = 255.0f; } - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, (s32) D_bg_80161394, (s32) D_bg_80161394, - (s32) D_bg_800C9C30); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, (s32) gAndrossUnkBrightness, + (s32) gAndrossUnkBrightness, (s32) gAndrossUnkAlpha); sp134 = (gPlayer[gPlayerNum].camPitch * -6000.0f) - (gPlayer[gPlayerNum].cam.eye.y * 0.4f); sp13C = Math_ModF(Math_RadToDeg(gPlayer[gPlayerNum].camYaw) * (-7280.0f / 360.0f) * 5.0f, @@ -389,7 +390,7 @@ void func_bg_8003E1E8(void) { if (D_ctx_80177AB0 == 5) { gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 64); } else { - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 128, (s32) D_bg_800C9C30); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 128, (s32) gAndrossUnkAlpha); } Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -290.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); @@ -508,24 +509,24 @@ void func_bg_8003E1E8(void) { sp130 = Math_RadToDeg(gPlayer[0].camPitch); if (((sp12C < 45.0f) || (sp12C > 315.0f)) && ((sp130 < 40.0f) || (sp130 > 325.0f))) { RCP_SetupDL_36(); - sp138 = D_ctx_80178420; - sp134 = D_ctx_80178424; - if (((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) && (gLevelStage == 1)) { - sp11C = LEVEL_WARP_ZONE; + sp138 = gStarfieldX; + sp134 = gStarfieldY; + if (((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) && (gLevelPhase == 1)) { + levelId = LEVEL_WARP_ZONE; } - if (sp11C == LEVEL_SECTOR_X) { + if (levelId == LEVEL_SECTOR_X) { sp138 = Math_ModF(sp138 + 60.0f, 480.0f); sp134 = Math_ModF(sp134 + 360.0f - 40.0f, 360.0f); - } else if (sp11C == LEVEL_TRAINING) { + } else if (levelId == LEVEL_TRAINING) { sp138 = Math_ModF(sp138 - 30.0f, 480.0f); sp134 = Math_ModF(sp134 + 360.0f - 40.0f, 360.0f); - } else if ((sp11C == LEVEL_SECTOR_Y) && (gLevelMode == LEVELMODE_ON_RAILS)) { + } else if ((levelId == LEVEL_SECTOR_Y) && (gLevelMode == LEVELMODE_ON_RAILS)) { sp138 = Math_ModF(sp138 + 480.0f - 60.0f, 480.0f); sp134 = Math_ModF(sp134, 360.0f); - } else if (sp11C == LEVEL_FORTUNA) { + } else if (levelId == LEVEL_FORTUNA) { sp138 = Math_ModF(sp138 - 34.5f, 480.0f); sp134 = Math_ModF(sp134 + 19.0f, 360.0f); - } else if (sp11C == LEVEL_BOLSE) { + } else if (levelId == LEVEL_BOLSE) { if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gPlayer[0].unk_1D0 < 10)) { sp134 = Math_ModF(sp134 + 360.0f - 100.0f, 360.0f); } @@ -539,12 +540,12 @@ void func_bg_8003E1E8(void) { if ((sp130 > 180.0f) && (sp134 > 280.0f)) { sp134 = -(360.0f - sp134); } - Matrix_RotateZ(gGfxMatrix, D_ctx_80178428, MTXF_APPLY); - switch (sp11C) { + Matrix_RotateZ(gGfxMatrix, gStarfieldRoll, MTXF_APPLY); + switch (levelId) { case LEVEL_WARP_ZONE: - if ((s32) D_bg_8015F960 != 0) { + if ((s32) gWarpZoneBgAlpha != 0) { RCP_SetupDL_62(); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) D_bg_8015F960); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, (s32) gWarpZoneBgAlpha); Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.7f, 1.7f, 1.0f, MTXF_APPLY); Matrix_Push(&gGfxMatrix); @@ -573,7 +574,7 @@ void func_bg_8003E1E8(void) { } break; case LEVEL_SECTOR_X: - if (gOverlayStage == 0) { + if (gSceneSetup == 0) { Matrix_Translate(gGfxMatrix, sp138 - 120.0f, -(sp134 - 120.0f), -290.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 3.0f, 3.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -647,27 +648,27 @@ void func_bg_8003E1E8(void) { } Matrix_Pop(&gGfxMatrix); } - if (D_ctx_80178414 > 0.0f) { - f32* sp50 = D_ctx_80178288; - f32* sp4C = D_ctx_80178290; - f32 sp48; + if (gStarWarpDistortion > 0.0f) { + f32* xStar = gStarOffsetsX; + f32* yStar = gStarOffsetsY; + f32 zRot; RCP_SetupDL_14(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 128, 128, 255, 255); - sp124 = 0; - sp48 = 0.0f; - for (sp124 = 0; sp124 < 300; sp124++, sp50++, sp4C++) { - *sp50 = RAND_FLOAT_SEEDED(480.0f) - 80.0f; - *sp4C = RAND_FLOAT_SEEDED(360.0f) - 60.0f; + i = 0; + zRot = 0.0f; + for (i = 0; i < 300; i++, xStar++, yStar++) { + *xStar = RAND_FLOAT_SEEDED(480.0f) - 80.0f; + *yStar = RAND_FLOAT_SEEDED(360.0f) - 60.0f; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, (*sp50 - 160.0f) * 10.0f, (*sp4C - 120.0f) * 10.0f, -5000.0f, + Matrix_Translate(gGfxMatrix, (*xStar - 160.0f) * 10.0f, (*yStar - 120.0f) * 10.0f, -5000.0f, MTXF_APPLY); - Matrix_RotateZ(gGfxMatrix, sp48, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, 10.0f, 1.0f, -D_ctx_80178414, MTXF_APPLY); + Matrix_RotateZ(gGfxMatrix, zRot, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, 10.0f, 1.0f, -gStarWarpDistortion, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_edisplay_800CFD80); Matrix_Pop(&gGfxMatrix); - sp48 += M_PI / 4; + zRot += M_PI / 4; } } break; @@ -675,13 +676,13 @@ void func_bg_8003E1E8(void) { Matrix_Pop(&gGfxMatrix); } -void func_bg_80040450(void) { - f32 sp44; - f32 var_fa0; - Color_RGB8* var_s1; - s32* var_s2; - Gfx** var_s3; - f32* var_s4; +void Background_DrawSun(void) { + f32 camYaw; + f32 camPitch; + Color_RGB8* sunColor; + s32* sunAlpha; + Gfx** sunDL; + f32* sunScale; s32 i; s32 levelType = gLevelType; @@ -689,119 +690,121 @@ void func_bg_80040450(void) { (gCurrentLevel == LEVEL_SOLAR) || (gCurrentLevel == LEVEL_TRAINING) || gVersusMode) { return; } - gPlayerFillScreenAlphas[gPlayerNum] -= D_bg_800C9E4C[levelType]; - if (gPlayerFillScreenAlphas[gPlayerNum] > 300) { - gPlayerFillScreenAlphas[gPlayerNum] = 0; + gPlayerGlareAlphas[gPlayerNum] -= sSunGlareAlphaStep[levelType]; + if (gPlayerGlareAlphas[gPlayerNum] > 300) { + gPlayerGlareAlphas[gPlayerNum] = 0; } if (((gCurrentLevel == LEVEL_AQUAS) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO)) || (((gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN) || (gLevelMode == LEVELMODE_ALL_RANGE) || (gPlayer[gPlayerNum].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) && (gLevelType == LEVELTYPE_PLANET) && (gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_AQUAS))) { - gPlayerFillScreenReds[gPlayerNum] = 128; - gPlayerFillScreenGreens[gPlayerNum] = 128; - gPlayerFillScreenBlues[gPlayerNum] = 128; - sp44 = Math_RadToDeg(gPlayer[gPlayerNum].camYaw); - var_fa0 = Math_RadToDeg(gPlayer[gPlayerNum].camPitch); - if (var_fa0 > 180.0f) { - var_fa0 -= 360.0f; + gPlayerGlareReds[gPlayerNum] = 128; + gPlayerGlareGreens[gPlayerNum] = 128; + gPlayerGlareBlues[gPlayerNum] = 128; + camYaw = Math_RadToDeg(gPlayer[gPlayerNum].camYaw); + camPitch = Math_RadToDeg(gPlayer[gPlayerNum].camPitch); + if (camPitch > 180.0f) { + camPitch -= 360.0f; } - sp44 -= 135.0f; - D_ctx_801783D0 = -sp44 * 3.2f; - D_ctx_801783D4 = ((-var_fa0 * 3.2f) + 130.0f) - ((gPlayer[gPlayerNum].cam.eye.y - 350.0f) * 0.015f); + camYaw -= 135.0f; + gSunViewX = -camYaw * 3.2f; + gSunViewY = (-camPitch * 3.2f) + 130.0f - ((gPlayer[gPlayerNum].cam.eye.y - 350.0f) * 0.015f); if (gCurrentLevel == LEVEL_KATINA) { - D_ctx_801783D4 -= 80.0f; + gSunViewY -= 80.0f; } if ((gCurrentLevel == LEVEL_ZONESS) && (gPlayer[0].unk_1D0 >= 2) && !gMissedZoSearchlight) { - D_ctx_801783D4 -= 60.0f; - D_ctx_801783D0 -= 480.0f; + gSunViewY -= 60.0f; + gSunViewX -= 480.0f; } - if ((D_ctx_801783D0 < 120.0f) && (D_ctx_801783D0 > -120.0f) && (D_ctx_801783D4 < 120.0f)) { - gPlayerFillScreenAlphas[gPlayerNum] += D_bg_800C9E4C[levelType] * 2; - if (D_bg_800C9E54[levelType] < gPlayerFillScreenAlphas[gPlayerNum]) { - gPlayerFillScreenAlphas[gPlayerNum] = D_bg_800C9E54[levelType]; + if ((gSunViewX < 120.0f) && (gSunViewX > -120.0f) && (gSunViewY < 120.0f)) { + gPlayerGlareAlphas[gPlayerNum] += sSunGlareAlphaStep[levelType] * 2; + if (sSunGlareMaxAlpha[levelType] < gPlayerGlareAlphas[gPlayerNum]) { + gPlayerGlareAlphas[gPlayerNum] = sSunGlareMaxAlpha[levelType]; } } } - if (gPlayerFillScreenAlphas[gPlayerNum] != 0) { + if (gPlayerGlareAlphas[gPlayerNum] != 0) { Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); RCP_SetupDL_62(); - var_s1 = D_bg_800C9D94; - var_s2 = D_bg_800C9DE4; - var_s3 = D_bg_800C9C5C; - var_s4 = D_bg_800C9D2C; + sunColor = sSunColors; + sunAlpha = sSunAlphas; + sunDL = sSunDLs; + sunScale = sSunScales; if (gCurrentLevel == LEVEL_KATINA) { - var_s1 = D_bg_800C9DBC; - var_s2 = D_bg_800C9E18; - var_s3 = D_bg_800C9C90; - var_s4 = D_bg_800C9D60; + sunColor = sKaSunColors; + sunAlpha = sKaSunAlphas; + sunDL = sKaSunDLs; + sunScale = sKaSunScales; } - for (i = 0; i < 5; i++, var_s1++, var_s2++, var_s3++, var_s4++) { + for (i = 0; i < 5; i++, sunColor++, sunAlpha++, sunDL++, sunScale++) { Matrix_Push(&gGfxMatrix); - Matrix_Scale(gGfxMatrix, *var_s4, *var_s4, *var_s4, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, *sunScale, *sunScale, *sunScale, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, var_s1->r, var_s1->g, var_s1->b, *var_s2); - gSPDisplayList(gMasterDisp++, *var_s3); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, sunColor->r, sunColor->g, sunColor->b, *sunAlpha); + gSPDisplayList(gMasterDisp++, *sunDL); Matrix_Pop(&gGfxMatrix); } Matrix_Pop(&gGfxMatrix); } } -void func_bg_80040954(void) { +void Background_DrawLensFlare(void) { s32 i; - Color_RGB8* var_s1; - s32* var_s4; - Gfx** var_s5; - f32* var_s6; - f32* var_s7; - f32 temp_fs0; - f32 temp_fs1; - f32 var_fs2; - f32 var_fv0; + Color_RGB8* lensFlareColor; + s32* lensFlareAlpha; + Gfx** lensFlareDL; + f32* lensFlareScale; + f32* lensFlareShift; + f32 lensFlareOffsetX; + f32 lensFlareOffsetY; + f32 alphaMod; + f32 alpha; if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || (gLevelType == LEVELTYPE_SPACE) || - (gPlayerFillScreenAlphas[gPlayerNum] == 0)) { + (gPlayerGlareAlphas[gPlayerNum] == 0)) { return; } - var_fs2 = 1.0f; - if (gPlayerFillScreenAlphas[gPlayerNum] < 80) { - var_fs2 = gPlayerFillScreenAlphas[gPlayerNum] / 80.0f; + alphaMod = 1.0f; + if (gPlayerGlareAlphas[gPlayerNum] < 80) { + alphaMod = gPlayerGlareAlphas[gPlayerNum] / 80.0f; } - var_fs2 *= D_bg_800C9E5C[gLevelType]; + alphaMod *= sLensFlareAlphaMod[gLevelType]; Matrix_Push(&gGfxMatrix); Matrix_RotateZ(gGfxMatrix, gPlayer[gPlayerNum].camRoll * M_DTOR, MTXF_APPLY); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); RCP_SetupDL_62(); - temp_fs0 = D_ctx_801783D0 * -0.03f; - temp_fs1 = D_ctx_801783D4 * 0.03f; - var_s1 = &D_bg_800C9D94[5]; - var_s4 = &D_bg_800C9DE4[5]; - var_s5 = &D_bg_800C9C5C[5]; - var_s6 = &D_bg_800C9D2C[5]; - var_s7 = &D_bg_800C9CC4[5]; + lensFlareOffsetX = gSunViewX * -0.03f; + lensFlareOffsetY = gSunViewY * 0.03f; + lensFlareColor = &sSunColors[5]; + lensFlareAlpha = &sSunAlphas[5]; + lensFlareDL = &sSunDLs[5]; + lensFlareScale = &sSunScales[5]; + lensFlareShift = &sSunShifts[5]; if (gCurrentLevel == LEVEL_KATINA) { - var_s1 = &D_bg_800C9DBC[5]; - var_s4 = &D_bg_800C9E18[5]; - var_s5 = &D_bg_800C9C90[5]; - var_s6 = &D_bg_800C9D60[5]; - var_s7 = &D_bg_800C9CF8[5]; + lensFlareColor = &sKaSunColors[5]; + lensFlareAlpha = &sKaSunAlphas[5]; + lensFlareDL = &sKaSunDLs[5]; + lensFlareScale = &sKaSunScales[5]; + lensFlareShift = &sKaSunShifts[5]; } - for (i = 5; i < 13; i++, var_s1++, var_s4++, var_s5++, var_s6++, var_s7++) { + for (i = 5; i < 13; i++, lensFlareColor++, lensFlareAlpha++, lensFlareDL++, lensFlareScale++, lensFlareShift++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, *var_s7 * temp_fs0, *var_s7 * -temp_fs1, 0.0f, MTXF_APPLY); - Matrix_Scale(gGfxMatrix, *var_s6, *var_s6, *var_s6, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, *lensFlareShift * lensFlareOffsetX, *lensFlareShift * -lensFlareOffsetY, 0.0f, + MTXF_APPLY); + Matrix_Scale(gGfxMatrix, *lensFlareScale, *lensFlareScale, *lensFlareScale, MTXF_APPLY); if (((i == 5) || (i == 11)) && (gCurrentLevel != LEVEL_KATINA)) { Matrix_RotateX(gGfxMatrix, M_PI / 2, MTXF_APPLY); } Matrix_SetGfxMtx(&gMasterDisp); - var_fv0 = *var_s4; + alpha = *lensFlareAlpha; if (i >= 5) { - var_fv0 *= var_fs2; + alpha *= alphaMod; } - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, var_s1->r, var_s1->g, var_s1->b, (s32) var_fv0); - gSPDisplayList(gMasterDisp++, *var_s5); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, lensFlareColor->r, lensFlareColor->g, lensFlareColor->b, + (s32) alpha); + gSPDisplayList(gMasterDisp++, *lensFlareDL); Matrix_Pop(&gGfxMatrix); } Matrix_Pop(&gGfxMatrix); @@ -810,7 +813,7 @@ void func_bg_80040954(void) { void func_bg_80040CDC(void) { } -void func_bg_80040CE4(void) { +void Background_DrawGround(void) { f32 sp1D4; s32 i; u32 temp_fv0; @@ -821,8 +824,8 @@ void func_bg_80040CE4(void) { if ((gCurrentLevel != LEVEL_VENOM_2) && ((gPlayer[0].cam.eye.y > 4000.0f) || (D_ctx_80177A98 == 0))) { return; } - if ((gCurrentLevel == LEVEL_BOLSE) && (D_bg_800C9C34 != 0)) { - Bolse_80192264(); + if ((gCurrentLevel == LEVEL_BOLSE) && gBolseDynamicGround) { + Bolse_DrawDynamicGround(); return; } sp1D4 = 0.0f; @@ -890,7 +893,7 @@ void func_bg_80040CE4(void) { } if (gLevelMode == LEVELMODE_ON_RAILS) { gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_CO_601B6C0)); - temp_s0 = fabsf(Math_ModF(2.0f * (D_ctx_80177CE8 * 0.2133333f), 128.0f)); + temp_s0 = fabsf(Math_ModF(2.0f * (D_ctx_80177CE8 * 0.2133333f), 128.0f)); // 0.64f / 3.0f temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); @@ -925,7 +928,7 @@ void func_bg_80040CE4(void) { gBgColor = 0x845; // 8, 8, 32 for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_601EAA0); Matrix_Pop(&gGfxMatrix); @@ -991,7 +994,7 @@ void func_bg_80040CE4(void) { } else { for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_Scale(gGfxMatrix, 1.5f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_TR_6005880); @@ -1003,7 +1006,7 @@ void func_bg_80040CE4(void) { RCP_SetupDL(&gMasterDisp, 0x14); sp1C0 = D_AQ_600AB10; gSPFogPosition(gMasterDisp++, gFogNear, gFogFar); - if ((D_bg_8015F964 == 0) && ((D_ctx_80177AC8 == 0) || (D_ctx_80177AC8 == 2))) { + if ((D_bg_8015F964 == 0) && ((gAqDrawMode == 0) || (gAqDrawMode == 2))) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_600AB68), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); @@ -1026,7 +1029,7 @@ void func_bg_80040CE4(void) { gSPDisplayList(gMasterDisp++, sp1C0); Matrix_Pop(&gGfxMatrix); } - if ((D_bg_8015F964 != 0) || (D_ctx_80177AC8 == 0)) { + if ((D_bg_8015F964 != 0) || (gAqDrawMode == 0)) { gDPLoadTileTexture(gMasterDisp++, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0), G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32); gDPSetTextureImage(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, SEGMENTED_TO_VIRTUAL(D_AQ_602ACC0)); @@ -1034,7 +1037,7 @@ void func_bg_80040CE4(void) { temp_fv0 = Math_ModF((10000.0f - gPlayer[gPlayerNum].unk_0AC) * 0.32f, 128.0f); gDPSetupTile(gMasterDisp++, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, temp_fv0, temp_s0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); - if (D_ctx_80177AC8 != 0) { + if (gAqDrawMode != 0) { RCP_SetupDL(&gMasterDisp, 0x2F); } else { RCP_SetupDL(&gMasterDisp, 0x25); @@ -1070,7 +1073,7 @@ void func_bg_80040CE4(void) { } for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gCurrentLevel == LEVEL_FORTUNA) { gSPDisplayList(gMasterDisp++, D_FO_6001360); @@ -1092,7 +1095,7 @@ void func_bg_80040CE4(void) { } for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_bg_800C9E64[i], 0.0f, D_bg_800C9E74[i], MTXF_APPLY); + Matrix_Translate(gGfxMatrix, sGroundPositions360x[i], 0.0f, sGroundPositions360z[i], MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); if (gVersusStage == VS_STAGE_CORNERIA) { gSPDisplayList(gMasterDisp++, D_versus_3018800); diff --git a/src/engine/fox_context.c b/src/engine/fox_context.c index aaf71bc6..7434822e 100644 --- a/src/engine/fox_context.c +++ b/src/engine/fox_context.c @@ -4,8 +4,8 @@ #include "sf64object.h" #include "sf64player.h" -s32 gOverlaySetup; -s32 gOverlayStage; +s32 gSceneId; +s32 gSceneSetup; s32 D_ctx_80177824; // some sort of flag s32 D_ctx_8017782C; // some sort of flag. all range related? GameState gGameState; @@ -23,7 +23,7 @@ s32 gSavedTeamShields[6]; s32 gPrevPlanetSavedTeamShields[6]; s32 gTeamDamage[6]; u8 gNextPlanetPath; // next planet path -f32 gGroundLevel; +f32 gGroundHeight; f32 D_ctx_80177950; f32 D_ctx_80177968; f32 D_ctx_80177970; @@ -41,11 +41,11 @@ f32 D_ctx_80177A48[10]; s32 gCsFrameCount; u8 D_ctx_80177A98; u8 D_ctx_80177AB0; -u8 D_ctx_80177AC8; +u8 gAqDrawMode; s32 D_ctx_80177AE0; s32 gMainController; s32 D_ctx_80177B40; -s32 gCurrentPlanet; // D_ctx_80177B48 // Arrow pointer? +s32 gMissionNumber; // D_ctx_80177B48 // Arrow pointer? s32 D_ctx_80177B50[7]; s32 D_ctx_80177B70[7]; PlanetId D_ctx_80177B90[7]; @@ -57,7 +57,7 @@ s32 gPlanetPathStatus[22]; // overruns gPrevPlanetTeamShields? #endif s32 gPrevPlanetTeamShields[6]; s32 D_ctx_80177C58[6]; -u8 gSoundMode; +u8 gOptionSoundMode; s32 gVolumeSettings[3]; u16 gBgmSeqId; u8 gLevelType; @@ -85,7 +85,7 @@ Vec3f D_ctx_80177F10; UNK_TYPE F_80178020; s32 D_ctx_8017812C; LevelId gCurrentLevel; -s32 gLevelStage; +s32 gLevelPhase; s32 gBossActive; s32 D_ctx_8017828C; s32 D_ctx_80178294; @@ -112,29 +112,29 @@ s32 gFogRed; s32 gFogGreen; s32 gFogBlue; s32 gFogAlpha; -s32 gFillScreenAlpha; // alpha something -s32 gFillScreenRed; // red something -s32 gFillScreenGreen; // green something -s32 gFillScreenBlue; // blue something -s32 gFillScreenAlphaTarget; // alpha target -s32 gFillScreenAlphaStep; // alpha step -s32 D_ctx_80178360; // 2 lights second color -s32 D_ctx_80178364; -s32 D_ctx_80178368; -f32 D_ctx_8017836C; // 2 lights second color brightness -f32 D_ctx_80178370; // Vec3f? -f32 D_ctx_80178374; -f32 D_ctx_80178378; -s32 D_ctx_8017837C; -u32 gPlayerFillScreenAlphas[4]; // player alphas -s32 gPlayerFillScreenReds[4]; // player reds -s32 gPlayerFillScreenGreens[4]; // player greens -s32 gPlayerFillScreenBlues[4]; // player alphas -UNK_TYPE D_ctx_801783C0[4]; -f32 D_ctx_801783D0; // something x translate -f32 D_ctx_801783D4; // something y translate -s32 gFogNear; // near -s32 gFogFar; // far +s32 gFillScreenAlpha; +s32 gFillScreenRed; +s32 gFillScreenGreen; +s32 gFillScreenBlue; +s32 gFillScreenAlphaTarget; +s32 gFillScreenAlphaStep; +s32 gLight3R; // 2 lights second color +s32 gLight3G; +s32 gLight3B; +f32 gLight3Brightness; // 2 lights second color brightness +f32 gLight3x; // Vec3f? +f32 gLight3y; +f32 gLight3z; +s32 gFadeoutType; +u32 gPlayerGlareAlphas[4]; +s32 gPlayerGlareReds[4]; +s32 gPlayerGlareGreens[4]; +s32 gPlayerGlareBlues[4]; +UNK_TYPE D_ctx_801783C0[4]; // unused. player alpha targets? +f32 gSunViewX; // something x translate +f32 gSunViewY; // something y translate +s32 gFogNear; // near +s32 gFogFar; // far UNK_TYPE F_801783E0; UNK_TYPE F_801783E4; UNK_TYPE F_801783E8; @@ -147,13 +147,13 @@ UNK_TYPE F_80178400; UNK_TYPE F_80178404; UNK_TYPE F_80178408; UNK_TYPE F_8017840C; -s32 D_ctx_80178410; -f32 D_ctx_80178414; +s32 gStarCount; +f32 gStarWarpDistortion; f32 D_ctx_80178418; UNK_TYPE F_8017841C; -f32 D_ctx_80178420; -f32 D_ctx_80178424; -f32 D_ctx_80178428; +f32 gStarfieldX; +f32 gStarfieldY; +f32 gStarfieldRoll; f32 D_ctx_8017842C; f32 D_ctx_80178430; UNK_TYPE F_80178434; @@ -250,7 +250,7 @@ UNK_TYPE F_80161AD0[4]; UNK_TYPE F_80161AE0[4]; UNK_TYPE F_80161AF0[4]; UNK_TYPE P_800D31A4 = 0; -Object_80 gObjects80[50]; +Scenery gScenery[50]; Sprite gSprites[40]; Actor gActors[60]; Boss gBosses[4]; @@ -268,14 +268,14 @@ f32 gActor194xRot[2][100]; f32 gActor194yRot[2][100]; f32 gActor194zRot[2][100]; UNK_TYPE P_800D31A8 = 0; -u16 gEnemyShotSpeed; // enemy shot speed? -u8 D_ctx_80177830; // show level complete status overlay -s32 gLevelStatusScreenTimer; // level clear related -s32 gLevelClearScreenTimer; // timer for mission accomplished scrren +u16 gEnemyShotSpeed; // enemy shot speed? +u8 gShowLevelClearStatusScreen; +s32 gLevelStartStatusScreenTimer; +s32 gLevelClearScreenTimer; // timer for mission accomplished scrren s32 gBossHealthBar; -s32 D_ctx_80177850; // bonus text related. set to 15 but never read -s32 D_ctx_80177858[4]; -s32 D_ctx_80177870[4]; +s32 D_ctx_80177850; // bonus text related. set to 15 but never read +s32 D_ctx_80177858[4]; // set to 3 but never used +PlayerForm gPlayerForms[4]; s32 gHandicap[4]; VsStage gVersusStage; s32 D_ctx_801778A4; @@ -286,7 +286,7 @@ u16 gBoostButton[4]; u16 gBrakeButton[4]; u16 gShootButton[4]; u16 gBombButton[4]; -f32 D_ctx_80177958[4]; +f32 D_ctx_80177958[4]; // set to 1.0f but never used s32 D_ctx_8017796C; OSContPad* gInputHold; OSContPad* gInputPress; @@ -302,15 +302,15 @@ s32 D_Timer_80177A38[4]; s32 D_Timer_80177A70[4]; s32 D_Timer_80177A88[4]; f32 D_ctx_80177AA0[4]; -f32 D_ctx_80177AB8[4]; -s32 D_ctx_80177AD0[4]; -s32 D_ctx_80177AE8[4]; -s32 D_ctx_80177B00[4][4]; -u8 D_Timer_80177B44; -u8 D_ctx_80177B4C; -u8 D_ctx_80177B6C; +f32 gShieldAlpha[4]; +s32 gHasShield[4]; +s32 gShieldTimer[4]; +s32 gVsLockOnTimers[4][4]; +u8 gStartAndrossFightTimer; +u8 gSoShieldsEmpty; +u8 gCoUturnCount; u8 gGreatFoxIntact; -u8 D_ctx_80177BAC; +u8 gTiStartLandmaster; u16 gControllerRumbleTimers[4]; u16 D_ctx_80177C30[4]; s32 D_ctx_80177C50; @@ -344,11 +344,11 @@ f32 D_ctx_80178028[65]; f32 D_ctx_80178130[65]; u8 D_ctx_80178238[65]; Player* gPlayer; -f32* D_ctx_80178288; -f32* D_ctx_80178290; -u32* D_ctx_80178298; +f32* gStarOffsetsX; +f32* gStarOffsetsY; +u32* gStarFillColors; UNK_TYPE F_801782A0; -Object_58* gObjects58; +Scenery360* gScenery360; UNK_TYPE F_801782B0; s32 D_ctx_801782B8; s32 D_ctx_801782BC; diff --git a/src/engine/fox_demo.c b/src/engine/fox_demo.c index 1e71237d..d9ce6a4f 100644 --- a/src/engine/fox_demo.c +++ b/src/engine/fox_demo.c @@ -246,11 +246,11 @@ void Cutscene_WarpZoneComplete(Player* player) { break; case 200: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 400: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 420: @@ -290,7 +290,7 @@ void Cutscene_WarpZoneComplete(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; if (gCurrentLevel == LEVEL_METEO) { D_play_800D3180[LEVEL_METEO] = Play_CheckMedalStatus(200) + 1; } else { @@ -477,9 +477,9 @@ void Cutscene_EnterWarpZone(Player* player) { switch (player->unk_1D0) { case 0: player->somersault = false; - D_ctx_80178414 = 100.0f; + gStarWarpDistortion = 100.0f; player->unk_1D0 = 1; - D_ctx_80178410 = 1; + gStarCount = 1; gLoadLevelObjects = 0; player->vel.x = 0.0f; player->vel.y = 0.0f; @@ -503,7 +503,7 @@ void Cutscene_EnterWarpZone(Player* player) { case 1: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 4.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 3.0f, 0.0f); - D_ctx_80178414 *= 1.05f; + gStarWarpDistortion *= 1.05f; if (player->timer_1F8 == 0) { player->unk_1D0 = 2; player->timer_1F8 = 150; @@ -515,8 +515,8 @@ void Cutscene_EnterWarpZone(Player* player) { case 2: Math_SmoothStepToF(&D_ctx_801779A8[player->num], 100.0f, 1.0f, 3.0f, 0.0f); - if (D_ctx_80178414 < 20000.0f) { - D_ctx_80178414 *= 1.01f; + if (gStarWarpDistortion < 20000.0f) { + gStarWarpDistortion *= 1.01f; } if (player->timer_1F8 <= 100) { @@ -586,7 +586,7 @@ void Cutscene_EnterWarpZone(Player* player) { player->timer_27C = gSavedHitCount = D_ctx_80177DC8 = D_ctx_80177CA0 = 0; player->unk_234 = 1; - gLevelStage = 1; + gLevelPhase = 1; D_display_800CA230 = 0.15f; AUDIO_PLAY_SFX(0x11407079, gDefaultSfxSource, 0); func_play_800AB334(); @@ -607,7 +607,7 @@ void Cutscene_EnterWarpZone(Player* player) { break; case 6: - Math_SmoothStepToF(&D_ctx_80178414, 0.0f, 0.2f, 1000.0f, 0.1f); + Math_SmoothStepToF(&gStarWarpDistortion, 0.0f, 0.2f, 1000.0f, 0.1f); Math_SmoothStepToF(&player->unk_08C, 0.0f, 0.2f, 500.0f, 0.1f); if (player->timer_1F8 < 30) { for (var_v0 = 0; var_v0 < 3; var_v0++) { @@ -616,13 +616,13 @@ void Cutscene_EnterWarpZone(Player* player) { } if (player->timer_1F8 == 30) { - D_ctx_80178410 = 300; + gStarCount = 300; AUDIO_PLAY_BGM(SEQ_ID_WARP_ZONE | SEQ_FLAG); } if (player->timer_1F8 == 0) { - D_bg_8015F960 = 0.0f; - D_ctx_80178414 = 0.0f; + gWarpZoneBgAlpha = 0.0f; + gStarWarpDistortion = 0.0f; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0f; player->unk_018 = 0.0f; @@ -643,29 +643,29 @@ void Cutscene_LevelStart(Player* player) { if (gLevelMode == LEVELMODE_ON_RAILS) { switch (gCurrentLevel) { case LEVEL_CORNERIA: - Corneria_8018F880(player); + Corneria_LevelStart(player); func_play_800AA800(player); break; case LEVEL_METEO: - Meteo_8018CD8C(player); + Meteo_LevelStart(player); break; case LEVEL_SECTOR_X: - SectorX_80193A30(player); + SectorX_LevelStart(player); break; case LEVEL_TITANIA: - Titania_8018769C(player); + Titania_LevelStart(player); func_play_800AA800(player); break; case LEVEL_ZONESS: - Zoness_8019D428(player); + Zoness_LevelStart(player); break; case LEVEL_MACBETH: - Macbeth_801AC754(player); + Macbeth_LevelStart(player); break; case LEVEL_SECTOR_Y: @@ -673,51 +673,51 @@ void Cutscene_LevelStart(Player* player) { break; case LEVEL_SOLAR: - Solar_801A10F4(player); + Solar_LevelStart(player); break; case LEVEL_VENOM_1: - Venom1_801988B8(player); + Venom1_LevelStart(player); func_play_800AA800(player); break; case LEVEL_AQUAS: - func_hud_800935E8(player); + HUD_AquasStart(player); break; case LEVEL_AREA_6: - Area6_8018DF74(player); + Area6_LevelStart(player); break; } func_demo_8004990C(player); - return; - } - switch (gCurrentLevel) { - case LEVEL_FORTUNA: - AllRange_FortunaIntro(player); - func_play_800AA800(player); - break; + } else { + switch (gCurrentLevel) { + case LEVEL_FORTUNA: + AllRange_FortunaIntro(player); + func_play_800AA800(player); + break; - case LEVEL_VENOM_2: - Venom2_80196BF8(player); - func_play_800AA800(player); - break; + case LEVEL_VENOM_2: + Venom2_LevelStart(player); + func_play_800AA800(player); + break; - case LEVEL_BOLSE: - Bolse_8018EF6C(player); - func_play_800AA800(player); - break; + case LEVEL_BOLSE: + Bolse_LevelStart(player); + func_play_800AA800(player); + break; - case LEVEL_KATINA: - Katina_80192E20(player); - func_play_800AA800(player); - break; + case LEVEL_KATINA: + Katina_LevelStart(player); + func_play_800AA800(player); + break; - case LEVEL_SECTOR_Z: - SectorZ_8019BA64(player); + case LEVEL_SECTOR_Z: + SectorZ_LevelStart(player); - default: - break; + default: + break; + } } } @@ -1288,7 +1288,7 @@ void Cutscene_CoComplete2(Player* player) { if (player->timer_1F8 == 0) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; Audio_FadeOutAll(10); D_play_800D3180[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; } @@ -1297,11 +1297,11 @@ void Cutscene_CoComplete2(Player* player) { switch (gCsFrameCount) { case 961: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1161: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1255: @@ -1359,47 +1359,47 @@ void Cutscene_LevelComplete(Player* player) { switch (player->form) { case FORM_ARWING: - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 1))) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 1))) { Andross_80193C4C(player); } else if (gCurrentLevel == LEVEL_SECTOR_X) { - if (gLevelStage == 0) { - SectorX_80194728(player); + if (gLevelPhase == 0) { + SectorX_LevelComplete(player); } else { Cutscene_WarpZoneComplete(player); } } else if (gCurrentLevel == LEVEL_AREA_6) { - Area6_8018ED78(player); + Area6_LevelComplete(player); } else if (gCurrentLevel == LEVEL_FORTUNA) { Cutscene_FortunaComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_BOLSE) { - Bolse_8018F94C(player); + Bolse_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_SECTOR_Z) { - SectorZ_8019C85C(player); + SectorZ_LevelComplete(player); } else if (gCurrentLevel == LEVEL_KATINA) { - Katina_80197290(player); + Katina_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_SECTOR_Y) { - SectorY_8019EE60(player); + SectorY_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_SOLAR) { - Solar_801A7930(player); + Solar_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_ZONESS) { - Zoness_8019D76C(player); + Zoness_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_VENOM_2) { - Venom2_80196D88(player); + Venom2_LevelComplete(player); func_play_800AA800(player); } else if (gCurrentLevel == LEVEL_METEO) { - if (gLevelStage == 0) { - Meteo_8018E084(player); + if (gLevelPhase == 0) { + Meteo_LevelComplete(player); } else { Cutscene_WarpZoneComplete(player); } } else if ((gCurrentLevel == LEVEL_CORNERIA) && (gLevelMode == LEVELMODE_ALL_RANGE)) { - Corneria_80191160(player); + Corneria_LevelComplete1(player); func_play_800AA800(player); } else { if (gCsFrameCount == 170) { @@ -1421,11 +1421,11 @@ void Cutscene_LevelComplete(Player* player) { gInputPress->stick_x = btn; if (gCurrentLevel == LEVEL_TITANIA) { - Titania_801882CC(player); + Titania_LevelComplete(player); } else if (gNextPlanetPath != 0) { - Macbeth_801AF8F4(player); + Macbeth_LevelComplete2(player); } else { - Macbeth_801B3D04(player); + Macbeth_LevelComplete1(player); } func_tank_80046358(player); @@ -1435,7 +1435,7 @@ void Cutscene_LevelComplete(Player* player) { case FORM_BLUE_MARINE: if (gCurrentLevel == LEVEL_AQUAS) { - func_hud_80095604(player); + HUD_AquasComplete(player); } break; } @@ -1454,11 +1454,11 @@ void Cutscene_UTurn(Player* player) { sp50.rot.z = player->unk_0D0; sp58.x = Math_RadToDeg(Math_Atan2F(player->pos.x, player->unk_138)); - player->unk_2B4 = 1; - player->unk_2BC += 1.0f; + player->boostCooldown = 1; + player->boostMeter += 1.0f; - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; } switch (player->unk_1D0) { @@ -1616,7 +1616,7 @@ void Cutscene_KillPlayer(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 70; player->timer_224 = 20; - D_ctx_8017837C = 7; + gFadeoutType = 7; if (player->unk_1D4 != 0) { player->unk_284 = 0; @@ -1857,7 +1857,7 @@ void func_demo_8004DEF8(Player* player) { } else if ((((player->timer_220 > 0) || (player->pos.y < player->unk_0A4)) || (player->timer_1FC == 0)) && (player->timer_1F8 == 0)) { if (player->pos.y < player->unk_0A4) { - func_effect_8007C688(player->pos.x, gGroundLevel + 20.0f, player->unk_138 - (2.0f * player->vel.z), 3.0f, + func_effect_8007C688(player->pos.x, gGroundHeight + 20.0f, player->unk_138 - (2.0f * player->vel.z), 3.0f, 800); func_enmy_80062C38(player->pos.x, player->pos.z); } @@ -1884,8 +1884,8 @@ void func_demo_8004DEF8(Player* player) { } if ((gGroundType == GROUNDTYPE_WATER) && (player->pos.y <= player->unk_0A4)) { - func_effect_8007D9DC(player->pos.x, gGroundLevel + 2.0f, player->unk_138, 3.0f, 20.0f, 0); - func_effect_8007ADF4(player->pos.x, gGroundLevel, player->unk_138, 0.1f, 2.0f); + func_effect_8007D9DC(player->pos.x, gGroundHeight + 2.0f, player->unk_138, 3.0f, 20.0f, 0); + func_effect_8007ADF4(player->pos.x, gGroundHeight, player->unk_138, 0.1f, 2.0f); } } @@ -2386,7 +2386,7 @@ void Actor195_Update(Actor* actor) { break; case LEVEL_METEO: - if (gLevelStage == 0) { + if (gLevelPhase == 0) { Meteo_8018ED9C(actor); break; } @@ -2421,13 +2421,13 @@ void Actor195_Update(Actor* actor) { actor->scale = 0.0f; } - D_ctx_8017836C = actor->iwork[0] / 255.0f; - D_ctx_80178370 = gActors[0].obj.pos.x + 10.0f; - D_ctx_80178374 = gActors[0].obj.pos.y - 40.0f; - D_ctx_80178378 = gActors[0].obj.pos.z - 70.0f; - D_ctx_80178360 = 255; - D_ctx_80178364 = 255; - D_ctx_80178368 = 80; + gLight3Brightness = actor->iwork[0] / 255.0f; + gLight3x = gActors[0].obj.pos.x + 10.0f; + gLight3y = gActors[0].obj.pos.y - 40.0f; + gLight3z = gActors[0].obj.pos.z - 70.0f; + gLight3R = 255; + gLight3G = 255; + gLight3B = 80; break; } } @@ -2443,7 +2443,7 @@ void Actor195_Update(Actor* actor) { break; case LEVEL_SECTOR_X: - if (gLevelStage != 0) { + if (gLevelPhase != 0) { func_demo_80049630(actor); break; } @@ -2611,7 +2611,7 @@ void Actor195_Draw(Actor* actor) { break; case 30: - func_edisplay_8005F670(&actor->obj.pos); + Display_SetSecondLight(&actor->obj.pos); if (actor->unk_046 != 0) { RCP_SetupDL(&gMasterDisp, 0x37); diff --git a/src/engine/fox_display.c b/src/engine/fox_display.c index c029cef5..f26d9307 100644 --- a/src/engine/fox_display.c +++ b/src/engine/fox_display.c @@ -845,15 +845,15 @@ void func_display_80054914(Player* player) { } void func_display_80054CA4(Player* player) { - if (D_ctx_80177AB8[player->num] > 1.0f) { + if (gShieldAlpha[player->num] > 1.0f) { Matrix_Push(&gGfxMatrix); Matrix_Copy(gGfxMatrix, &D_display_80161418[player->num]); Matrix_Translate(gGfxMatrix, 0.0f, -5.0f, 10.0f, MTXF_APPLY); Matrix_Scale(gGfxMatrix, 2.5f, 1.6f, 2.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); RCP_SetupDL(&gMasterDisp, 0x44); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, (s32) D_ctx_80177AB8[player->num]); - gDPSetEnvColor(gMasterDisp++, 255, 0, 255, (s32) D_ctx_80177AB8[player->num]); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 0, 255, 255, (s32) gShieldAlpha[player->num]); + gDPSetEnvColor(gMasterDisp++, 255, 0, 255, (s32) gShieldAlpha[player->num]); gSPDisplayList(gMasterDisp++, D_101CD70); Matrix_Pop(&gGfxMatrix); Texture_Scroll(D_101D070, 32, 32, 3); @@ -1200,14 +1200,14 @@ void func_display_800564C0(Player* player, s32 arg1) { player->unk_138 + player->unk_144, MTXF_APPLY); if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if (D_ctx_80177B00[player->num][i] != 0) { + if (gVsLockOnTimers[player->num][i] != 0) { Matrix_MultVec3f(gGfxMatrix, &sp50, &D_display_80161578[i]); if ((i == gPlayerNum) && ((D_display_80161578[i].z > 300.0f) || (D_display_80161578[i].z < -8000.0f) || (fabsf(D_display_80161578[i].x) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)) || (fabsf(D_display_80161578[i].y)) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f))) { - D_ctx_80177B00[player->num][i] = 0; + gVsLockOnTimers[player->num][i] = 0; } } } @@ -1245,14 +1245,14 @@ void func_display_800564C0(Player* player, s32 arg1) { Matrix_Translate(gGfxMatrix, player->pos.x, player->pos.y, player->unk_138 + player->unk_144, MTXF_APPLY); if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if (D_ctx_80177B00[player->num][i] != 0) { + if (gVsLockOnTimers[player->num][i] != 0) { Matrix_MultVec3f(gGfxMatrix, &sp50, &D_display_80161578[i]); if ((i == gPlayerNum) && ((D_display_80161578[i].z > 300.0f) || (D_display_80161578[i].z < -8000.0f) || (fabsf(D_display_80161578[i].x) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)) || (fabsf(D_display_80161578[i].y) > (fabsf(D_display_80161578[i].z * 0.5f) + 100.0f)))) { - D_ctx_80177B00[player->num][i] = 0; + gVsLockOnTimers[player->num][i] = 0; } } } @@ -1588,14 +1588,14 @@ void Play_Draw(void) { tempVec.y = 100.0f; tempVec.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &tempVec, &playerCamUp); - if (D_ctx_80178410 != 0) { - D_ctx_80178428 = DEG_TO_RAD(gPlayer[0].camRoll); + if (gStarCount != 0) { + gStarfieldRoll = DEG_TO_RAD(gPlayer[0].camRoll); func_play_800B6F50(gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, gPlayerCamAt.z); - func_bg_8003DAF0(); + Background_DrawStarfield(); } - func_bg_8003E1E8(); - func_bg_80040450(); + Background_DrawBackdrop(); + Background_DrawSun(); Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gPlayerCamEye.x, gPlayerCamEye.y, gPlayerCamEye.z, gPlayerCamAt.x, gPlayerCamAt.y, gPlayerCamAt.z, playerCamUp.x, playerCamUp.y, playerCamUp.z, MTXF_APPLY); @@ -1609,8 +1609,8 @@ void Play_Draw(void) { D_ctx_80177CC8 = 0.0f; Matrix_Pop(&gGfxMatrix); } else if (gGroundType != GROUNDTYPE_WATER) { - D_bg_8015F964 = 0; - func_bg_80040CE4(); + D_bg_8015F964 = false; + Background_DrawGround(); } } Lights_SetOneLight(&gMasterDisp, gLight2x, gLight2y, gLight2z, gLight2R, gLight2G, gLight2B, gAmbientR, gAmbientG, @@ -1619,7 +1619,7 @@ void Play_Draw(void) { opponentPos.x = opponent->pos.x; opponentPos.y = opponent->pos.y; opponentPos.z = opponent->unk_138; - func_edisplay_8005F670(&opponentPos); + Display_SetSecondLight(&opponentPos); func_display_800564C0(opponent, 0); func_display_80057814(opponent); } @@ -1664,10 +1664,10 @@ void Play_Draw(void) { if (gCurrentLevel == LEVEL_AQUAS) { Effect_Draw(0); } - if ((gGroundType == GROUNDTYPE_WATER) || (D_ctx_80177AC8 != 0)) { - D_bg_8015F964 = 1; + if ((gGroundType == GROUNDTYPE_WATER) || (gAqDrawMode != 0)) { + D_bg_8015F964 = true; Effect_Draw(1); - func_bg_80040CE4(); + Background_DrawGround(); } if ((gCurrentLevel != LEVEL_AQUAS) && (((gCurrentLevel != LEVEL_CORNERIA) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) || @@ -1713,7 +1713,7 @@ void Play_Draw(void) { if ((gLevelMode == LEVELMODE_UNK_2) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { Turret_801A6164(gPlayer); } - func_bg_80040954(); + Background_DrawLensFlare(); if ((gCamCount != 1) && ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (player->state_1C8 == PLAYERSTATE_1C8_U_TURN))) { func_hud_8008FA84(); diff --git a/src/engine/fox_edata.c b/src/engine/fox_edata.c index c5e08d6a..3780107d 100644 --- a/src/engine/fox_edata.c +++ b/src/engine/fox_edata.c @@ -4,7 +4,7 @@ f32* D_edata_800CF964[] = { NULL }; -void func_edata_800594F0(Object_80* obj80) { +void func_edata_800594F0(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); @@ -12,7 +12,7 @@ void func_edata_800594F0(Object_80* obj80) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edata_800595D0(Object_80* obj80) { +void func_edata_800595D0(Scenery* scenery) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); Matrix_RotateY(gGfxMatrix, M_PI, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); diff --git a/src/engine/fox_edata_info.c b/src/engine/fox_edata_info.c index ea714c4c..0b3c7522 100644 --- a/src/engine/fox_edata_info.c +++ b/src/engine/fox_edata_info.c @@ -25,26 +25,26 @@ f32 gActor241Hitbox[] = { 1.0f, 0.0f, 50.0f, 0.0f, 25.0f, 0.0f, 25.0f, }; -f32 gDefaultCubeHitbox100[] = { +f32 gCubeHitbox100[] = { 1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f, }; -f32 gDefaultCubeHitbox150[] = { +f32 gCubeHitbox150[] = { 1.0f, 0.0f, 75.0f, 0.0f, 75.0f, 0.0f, 75.0f, }; -f32 gDefaultCubeHitbox200[] = { +f32 gCubeHitbox200[] = { 1.0f, 0.0f, 100.0f, 0.0f, 100.0f, 0.0f, 100.0f, }; -f32 gDefaultCubeHitbox300[] = { +f32 gCubeHitbox300[] = { // unused 1.0f, 0.0f, 150.0f, 0.0f, 150.0f, 0.0f, 150.0f, }; -f32 gDefaultCubeHitbox400[] = { +f32 gCubeHitbox400[] = { 1.0f, 0.0f, 200.0f, 0.0f, 200.0f, 0.0f, 200.0f, }; f32 gItemRingCheckHitbox[] = { 1.0f, -113.0f, 61.0f, 98.0f, 100.0f, 0.0f, 219.0f, }; -f32 gHitboxNone[] = { +f32 gNoHitbox[] = { 0.0f, }; f32 gItemCheckpointHitbox[] = { @@ -56,7 +56,7 @@ f32 gItemSupplyRingHitbox[] = { f32 gMeteoWarpHitbox[] = { 1.0f, -40.0f, 100.0f, 0.0f, 100.0f, 0.0f, 100.0f, }; -f32 D_edata_800CBF8C[] = { +f32 gItemPathChangeHitbox[] = { 1.0f, 0.0f, 100.0f, 0.0f, 1200.0f, 0.0f, 1200.0f, }; f32 gItemLasersHitbox[] = { @@ -68,7 +68,7 @@ f32 gItemBombHitbox[] = { f32 gActor190_191Hitbox[] = { 1.0f, 0.0f, 40.0f, 0.0f, 40.0f, 0.0f, 40.0f, }; -f32 gActor194HItbox[] = { +f32 gActor194Hitbox[] = { 1.0f, 0.0f, 50.0f, 0.0f, 50.0f, 0.0f, 50.0f, }; f32 gTeamHitbox[] = { @@ -93,210 +93,210 @@ f32 gWarpZoneEvent93Hitbox[] = { // clang-format off ObjectInfo D_edata_800CC124[0x190] = { - /* OBJ_80_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, gHitboxNone, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_6, */ {(void*) D_CO_60132B0, 0, (ObjectFunc) NULL, D_CO_603DCA4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_7, */ {(void*) D_CO_602E080, 0, (ObjectFunc) NULL, D_CO_603DD40, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_10, */ {(void*) D_CO_602D5F0, 0, (ObjectFunc) NULL, D_CO_603DDF0, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_11, */ {(void*) D_CO_601A7D0, 0, (ObjectFunc) NULL, D_CO_603DE8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_12, */ {(void*) D_CO_6014B50, 0, (ObjectFunc) NULL, D_CO_603DEF4, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_13, */ {(void*) D_CO_6016580, 0, (ObjectFunc) NULL, D_CO_603DF8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_14, */ {(void*) D_CO_601B560, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603DFDC, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_15, */ {(void*) D_CO_60361F0, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E014, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_16, */ {(void*) D_CO_6018E80, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E030, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_17, */ {(void*) D_CO_6035F10, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E09C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_18, */ {(void*) Corneria_8018753C, 1, (ObjectFunc) Corneria_80187530, D_CO_603E98C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_19, */ {(void*) D_CO_60153B0, 0, (ObjectFunc) NULL, D_CO_603E118, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_20, */ {(void*) D_CO_601F5A0, 0, (ObjectFunc) NULL, D_CO_603E14C, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_21, */ {(void*) D_CO_60137B0, 0, (ObjectFunc) NULL, D_CO_603E1B4, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_22, */ {(void*) D_CO_6006A80, 0, (ObjectFunc) NULL, D_CO_603E21C, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_23, */ {(void*) D_CO_6016270, 0, (ObjectFunc) NULL, D_CO_603E4A0, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_24, */ {(void*) D_CO_6010E00, 0, (ObjectFunc) NULL, D_CO_603E9EC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_25, */ {(void*) D_CO_6014670, 0, (ObjectFunc) NULL, D_CO_603EA08, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_26, */ {(void*) D_CO_6010A50, 0, (ObjectFunc) NULL, D_CO_603EA74, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_27, */ {(void*) D_CO_60143E0, 0, (ObjectFunc) NULL, D_CO_603EAE0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_28, */ {(void*) D_CO_6014A20, 0, (ObjectFunc) NULL, D_CO_603EB0C, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_29, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60064FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_30, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006518, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_31, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006564, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_32, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065B0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_33, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_34, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006648, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_35, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006694, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_36, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_37, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_38, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, gHitboxNone, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_42, */ {(void*) Obj42_Draw, 1, (ObjectFunc) Obj42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_43, */ {(void*) D_ZO_6024AC0, 0, (ObjectFunc) NULL, D_ZO_602B9EC, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_44, */ {(void*) D_ZO_600F560, 0, (ObjectFunc) NULL, D_ZO_602BA20, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_45, */ {(void*) D_ZO_600EC90, 0, (ObjectFunc) NULL, D_ZO_602BAE4, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_46, */ {(void*) D_ZO_600E820, 0, (ObjectFunc) NULL, D_ZO_602BBD8, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_47, */ {(void*) D_ZO_601FCB0, 0, (ObjectFunc) NULL, D_ZO_602BC54, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_48, */ {(void*) func_edata_800594F0, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_49, */ {(void*) func_edata_800595D0, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_50, */ {(void*) D_VE1_6007410, 0, (ObjectFunc) NULL, D_VE1_601B518, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_80193540, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Obj54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_55, */ {(void*) D_CO_6013B50, 0, (ObjectFunc) NULL, D_CO_603E88C, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_56, */ {(void*) Corneria_8018F31C, 2, (ObjectFunc) Corneria_8018F044, D_CO_603E8A8, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_57, */ {(void*) Titania_8018F8B8, 1, (ObjectFunc) Titania_8018F4D8, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_58, */ {(void*) D_TI1_700BE00, 0, (ObjectFunc) NULL, D_TI_6006C44, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_61, */ {(void*) Macbeth_801A2A78, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gHitboxNone, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_65, */ {(void*) Macbeth_801A6608, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_66, */ {(void*) D_MA_601F1D0, 0, (ObjectFunc) NULL, D_MA_60362D8, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_67, */ {(void*) D_MA_60238F0, 0, (ObjectFunc) NULL, D_MA_6036328, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_68, */ {(void*) D_MA_601B7C0, 0, (ObjectFunc) NULL, D_MA_60362F4, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, - /* OBJ_80_69, */ {(void*) D_MA_6030500, 0, (ObjectFunc) NULL, D_MA_6036370, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_70, */ {(void*) D_MA_602DAE0, 0, (ObjectFunc) NULL, D_MA_603638C, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_71, */ {(void*) D_MA_6027900, 0, (ObjectFunc) NULL, D_MA_60363B8, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_72, */ {(void*) D_MA_602DB80, 0, (ObjectFunc) NULL, D_MA_60363E4, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_73, */ {(void*) D_MA_6030630, 0, (ObjectFunc) NULL, D_MA_6036410, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_77, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gHitboxNone, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_104 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) Macbeth_801A0BD8, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_105 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_107 */ {(void*) D_SY_601D730, 0, (ObjectFunc) NULL, D_SY_603450C, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_116 */ {(void*) D_SY_60034D0, 0, (ObjectFunc) NULL, D_SY_60347D4, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_117 */ {(void*) D_AQ_60231C0, 0, (ObjectFunc) NULL, D_AQ_6030C60, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_118 */ {(void*) D_AQ_6011EE0, 0, (ObjectFunc) NULL, D_AQ_6030C7C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_119 */ {(void*) D_AQ_6015730, 0, (ObjectFunc) NULL, D_AQ_6030D74, 2000.0f, 0, 0, 39, 0, 0.0f, 0 }, - /* OBJ_80_120 */ {(void*) D_AQ_601DE60, 0, (ObjectFunc) NULL, D_AQ_6030DF8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_121 */ {(void*) D_AQ_602B4C0, 0, (ObjectFunc) NULL, D_AQ_6030E14, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_122 */ {(void*) D_AQ_600EE10, 0, (ObjectFunc) NULL, D_AQ_6030E30_Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, gHitboxNone, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_801924A8, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_80_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_80_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_80_130 */ {(void*) D_VE1_900F1D0, 0, (ObjectFunc) NULL, D_VE1_601B75C, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, - /* OBJ_80_131 */ {(void*) Andross_801935D4, 1, (ObjectFunc) Andross_8019356C, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_132 */ {(void*) Andross_8019350C, 1, (ObjectFunc) Andross_80193380, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, - /* OBJ_80_133 */ {(void*) D_TR_60030F0, 0, (ObjectFunc) NULL, D_TR_6009CC4, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_80_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_80_135 */ {(void*) D_TI_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_80_136 */ {(void*) D_VE2_6002990, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, - /* OBJ_80_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, - /* OBJ_80_138 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE64, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_139 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_142 */ {(void*) D_versus_301B080, 0, (ObjectFunc) NULL, D_versus_302EE9C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_143 */ {(void*) D_versus_3016B00, 0, (ObjectFunc) NULL, D_versus_302EE00, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_144 */ {(void*) D_versus_3013780, 0, (ObjectFunc) NULL, D_versus_302ED4C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_145 */ {(void*) D_versus_3013580, 0, (ObjectFunc) NULL, D_versus_302ED98, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_146 */ {(void*) D_versus_3012ED0, 0, (ObjectFunc) NULL, D_versus_302EDB4, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_80_148 */ {(void*) D_FO_60079B0, 0, (ObjectFunc) NULL, D_FO_600FF80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_149 */ {(void*) D_FO_6007D80, 0, (ObjectFunc) NULL, D_FO_600FFA0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_150 */ {(void*) D_FO_6006310, 0, (ObjectFunc) NULL, D_FO_600FFC0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_151 */ {(void*) D_FO_60066E0, 0, (ObjectFunc) NULL, D_FO_600FEB8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_154 */ {(void*) D_KA_600BAF0, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_158 */ {(void*) D_SZ_6001360, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_80_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_0, */ {(void*) D_CO_6015F00, 0, (ObjectFunc) NULL, D_CO_603E3E0, 800.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_1, */ {(void*) D_CO_602E9E0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_2, */ {(void*) D_CO_601BEC0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_3, */ {(void*) D_CO_602E7A0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_4, */ {(void*) D_CO_60244A0, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_5, */ {(void*) D_CO_602E570, 0, (ObjectFunc) NULL, gNoHitbox, 3000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_6, */ {(void*) D_CO_60132B0, 0, (ObjectFunc) NULL, D_CO_603DCA4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_7, */ {(void*) D_CO_602E080, 0, (ObjectFunc) NULL, D_CO_603DD40, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_8, */ {(void*) D_CO_60164F0, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_9, */ {(void*) D_CO_6014500, 0, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_10, */ {(void*) D_CO_602D5F0, 0, (ObjectFunc) NULL, D_CO_603DDF0, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_11, */ {(void*) D_CO_601A7D0, 0, (ObjectFunc) NULL, D_CO_603DE8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_12, */ {(void*) D_CO_6014B50, 0, (ObjectFunc) NULL, D_CO_603DEF4, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_13, */ {(void*) D_CO_6016580, 0, (ObjectFunc) NULL, D_CO_603DF8C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_14, */ {(void*) D_CO_601B560, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603DFDC, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_15, */ {(void*) D_CO_60361F0, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E014, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_16, */ {(void*) D_CO_6018E80, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E030, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_17, */ {(void*) D_CO_6035F10, 0, (ObjectFunc) func_enmy_80066EA8, D_CO_603E09C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_18, */ {(void*) Corneria_8018753C, 1, (ObjectFunc) Corneria_80187530, D_CO_603E98C, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_19, */ {(void*) D_CO_60153B0, 0, (ObjectFunc) NULL, D_CO_603E118, 100.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_20, */ {(void*) D_CO_601F5A0, 0, (ObjectFunc) NULL, D_CO_603E14C, 500.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_21, */ {(void*) D_CO_60137B0, 0, (ObjectFunc) NULL, D_CO_603E1B4, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_22, */ {(void*) D_CO_6006A80, 0, (ObjectFunc) NULL, D_CO_603E21C, 400.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_23, */ {(void*) D_CO_6016270, 0, (ObjectFunc) NULL, D_CO_603E4A0, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_24, */ {(void*) D_CO_6010E00, 0, (ObjectFunc) NULL, D_CO_603E9EC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_25, */ {(void*) D_CO_6014670, 0, (ObjectFunc) NULL, D_CO_603EA08, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_26, */ {(void*) D_CO_6010A50, 0, (ObjectFunc) NULL, D_CO_603EA74, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_27, */ {(void*) D_CO_60143E0, 0, (ObjectFunc) NULL, D_CO_603EAE0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_28, */ {(void*) D_CO_6014A20, 0, (ObjectFunc) NULL, D_CO_603EB0C, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_29, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60064FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_30, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006518, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_31, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006564, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_32, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065B0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_33, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60065FC, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_34, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006648, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_35, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006694, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_36, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_60066E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_37, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_600672C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_38, */ {(void*) func_edisplay_80059B20, 1, (ObjectFunc) func_enmy_800652CC, D_TI_6006778, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_39, */ {(void*) Obj39_Draw, 1, (ObjectFunc) Obj39_Update, gNoHitbox, 6000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_40, */ {(void*) func_edisplay_80059F68, 1, (ObjectFunc) func_enmy_80066D5C, D_CO_603E4A4, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_41, */ {(void*) func_edisplay_80059FDC, 1, (ObjectFunc) func_enmy_80066EA8, D_CO_603E4DC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_42, */ {(void*) Obj42_Draw, 1, (ObjectFunc) Obj42_Update, D_CO_603E514, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_43, */ {(void*) D_ZO_6024AC0, 0, (ObjectFunc) NULL, D_ZO_602B9EC, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_44, */ {(void*) D_ZO_600F560, 0, (ObjectFunc) NULL, D_ZO_602BA20, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_45, */ {(void*) D_ZO_600EC90, 0, (ObjectFunc) NULL, D_ZO_602BAE4, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_46, */ {(void*) D_ZO_600E820, 0, (ObjectFunc) NULL, D_ZO_602BBD8, 1500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_47, */ {(void*) D_ZO_601FCB0, 0, (ObjectFunc) NULL, D_ZO_602BC54, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_48, */ {(void*) func_edata_800594F0, 1, (ObjectFunc) NULL, D_VE1_601B4E0, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_49, */ {(void*) func_edata_800595D0, 1, (ObjectFunc) NULL, D_VE1_601B4FC, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_50, */ {(void*) D_VE1_6007410, 0, (ObjectFunc) NULL, D_VE1_601B518, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_51, */ {(void*) D_VE1_6006F50, 0, (ObjectFunc) NULL, D_VE1_601B584, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_52, */ {(void*) D_VE1_6005780, 0, (ObjectFunc) Venom1_80193540, D_VE1_601B5F4, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_53, */ {(void*) D_VE1_6003610, 0, (ObjectFunc) NULL, D_VE1_601B644, 2500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_54, */ {(void*) D_CO_6000E00, 0, (ObjectFunc) Obj54_Update, D_CO_603E0EC, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_55, */ {(void*) D_CO_6013B50, 0, (ObjectFunc) NULL, D_CO_603E88C, 1000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_56, */ {(void*) Corneria_8018F31C, 2, (ObjectFunc) Corneria_8018F044, D_CO_603E8A8, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_57, */ {(void*) Titania_8018F8B8, 1, (ObjectFunc) Titania_8018F4D8, D_TI_6006BF0, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_58, */ {(void*) D_TI1_700BE00, 0, (ObjectFunc) NULL, D_TI_6006C44, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_59, */ {(void*) D_MA_6024010, 0, (ObjectFunc) NULL, D_MA_603626C, 300.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_60, */ {(void*) D_MA_6027180, 0, (ObjectFunc) NULL, D_MA_6036288, 400.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_61, */ {(void*) Macbeth_801A2A78, 1, (ObjectFunc) NULL, D_MA_60362A4, 200.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_62, */ {(void*) D_MA_60270E0, 0, (ObjectFunc) NULL, gNoHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_63, */ {(void*) D_MA_6013960, 0, (ObjectFunc) NULL, D_MA_6036894, 500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_64, */ {(void*) D_MA_600AF40, 0, (ObjectFunc) NULL, D_MA_60368E0, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_65, */ {(void*) Macbeth_801A6608, 1, (ObjectFunc) NULL, D_MA_6036724, 400.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_66, */ {(void*) D_MA_601F1D0, 0, (ObjectFunc) NULL, D_MA_60362D8, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_67, */ {(void*) D_MA_60238F0, 0, (ObjectFunc) NULL, D_MA_6036328, 2000.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_68, */ {(void*) D_MA_601B7C0, 0, (ObjectFunc) NULL, D_MA_60362F4, 2500.0f, 0, 0, 5, 0, 0.0f, 0 }, + /* OBJ_SCENERY_69, */ {(void*) D_MA_6030500, 0, (ObjectFunc) NULL, D_MA_6036370, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_70, */ {(void*) D_MA_602DAE0, 0, (ObjectFunc) NULL, D_MA_603638C, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_71, */ {(void*) D_MA_6027900, 0, (ObjectFunc) NULL, D_MA_60363B8, 1900.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_72, */ {(void*) D_MA_602DB80, 0, (ObjectFunc) NULL, D_MA_60363E4, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_73, */ {(void*) D_MA_6030630, 0, (ObjectFunc) NULL, D_MA_6036410, 1100.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_74, */ {(void*) D_MA_602DC20, 0, (ObjectFunc) NULL, D_MA_603643C, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_75, */ {(void*) D_MA_601B0D0, 0, (ObjectFunc) NULL, D_MA_6036760, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_76, */ {(void*) D_MA_60075D0, 0, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_77, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, D_MA_6036344, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_78, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_79, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_80, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_81, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_82, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_83, */ {(void*) Macbeth_801A3240, 1, (ObjectFunc) Macbeth_801A2DD8, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_84, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_85, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_86, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_87, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_88, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_89, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_90, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_91, */ {(void*) Macbeth_801A2B24, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_92, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_93, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_94, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_95, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_96, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_97, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_98, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 15000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_99, */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_100 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_101 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_102 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_103 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, gNoHitbox, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_104 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) Macbeth_801A0BD8, D_MA_6036594, 2500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_105 */ {(void*) Macbeth_801A23AC, 1, (ObjectFunc) NULL, D_MA_6036204, 1300.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_106 */ {(void*) D_SY_60097E0, 0, (ObjectFunc) NULL, D_SY_6034478, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_107 */ {(void*) D_SY_601D730, 0, (ObjectFunc) NULL, D_SY_603450C, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_108 */ {(void*) D_SY_60102C0, 0, (ObjectFunc) NULL, D_SY_6034588, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_109 */ {(void*) D_SY_60036A0, 0, (ObjectFunc) SectorY_801A4E44, D_SY_6034664, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_110 */ {(void*) D_SY_6005360, 0, (ObjectFunc) NULL, D_SY_6034770, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_111 */ {(void*) Obj111_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_112 */ {(void*) D_SY_600F6C0, 0, (ObjectFunc) SectorY_801A52B8, D_SY_60347F0, 4000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_113 */ {(void*) D_SY_601B610, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_114 */ {(void*) D_SY_601C6A0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_115 */ {(void*) D_SY_60188D0, 0, (ObjectFunc) NULL, D_SY_603486C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_116 */ {(void*) D_SY_60034D0, 0, (ObjectFunc) NULL, D_SY_60347D4, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_117 */ {(void*) D_AQ_60231C0, 0, (ObjectFunc) NULL, D_AQ_6030C60, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_118 */ {(void*) D_AQ_6011EE0, 0, (ObjectFunc) NULL, D_AQ_6030C7C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_119 */ {(void*) D_AQ_6015730, 0, (ObjectFunc) NULL, D_AQ_6030D74, 2000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_SCENERY_120 */ {(void*) D_AQ_601DE60, 0, (ObjectFunc) NULL, D_AQ_6030DF8, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_121 */ {(void*) D_AQ_602B4C0, 0, (ObjectFunc) NULL, D_AQ_6030E14, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_122 */ {(void*) D_AQ_600EE10, 0, (ObjectFunc) NULL, D_AQ_6030E30_Hitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_123 */ {(void*) D_AQ_60120F0, 0, (ObjectFunc) NULL, D_AQ_6030E4C, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_124 */ {(void*) D_AQ_600EEF0, 0, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_125 */ {(void*) D_AQ_600BF80, 0, (ObjectFunc) NULL, D_AQ_6030E68, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_126 */ {(void*) Aquas_801BE1FC, 1, (ObjectFunc) NULL, gNoHitbox, 2000.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_127 */ {(void*) D_VE1_9005C80, 0, (ObjectFunc) Venom1_801924A8, D_VE1_601B678, 1000.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_128 */ {(void*) D_VE1_9003F50, 0, (ObjectFunc) NULL, D_VE1_601B6C4, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_129 */ {(void*) D_VE1_900F060, 0, (ObjectFunc) NULL, D_VE1_601B710, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_130 */ {(void*) D_VE1_900F1D0, 0, (ObjectFunc) NULL, D_VE1_601B75C, 3200.0f, 0, 0, 42, 0, 0.0f, 0 }, + /* OBJ_SCENERY_131 */ {(void*) Andross_801935D4, 1, (ObjectFunc) Andross_8019356C, D_ANDROSS_C038BD8, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_132 */ {(void*) Andross_8019350C, 1, (ObjectFunc) Andross_80193380, D_ANDROSS_C038A48, 500.0f, 0, 0, 41, 0, 0.0f, 0 }, + /* OBJ_SCENERY_133 */ {(void*) D_TR_60030F0, 0, (ObjectFunc) NULL, D_TR_6009CC4, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_SCENERY_134 */ {(void*) D_VE2_6003000, 0, (ObjectFunc) NULL, D_ANDROSS_C038BA4, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_135 */ {(void*) D_TI_6006890, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_136 */ {(void*) D_VE2_6002990, 0, (ObjectFunc) NULL, D_ANDROSS_C038B40, 0.0f, 0, 0, 41, 1, 0.0f, 0 }, + /* OBJ_SCENERY_137 */ {(void*) D_VE2_6004170, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 1, 0.0f, 0 }, + /* OBJ_SCENERY_138 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE64, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_139 */ {(void*) D_versus_3017600, 0, (ObjectFunc) NULL, D_versus_302EE80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_140 */ {(void*) D_versus_30173C0, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_141 */ {(void*) D_versus_30174E0, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_142 */ {(void*) D_versus_301B080, 0, (ObjectFunc) NULL, D_versus_302EE9C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_143 */ {(void*) D_versus_3016B00, 0, (ObjectFunc) NULL, D_versus_302EE00, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_144 */ {(void*) D_versus_3013780, 0, (ObjectFunc) NULL, D_versus_302ED4C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_145 */ {(void*) D_versus_3013580, 0, (ObjectFunc) NULL, D_versus_302ED98, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_146 */ {(void*) D_versus_3012ED0, 0, (ObjectFunc) NULL, D_versus_302EDB4, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_147 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SCENERY_148 */ {(void*) D_FO_60079B0, 0, (ObjectFunc) NULL, D_FO_600FF80, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_149 */ {(void*) D_FO_6007D80, 0, (ObjectFunc) NULL, D_FO_600FFA0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_150 */ {(void*) D_FO_6006310, 0, (ObjectFunc) NULL, D_FO_600FFC0, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_151 */ {(void*) D_FO_60066E0, 0, (ObjectFunc) NULL, D_FO_600FEB8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_152 */ {(void*) D_BO_600F4C0, 0, (ObjectFunc) NULL, D_BO_6011C10, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_153 */ {(void*) D_BO_600B8B0, 0, (ObjectFunc) NULL, D_BO_6011C48, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_154 */ {(void*) D_KA_600BAF0, 0, (ObjectFunc) NULL, D_KA_601115C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_155 */ {(void*) NULL, 0, (ObjectFunc) NULL, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_156 */ {(void*) SectorY_80197CB8, 1, (ObjectFunc) NULL, D_SY_6034368, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_157 */ {(void*) D_SZ_6001DA0, 0, (ObjectFunc) NULL, D_SZ_600924C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_158 */ {(void*) D_SZ_6001360, 0, (ObjectFunc) NULL, D_SZ_60092E8, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_159 */ {(void*) D_VE2_6008370, 0, (ObjectFunc) NULL, D_VE2_601668C, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SCENERY_160 */ {(void*) D_VE2_6010960, 0, (ObjectFunc) NULL, D_VE2_6016714, 0.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_POLE */ {(void*) D_CO_602F7C0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E468, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_CO_TREE */ {(void*) D_CO_601C9B0, 0, (ObjectFunc) Sprite_UpdateDoodad, D_CO_603E484, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_FO_POLE */ {(void*) D_FO_600A420, 0, (ObjectFunc) Sprite_UpdateDoodad, D_FO_600FE9C, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gHitboxNone, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gHitboxNone, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gHitboxNone, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gHitboxNone, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_FOG_SHADOW */ {(void*) FogShadow_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 1800.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_RUIN1 */ {(void*) D_CO_602DCA0, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_RUIN2 */ {(void*) D_CO_601F500, 0, (ObjectFunc) NULL, gNoHitbox, -100.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_167 */ {(void*) Sprite167_Draw, 1, (ObjectFunc) Sprite167_Update, gNoHitbox, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_SPRITE_168 */ {(void*) Sprite168_Draw, 1, (ObjectFunc) NULL, gNoHitbox, 100.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_SPRITE_TI_CACTUS */ {(void*) D_TI_60023B0, 0, (ObjectFunc) Titania_Cactus_Update, D_TI_60068BC, 100.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_VE1_BOSS_TRIGGER4 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger4_Update, gHitboxNone, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_SPRITE_GFOX_TARGET */ {(void*) NULL, 1, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_CO_SMOKE */ {(void*) NULL, 1, (ObjectFunc) Corneria_801875A4, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER1 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger1_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER2 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger2_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER3 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger3_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_VE1_BOSS_TRIGGER4 */ {(void*) NULL, 1, (ObjectFunc) Venom1_BossTrigger4_Update, gNoHitbox, 0.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_SPRITE_GFOX_TARGET */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_176 */ {(void*) Corneria_8018BAAC, 2, (ObjectFunc) Corneria_8018AED0, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_177 */ {(void*) Corneria_8018BBA4, 2, (ObjectFunc) Corneria_8018B15C, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_178 */ {(void*) Corneria_8018BBF8, 2, (ObjectFunc) Corneria_8018B418, D_CO_603E5D0, 500.0f, 0, 0, 39, 1, 200.0f, 1 }, /* OBJ_ACTOR_179 */ {(void*) Corneria_8018BD7C, 2, (ObjectFunc) Corneria_8018B58C, D_CO_603E604, 500.0f, 0, 0, 39, 1, 0.0f, 1 }, - /* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, gHitboxNone, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_180 */ {(void*) func_edisplay_8005B6A4, 1, (ObjectFunc) func_enmy_80066A80, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_181 */ {(void*) D_ME_6018C00, 0, (ObjectFunc) Meteo_8018756C, D_ME_602F6EC, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_182 */ {(void*) func_edisplay_8005B71C, 1, (ObjectFunc) Meteo_80187650, D_ME_602F708, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, gHitboxNone, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_183 */ {(void*) Meteo_8018DA6C, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_184 */ {(void*) Meteo_8018DAEC, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_185 */ {(void*) Meteo_8018DB6C, 1, (ObjectFunc) Meteo_8018D9EC, gNoHitbox, 100.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_186 */ {(void*) func_edisplay_8005B7CC, 1, (ObjectFunc) Meteo_8018795C, D_ME_602F724, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_187 */ {(void*) D_ME_6018450, 0, (ObjectFunc) Meteo_801877C4, D_ME_602F740, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_188 */ {(void*) Aquas_801BEC74, 1, (ObjectFunc) Aquas_801BEC68, D_AQ_6030BE0, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, gHitboxNone, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_189 */ {(void*) Actor189_Draw, 1, (ObjectFunc) Actor189_Update, gNoHitbox, 0.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_190 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* OBJ_ACTOR_191 */ {(void*) func_edisplay_8005B848, 1, (ObjectFunc) func_enmy_800656D4, gActor190_191Hitbox, 100.0f, 0, 1, 39, 0, 1.0f, 0 }, /* OBJ_ACTOR_192 */ {(void*) func_edisplay_8005B9A4, 1, (ObjectFunc) func_enmy_8006654C, D_CO_603E54C, 200.0f, 0, 1, 39, 0, 50.0f, 1 }, /* OBJ_ACTOR_193 */ {(void*) func_edisplay_8005BA30, 1, (ObjectFunc) func_enmy_800669A0, D_CO_603E598, 100.0f, 0, 1, 39, 0, 0.0f, 0 }, - /* OBJ_ACTOR_194 */ {(void*) Actor194_Draw, 1, (ObjectFunc) Actor194_Update, gActor194HItbox, 200.0f, 0, 1, 39, 0, 0.0f, 1 }, - /* OBJ_ACTOR_195 */ {(void*) Actor195_Draw, 1, (ObjectFunc) Actor195_Update, gHitboxNone, 20000.0f, 0, 1, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_194 */ {(void*) Actor194_Draw, 1, (ObjectFunc) Actor194_Update, gActor194Hitbox, 200.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_195 */ {(void*) Actor195_Draw, 1, (ObjectFunc) Actor195_Update, gNoHitbox, 20000.0f, 0, 1, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_196 */ {(void*) Actor196_Draw, 1, (ObjectFunc) Actor196_Update, D_CO_603E5B4, 200.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_ALLRANGE */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorAllRange_Update, gActorAllRangeHItbox, 20000.0f, 0, 1, 39, 1, 1.0f, 1 }, /* OBJ_ACTOR_TEAM_BOSS */ {(void*) ActorAllRange_Draw, 1, (ObjectFunc) ActorTeamBoss_Update, gTeamHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, gHitboxNone, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, - /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gHitboxNone, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, + /* OBJ_ACTOR_199 */ {(void*) Andross_80188448, 1, (ObjectFunc) Andross_801880E4, gNoHitbox, 20000.0f, 0, 0, 39, 1, 0.0f, 0 }, + /* OBJ_ACTOR_EVENT */ {(void*) ActorEvent_Draw, 1, (ObjectFunc) ActorEvent_Update, gNoHitbox, 2000.0f, 0, 1, 39, 0, 0.0f, 1 }, /* OBJ_ACTOR_201 */ {(void*) Actor201_Draw, 1, (ObjectFunc) Actor201_Update, D_ME_602F684, 100.0f, 0, 1, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_202 */ {(void*) Actor202_Draw, 1, (ObjectFunc) Actor202_Update, D_ME_602F6A0, 100.0f, 0, 1, 39, 0, 180.0f, 1 }, - /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, gHitboxNone, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SLIPPY_SX */ {(void*) SectorX_8018F884, 1, (ObjectFunc) SectorX_8018F330, gNoHitbox, 1000.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_204 */ {(void*) SectorY_Actor204_Draw, 1, (ObjectFunc) SectorY_Actor204_Update, D_SY_603405C, 1000.0f, 0, 0, 39, 0, 1.0f, 1 }, /* OBJ_ACTOR_205 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_8019C778, D_MA_60359C8, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_206 */ {(void*) Macbeth_801A12C4, 1, (ObjectFunc) Macbeth_801AC438, D_MA_6035A48, 20000.0f, 0, 0, 40, 1, 0.0f, 0 }, @@ -317,7 +317,7 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_221 */ {(void*) Macbeth_801AE2C0, 1, (ObjectFunc) Macbeth_801ADD68, D_MA_603694C, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, /* OBJ_ACTOR_222 */ {(void*) Macbeth_801AEEFC, 1, (ObjectFunc) Macbeth_801AEC04, D_MA_6036968, 300.0f, 0, 0, 40, 1, 1.0f, 0 }, /* OBJ_ACTOR_223 */ {(void*) Macbeth_801A54E8, 1, (ObjectFunc) Macbeth_801A4B24, D_MA_60364DC, 300.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, gHitboxNone, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, + /* OBJ_ACTOR_224 */ {(void*) NULL, 1, (ObjectFunc) Titania_80189194, gNoHitbox, 200.0f, 0, 0, 39, 0, 0.0f, 0 }, /* OBJ_ACTOR_225 */ {(void*) D_TI1_700AB70, 0, (ObjectFunc) Titania_8018AB44, D_TI_60064AC, 50.0f, 0, 0, 39, 1, 1.0f, 0 }, /* OBJ_ACTOR_226 */ {(void*) Titania_80189AFC, 1, (ObjectFunc) Titania_801895B8, D_TI_60064C8, 300.0f, 0, 0, 39, 1, 70.0f, 1 }, /* OBJ_ACTOR_227 */ {(void*) Titania_8018E5B4, 1, (ObjectFunc) Titania_8018E54C, D_TI_60067C4, 0.0f, 0, 0, 39, 1, 0.0f, 0 }, @@ -327,22 +327,22 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_231 */ {(void*) Titania_8018BE84, 1, (ObjectFunc) Titania_8018B9D0, D_TI_6006858, 0.0f, 0, 0, 39, 1, 0.0f, 1 }, /* OBJ_ACTOR_232 */ {(void*) Titania_8018B6AC, 1, (ObjectFunc) Titania_8018B268, D_TI_6006890, 0.0f, 0, 0, 39, 1, 20.0f, 1 }, /* OBJ_ACTOR_233 */ {(void*) Titania_8018A1C0, 1, (ObjectFunc) Titania_80189CC8, D_TI_60068F0, 200.0f, 0, 0, 39, 1, 1.0f, 1 }, - /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gHitboxNone, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, + /* OBJ_ACTOR_234 */ {(void*) Actor234_Draw, 1, (ObjectFunc) Actor234_Update, gNoHitbox, 2000.0f, 0, 0, 39, 0, 0.0f, 5 }, /* OBJ_ACTOR_235 */ {(void*) Zoness_80190430, 2, (ObjectFunc) Zoness_801904CC, D_ZO_602C294, 1000.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_236 */ {(void*) Zoness_80190F08, 1, (ObjectFunc) Zoness_80190A00, D_ZO_602BC58, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gHitboxNone, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, - /* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, gDefaultCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, - /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, gDefaultCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, + /* OBJ_ACTOR_237 */ {(void*) Actor237_Draw, 1, (ObjectFunc) Actor237_Update, gNoHitbox, 200.0f, 0, 0, 40, 0, 0.0f, 2 }, + /* OBJ_ACTOR_238 */ {(void*) Zoness_801914C4, 2, (ObjectFunc) Zoness_80191010, gCubeHitbox100, 200.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_239 */ {(void*) NULL, 1, (ObjectFunc) NULL, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_240 */ {(void*) Zoness_80191B4C, 1, (ObjectFunc) Zoness_80191680, gCubeHitbox100, 1500.0f, 0, 1, 40, 0, 20.0f, 0 }, /* OBJ_ACTOR_241 */ {(void*) Zoness_80191DB0, 1, (ObjectFunc) Zoness_80191BC4, gActor241Hitbox, 1500.0f, 0, 1, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_242 */ {(void*) Zoness_80191FFC, 2, (ObjectFunc) Zoness_80192094, D_ZO_602BE3C, 500.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, gDefaultCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, + /* OBJ_ACTOR_243 */ {(void*) Zoness_80192C18, 2, (ObjectFunc) Zoness_80192834, gCubeHitbox100, 0.0f, 0, 1, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_244 */ {(void*) Zoness_80193240, 2, (ObjectFunc) Zoness_80192E64, D_ZO_602BE58, 2000.0f, 0, 0, 40, 0, 50.0f, 0 }, - /* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, gDefaultCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, - /* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, gDefaultCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_245 */ {(void*) Zoness_8019983C, 1, (ObjectFunc) Zoness_8019969C, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 1.0f, 0 }, + /* OBJ_ACTOR_246 */ {(void*) Zoness_80199E24, 1, (ObjectFunc) Zoness_80199A28, gCubeHitbox100, 2000.0f, 0, 0, 40, 0, 1.0f, 0 }, /* OBJ_ACTOR_247 */ {(void*) Zoness_8019D3C4, 1, (ObjectFunc) Zoness_8019D15C, D_ZO_602BFC4, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, gDefaultCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, gDefaultCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_248 */ {(void*) Zoness_8019A1FC, 1, (ObjectFunc) Zoness_80199F10, gCubeHitbox150, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_249 */ {(void*) Zoness_8019ACCC, 1, (ObjectFunc) Zoness_8019A5D4, gCubeHitbox200, 5000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_250 */ {(void*) Zoness_8019B7DC, 1, (ObjectFunc) Zoness_8019B548, D_ZO_602C1D4, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_251 */ {(void*) Zoness_8019BDE0, 2, (ObjectFunc) Zoness_8019B854, D_ZO_602C218, 1000.0f, 0, 0, 40, 0, 1.0f, 1 }, /* OBJ_ACTOR_252 */ {(void*) Zoness_8019C1CC, 1, (ObjectFunc) Zoness_8019BE48, D_ZO_602C234, 200.0f, 0, 0, 40, 0, 80.0f, 1 }, @@ -351,13 +351,13 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_255 */ {(void*) Aquas_801AE168, 1, (ObjectFunc) Aquas_801AD6C0, D_AQ_6030BFC, 500.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_256 */ {(void*) Aquas_801AEB44, 1, (ObjectFunc) Aquas_801AE3D8, D_AQ_6030C18, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_257 */ {(void*) Aquas_801B099C, 1, (ObjectFunc) Aquas_801AFA5C, D_AQ_6030C44, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, gDefaultCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, + /* OBJ_ACTOR_258 */ {(void*) Aquas_801B0EC0, 1, (ObjectFunc) Aquas_801B0B60, gCubeHitbox100, 200.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_259 */ {(void*) Aquas_801B619C, 2, (ObjectFunc) Aquas_801B638C, D_AQ_6031398, 10000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_260 */ {(void*) Aquas_801B90DC, 2, (ObjectFunc) Aquas_801B7C78, D_AQ_60313CC, 300.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_261 */ {(void*) Aquas_801B504C, 2, (ObjectFunc) Aquas_801B50E8, D_AQ_6031400, 300.0f, 0, 0, 40, 0, 0.0f, 1 }, /* OBJ_ACTOR_262 */ {(void*) Aquas_801B7A24, 2, (ObjectFunc) Aquas_801B6FF8, D_AQ_603144C, 2000.0f, 0, 0, 40, 0, 0.0f, 0 }, /* OBJ_ACTOR_263 */ {(void*) Aquas_801BA108, 2, (ObjectFunc) Aquas_801B91A4, D_AQ_6031480, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, - /* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, gDefaultCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ACTOR_264 */ {(void*) Aquas_801BA4E4, 1, (ObjectFunc) Aquas_801BA26C, gCubeHitbox100, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_265 */ {(void*) Aquas_801BAD7C, 1, (ObjectFunc) Aquas_801BA6A4, D_AQ_6031500, 200.0f, 0, 0, 40, 0, 0.0f, 1 }, /* OBJ_ACTOR_266 */ {(void*) Aquas_801BB204, 2, (ObjectFunc) Aquas_801BADF8, D_AQ_6031538, 200.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ACTOR_267 */ {(void*) Aquas_801BC930, 2, (ObjectFunc) Aquas_801BB79C, D_AQ_6031554, 800.0f, 0, 0, 40, 0, 0.0f, 0 }, @@ -367,24 +367,24 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ACTOR_271 */ {(void*) Actor271_Draw, 2, (ObjectFunc) Actor271_Update, D_BO_6011B24, 0.0f, 0, 0, 39, 0, 730.0f, 1 }, /* OBJ_ACTOR_272 */ {(void*) Actor272_Draw, 1, (ObjectFunc) Actor272_Update, D_BO_6011BF4, 0.0f, 0, 0, 39, 0, 150.0f, 1 }, /* OBJ_ACTOR_273 */ {(void*) Fortuna_80188FE4, 2, (ObjectFunc) Fortuna_80188AD0, D_FO_600FF30, 0.0f, 0, 0, 39, 0, 220.0f, 1 }, - /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gDefaultCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, - /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gDefaultCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, - /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, gHitboxNone, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, gHitboxNone, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_274 */ {(void*) SectorZ_8019E3A8, 1, (ObjectFunc) SectorZ_8019E234, gCubeHitbox200, 0.0f, 0, 0, 39, 0, 1.0f, 0 }, + /* OBJ_ACTOR_275 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_276 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox100, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_277 */ {(void*) Solar_8019F7AC, 1, (ObjectFunc) Solar_8019F20C, gCubeHitbox200, 200.0f, 0, 0, 39, 0, 1.0f, 1 }, + /* OBJ_ACTOR_278 */ {(void*) NULL, 1, (ObjectFunc) Solar_8019EA7C, gNoHitbox, 200.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* OBJ_ACTOR_279 */ {(void*) NULL, 1, (ObjectFunc) Solar_801A003C, gNoHitbox, 1000.0f, 0, 0, 0, 0, 0.0f, 1 }, /* OBJ_ACTOR_280 */ {(void*) D_VE1_900DD20, 0, (ObjectFunc) Venom1_80192518, D_VE1_601B7F8, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_281 */ {(void*) Venom1_80192E2C, 1, (ObjectFunc) Venom1_80192CD4, D_VE1_601B830, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_282 */ {(void*) D_VE1_901DA50, 0, (ObjectFunc) Venom1_80192CD4, D_VE1_601B868, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_283 */ {(void*) D_VE1_9023AD0, 0, (ObjectFunc) Venom1_80192EB0, D_VE1_601B8A0, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, /* OBJ_ACTOR_284 */ {(void*) Venom1_801934D0, 1, (ObjectFunc) Venom1_801933DC, D_VE1_601B8D8, 1000.0f, 0, 0, 40, 0, 0.0f, 0 }, - /* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, gDefaultCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, - /* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, gDefaultCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, gHitboxNone, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, - /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, gHitboxNone, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, gHitboxNone, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, - /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, gHitboxNone, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, - /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gDefaultCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, + /* OBJ_ACTOR_285 */ {(void*) Andross_80193244, 1, (ObjectFunc) Andross_80192E94, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 1.0f, 1 }, + /* OBJ_ACTOR_286 */ {(void*) Andross_80188660, 1, (ObjectFunc) Andross_80188528, gCubeHitbox100, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_287 */ {(void*) NULL, 1, (ObjectFunc) Andross_80189724, gNoHitbox, 1000.0f, 0, 0, 40, 1, 0.0f, 0 }, + /* OBJ_ACTOR_288 */ {(void*) NULL, 1, (ObjectFunc) Andross_801893B8, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_289 */ {(void*) func_edata_800596B0, 1, (ObjectFunc) Andross_80189470, gNoHitbox, 1000.0f, 0, 0, 20, 1, 0.0f, 0 }, + /* OBJ_ACTOR_290 */ {(void*) NULL, 1, (ObjectFunc) Andross_8018933C, gNoHitbox, 1000.0f, 0, 0, 20, 0, 0.0f, 0 }, + /* OBJ_ACTOR_SUPPLIES */ {(void*) ActorSupplies_Draw, 1, (ObjectFunc) ActorSupplies_Update, gCubeHitbox150, 1000.0f, 0, 0, 0, 0, 1.0f, 0 }, /* OBJ_BOSS_292 */ {(void*) Corneria_8018AA74, 2, (ObjectFunc) Corneria_80189058, D_CO_603E620, 20000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_293 */ {(void*) Corneria_8018ECAC, 1, (ObjectFunc) Corneria_8018C19C, D_CO_603E840, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_294 */ {(void*) Corneria_8018ED78, 1, (ObjectFunc) Corneria_8018DDAC, D_CO_603E714, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, @@ -392,8 +392,8 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_BOSS_296 */ {(void*) Corneria_8018EF90, 1, (ObjectFunc) Corneria_8018E76C, D_CO_603E7C4, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_297 */ {(void*) Meteo_8018BACC, 1, (ObjectFunc) Meteo_8018978C, D_ME_602F75C, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_298 */ {(void*) Meteo_801887D0, 1, (ObjectFunc) Meteo_80188344, D_ME_602FA50, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gHitboxNone, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gHitboxNone, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_299 */ {(void*) Boss299_Draw, 2, (ObjectFunc) Boss299_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_300 */ {(void*) Boss300_Draw, 1, (ObjectFunc) Boss300_Update, gNoHitbox, 20000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_301 */ {(void*) Aquas_801BEC5C, 1, (ObjectFunc) Aquas_801BEC50, D_AQ_6030B10, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_A6 */ {(void*) Area6_8018C54C, 1, (ObjectFunc) Area6_80187944, D_A6_6028454, 2000.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_303 */ {(void*) SectorX_80193434, 2, (ObjectFunc) SectorX_80190078, D_SX_6032550, 20000.0f, 0, 0, 20, 0, 0.0f, 10 }, @@ -402,13 +402,13 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_BOSS_306 */ {(void*) Titania_801982A8, 1, (ObjectFunc) Titania_80197A94,D_TI_801B83A8, 1000.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_ZO */ {(void*) Zoness_801949DC, 2, (ObjectFunc) Zoness_80194A84, D_ZO_602C044, 1000.0f, 0, 0, 40, 0, 1.0f, 10 }, /* OBJ_BOSS_308 */ {(void*) func_hud_8008FE78, 1, (ObjectFunc) func_hud_800907C4, D_FO_600FFE0, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, - /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gHitboxNone, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_309 */ {(void*) Boss309_Draw, 1, (ObjectFunc) Boss309_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, + /* OBJ_BOSS_310 */ {(void*) Boss310_Draw, 1, (ObjectFunc) Boss310_Update, gNoHitbox, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_311 */ {(void*) Bolse_80191AFC, 2, (ObjectFunc) Bolse_801912FC, D_BO_6011C80, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_312 */ {(void*) Venom2_80196288, 2, (ObjectFunc) Venom2_80196210, D_VE2_60166F4, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_313 */ {(void*) SectorZ_8019E98C, 1, (ObjectFunc) SectorZ_8019E454, D_SZ_6009388, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, - /* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, gHitboxNone, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_314 */ {(void*) SectorY_8019E2C4, 2, (ObjectFunc) SectorY_8019C888, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, + /* OBJ_BOSS_SO */ {(void*) Solar_801A71B8, 2, (ObjectFunc) Solar_801A5B3C, gNoHitbox, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_316 */ {(void*) Katina_801968F4, 1, (ObjectFunc) Katina_801946C4, D_KA_6011058, 0.0f, 0, 0, 40, 0, 0.0f, 10 }, /* OBJ_BOSS_317 */ {(void*) Katina_80193B1C, 1, (ObjectFunc) Katina_80193718, D_KA_601115C, 0.0f, 0, 0, 40, 1, 0.0f, 10 }, /* OBJ_BOSS_AQ */ {(void*) Aquas_801B4D84, 2, (ObjectFunc) Aquas_801B134C, D_AQ_6030F74, 10000.0f, 0, 0, 40, 0, 0.0f, 10 }, @@ -421,14 +421,14 @@ ObjectInfo D_edata_800CC124[0x190] = { /* OBJ_ITEM_SILVER_STAR */ {(void*) ItemSilverStar_Draw, 1, (ObjectFunc) ItemSilverStar_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_METEO_WARP */ {(void*) ItemMeteoWarp_Draw, 1, (ObjectFunc) ItemMeteoWarp_Update, gMeteoWarpHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_BOMB */ {(void*) ItemBomb_Draw, 1, (ObjectFunc) ItemPickup_Update, gItemBombHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_SPLIT_X */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_TURN_LEFT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_TURN_RIGHT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_SPLIT_Y */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_TURN_UP */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_PATH_TURN_DOWN */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, D_edata_800CBF8C, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_SPLIT_X */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_LEFT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_RIGHT */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_SPLIT_Y */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_UP */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_PATH_TURN_DOWN */ {(void*) NULL, 1, (ObjectFunc) ItemPathChange_Update, gItemPathChangeHitbox, 1500.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_RING_CHECK */ {(void*) NULL, 1, (ObjectFunc) ItemRingCheck_Update, gItemRingCheckHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gDefaultCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* OBJ_ITEM_1UP */ {(void*) D_1022120, 0, (ObjectFunc) Item1up_Update, gCubeHitbox100, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_GOLD_RING */ {(void*) ItemGoldRing_Draw, 1, (ObjectFunc) ItemGoldRing_Update, gItemSupplyRingHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_WING_REPAIR */ {(void*) D_arwing_3007650, 0, (ObjectFunc) ItemWingRepair_Update, gItemLasersHitbox, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, /* OBJ_ITEM_TRAINING_RING */ {(void*) gItemTrainingRingDL, 0, (ObjectFunc) Training_ItemRing_Update, D_TR_6009CFC, 700.0f, 0, 0, 0, 0, 0.0f, 0 }, diff --git a/src/engine/fox_edisplay.c b/src/engine/fox_edisplay.c index e2671bbe..c6218e05 100644 --- a/src/engine/fox_edisplay.c +++ b/src/engine/fox_edisplay.c @@ -98,15 +98,15 @@ void Actor202_Draw(Actor202* this) { Animation_DrawSkeleton(1, D_ME_601E9D0, sp30, NULL, func_edisplay_800599A4, &this->index, &gIdentityMatrix); } -void Obj39_Draw(Object80_39* this) { +void Obj39_Draw(Scenery_39* this) { gSPDisplayList(gMasterDisp++, D_ME_601AE40); } -void func_edisplay_80059B20(Object_80* obj80) { - if (obj80->obj.id == OBJ_80_29) { +void func_edisplay_80059B20(Scenery* scenery) { + if (scenery->obj.id == OBJ_SCENERY_29) { gSPDisplayList(gMasterDisp++, D_TI1_7007350); } else { - Graphics_SetScaleMtx(D_edisplay_800CF9B0[obj80->obj.id + 2]); + Graphics_SetScaleMtx(D_edisplay_800CF9B0[scenery->obj.id + 2]); gSPDisplayList(gMasterDisp++, D_TI1_700BB10); } } @@ -114,7 +114,7 @@ void func_edisplay_80059B20(Object_80* obj80) { void func_edisplay_80059BB0(void* arg0) { } -void Obj42_Draw(Object80_42* this) { +void Obj42_Draw(Scenery_42* this) { gSPDisplayList(gMasterDisp++, D_CO_6023AC0); } @@ -134,33 +134,33 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_47(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 180); switch (this->unk_45) { - case OBJ_80_0: + case OBJ_SCENERY_0: Matrix_Scale(gGfxMatrix, 2.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_80_21: + case OBJ_SCENERY_21: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 0.7f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_80_6: - case OBJ_80_7: + case OBJ_SCENERY_6: + case OBJ_SCENERY_7: Matrix_Scale(gGfxMatrix, 1.0f, 1.0f, 10.55f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_Gfx_800DAC20); break; - case OBJ_80_56: + case OBJ_SCENERY_56: Matrix_Scale(gGfxMatrix, 1.6f, 1.0f, 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_80_20: + case OBJ_SCENERY_20: Matrix_Scale(gGfxMatrix, 1.2f, 1.0f, 1.3f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); break; - case OBJ_80_22: + case OBJ_SCENERY_22: Matrix_Scale(gGfxMatrix, 2.2f, 1.0f, 1.4f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_6034B90); @@ -169,13 +169,13 @@ void FogShadow_Draw(FogShadow* this) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void func_edisplay_80059F68(Object_80* obj80) { +void func_edisplay_80059F68(Scenery* scenery) { Matrix_Translate(gGfxMatrix, 0.0f, 0.0f, -95.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_CO_602DA20); } -void func_edisplay_80059FDC(Object_80* obj80) { +void func_edisplay_80059FDC(Scenery* scenery) { gSPDisplayList(gMasterDisp++, D_CO_6035DA0); } @@ -940,13 +940,13 @@ void func_edisplay_8005D3CC(Object* obj, f32 xRot, f32 yRot, f32 zRot, s32 drawT } } -void Object_80_Draw(Object_80* this, s32 arg1) { +void Scenery_Draw(Scenery* this, s32 arg1) { this->obj.pos.y += gCameraShakeY; func_edisplay_8005D008(&this->obj, this->info.drawType); this->obj.pos.y -= gCameraShakeY; if (this->info.drawType == 0) { - if ((this->obj.id == OBJ_80_19) || (this->obj.id == OBJ_80_55) || (this->obj.id == OBJ_80_9) || - (this->obj.id == OBJ_80_50)) { + if ((this->obj.id == OBJ_SCENERY_19) || (this->obj.id == OBJ_SCENERY_55) || (this->obj.id == OBJ_SCENERY_9) || + (this->obj.id == OBJ_SCENERY_50)) { RCP_SetupDL_57(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); if (arg1 < 0) { @@ -955,7 +955,7 @@ void Object_80_Draw(Object_80* this, s32 arg1) { gSPDisplayList(gMasterDisp++, this->info.dList); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } else { - if (this->obj.id == OBJ_80_8) { + if (this->obj.id == OBJ_SCENERY_8) { if (arg1 < 0) { return; // weird control flow } @@ -966,7 +966,7 @@ void Object_80_Draw(Object_80* this, s32 arg1) { func_edisplay_800596C0(); } gSPDisplayList(gMasterDisp++, this->info.dList); - if (this->obj.id == OBJ_80_8) { + if (this->obj.id == OBJ_SCENERY_8) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } } @@ -1026,11 +1026,11 @@ void Actor_DrawOnRails(Actor* this) { Matrix_MultVec3f(gGfxMatrix, &sp34, &gTeamArrowsViewPos[this->aiType]); } } - if ((this->timer_0CA[0] != 0) && (gReflectY > 0)) { + if ((this->lockOnTimers[0] != 0) && (gReflectY > 0)) { sp34.y += this->info.unk_1C; Matrix_MultVec3f(gGfxMatrix, &sp34, &D_display_80161578[0]); if (D_display_80161578[0].z > -200.0f) { - this->timer_0CA[0] = 0; + this->lockOnTimers[0] = 0; } } } @@ -1113,17 +1113,17 @@ void Actor_DrawAllRange(Actor* this) { } } if (D_edisplay_801615EC == 0) { - this->timer_0CA[gPlayerNum] = 0; + this->lockOnTimers[gPlayerNum] = 0; if ((this->obj.id == OBJ_ACTOR_189) || (this->obj.id == OBJ_ACTOR_286)) { Object_Kill(&this->obj, this->sfxSource); } } for (var_v1 = 0; var_v1 < gCamCount; var_v1++) { - if (this->timer_0CA[var_v1] != 0) { + if (this->lockOnTimers[var_v1] != 0) { D_display_80161578[var_v1] = D_edisplay_801615E0; D_display_80161578[var_v1].y += this->info.unk_1C; if ((var_v1 == gPlayerNum) && (D_display_80161578[var_v1].z > -300.0f)) { - this->timer_0CA[var_v1] = 0; + this->lockOnTimers[var_v1] = 0; } } } @@ -1171,7 +1171,7 @@ void Boss_Draw(Boss* this, s32 arg1) { sp3C = 1.0f; if (this->obj.id != OBJ_BOSS_309) { if (this->obj.id != OBJ_BOSS_316) { - func_edisplay_8005F670(&this->obj.pos); + Display_SetSecondLight(&this->obj.pos); } if (this->info.drawType != 2) { Matrix_SetGfxMtx(&gMasterDisp); @@ -1187,7 +1187,7 @@ void Boss_Draw(Boss* this, s32 arg1) { D_edisplay_801615D0.y = sp3C; if (this->obj.id == OBJ_BOSS_309) { this->vwork[30] = D_edisplay_801615D0; - func_edisplay_8005F670(&this->obj.pos); + Display_SetSecondLight(&this->obj.pos); Matrix_SetGfxMtx(&gMasterDisp); this->info.draw(&this->obj); } @@ -1321,19 +1321,19 @@ void Object_DrawShadow(s32 index, Object* obj) { } else { switch (obj->id) { case OBJ_ACTOR_230: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[1], + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[1], obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; case OBJ_ACTOR_229: case OBJ_ACTOR_231: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gActors[index].fwork[0], + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gActors[index].fwork[0], obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; case OBJ_BOSS_316: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f + gCameraShakeY, obj->pos.z, MTXF_APPLY); break; default: - Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundLevel + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, obj->pos.x, gGroundHeight + 2.0f, obj->pos.z + D_ctx_80177D20, MTXF_APPLY); break; } if ((D_ctx_801784AC != 4) || (obj->id == OBJ_ACTOR_EVENT) || (obj->id == OBJ_ACTOR_195) || @@ -1419,7 +1419,7 @@ void func_edisplay_8005F290(f32* sfxSrc, Vec3f* pos) { Object_ClampSfxSource(sfxSrc); } -void Object_58_Draw(Object_58* this) { +void Scenery360_Draw(Scenery360* this) { Vec3f sp54 = { 0.0f, 0.0f, 0.0f }; Vec3f sp48; f32 sp44 = 1000.0f; @@ -1427,14 +1427,14 @@ void Object_58_Draw(Object_58* this) { f32 sp3C = 2000.0f; f32 sp38 = 0.5f; - if (this->obj.id == OBJ_80_156) { + if (this->obj.id == OBJ_SCENERY_156) { sp44 = 4000.0f; sp40 = -13000.0f; sp3C = 4500.0f; } else if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { sp40 = -20000.0f; sp38 = 0.4f; - } else if (this->obj.id == OBJ_80_143) { + } else if (this->obj.id == OBJ_SCENERY_143) { sp44 = 6000.0f; sp40 = -20000.0f; sp3C = 6000.0f; @@ -1449,8 +1449,8 @@ void Object_58_Draw(Object_58* this) { if ((sp48.z < sp44) && (sp40 < sp48.z)) { if (fabsf(sp48.y) < (fabsf(sp48.z * sp38) + sp3C)) { if (fabsf(sp48.x) < (fabsf(sp48.z * sp38) + sp3C)) { - func_edisplay_8005F670(&this->obj.pos); - if (this->obj.id == OBJ_80_131) { + Display_SetSecondLight(&this->obj.pos); + if (this->obj.id == OBJ_SCENERY_131) { Matrix_RotateY(gGfxMatrix, this->obj.rot.y * M_DTOR, MTXF_APPLY); Matrix_RotateX(gGfxMatrix, this->obj.rot.x * M_DTOR, MTXF_APPLY); Matrix_RotateZ(gGfxMatrix, this->obj.rot.z * M_DTOR, MTXF_APPLY); @@ -1468,7 +1468,7 @@ void Object_58_Draw(Object_58* this) { } } -void func_edisplay_8005F670(Vec3f* pos) { +void Display_SetSecondLight(Vec3f* pos) { Vec3f sp9C; f32 sp98; f32 sp94; @@ -1481,10 +1481,10 @@ void func_edisplay_8005F670(Vec3f* pos) { f32 temp3; f32 pad; - if (D_ctx_8017836C > 0.01f) { - sp9C.x = pos->x - D_ctx_80178370; - sp9C.y = pos->y - D_ctx_80178374; - sp9C.z = pos->z - D_ctx_80178378; + if (gLight3Brightness > 0.01f) { + sp9C.x = pos->x - gLight3x; + sp9C.y = pos->y - gLight3y; + sp9C.z = pos->z - gLight3z; temp_fv0 = VEC3F_MAG(&sp9C); if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { var_fs0 = 700.0f / temp_fv0; @@ -1509,9 +1509,9 @@ void func_edisplay_8005F670(Vec3f* pos) { sp6C.z = -100.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp6C, &sp84); Matrix_Pop(&gCalcMatrix); - temp1 = D_ctx_80178360 * D_ctx_8017836C * var_fs0; - temp2 = D_ctx_80178364 * D_ctx_8017836C * var_fs0; - temp3 = D_ctx_80178368 * D_ctx_8017836C * var_fs0; + temp1 = gLight3R * gLight3Brightness * var_fs0; + temp2 = gLight3G * gLight3Brightness * var_fs0; + temp3 = gLight3B * gLight3Brightness * var_fs0; Lights_SetTwoLights(&gMasterDisp, gLight1x, gLight1y, gLight1z, sp84.x, sp84.y, sp84.z, gLight1R, gLight1G, gLight1B, temp1, temp2, temp3, gAmbientR, gAmbientG, gAmbientB); } @@ -1544,40 +1544,40 @@ void Object_DrawAll(s32 arg0) { Actor* actor; Boss* boss; Sprite* sprite; - Object_58* obj58; + Scenery360* scenery360; Item* item; - Object_80* obj80; + Scenery* scenery; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gCurrentLevel != LEVEL_KATINA)) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); if (D_ctx_80177AB0 == 5) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if ((obj58->obj.status == OBJ_ACTIVE) && (obj58->obj.id != OBJ_80_147)) { + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && (scenery360->obj.id != OBJ_SCENERY_147)) { if (gCurrentLevel == LEVEL_BOLSE) { - spAC.x = obj58->sfxSource[0]; - spAC.y = obj58->sfxSource[1]; - spAC.z = obj58->sfxSource[2]; - Matrix_MultVec3fNoTranslate(&D_BO_8019EE80, &spAC, &obj58->obj.pos); - obj58->obj.rot.y = obj58->unk_54 + gBosses->obj.rot.y; + spAC.x = scenery360->sfxSource[0]; + spAC.y = scenery360->sfxSource[1]; + spAC.z = scenery360->sfxSource[2]; + Matrix_MultVec3fNoTranslate(&D_BO_8019EE80, &spAC, &scenery360->obj.pos); + scenery360->obj.rot.y = scenery360->unk_54 + gBosses->obj.rot.y; } Matrix_Push(&gGfxMatrix); - Object_58_Draw(obj58); + Scenery360_Draw(scenery360); Matrix_Pop(&gGfxMatrix); } } } else { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if (obj80->obj.status >= OBJ_ACTIVE) { + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if (scenery->obj.status >= OBJ_ACTIVE) { if (arg0 > 0) { - func_edisplay_8005F670(&obj80->obj.pos); + Display_SetSecondLight(&scenery->obj.pos); } Matrix_Push(&gGfxMatrix); - Object_80_Draw(obj80, arg0); + Scenery_Draw(scenery, arg0); Matrix_Pop(&gGfxMatrix); - func_edisplay_8005F1EC(obj80->sfxSource); + func_edisplay_8005F1EC(scenery->sfxSource); } } } @@ -1636,7 +1636,7 @@ void Object_DrawAll(s32 arg0) { Matrix_Push(&gGfxMatrix); if ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) || (gCurrentLevel == LEVEL_AQUAS)) { - func_edisplay_8005F670(&actor->obj.pos); + Display_SetSecondLight(&actor->obj.pos); } func_edisplay_800597C0(arg0); Actor_DrawOnRails(actor); diff --git a/src/engine/fox_effect.c b/src/engine/fox_effect.c index 616d3fbc..c7ddbfeb 100644 --- a/src/engine/fox_effect.c +++ b/src/engine/fox_effect.c @@ -663,14 +663,14 @@ void func_effect_80079618(f32 xPos, f32 yPos, f32 zPos, f32 scale2) { void func_effect_8007968C(Effect* effect) { if ((gCurrentLevel != LEVEL_MACBETH) || (effect->unk_44 != 7)) { - if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundLevel)) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundHeight)) { Object_Kill(&effect->obj, effect->sfxSource); } } else { if (((gGameFrameCount % 4) == 0)) { func_effect_8007D2C8(effect->obj.pos.x, effect->obj.pos.y + 550.0f, effect->obj.pos.z, 10.0f); } - if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundLevel - 100.0f))) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < (gGroundHeight - 100.0f))) { Object_Kill(&effect->obj, effect->sfxSource); } } @@ -712,7 +712,7 @@ void func_effect_800798F0(Effect* effect) { Vec3f frameJointTable[50]; if ((gCurrentLevel == LEVEL_BOLSE) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { - func_edisplay_8005F670(&effect->obj.pos); + Display_SetSecondLight(&effect->obj.pos); } RCP_SetupDL(&gMasterDisp, 0x1D); @@ -1041,7 +1041,7 @@ void func_effect_8007A994(Effect* effect) { effect->unk_4A++; } -static Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TR_6003760 }; +static Gfx* D_800D178C[] = { D_TI_6003440, D_TI_60034E0, D_TI_6003580, D_TI_6003620, D_TI_60036C0, D_TI_6003760 }; void func_effect_8007AA60(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x44); @@ -1076,7 +1076,7 @@ void func_effect_8007AC0C(Effect* effect, f32 xPos, f32 unused_posY, f32 zPos, f effect->obj.id = OBJ_EFFECT_372; effect->obj.pos.x = xPos; - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; effect->obj.pos.z = zPos; effect->unk_44 = 180; @@ -1106,7 +1106,7 @@ void func_effect_8007AD58(Effect* effect, f32 xPos, f32 unused_posY, f32 zPos, f effect->state = 1; effect->obj.pos.x = xPos; - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; effect->obj.pos.z = zPos; effect->unk_44 = 180; @@ -2005,14 +2005,14 @@ void func_effect_8007D2F4(Effect* effect) { } effect->unk_44 -= 15; } - if (D_ctx_8017836C < effect->scale1) { - D_ctx_8017836C = effect->scale1; - D_ctx_80178370 = effect->obj.pos.x; - D_ctx_80178374 = effect->obj.pos.y; - D_ctx_80178378 = effect->obj.pos.z; - D_ctx_80178360 = 255; - D_ctx_80178364 = 50; - D_ctx_80178368 = 0; + if (gLight3Brightness < effect->scale1) { + gLight3Brightness = effect->scale1; + gLight3x = effect->obj.pos.x; + gLight3y = effect->obj.pos.y; + gLight3z = effect->obj.pos.z; + gLight3R = 255; + gLight3G = 50; + gLight3B = 0; } Math_SmoothStepToF(&effect->scale1, 0.0f, 1.0f, 0.05f, 0.0f); } @@ -2093,14 +2093,14 @@ void func_effect_8007D748(Effect* effect) { } effect->unk_44 -= 15; } - if (D_ctx_8017836C < effect->scale1) { - D_ctx_8017836C = effect->scale1; - D_ctx_80178370 = effect->obj.pos.x; - D_ctx_80178374 = effect->obj.pos.y; - D_ctx_80178378 = effect->obj.pos.z; - D_ctx_80178360 = 255; - D_ctx_80178364 = 50; - D_ctx_80178368 = 0; + if (gLight3Brightness < effect->scale1) { + gLight3Brightness = effect->scale1; + gLight3x = effect->obj.pos.x; + gLight3y = effect->obj.pos.y; + gLight3z = effect->obj.pos.z; + gLight3R = 255; + gLight3G = 50; + gLight3B = 0; } Math_SmoothStepToF(&effect->scale1, 0, 1.0f, 0.1f, 0.0f); } @@ -2175,10 +2175,10 @@ void func_effect_8007DB70(Effect* effect) { case 0: effect->vel.y -= 0.5f; if ((effect->timer_50 == 0) && ((Object_CheckCollision(1000, &effect->obj.pos, &sp54, 1) != 0) || - (effect->obj.pos.y < (gGroundLevel + 10.0f)))) { + (effect->obj.pos.y < (gGroundHeight + 10.0f)))) { effect->vel.y = 0.0f; - if (effect->obj.pos.y < (gGroundLevel + 10.0f)) { - effect->obj.pos.y = gGroundLevel; + if (effect->obj.pos.y < (gGroundHeight + 10.0f)) { + effect->obj.pos.y = gGroundHeight; } effect->state = 1; effect->timer_50 = 30; @@ -2189,7 +2189,7 @@ void func_effect_8007DB70(Effect* effect) { func_effect_8007D0E0(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 7.0f); func_effect_8007BFFC(effect->obj.pos.x, effect->obj.pos.y + 30.0f, effect->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); - if ((effect->obj.pos.y < (gGroundLevel + 10.0f)) || (gGroundType != GROUNDTYPE_WATER)) { + if ((effect->obj.pos.y < (gGroundHeight + 10.0f)) || (gGroundType != GROUNDTYPE_WATER)) { func_beam_800365E4(effect->obj.pos.x, 3.0f, effect->obj.pos.z, effect->obj.pos.x, effect->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); break; @@ -2614,7 +2614,7 @@ void func_effect_8007F2FC(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } - if ((effect->obj.pos.y < gGroundLevel) && (gLevelType == LEVELTYPE_PLANET)) { + if ((effect->obj.pos.y < gGroundHeight) && (gLevelType == LEVELTYPE_PLANET)) { Object_Kill(&effect->obj, effect->sfxSource); } @@ -2720,7 +2720,7 @@ void func_effect_8007F6B0(Effect* effect) { temp = (i * 10.0f * M_DTOR) + randfloat; sin = __sinf(temp) * effect->scale2 * 8.0f; cos = __cosf(temp) * effect->scale2 * 8.0f; - yPos = gGroundLevel + 40.0f; + yPos = gGroundHeight + 40.0f; if (D_ctx_801784AC == 4) { Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z); @@ -2767,7 +2767,7 @@ void func_effect_8007F958(Effect* effect) { temp = (i * 72.0f * M_DTOR) + randFloat; sin = __sinf(temp) * effect->scale2 * 16.0f; cos = __cosf(temp) * effect->scale2 * 16.0f; - yPos = gGroundLevel + 10.0f; + yPos = gGroundHeight + 10.0f; if (D_ctx_801784AC == 4) { Ground_801B6E20(effect->obj.pos.x + sin, effect->obj.pos.z + cos + D_ctx_80177D20, &x, &y, &z); @@ -2808,7 +2808,7 @@ void func_effect_8007FBE0(Effect* effect) { temp = (i * 36.0f * M_DTOR) + randFloat; sin = __sinf(temp) * effect->scale2 * 16.0f; cos = __cosf(temp) * effect->scale2 * 16.0f; - yPos = gGroundLevel + 10.0f; + yPos = gGroundHeight + 10.0f; func_effect_8007BC7C(effect->obj.pos.x + sin, yPos, effect->obj.pos.z + cos, 12.0f); } } @@ -2899,10 +2899,10 @@ void func_effect_8007FE88(Effect* effect) { if (Ground_801B6AEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z + D_ctx_80177D20) != 0) { Object_Kill(&effect->obj, effect->sfxSource); } - } else if (effect->obj.pos.y < gGroundLevel) { + } else if (effect->obj.pos.y < gGroundHeight) { Object_Kill(&effect->obj, effect->sfxSource); if (gGroundType != GROUNDTYPE_WATER) { - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } } @@ -3030,10 +3030,10 @@ void func_effect_8008040C(Effect* effect) { 0) { Object_Kill(&effect->obj, effect->sfxSource); } - } else if (effect->obj.pos.y < gGroundLevel) { + } else if (effect->obj.pos.y < gGroundHeight) { Object_Kill(&effect->obj, effect->sfxSource); if (gGroundType != GROUNDTYPE_WATER) { - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; func_effect_8007D074(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 2.0f); } } @@ -3116,7 +3116,7 @@ void func_effect_80080ACC(Effect* effect) { effect->obj.rot.x += effect->unk_60.x; effect->obj.rot.y += effect->unk_60.y; effect->obj.rot.z += effect->unk_60.z; - if ((effect->unk_44 == 0) && (effect->obj.pos.y < gGroundLevel)) { + if ((effect->unk_44 == 0) && (effect->obj.pos.y < gGroundHeight)) { Object_Kill(&effect->obj, effect->sfxSource); } if (effect->unk_44 != 0) { @@ -3624,7 +3624,7 @@ void func_effect_80081C5C(Effect* effect) { effect->obj.rot.y += effect->unk_60.y; effect->obj.rot.z += effect->unk_60.z; effect->vel.y -= 0.5f; - if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundLevel)) { + if ((effect->timer_50 == 0) || (effect->obj.pos.y < gGroundHeight)) { Object_Kill(&effect->obj, effect->sfxSource); } break; diff --git a/src/engine/fox_enmy.c b/src/engine/fox_enmy.c index a1fbbd06..a277bb15 100644 --- a/src/engine/fox_enmy.c +++ b/src/engine/fox_enmy.c @@ -29,7 +29,7 @@ ObjectInit* gLevelObjectInits[] = { D_FO_600EAD4, NULL, D_KA_6011044, D_BO_600FF74, D_SZ_6006EB4, D_VE2_6014D94, D_versus_302DE3C, }; static s32 D_enmy_800CFDF4[] = { - /* 0 */ OBJ_80_0, + /* 0 */ OBJ_SCENERY_0, /* 1 */ OBJ_ITEM_SILVER_RING, /* 2 */ OBJ_ITEM_SILVER_RING, /* 3 */ OBJ_ITEM_SILVER_RING, @@ -53,7 +53,7 @@ static s32 D_enmy_800CFDF4[] = { /* 21 */ OBJ_ITEM_SILVER_RING, /* 22 */ OBJ_ITEM_SILVER_RING, /* 23 */ OBJ_ITEM_WING_REPAIR, - /* 24 */ OBJ_80_0, + /* 24 */ OBJ_SCENERY_0, /* 25 */ OBJ_ITEM_SILVER_STAR, }; static f32 D_enmy_800CFE5C[] = { @@ -139,11 +139,11 @@ void Object_SetInfo(ObjectInfo* info, u32 objId) { } } -void Object_80_Initialize(Object_80* obj80) { +void Scenery_Initialize(Scenery* scenery) { s32 i; - u8* ptr = (u8*) obj80; + u8* ptr = (u8*) scenery; - for (i = 0; i < sizeof(Object_80); i++, ptr++) { + for (i = 0; i < sizeof(Scenery); i++, ptr++) { *ptr = 0; } } @@ -196,18 +196,18 @@ void Effect_Initialize(Effect* effect) { effect->scale2 = 1.0f; } -void Object_80_Load(Object_80* obj80, ObjectInit* objInit) { - Object_80_Initialize(obj80); - obj80->obj.status = OBJ_INIT; - obj80->obj.pos.z = -objInit->zPos1; - obj80->obj.pos.z += -3000.0f + objInit->zPos2; - obj80->obj.pos.x = objInit->xPos; - obj80->obj.pos.y = objInit->yPos; - obj80->obj.rot.x = objInit->rot.x; - obj80->obj.rot.y = objInit->rot.y; - obj80->obj.rot.z = objInit->rot.z; - obj80->obj.id = objInit->id; - Object_SetInfo(&obj80->info, obj80->obj.id); +void Scenery_Load(Scenery* scenery, ObjectInit* objInit) { + Scenery_Initialize(scenery); + scenery->obj.status = OBJ_INIT; + scenery->obj.pos.z = -objInit->zPos1; + scenery->obj.pos.z += -3000.0f + objInit->zPos2; + scenery->obj.pos.x = objInit->xPos; + scenery->obj.pos.y = objInit->yPos; + scenery->obj.rot.x = objInit->rot.x; + scenery->obj.rot.y = objInit->rot.y; + scenery->obj.rot.z = objInit->rot.z; + scenery->obj.id = objInit->id; + Object_SetInfo(&scenery->info, scenery->obj.id); } void Sprite_Load(Sprite* sprite, ObjectInit* objInit) { @@ -319,7 +319,7 @@ void func_enmy_80061B68(void) { x = gPlayer[0].pos.x + RAND_FLOAT_CENTERED(2000.0f) + (5.0f * gPlayer[0].vel.x); y = 0; - while (y <= gGroundLevel) { + while (y <= gGroundHeight) { y = gPlayer[0].pos.y + RAND_FLOAT_CENTERED(2000.0f) + (5.0f * gPlayer[0].vel.y); } z = -D_ctx_80177D20 - 3000.0f; @@ -411,9 +411,9 @@ void Object_Load(ObjectInit* objInit, f32 xMax, f32 xMin, f32 yMax, f32 yMin) { if ((xMax > objInit->xPos - gPlayer[0].unk_0AC) && (objInit->xPos - gPlayer[0].unk_0AC > xMin) && (yMax > objInit->yPos - gPlayer[0].unk_0B0) && (objInit->yPos - gPlayer[0].unk_0B0 > yMin)) { if (objInit->id < OBJ_SPRITE_CO_POLE) { - for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { - if (gObjects80[i].obj.status == OBJ_FREE) { - Object_80_Load(&gObjects80[i], objInit); + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + if (gScenery[i].obj.status == OBJ_FREE) { + Scenery_Load(&gScenery[i], objInit); break; } } @@ -526,13 +526,13 @@ void Object_LoadFromInit(void) { s32 i; s32 j; - if ((gCurrentLevel == LEVEL_METEO) && (gLevelStage == 1)) { + if ((gCurrentLevel == LEVEL_METEO) && (gLevelPhase == 1)) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_ME_602B148); - } else if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelStage == 1)) { + } else if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelPhase == 1)) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_SX_602F18C); - } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { + } else if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C0356A4); - } else if ((gCurrentLevel == LEVEL_VENOM_1) && (gLevelStage == 1)) { + } else if ((gCurrentLevel == LEVEL_VENOM_1) && (gLevelPhase == 1)) { gLevelObjects = SEGMENTED_TO_VIRTUAL(D_VE1_6010088); } else { gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); @@ -595,7 +595,7 @@ void func_enmy_80062B60(f32 xPos, f32 zPos, s32 state, f32 scale) { gEffects[i].obj.status = OBJ_INIT; gEffects[i].obj.id = OBJ_EFFECT_348; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = gGroundLevel + 3.0f; + gEffects[i].obj.pos.y = gGroundHeight + 3.0f; gEffects[i].obj.pos.z = zPos; gEffects[i].scale2 = 10.0f; gEffects[i].scale1 = scale; @@ -618,7 +618,7 @@ void func_enmy_80062C38(f32 xPos, f32 yPos) { gEffects[i].obj.status = OBJ_INIT; gEffects[i].obj.id = OBJ_EFFECT_349; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = gGroundLevel + 3.0f; + gEffects[i].obj.pos.y = gGroundHeight + 3.0f; gEffects[i].obj.pos.z = yPos; gEffects[i].scale2 = 1.0f; gEffects[i].scale1 = 1.3f; @@ -639,7 +639,7 @@ void func_enmy_80062D04(f32 xPos, f32 yPos) { gEffects[i].obj.status = OBJ_INIT; gEffects[i].obj.id = OBJ_EFFECT_350; gEffects[i].obj.pos.x = xPos; - gEffects[i].obj.pos.y = gGroundLevel + 3.0f; + gEffects[i].obj.pos.y = gGroundHeight + 3.0f; gEffects[i].obj.pos.z = yPos; gEffects[i].scale2 = 3.0f; gEffects[i].scale1 = 2.0f; @@ -745,21 +745,22 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o objPos.x = obj->pos.x; objPos.y = obj->pos.y; objPos.z = obj->pos.z; - if ((objId == OBJ_ACTOR_180) || (objId == OBJ_80_149) || (objId == OBJ_80_150) || (objId == OBJ_BOSS_308) || - (objId == OBJ_BOSS_313) || (objId == OBJ_BOSS_312) || (objId == OBJ_BOSS_309) || (objId == OBJ_80_39)) { + if ((objId == OBJ_ACTOR_180) || (objId == OBJ_SCENERY_149) || (objId == OBJ_SCENERY_150) || + (objId == OBJ_BOSS_308) || (objId == OBJ_BOSS_313) || (objId == OBJ_BOSS_312) || (objId == OBJ_BOSS_309) || + (objId == OBJ_SCENERY_39)) { colId = COL1_0; if (objId == OBJ_BOSS_312) { colId = COL1_9; } - if (objId == OBJ_80_39) { + if (objId == OBJ_SCENERY_39) { colId = COL1_1; } else if (objId == OBJ_BOSS_308) { colId = COL1_4; } else if (objId == OBJ_BOSS_309) { colId = COL1_7; - } else if (objId == OBJ_80_149) { + } else if (objId == OBJ_SCENERY_149) { colId = COL1_5; - } else if (objId == OBJ_80_150) { + } else if (objId == OBJ_SCENERY_150) { colId = COL1_6; } else if (objId == OBJ_BOSS_313) { colId = COL1_8; @@ -769,21 +770,21 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o } } else { colId = COL2_0; - if (objId == OBJ_80_2) { + if (objId == OBJ_SCENERY_2) { colId = COL2_2; } - if (objId == OBJ_80_3) { + if (objId == OBJ_SCENERY_3) { colId = COL2_3; } - if (objId == OBJ_80_140) { + if (objId == OBJ_SCENERY_140) { colId = COL2_4; } - if (objId == OBJ_80_141) { + if (objId == OBJ_SCENERY_141) { colId = COL2_6; } - if (objId == OBJ_80_117) { + if (objId == OBJ_SCENERY_117) { colId = COL2_14; - } else if ((objId == OBJ_80_4) || (objId == OBJ_80_5)) { + } else if ((objId == OBJ_SCENERY_4) || (objId == OBJ_SCENERY_5)) { colId = COL2_1; } if (func_col2_800A3690(&relPos, &objPos, colId, &sp44)) { @@ -795,8 +796,8 @@ bool Object_CheckPolyCollision(Vec3f* pos, Vec3f* vel, ObjectId objId, Object* o } s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { - Object_58* obj58; - Object_80* obj80; + Scenery360* scenery360; + Scenery* scenery; Sprite* sprite; Boss* boss; Actor* actor; @@ -804,34 +805,37 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { s32 i; if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gCurrentLevel != LEVEL_KATINA)) { - obj58 = gObjects58; - for (i = 0; i < 200; i++, obj58++) { - if (obj58->obj.status == OBJ_ACTIVE) { - if ((obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3) || (obj58->obj.id == OBJ_80_117) || - (obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) || - (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_140)) { - if (Object_CheckPolyCollision(pos, vel, obj58->obj.id, &obj58->obj)) { + scenery360 = gScenery360; + for (i = 0; i < 200; i++, scenery360++) { + if (scenery360->obj.status == OBJ_ACTIVE) { + if ((scenery360->obj.id == OBJ_SCENERY_1) || (scenery360->obj.id == OBJ_SCENERY_3) || + (scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_141) || + (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_140)) { + if (Object_CheckPolyCollision(pos, vel, scenery360->obj.id, &scenery360->obj)) { return 999; } - } else if ((fabsf(pos->x - obj58->obj.pos.x) < 2000.0f) && - (fabsf(pos->z - obj58->obj.pos.z) < 2000.0f)) { - if (Object_CheckHitboxCollision(pos, obj58->info.hitbox, &obj58->obj, 0.0f, 0.0f, 0.0f)) { + } else if ((fabsf(pos->x - scenery360->obj.pos.x) < 2000.0f) && + (fabsf(pos->z - scenery360->obj.pos.z) < 2000.0f)) { + if (Object_CheckHitboxCollision(pos, scenery360->info.hitbox, &scenery360->obj, 0.0f, 0.0f, 0.0f)) { return 2; } } } } } - obj80 = gObjects80; - for (i = 0; (i < ARRAY_COUNT(gObjects80)) && (gLevelMode == LEVELMODE_ON_RAILS); i++, obj80++) { - if (obj80->obj.status == OBJ_ACTIVE) { - if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5) || - (obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_39) || (obj80->obj.id == OBJ_80_3)) { - if (Object_CheckPolyCollision(pos, vel, obj80->obj.id, &obj80->obj)) { + scenery = gScenery; + for (i = 0; (i < ARRAY_COUNT(gScenery)) && (gLevelMode == LEVELMODE_ON_RAILS); i++, scenery++) { + if (scenery->obj.status == OBJ_ACTIVE) { + if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || + (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_2) || + (scenery->obj.id == OBJ_SCENERY_39) || (scenery->obj.id == OBJ_SCENERY_3)) { + if (Object_CheckPolyCollision(pos, vel, scenery->obj.id, &scenery->obj)) { return 2; } - } else if ((fabsf(pos->x - obj80->obj.pos.x) < 2000.0f) && (fabsf(pos->z - obj80->obj.pos.z) < 2000.0f)) { - if (Object_CheckHitboxCollision(pos, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f)) { + } else if ((fabsf(pos->x - scenery->obj.pos.x) < 2000.0f) && + (fabsf(pos->z - scenery->obj.pos.z) < 2000.0f)) { + if (Object_CheckHitboxCollision(pos, scenery->info.hitbox, &scenery->obj, 0.0f, 0.0f, 0.0f)) { return i + 10; } } @@ -901,9 +905,9 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { actor->unk_0D0 = 1; actor->damage = 10; actor->unk_0D2 = -1; - actor->unk_0D8.x = pos->x; - actor->unk_0D8.y = pos->y; - actor->unk_0D8.z = pos->z; + actor->hitPos.x = pos->x; + actor->hitPos.y = pos->y; + actor->hitPos.z = pos->z; return 2; } } else if ((mode != 2) && (mode != 3)) { @@ -916,9 +920,9 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { ((actor->aiType < AI360_10) || (actor->aiType >= AI360_GREAT_FOX))))) { actor->health = 0; } - actor->unk_0D8.x = pos->x; - actor->unk_0D8.y = pos->y; - actor->unk_0D8.z = pos->z; + actor->hitPos.x = pos->x; + actor->hitPos.y = pos->y; + actor->hitPos.z = pos->z; return 1; } } @@ -928,7 +932,7 @@ s32 Object_CheckCollision(s32 index, Vec3f* pos, Vec3f* vel, s32 mode) { return 0; } -void func_enmy_80063CAC(Object_80* obj80) { +void func_enmy_80063CAC(Scenery* scenery) { s32 i; for (i = 0; i < ARRAY_COUNT(gActors); i++) { @@ -936,9 +940,9 @@ void func_enmy_80063CAC(Object_80* obj80) { Actor_Initialize(&gActors[i]); gActors[i].obj.status = OBJ_INIT; gActors[i].obj.id = OBJ_ACTOR_193; - gActors[i].obj.pos.x = obj80->obj.pos.x; - gActors[i].obj.pos.y = obj80->obj.pos.y; - gActors[i].obj.pos.z = obj80->obj.pos.z; + gActors[i].obj.pos.x = scenery->obj.pos.x; + gActors[i].obj.pos.y = scenery->obj.pos.y; + gActors[i].obj.pos.z = scenery->obj.pos.z; gActors[i].obj.rot.y = RAND_FLOAT(360.0f); Object_SetInfo(&gActors[i].info, gActors[i].obj.id); break; @@ -946,23 +950,24 @@ void func_enmy_80063CAC(Object_80* obj80) { } } -void func_enmy_80063D58(Object_80* obj80) { +void func_enmy_80063D58(Scenery* scenery) { s32 i; - obj80->obj.pos.y = gGroundLevel; + scenery->obj.pos.y = gGroundHeight; for (i = 0; i < ARRAY_COUNT(gSprites); i++) { if (gSprites[i].obj.status == OBJ_FREE) { Sprite_Initialize(&gSprites[i]); gSprites[i].obj.status = OBJ_INIT; gSprites[i].obj.id = OBJ_SPRITE_FOG_SHADOW; - gSprites[i].unk_45 = obj80->obj.id; - gSprites[i].obj.pos.x = obj80->obj.pos.x; + gSprites[i].unk_45 = scenery->obj.id; + gSprites[i].obj.pos.x = scenery->obj.pos.x; gSprites[i].obj.pos.y = 5.0f; - gSprites[i].obj.pos.z = obj80->obj.pos.z; - if ((obj80->obj.id == OBJ_80_0) || (obj80->obj.id == OBJ_80_6) || (obj80->obj.id == OBJ_80_7) || - (obj80->obj.id == OBJ_80_56) || (obj80->obj.id == OBJ_80_20) || (obj80->obj.id == OBJ_80_21) || - (obj80->obj.id == OBJ_80_22)) { - gSprites[i].obj.rot.y = obj80->obj.rot.y; + gSprites[i].obj.pos.z = scenery->obj.pos.z; + if ((scenery->obj.id == OBJ_SCENERY_0) || (scenery->obj.id == OBJ_SCENERY_6) || + (scenery->obj.id == OBJ_SCENERY_7) || (scenery->obj.id == OBJ_SCENERY_56) || + (scenery->obj.id == OBJ_SCENERY_20) || (scenery->obj.id == OBJ_SCENERY_21) || + (scenery->obj.id == OBJ_SCENERY_22)) { + gSprites[i].obj.rot.y = scenery->obj.rot.y; } else { gSprites[i].obj.rot.y = 44.9f; } @@ -972,7 +977,7 @@ void func_enmy_80063D58(Object_80* obj80) { } } -void func_enmy_80063E5C(Object_80* obj80, f32* hitboxData) { +void func_enmy_80063E5C(Scenery* scenery, f32* hitboxData) { s32 i; Item* item; @@ -981,10 +986,10 @@ void func_enmy_80063E5C(Object_80* obj80, f32* hitboxData) { Item_Initialize(&gItems[i]); item->obj.status = OBJ_INIT; item->obj.id = OBJ_ITEM_RING_CHECK; - item->obj.pos.x = obj80->obj.pos.x; - item->obj.pos.y = obj80->obj.pos.y; - item->obj.pos.z = obj80->obj.pos.z; - item->obj.rot.y = obj80->obj.rot.y; + item->obj.pos.x = scenery->obj.pos.x; + item->obj.pos.y = scenery->obj.pos.y; + item->obj.pos.z = scenery->obj.pos.z; + item->obj.rot.y = scenery->obj.rot.y; Object_SetInfo(&item->info, item->obj.id); item->info.hitbox = SEGMENTED_TO_VIRTUAL(hitboxData); break; @@ -1018,8 +1023,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_ACTOR_234: AUDIO_PLAY_SFX(0x11030010, gActors[index].sfxSource, 0); break; - case OBJ_80_54: - AUDIO_PLAY_SFX(0x11000000, gObjects80[index].sfxSource, 0); + case OBJ_SCENERY_54: + AUDIO_PLAY_SFX(0x11000000, gScenery[index].sfxSource, 0); break; case OBJ_ACTOR_TEAM_BOSS: ActorTeamBoss_Init(&gActors[index]); @@ -1041,35 +1046,35 @@ void Object_Init(s32 index, ObjectId objId) { gEffects[index].obj.status = OBJ_FREE; } break; - case OBJ_80_30: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006940); + case OBJ_SCENERY_30: + func_enmy_80063E5C(&gScenery[index], D_TI_6006940); break; - case OBJ_80_31: - func_enmy_80063E5C(&gObjects80[index], D_TI_600695C); + case OBJ_SCENERY_31: + func_enmy_80063E5C(&gScenery[index], D_TI_600695C); break; - case OBJ_80_32: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006978); + case OBJ_SCENERY_32: + func_enmy_80063E5C(&gScenery[index], D_TI_6006978); break; - case OBJ_80_33: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006994); + case OBJ_SCENERY_33: + func_enmy_80063E5C(&gScenery[index], D_TI_6006994); break; - case OBJ_80_34: - func_enmy_80063E5C(&gObjects80[index], D_TI_60069B0); + case OBJ_SCENERY_34: + func_enmy_80063E5C(&gScenery[index], D_TI_60069B0); break; - case OBJ_80_35: - func_enmy_80063E5C(&gObjects80[index], D_TI_60069CC); + case OBJ_SCENERY_35: + func_enmy_80063E5C(&gScenery[index], D_TI_60069CC); break; - case OBJ_80_36: - func_enmy_80063E5C(&gObjects80[index], D_TI_60069E8); + case OBJ_SCENERY_36: + func_enmy_80063E5C(&gScenery[index], D_TI_60069E8); break; - case OBJ_80_37: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006A04); + case OBJ_SCENERY_37: + func_enmy_80063E5C(&gScenery[index], D_TI_6006A04); break; - case OBJ_80_38: - func_enmy_80063E5C(&gObjects80[index], D_TI_6006A20); + case OBJ_SCENERY_38: + func_enmy_80063E5C(&gScenery[index], D_TI_6006A20); break; - case OBJ_80_23: - func_enmy_80063CAC(&gObjects80[index]); + case OBJ_SCENERY_23: + func_enmy_80063CAC(&gScenery[index]); break; case OBJ_ITEM_CHECKPOINT: if (D_ctx_80177CA0 != 0) { @@ -1098,16 +1103,16 @@ void Object_Init(s32 index, ObjectId objId) { gItems[index].obj.status = OBJ_FREE; } break; - case OBJ_80_0: - func_enmy_80063E5C(&gObjects80[index], gItemRingCheckHitbox); + case OBJ_SCENERY_0: + func_enmy_80063E5C(&gScenery[index], gItemRingCheckHitbox); /* fallthrough */ - case OBJ_80_6: - case OBJ_80_7: - case OBJ_80_20: - case OBJ_80_21: - case OBJ_80_22: - case OBJ_80_56: - func_enmy_80063D58(&gObjects80[index]); + case OBJ_SCENERY_6: + case OBJ_SCENERY_7: + case OBJ_SCENERY_20: + case OBJ_SCENERY_21: + case OBJ_SCENERY_22: + case OBJ_SCENERY_56: + func_enmy_80063D58(&gScenery[index]); break; case OBJ_ACTOR_187: gActors[index].fwork[0] = gActors[index].obj.pos.x; @@ -1217,8 +1222,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_ACTOR_218: Macbeth_801A6134(&gActors[index]); break; - case OBJ_80_65: - Macbeth_801A65E0(&gObjects80[index]); + case OBJ_SCENERY_65: + Macbeth_801A65E0(&gScenery[index]); break; case OBJ_ACTOR_177: case OBJ_ACTOR_178: @@ -1309,8 +1314,8 @@ void Object_Init(s32 index, ObjectId objId) { case OBJ_ACTOR_260: Aquas_801B7AF0(&gActors[index]); break; - case OBJ_80_57: - Titania_8018F0D8(&gObjects80[index]); + case OBJ_SCENERY_57: + Titania_8018F0D8(&gScenery[index]); break; case OBJ_BOSS_319: Venom1_Boss319_Init(&gBosses[index]); @@ -1337,17 +1342,17 @@ void Object_Init(s32 index, ObjectId objId) { } } -void func_enmy_800652CC(Object_80* obj80) { +void func_enmy_800652CC(Scenery* scenery) { f32 sp2C; f32 sp28; f32 sp24; - if ((D_ctx_801784AC == 4) && (obj80->state == 0)) { - Ground_801B6E20(obj80->obj.pos.x, obj80->obj.pos.z + D_ctx_80177D20, &sp2C, &sp24, &sp28); - obj80->obj.pos.y = sp24 + 3.0f; - obj80->obj.rot.x = RAD_TO_DEG(sp2C); - obj80->obj.rot.z = RAD_TO_DEG(sp28); - obj80->state++; + if ((D_ctx_801784AC == 4) && (scenery->state == 0)) { + Ground_801B6E20(scenery->obj.pos.x, scenery->obj.pos.z + D_ctx_80177D20, &sp2C, &sp24, &sp28); + scenery->obj.pos.y = sp24 + 3.0f; + scenery->obj.rot.x = RAD_TO_DEG(sp2C); + scenery->obj.rot.z = RAD_TO_DEG(sp28); + scenery->state++; } } @@ -1580,7 +1585,7 @@ void func_enmy_800656D4(Actor* actor) { sp8C.y = actor->vel.y; sp8C.z = actor->vel.z; if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp8C, 1) != 0) || (actor->unk_0D0 != 0) || - (actor->obj.pos.y < (gGroundLevel + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { + (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 3.0f); Object_Kill(&actor->obj, actor->sfxSource); if (actor->unk_0D0 != 0) { @@ -1705,8 +1710,8 @@ void Actor_Despawn(Actor* actor) { void func_enmy_8006654C(Actor* actor) { actor->gravity = 0.4f; - if (actor->obj.pos.y <= gGroundLevel + 130.0f) { - actor->obj.pos.y = gGroundLevel + 130.0f; + if (actor->obj.pos.y <= gGroundHeight + 130.0f) { + actor->obj.pos.y = gGroundHeight + 130.0f; actor->vel.y = 0.0f; } actor->vel.x = SIN_DEG(actor->obj.rot.y) * actor->fwork[0]; @@ -1807,62 +1812,63 @@ void func_enmy_800669A0(Actor* actor) { void func_enmy_80066A80(Actor* actor) { } -void func_enmy_80066A8C(Object_80* obj80) { +void func_enmy_80066A8C(Scenery* scenery) { Vec3f sp64; Vec3f sp58; f32 yf; sp64.z = 0.0f; sp64.x = -120.0f; - if (obj80->obj.rot.y > 90.0f) { + if (scenery->obj.rot.y > 90.0f) { sp64.x = 120.0f; } for (yf = 0.0f; yf < 680.0f; yf += 100.0f) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); sp64.y = yf; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - func_effect_8007D0E0(obj80->obj.pos.x + sp58.x, obj80->obj.pos.y + sp58.y, obj80->obj.pos.z + sp58.z, 4.0f); + func_effect_8007D0E0(scenery->obj.pos.x + sp58.x, scenery->obj.pos.y + sp58.y, scenery->obj.pos.z + sp58.z, + 4.0f); } } -void func_enmy_80066C00(Object_80* obj80) { +void func_enmy_80066C00(Scenery* scenery) { Vec3f sp64; Vec3f sp58; f32 zf; sp64.y = 30.0f; sp64.x = -100.0f; - if (obj80->obj.rot.y > 90.0f) { + if (scenery->obj.rot.y > 90.0f) { sp64.x = 100.0f; } - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); for (zf = -180.0f; zf <= 0.0f; zf += 30.0f) { sp64.z = zf; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp64, &sp58); - func_effect_8007D0E0(obj80->obj.pos.x + sp58.x, obj80->obj.pos.y + sp58.y, obj80->obj.pos.z + sp58.z, + func_effect_8007D0E0(scenery->obj.pos.x + sp58.x, scenery->obj.pos.y + sp58.y, scenery->obj.pos.z + sp58.z, RAND_FLOAT(1.0f) + 2.0f); } } -void func_enmy_80066D5C(Object_80* obj80) { - switch (obj80->state) { +void func_enmy_80066D5C(Scenery* scenery) { + switch (scenery->state) { case 1: - func_enmy_80066C00(obj80); - obj80->state++; - AUDIO_PLAY_SFX(0x2900300F, obj80->sfxSource, 4); + func_enmy_80066C00(scenery); + scenery->state++; + AUDIO_PLAY_SFX(0x2900300F, scenery->sfxSource, 4); break; case 2: - obj80->vel.x += 0.05f; - obj80->obj.rot.x += obj80->vel.x; - if (obj80->obj.rot.x >= 90.0f) { - obj80->obj.rot.x = 90.0f; - obj80->unk_44 = 40; - func_enmy_80066A8C(obj80); - obj80->state = 0; + scenery->vel.x += 0.05f; + scenery->obj.rot.x += scenery->vel.x; + if (scenery->obj.rot.x >= 90.0f) { + scenery->obj.rot.x = 90.0f; + scenery->unk_44 = 40; + func_enmy_80066A8C(scenery); + scenery->state = 0; gCameraShake = 25; - AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); + AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); } break; case 0: @@ -1870,17 +1876,17 @@ void func_enmy_80066D5C(Object_80* obj80) { } } -void func_enmy_80066E80(Object_80* obj80) { +void func_enmy_80066E80(Scenery* scenery) { } void Sprite167_Update(Sprite167* this) { this->obj.rot.y += 0.2f; } -void func_enmy_80066EA8(Object_80* obj80) { - obj80->obj.rot.y = 0.0f; - if (gPlayer[0].cam.eye.x < obj80->obj.pos.x) { - obj80->obj.rot.y = 271.0f; +void func_enmy_80066EA8(Scenery* scenery) { + scenery->obj.rot.y = 0.0f; + if (gPlayer[0].cam.eye.x < scenery->obj.pos.x) { + scenery->obj.rot.y = 271.0f; } } @@ -1909,8 +1915,8 @@ void func_enmy_80066EF0(Item* item) { Math_SmoothStepToF(&item->obj.pos.y, 650.0f, 0.1f, 10.0f, 0.01f); } if (gLevelType == LEVELTYPE_PLANET) { - if (item->obj.pos.y < gGroundLevel + 70.0f) { - Math_SmoothStepToF(&item->obj.pos.y, gGroundLevel + 70.0f, 0.1f, 5.0f, 0.01f); + if (item->obj.pos.y < gGroundHeight + 70.0f) { + Math_SmoothStepToF(&item->obj.pos.y, gGroundHeight + 70.0f, 0.1f, 5.0f, 0.01f); } if ((gCurrentLevel == LEVEL_AQUAS) && (gBossActive != 0)) { item->obj.pos.z += 20.0f; @@ -2347,7 +2353,7 @@ void ItemPathChange_Update(Item* this) { gLastPathChange = this->obj.id; if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_ACTIVE) { Object_Kill(&this->obj, this->sfxSource); - } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelStage == 1)) { + } else if (((gCurrentLevel == LEVEL_METEO) || (gCurrentLevel == LEVEL_SECTOR_X)) && (gLevelPhase == 1)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; Object_Kill(&this->obj, this->sfxSource); @@ -2540,17 +2546,17 @@ void Boss_Move(Boss* boss) { } } -void Object80_Move(Object_80* obj80) { +void Scenery_Move(Scenery* scenery) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) { - obj80->obj.pos.z += obj80->unk_60; - if (obj80->info.unk_10 < obj80->obj.pos.z) { - Object_Kill(&obj80->obj, obj80->sfxSource); + scenery->obj.pos.z += scenery->unk_60; + if (scenery->info.unk_10 < scenery->obj.pos.z) { + Object_Kill(&scenery->obj, scenery->sfxSource); } } else if ((gLevelMode == LEVELMODE_ON_RAILS) && (gBossActive != 2)) { - f32 temp_fv0 = fabsf(obj80->obj.pos.x - gPlayer[0].cam.eye.x); + f32 temp_fv0 = fabsf(scenery->obj.pos.x - gPlayer[0].cam.eye.x); f32 var_fa0 = 500.0f; - if ((obj80->obj.id == OBJ_80_6) || (obj80->obj.id == OBJ_80_7)) { + if ((scenery->obj.id == OBJ_SCENERY_6) || (scenery->obj.id == OBJ_SCENERY_7)) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f : (temp_fv0 - var_fa0) * 1.7f; @@ -2558,8 +2564,8 @@ void Object80_Move(Object_80* obj80) { temp_fv0 = 0.0f; } temp_fv0 -= gPlayer[0].cam.eye.z; - if ((obj80->info.unk_10 - temp_fv0) < (obj80->obj.pos.z + D_ctx_80177D20)) { - Object_Kill(&obj80->obj, obj80->sfxSource); + if ((scenery->info.unk_10 - temp_fv0) < (scenery->obj.pos.z + D_ctx_80177D20)) { + Object_Kill(&scenery->obj, scenery->sfxSource); } } } @@ -2570,8 +2576,8 @@ void Sprite_Move(Sprite* sprite) { f32 var_fa0 = 500.0f; if (((sprite->obj.id == OBJ_SPRITE_FOG_SHADOW) && - ((sprite->unk_45 == OBJ_80_6) || (sprite->unk_45 == OBJ_80_7))) || - (sprite->obj.id == OBJ_80_8)) { + ((sprite->unk_45 == OBJ_SCENERY_6) || (sprite->unk_45 == OBJ_SCENERY_7))) || + (sprite->obj.id == OBJ_SCENERY_8)) { var_fa0 = 1000.0f; } temp_fv0 = ((temp_fv0 - var_fa0) < 0.0f) ? 0.0f * 1.7f : (temp_fv0 - var_fa0) * 1.7f; @@ -2629,16 +2635,16 @@ void Actor_Update(Actor* this) { } if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if (this->timer_0CA[i] != 0) { + if (this->lockOnTimers[i] != 0) { if (!(gControllerHold[i].button & A_BUTTON)) { - this->timer_0CA[i]--; + this->lockOnTimers[i]--; } gChargeTimers[i] = 0; } } - } else if (this->timer_0CA[0] != 0) { + } else if (this->lockOnTimers[0] != 0) { if (!(gControllerHold[gMainController].button & A_BUTTON)) { - this->timer_0CA[0]--; + this->lockOnTimers[0]--; } gChargeTimers[0] = 0; } @@ -2711,7 +2717,7 @@ void Boss_Update(Boss* this) { } } -void Object_80_Update(Object_80* this) { +void Scenery_Update(Scenery* this) { if (this->timer_4C != 0) { this->timer_4C--; } @@ -2719,10 +2725,10 @@ void Object_80_Update(Object_80* this) { case OBJ_INIT: this->obj.status = OBJ_ACTIVE; Object_Init(this->index, this->obj.id); - Object80_Move(this); + Scenery_Move(this); break; case OBJ_ACTIVE: - Object80_Move(this); + Scenery_Move(this); if (this->info.action != NULL) { this->info.action(&this->obj); } @@ -2856,11 +2862,11 @@ void TexturedLine_UpdateAll(void) { void Object_Update(void) { s32 i; s32 pad; - Object_58* obj58; + Scenery360* scenery360; Actor* actor; Boss* boss; Sprite* sprite; - Object_80* obj80; + Scenery* scenery; Item* item; Effect* effect; @@ -2875,19 +2881,19 @@ void Object_Update(void) { if ((gLoadLevelObjects != 0) && (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO)) { Object_LoadFromInit(); } - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if (obj80->obj.status != OBJ_FREE) { - obj80->index = i; - Object_80_Update(obj80); + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if (scenery->obj.status != OBJ_FREE) { + scenery->index = i; + Scenery_Update(scenery); } } } else if (gVersusMode) { - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if ((obj58->obj.status != OBJ_FREE) && (obj58->obj.id == OBJ_80_146)) { + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if ((scenery360->obj.status != OBJ_FREE) && (scenery360->obj.id == OBJ_SCENERY_146)) { if ((i % 2) != 0) { - obj58->obj.rot.y += 0.5f; + scenery360->obj.rot.y += 0.5f; } else { - obj58->obj.rot.y -= 0.5f; + scenery360->obj.rot.y -= 0.5f; } } } diff --git a/src/engine/fox_enmy2.c b/src/engine/fox_enmy2.c index 8d49352e..c303222f 100644 --- a/src/engine/fox_enmy2.c +++ b/src/engine/fox_enmy2.c @@ -103,7 +103,7 @@ void Obj54_8006AA3C(f32 xPos, f32 yPos, f32 zPos) { } } -void Obj54_Update(Object80_54* this) { +void Obj54_Update(Scenery_54* this) { Vec3f sp24; Vec3f sp18; @@ -307,11 +307,11 @@ void Actor194_8006B46C(Actor194* this, f32 xTrans, f32 yTrans, f32 zTrans, f32 x if (arg7 != 1) { RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); - if ((arg7 == 0) && (this->timer_0CA[0] != 0)) { + if ((arg7 == 0) && (this->lockOnTimers[0] != 0)) { sp34.y += this->info.unk_1C; Matrix_MultVec3f(gGfxMatrix, &sp34, D_display_80161578); if (D_display_80161578->z > -500.0f) { - this->timer_0CA[0] = 0; + this->lockOnTimers[0] = 0; } } } else { @@ -341,7 +341,7 @@ void Actor194_Draw(Actor194* this) { } } -void Obj42_Update(Object80_42* this) { +void Obj42_Update(Scenery_42* this) { this->obj.pos.x += this->vel.x; this->obj.pos.y += this->vel.y; this->obj.pos.z += this->vel.z; @@ -350,8 +350,8 @@ void Obj42_Update(Object80_42* this) { case 0: this->vel.y -= 1.0f; - if (this->obj.pos.y < gGroundLevel + 40.0f) { - this->obj.pos.y = gGroundLevel + 40.0f; + if (this->obj.pos.y < gGroundHeight + 40.0f) { + this->obj.pos.y = gGroundHeight + 40.0f; AUDIO_PLAY_SFX(0x19130003, this->sfxSource, 0); this->state = 2; this->vel.y = 0.0f; @@ -451,8 +451,8 @@ void Actor196_Update(Actor196* this) { if (this->vel.y < 12.0f) { Math_SmoothStepToF(&this->obj.rot.x, 180.0f, 0.1f, 7.0f, 0.01f); } - if (this->obj.pos.y < (gGroundLevel + 10.0f)) { - this->obj.pos.y = gGroundLevel; + if (this->obj.pos.y < (gGroundHeight + 10.0f)) { + this->obj.pos.y = gGroundHeight; this->state = 4; this->unk_0B6 = 0; this->vel.y = 0.0f; @@ -469,7 +469,7 @@ void Actor196_Update(Actor196* this) { break; } - if ((this->obj.pos.y <= (gGroundLevel + 10.0f)) && ((gGameFrameCount % 8) == 0)) { + if ((this->obj.pos.y <= (gGroundHeight + 10.0f)) && ((gGameFrameCount % 8) == 0)) { func_enmy2_8006BB1C(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z); } @@ -624,7 +624,7 @@ void Actor189_Update(Actor189* this) { case 53: case 55: if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); @@ -635,7 +635,7 @@ void Actor189_Update(Actor189* this) { case 56: Math_SmoothStepToF(&this->scale, 0.0f, 0.1f, 2.0f, 0.0001f); if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); @@ -656,7 +656,7 @@ void Actor189_Update(Actor189* this) { this->obj.rot.z += this->fwork[2]; if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 50.0f, this->scale * 10.0f); Object_Kill(&this->obj, this->sfxSource); @@ -666,7 +666,7 @@ void Actor189_Update(Actor189* this) { case 54: if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); func_effect_8007B8F8(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z + 70.0f, this->scale * 20.0f); @@ -686,7 +686,7 @@ void Actor189_Update(Actor189* this) { if (Object_CheckCollision(this->index, &this->obj.pos, &D_tank_800C9F2C, 1) != 0) { this->vel.x *= -0.7f; } - if (this->obj.pos.y < gGroundLevel) { + if (this->obj.pos.y < gGroundHeight) { Object_Kill(&this->obj, this->sfxSource); } break; @@ -700,7 +700,7 @@ void Actor189_Update(Actor189* this) { this->vel.x *= -0.7f; } - if (this->obj.pos.y < gGroundLevel) { + if (this->obj.pos.y < gGroundHeight) { if (this->iwork[0] >= 3) { this->vel.y = 0.0f; this->gravity = 0.0f; @@ -710,7 +710,7 @@ void Actor189_Update(Actor189* this) { } else { this->iwork[0]++; this->vel.y = -this->vel.y * 0.7f; - this->obj.pos.y = gGroundLevel; + this->obj.pos.y = gGroundHeight; this->fwork[0] *= 0.5f; this->fwork[1] *= 0.5f; this->fwork[2] *= 0.5f; @@ -733,13 +733,13 @@ void Actor189_Update(Actor189* this) { if (this->state == 70) { if ((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) { + (this->obj.pos.y < (gGroundHeight + 10.0f))) { Object_Kill(&this->obj, this->sfxSource); } } else if (this->state == 39) { if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 10.0f); Object_Kill(&this->obj, this->sfxSource); @@ -763,7 +763,7 @@ void Actor189_Update(Actor189* this) { } if (((this->timer_0BC == 0) || (Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) && + (this->obj.pos.y < (gGroundHeight + 10.0f))) && (this->timer_0BE == 0)) { func_effect_8007BFFC(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, this->vel.x, this->vel.y, this->vel.z, this->scale * 1.5f, 4); @@ -775,7 +775,7 @@ void Actor189_Update(Actor189* this) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 1.5f); } if ((Object_CheckCollision(this->index, &this->obj.pos, &D_800D0030, 1) != 0) || - (this->obj.pos.y < (gGroundLevel + 10.0f))) { + (this->obj.pos.y < (gGroundHeight + 10.0f))) { if (gLevelType == LEVELTYPE_SPACE) { func_effect_8007D0E0(this->obj.pos.x, this->obj.pos.y, this->obj.pos.z, 2.0f); Object_Kill(&this->obj, this->sfxSource); @@ -836,28 +836,28 @@ void func_enmy2_8006D0F4(Actor* this) { D_ctx_80161A84 = 110; D_ctx_80178544 = 40; - for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { - if ((gObjects80[i].obj.status == OBJ_ACTIVE) && ((gPlayer[0].unk_138 - 3000.0f) < gObjects80[i].obj.pos.z)) { - hitboxData = D_edata_800CF964[gObjects80[i].obj.id]; + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + if ((gScenery[i].obj.status == OBJ_ACTIVE) && ((gPlayer[0].unk_138 - 3000.0f) < gScenery[i].obj.pos.z)) { + hitboxData = D_edata_800CF964[gScenery[i].obj.id]; count = *hitboxData; if (count != 0) { - Matrix_RotateY(gCalcMatrix, -gObjects80[i].obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, -gScenery[i].obj.rot.y * M_DTOR, MTXF_NEW); - spA8.x = this->obj.pos.x - gObjects80[i].obj.pos.x; - spA8.y = this->obj.pos.y - gObjects80[i].obj.pos.y; - spA8.z = this->obj.pos.z - gObjects80[i].obj.pos.z; + spA8.x = this->obj.pos.x - gScenery[i].obj.pos.x; + spA8.y = this->obj.pos.y - gScenery[i].obj.pos.y; + spA8.z = this->obj.pos.z - gScenery[i].obj.pos.z; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spA8, &sp9C); - temp_fs0 = gObjects80[i].obj.pos.x + sp9C.x; - temp_fs1 = gObjects80[i].obj.pos.y + sp9C.y; - temp_fs2 = gObjects80[i].obj.pos.z + sp9C.z; + temp_fs0 = gScenery[i].obj.pos.x + sp9C.x; + temp_fs1 = gScenery[i].obj.pos.y + sp9C.y; + temp_fs2 = gScenery[i].obj.pos.z + sp9C.z; hitboxData++; for (j = 0; j < count; j++) { hitbox = (Hitbox*) hitboxData; - if (func_play_800A78C4(hitbox, gObjects80[i].obj.pos.x, gObjects80[i].obj.pos.y, - gObjects80[i].obj.pos.z, temp_fs0, temp_fs1, temp_fs2)) { + if (func_play_800A78C4(hitbox, gScenery[i].obj.pos.x, gScenery[i].obj.pos.y, gScenery[i].obj.pos.z, + temp_fs0, temp_fs1, temp_fs2)) { D_ctx_80161A7C = 10; D_ctx_80161A80 = 10; D_ctx_80161A84 = 10; @@ -870,35 +870,49 @@ void func_enmy2_8006D0F4(Actor* this) { } } -void Obj39_Update(Object80_39* this) { +void Obj39_Update(Scenery_39* this) { this->obj.rot.z += 1.0f; } +typedef struct { + /* 0x00 */ Gfx* dList; + /* 0x04 */ f32* hitbox; + /* 0x08 */ f32 scale; + /* 0x0C */ f32 info_unk_10; + /* 0x10 */ f32 unk_10; + /* 0x14 */ u8 info_unk_16; + /* 0x15 */ u8 info_unk_14; + /* 0x16 */ u8 sfx; + /* 0x17 */ u8 info_unk_19; + /* 0x18 */ f32 info_unk_1C; + /* 0x1C */ u8 bonus; +} UnkStruct_D003C; // size = 0x20 + static UnkStruct_D003C D_800D003C[108] = { - /* 0 */ { D_ENMY_PLANET_40068F0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 1 */ { D_ENMY_PLANET_4006E90, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 2 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 3 */ { D_ENMY_PLANET_4009800, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 4 */ { D_ENMY_PLANET_40073C0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 5 */ { D_ENMY_PLANET_4007AF0, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 6 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 7 */ { D_CO_6011F90, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 8 */ { D_ENMY_PLANET_4000710, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, 1, 1, 1.0f, 1 }, - /* 9 */ { NULL, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - /* 10 */ { D_ENMY_SPACE_400BD20, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 11 */ { D_ENMY_SPACE_4001310, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, - /* 12 */ { D_ENMY_SPACE_400B390, gDefaultCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 13 */ { D_ME_6018C00, gDefaultCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 14 */ { D_ME_601F2A0, gDefaultCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 15 */ { D_ENMY_SPACE_400AAE0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 16 */ { D_ENMY_SPACE_4000650, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 0 */ { D_ENMY_PLANET_40068F0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 1 */ { D_ENMY_PLANET_4006E90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 2 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 3 */ { D_ENMY_PLANET_4009800, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 4 */ { D_ENMY_PLANET_40073C0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 5 */ { D_ENMY_PLANET_4007AF0, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 6 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 7 */ { D_CO_6011F90, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 8 */ { D_ENMY_PLANET_4000710, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 0, 1, 1, 1.0f, 1 }, + /* 9 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 10 */ { D_ENMY_SPACE_400BD20, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 11 */ { D_ENMY_SPACE_4001310, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, + /* 12 */ { D_ENMY_SPACE_400B390, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 13 */ { D_ME_6018C00, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 14 */ { D_ME_601F2A0, gCubeHitbox400, 7.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 15 */ { D_ENMY_SPACE_400AAE0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 16 */ { D_ENMY_SPACE_4000650, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 6, 0, 1.0f, 1 }, /* 17 */ { D_A6_6016190, D_A6_60282A0, -2.0f, 2100.0f, 3000.0f, 0, 0, 7, 0, 0.0f, 5 }, - /* 18 */ { D_SX_6023500, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 19 */ { D_SX_6022DF0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 20 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, 1, 0, 0.0f, 1 }, - /* 21 */ { NULL, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 22 */ { NULL, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, - /* 23 */ { D_ENMY_SPACE_4008FA0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 18 */ { D_SX_6023500, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 19 */ { D_SX_6022DF0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 20 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 2, 1, 1, 0, 0.0f, 1 }, + /* 21 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 22 */ { NULL, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 0.0f, 1 }, + /* 23 */ { D_ENMY_SPACE_4008FA0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, /* 24 */ { D_SX_60285F0, D_SX_603298C, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 25 */ { D_SX_600AF70, D_SX_6032904, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 26 */ { D_SX_6023E30, D_SX_6032970, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, @@ -908,61 +922,61 @@ static UnkStruct_D003C D_800D003C[108] = { /* 30 */ { D_A6_6012A40, D_A6_6028254, -2.0f, 2100.0f, 3001.0f, 0, 0, 7, 0, 0.0f, 2 }, /* 31 */ { NULL, D_A6_60280E0, -2.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 3 }, /* 32 */ { D_SX_6009950, D_SX_6032878, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 33 */ { NULL, gDefaultCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 33 */ { NULL, gCubeHitbox200, 2.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 34 */ { D_SX_600B2B0, D_SX_6032894, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 35 */ { D_SX_600A2E0, D_SX_60328B0, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 36 */ { NULL, gDefaultCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 37 */ { D_SX_600B830, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 36 */ { NULL, gCubeHitbox400, 2.0f, 200.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 37 */ { D_SX_600B830, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, /* 38 */ { NULL, D_SX_603238C, 1.0f, 500.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 39 */ { D_SX_6020D20, D_SX_60328CC, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 40 */ { NULL, gHitboxNone, 1.0f, 100.0f, 3001.0f, 2, 0, 0, 0, 0.0f, 1 }, + /* 40 */ { NULL, gNoHitbox, 1.0f, 100.0f, 3001.0f, 2, 0, 0, 0, 0.0f, 1 }, /* 41 */ { D_SY_60097E0, D_SY_6034478, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 42 */ { D_SY_601D730, D_SY_603450C, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 43 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 43 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, /* 44 */ { D_SY_60102C0, D_SY_6034588, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 45 */ { D_ME_6017B60, gDefaultCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, 0, 0, 1.0f, 1 }, - /* 46 */ { D_ZO_6004D00, gDefaultCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, 4, 0, 1.0f, 1 }, - /* 47 */ { D_ME_601A880, gDefaultCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 45 */ { D_ME_6017B60, gCubeHitbox200, -1.0f, 300.0f, 3001.0f, 0, 0, 0, 0, 1.0f, 1 }, + /* 46 */ { D_ZO_6004D00, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 1, 0, 4, 0, 1.0f, 1 }, + /* 47 */ { D_ME_601A880, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 48 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, /* 49 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, /* 50 */ { NULL, D_SY_603405C, 0.3f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, /* 51 */ { D_SY_6015D60, D_SY_6034124, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 1.0f, 1 }, /* 52 */ { NULL, D_ZO_602C1A0, -1.0f, 1000.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 53 */ { D_SX_600B540, D_SX_60328E8, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 54 */ { D_ENMY_SPACE_4000EC0, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 55 */ { D_ENMY_SPACE_4008D50, gDefaultCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, - /* 56 */ { NULL, gHitboxNone, -1.0f, 2000.0f, 3000.0f, 0, 0, 3, 0, 0.0f, 1 }, - /* 57 */ { D_SY_60102C0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 58 */ { D_SY_601F3D0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 59 */ { D_SY_6022B10, gHitboxNone, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 60 */ { D_SY_60209F0, gHitboxNone, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 61 */ { D_ME_6019430, gDefaultCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 62 */ { D_ME_6018960, gDefaultCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 63 */ { D_ME_6009F50, gHitboxNone, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 64 */ { NULL, gDefaultCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 65 */ { D_ME_600C2A0, gDefaultCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, - /* 66 */ { D_ME_600BD40, gDefaultCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 54 */ { D_ENMY_SPACE_4000EC0, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 55 */ { D_ENMY_SPACE_4008D50, gCubeHitbox100, 1.5f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 56 */ { NULL, gNoHitbox, -1.0f, 2000.0f, 3000.0f, 0, 0, 3, 0, 0.0f, 1 }, + /* 57 */ { D_SY_60102C0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 58 */ { D_SY_601F3D0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 59 */ { D_SY_6022B10, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 60 */ { D_SY_60209F0, gNoHitbox, 2.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 61 */ { D_ME_6019430, gCubeHitbox200, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 62 */ { D_ME_6018960, gCubeHitbox100, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 63 */ { D_ME_6009F50, gNoHitbox, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 64 */ { NULL, gCubeHitbox200, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, + /* 65 */ { D_ME_600C2A0, gCubeHitbox200, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 66 */ { D_ME_600BD40, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 67 */ { NULL, D_ME_602F604, 3.0f, 100.0f, 3000.0f, 2, 0, 1, 0, 1.0f, 1 }, /* 68 */ { D_SY_60205D0, D_SY_603445C, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, /* 69 */ { D_SY_60036A0, D_SY_6034664, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 70 */ { D_SY_601AD70, gHitboxNone, 4.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 71 */ { D_arwing_3007650, gHitboxNone, 1.0f, 100.0f, 3000.0f, 2, 0, 5, 0, 0.0f, 1 }, + /* 70 */ { D_SY_601AD70, gNoHitbox, 4.0f, 100.0f, 3000.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 71 */ { D_arwing_3007650, gNoHitbox, 1.0f, 100.0f, 3000.0f, 2, 0, 5, 0, 0.0f, 1 }, /* 72 */ { D_SY_60034D0, D_SY_60347D4, 3.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 73 */ { D_SY_6005360, D_SY_6034770, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 74 */ { D_SY_600F6C0, D_SY_60347F0, -1.0f, 10000.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 75 */ { D_SY_601B610, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 76 */ { D_SY_601C6A0, gHitboxNone, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 75 */ { D_SY_601B610, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, + /* 76 */ { D_SY_601C6A0, gNoHitbox, -1.0f, 10000.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, /* 77 */ { D_SY_60188D0, D_SY_603486C, 3.0f, 100.0f, 3001.0f, 0, 0, 1, 0, 0.0f, 1 }, - /* 78 */ { NULL, gDefaultCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 0 }, + /* 78 */ { NULL, gCubeHitbox150, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 1.0f, 0 }, /* 79 */ { NULL, D_ZO_602C294, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, /* 80 */ { NULL, D_VE1_601B474, -1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 0.0f, 1 }, - /* 81 */ { NULL, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 82 */ { NULL, gDefaultCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, + /* 81 */ { NULL, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 82 */ { NULL, gCubeHitbox100, 2.0f, 100.0f, 3000.0f, 1, 0, 1, 0, 1.0f, 1 }, /* 83 */ { NULL, D_AQ_6030B4C, 1.0f, 100.0f, 3000.0f, 2, 0, 0, 0, 60.0f, 1 }, /* 84 */ { D_VE1_9012180, D_VE1_601B43C, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 85 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 86 */ { NULL, gDefaultCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, - /* 87 */ { D_VE1_900EFC0, gHitboxNone, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, + /* 85 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 86 */ { NULL, gCubeHitbox100, 1.0f, 20000.0f, 3000.0f, 1, 0, 2, 0, 0.0f, 0 }, + /* 87 */ { D_VE1_900EFC0, gNoHitbox, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, /* 88 */ { NULL, D_AQ_6030B30, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, /* 89 */ { NULL, D_AQ_6030B14_f32, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, /* 90 */ { D_MA_601C520, D_MA_60368FC, 1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, @@ -970,18 +984,18 @@ static UnkStruct_D003C D_800D003C[108] = { /* 92 */ { D_WZ_7000C40, gWarpZoneEvent92Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 93 */ { D_WZ_70010E0, gWarpZoneEvent93Hitbox, -1.0f, 2100.0f, 3001.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 94 */ { D_WZ_7000E80, gWarpZoneEvent94Hitbox, 2.5f, 100.0f, 3000.0f, 1, 0, 0, 0, 1.0f, 1 }, - /* 95 */ { D_WZ_70008F0, gDefaultCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 0 }, + /* 95 */ { D_WZ_70008F0, gCubeHitbox100, -1.0f, 100.0f, 8000.0f, 1, 0, 0, 0, 0.0f, 0 }, /* 96 */ { D_WZ_7000280, gWarpZoneEvent96Hitbox, -1.0f, 1000.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 0 }, - /* 97 */ { D_ME_600AC70, gDefaultCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, + /* 97 */ { D_ME_600AC70, gCubeHitbox100, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, /* 98 */ { D_MA_601A2B0, D_MA_60364C0, 1.0f, 100.0f, 3000.0f, 1, 1, 0, 0, 0.0f, 1 }, /* 99 */ { D_VE1_6002500, D_VE1_601B944, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 100 */ { D_VE1_60043F0, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 101 */ { D_VE1_6004310, gHitboxNone, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 100 */ { D_VE1_60043F0, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, + /* 101 */ { D_VE1_6004310, gNoHitbox, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, /* 102 */ { D_TR_6002740, D_TR_6009D18, -1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 1 }, - /* 103 */ { NULL, gHitboxNone, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* 104 */ { NULL, gHitboxNone, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, - /* 105 */ { NULL, gDefaultCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, - /* 106 */ { NULL, gDefaultCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, 6, 0, 0.0f, 0 }, + /* 103 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* 104 */ { NULL, gNoHitbox, -1.0f, 500.0f, 3000.0f, 0, 0, 0, 0, 0.0f, 0 }, + /* 105 */ { NULL, gCubeHitbox200, 1.0f, 100.0f, 3000.0f, 0, 0, 0, 0, 1.0f, 1 }, + /* 106 */ { NULL, gCubeHitbox100, 1.0f, 100.0f, 3000.0f, 0, 0, 6, 0, 0.0f, 0 }, /* 107 */ { D_MA_6002890, D_MA_60368E0, -1.0f, 100.0f, 3000.0f, 1, 0, 0, 0, 0.0f, 1 }, }; static u8 D_800D0DBC[6][4] = { @@ -1079,7 +1093,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { if ((this->unk_0B4 >= EINFO_200) && (this->unk_0B4 < EINFO_300)) { this->unk_046 = 100; - this->info.hitbox = gDefaultCubeHitbox200; + this->info.hitbox = gCubeHitbox200; this->info.unk_1C = 1.0f; for (i = 0; i < 2; i++) { @@ -1224,7 +1238,7 @@ void ActorEvent_ProcessScript(ActorEvent* this) { } if (actorScript[this->aiIndex + 1] == EVACT_ME_AS_CLOSE) { - this->info.hitbox = SEGMENTED_TO_VIRTUAL(gDefaultCubeHitbox200); + this->info.hitbox = SEGMENTED_TO_VIRTUAL(gCubeHitbox200); this->state = EVSTATE_ME_AS_CLOSE; this->aiIndex += 2; break; @@ -2091,7 +2105,7 @@ void ActorEvent_800701E0(ActorEvent* this) { this->timer_04C = RAND_INT(2.9f); if (this->unk_0B4 == EINFO_2) { this->timer_04C = 1; - if (this->obj.pos.x < this->unk_0D8.x) { + if (this->obj.pos.x < this->hitPos.x) { func_play_800A69F8(1, this->obj.pos.x + 20.0f, this->obj.pos.y, this->obj.pos.z); this->fwork[17] = 777.0f; } else { @@ -2172,7 +2186,7 @@ void ActorEvent_800701E0(ActorEvent* this) { if (((gLevelMode == LEVELMODE_ALL_RANGE) || (gLevelMode == LEVELMODE_UNK_2)) && (this->unk_0B4 != EINFO_21) && (this->unk_0B4 != EINFO_23)) { this->fwork[13] = 20.0f; - if (this->obj.pos.x < this->unk_0D8.x) { + if (this->obj.pos.x < this->hitPos.x) { this->fwork[13] *= -1.0f; } } @@ -2222,7 +2236,7 @@ void ActorEvent_800701E0(ActorEvent* this) { sp3C.z = this->vel.z; if ((Object_CheckCollision(this->index, &this->obj.pos, &sp3C, 0) != 0) || - (this->obj.pos.y < (gGroundLevel + 20.0f))) { + (this->obj.pos.y < (gGroundHeight + 20.0f))) { this->obj.status = OBJ_DYING; this->obj.pos.z -= this->vel.z; this->unk_0D0 = 1; @@ -2243,8 +2257,8 @@ void ActorEvent_80070BA8(ActorEvent* this) { this->unk_0D0 = 0; if ((this->unk_0B4 != EINFO_17) || ((this->unk_0B4 == EINFO_17) && (this->unk_0D2 == 0))) { this->timer_0C6 = 10; - func_effect_8007C120(this->unk_0D8.x, this->unk_0D8.y, this->unk_0D8.z, this->vel.x, this->vel.y, - this->vel.z, 0.2f, 10); + func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, + 0.2f, 10); this->health -= this->damage; AUDIO_PLAY_SFX(0x29033064, this->sfxSource, 4); if (this->health <= 0) { @@ -3776,7 +3790,7 @@ bool ActorEvent_OverrideLimbDraw3(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* return false; } -s32 Obj111_Draw(Object80_111* this) { +s32 Obj111_Draw(Scenery_111* this) { RCP_SetupDL(&gMasterDisp, 0x3C); gSPDisplayList(gMasterDisp++, D_SY_601AD70); RCP_SetupDL(&gMasterDisp, 0x40); @@ -4216,7 +4230,7 @@ void func_enmy2_800763A4(Actor* actor) { sp60 = Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 0); - if ((sp60 != 0) || (actor->obj.pos.y < (gGroundLevel + 30.0f))) { + if ((sp60 != 0) || (actor->obj.pos.y < (gGroundHeight + 30.0f))) { if ((Rand_ZeroOne() < 0.5f) && (actor->timer_04C < 3) && (gLevelType == LEVELTYPE_PLANET) && (sp60 != 999) && (gGroundType != GROUNDTYPE_WATER) && ((actor->vel.z < -20.0f) || (actor->vel.z > 0.0f))) { @@ -4254,16 +4268,16 @@ void func_enmy2_800763A4(Actor* actor) { } } } else { - if ((actor->obj.pos.y < (gGroundLevel + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { + if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (gLevelType == LEVELTYPE_PLANET)) { actor->vel.z = 0.0f; if (gGroundType == GROUNDTYPE_WATER) { - func_effect_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, + func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 0); - func_effect_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, + func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 10); - func_effect_8007D9DC(actor->obj.pos.x, gGroundLevel + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, + func_effect_8007D9DC(actor->obj.pos.x, gGroundHeight + 2.0f, actor->obj.pos.z, 3.0f, 20.0f, 20); - func_effect_8007ADF4(actor->obj.pos.x, gGroundLevel, actor->obj.pos.z, 0.1f, 3.0f); + func_effect_8007ADF4(actor->obj.pos.x, gGroundHeight, actor->obj.pos.z, 0.1f, 3.0f); } else { func_beam_800365E4(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 6.5f, 0, 0); @@ -4271,7 +4285,7 @@ void func_enmy2_800763A4(Actor* actor) { func_effect_8007C120(actor->obj.pos.x, 20.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, actor->scale * 0.05f, 30); if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - func_effect_8007C688(actor->obj.pos.x, gGroundLevel + 30.0f, actor->obj.pos.z, 3.0f, 60); + func_effect_8007C688(actor->obj.pos.x, gGroundHeight + 30.0f, actor->obj.pos.z, 3.0f, 60); if (gCurrentLevel == LEVEL_FORTUNA) { func_enmy_80062C38(actor->obj.pos.x, actor->obj.pos.z); } diff --git a/src/engine/fox_game.c b/src/engine/fox_game.c index d0265358..389eb086 100644 --- a/src/engine/fox_game.c +++ b/src/engine/fox_game.c @@ -8,13 +8,13 @@ f32 D_game_80161A14; s32 gPlayerInactive[4]; s32 D_game_80161A28; u8 gShowHud; -u16 gNextLevelStage; +u16 gNextLevelPhase; u16 gNextLevel; u16 gNextGameState; u16 D_game_80161A34; u16 gBgColor; u8 gBlurAlpha; -u8 D_game_80161A39; +u8 gGameStandby; f32 gFovY; f32 gProjectNear; f32 gProjectFar; @@ -25,28 +25,28 @@ static s32 sVsCameraULx[] = { 0, SCREEN_WIDTH / 2, 0, SCREEN_WIDTH / 2 }; static s32 sVsCameraLRx[] = { SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1, SCREEN_WIDTH / 2 - 1, SCREEN_WIDTH - 1 }; static s32 sVsCameraULy[] = { 0, 0, SCREEN_HEIGHT / 2, SCREEN_HEIGHT / 2 }; static s32 sVsCameraLRy[] = { SCREEN_HEIGHT / 2 - 1, SCREEN_HEIGHT / 2 - 1, SCREEN_HEIGHT - 1, SCREEN_HEIGHT - 1 }; -static s32 sOverlaySetups[] = { - /* LEVEL_CORNERIA */ OVL_SETUP_CORNERIA, - /* LEVEL_METEO */ OVL_SETUP_METEO, - /* LEVEL_SECTOR_X */ OVL_SETUP_SECTOR_X, - /* LEVEL_AREA_6 */ OVL_SETUP_AREA_6, - /* LEVEL_UNK_4 */ OVL_SETUP_UNK_4, - /* LEVEL_SECTOR_Y */ OVL_SETUP_SECTOR_Y, - /* LEVEL_VENOM_1 */ OVL_SETUP_VENOM_1, - /* LEVEL_SOLAR */ OVL_SETUP_SOLAR, - /* LEVEL_ZONESS */ OVL_SETUP_ZONESS, - /* LEVEL_VENOM_ANDROSS */ OVL_SETUP_VENOM_ANDROSS, - /* LEVEL_TRAINING */ OVL_SETUP_TRAINING, - /* LEVEL_MACBETH */ OVL_SETUP_MACBETH, - /* LEVEL_TITANIA */ OVL_SETUP_TITANIA, - /* LEVEL_AQUAS */ OVL_SETUP_AQUAS, - /* LEVEL_FORTUNA */ OVL_SETUP_FORTUNA, - /* LEVEL_UNK_15 */ OVL_SETUP_TITLE, - /* LEVEL_KATINA */ OVL_SETUP_KATINA, - /* LEVEL_BOLSE */ OVL_SETUP_BOLSE, - /* LEVEL_SECTOR_Z */ OVL_SETUP_SECTOR_Z, - /* LEVEL_VENOM_2 */ OVL_SETUP_VENOM_2, - /* LEVEL_VERSUS */ OVL_SETUP_VERSUS, +static s32 sLevelSceneIds[] = { + /* LEVEL_CORNERIA */ SCENE_CORNERIA, + /* LEVEL_METEO */ SCENE_METEO, + /* LEVEL_SECTOR_X */ SCENE_SECTOR_X, + /* LEVEL_AREA_6 */ SCENE_AREA_6, + /* LEVEL_UNK_4 */ SCENE_UNK_4, + /* LEVEL_SECTOR_Y */ SCENE_SECTOR_Y, + /* LEVEL_VENOM_1 */ SCENE_VENOM_1, + /* LEVEL_SOLAR */ SCENE_SOLAR, + /* LEVEL_ZONESS */ SCENE_ZONESS, + /* LEVEL_VENOM_ANDROSS */ SCENE_VENOM_ANDROSS, + /* LEVEL_TRAINING */ SCENE_TRAINING, + /* LEVEL_MACBETH */ SCENE_MACBETH, + /* LEVEL_TITANIA */ SCENE_TITANIA, + /* LEVEL_AQUAS */ SCENE_AQUAS, + /* LEVEL_FORTUNA */ SCENE_FORTUNA, + /* LEVEL_UNK_15 */ SCENE_TITLE, + /* LEVEL_KATINA */ SCENE_KATINA, + /* LEVEL_BOLSE */ SCENE_BOLSE, + /* LEVEL_SECTOR_Z */ SCENE_SECTOR_Z, + /* LEVEL_VENOM_2 */ SCENE_VENOM_2, + /* LEVEL_VERSUS */ SCENE_VERSUS, }; void Game_Initialize(void) { @@ -61,10 +61,10 @@ void Game_Initialize(void) { gProjectNear = 10.0f; gProjectFar = 12800.0f; D_game_80161A10 = D_game_80161A14 = 0.0f; - gOverlaySetup = OVL_SETUP_LOGO; - gOverlayStage = 0; - Overlay_InitDma(); - D_game_80161A39 = true; + gSceneId = SCENE_LOGO; + gSceneSetup = 0; + Load_InitDmaAndMsg(); + gGameStandby = true; } void Game_SetGameState(void) { @@ -79,9 +79,9 @@ void Game_SetGameState(void) { gCurrentLevel = gNextLevel; Play_Setup(); gPlayState = PLAY_STANDBY; - gLevelStage = gNextLevelStage; - gNextLevelStage = 0; - if ((gLevelStage != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { + gLevelPhase = gNextLevelPhase; + gNextLevelPhase = 0; + if ((gLevelPhase != 0) && (gCurrentLevel != LEVEL_VENOM_ANDROSS)) { D_ctx_8017782C = 0; } break; @@ -98,10 +98,10 @@ void Game_SetGameState(void) { gNextGameStateTimer = 3; gAllRangeCheckpoint = 0; gNextGameState = GSTATE_NONE; - gOverlayStage = 0; + gSceneSetup = 0; gFillScreenColor = gBgColor = 0; D_ctx_80177D20 = 0.0f; - if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2)) { + if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) { gFillScreenColor = gBgColor = 0xFFFF; // 248, 248, 248 gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } else { @@ -109,30 +109,30 @@ void Game_SetGameState(void) { Audio_FadeOutAll(1); } gFillScreenAlpha = 255; - gPlayerFillScreenAlphas[0] = 0; + gPlayerGlareAlphas[0] = 0; gRadioState = 0; - D_ctx_80178428 = 0.0f; + gStarfieldRoll = 0.0f; gBlurAlpha = 255; gDrawMode = DRAW_NONE; Audio_ClearVoice(); Audio_SetBaseSfxReverb(0); } -bool func_game_800A1B6C(void) { +bool Game_ChangeScene(void) { static u8 sHoldTimer = 0; - static u8 sOverlaySelect = 99; - static u8 sCurrentOverlay = 99; - static u8 sCurrentStage = 99; + static u8 sSceneSelect = SCENE_LOGO; + static u8 sCurrentSceneId = SCENE_LOGO; + static u8 sCurrentSetup = SCENE_LOGO; - if (gOverlaySetup != sCurrentOverlay) { + if (gSceneId != sCurrentSceneId) { sHoldTimer = 2; - sCurrentOverlay = gOverlaySetup; + sCurrentSceneId = gSceneId; } if (sHoldTimer == 0) { - sOverlaySelect = sCurrentOverlay; - sCurrentStage = gOverlayStage; + sSceneSelect = sCurrentSceneId; + sCurrentSetup = gSceneSetup; } - Overlay_Load(sOverlaySelect, sCurrentStage); + Load_SceneSetup(sSceneSelect, sCurrentSetup); if (sHoldTimer) { sHoldTimer--; @@ -141,7 +141,7 @@ bool func_game_800A1B6C(void) { return false; } -void func_game_800A1C14(Gfx** dList) { +void Game_InitMasterDL(Gfx** dList) { gSPDisplayList((*dList)++, gRcpInitDL); gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); @@ -168,26 +168,26 @@ void func_game_800A1C14(Gfx** dList) { gDPSetColorDither((*dList)++, G_CD_MAGICSQ); } -void func_game_800A1E68(Gfx** arg0) { - gSPDisplayList((*arg0)++, gRcpInitDL); - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT * 3); - gDPSetFillColor((*arg0)++, FILL_COLOR(0x0001)); - gDPSetColorImage((*arg0)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gFrameBuffers[0].data); - gDPFillRectangle((*arg0)++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT * 3 - 1); - gDPPipeSync((*arg0)++); - gDPSetColorDither((*arg0)++, G_CD_MAGICSQ); +void Game_InitStandbyDL(Gfx** dList) { + gSPDisplayList((*dList)++, gRcpInitDL); + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT * 3); + gDPSetFillColor((*dList)++, FILL_COLOR(0x0001)); + gDPSetColorImage((*dList)++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, gFrameBuffers[0].data); + gDPFillRectangle((*dList)++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT * 3 - 1); + gDPPipeSync((*dList)++); + gDPSetColorDither((*dList)++, G_CD_MAGICSQ); } -void func_game_800A1F44(void) { +void Game_InitFullViewport(void) { gViewport->vp.vscale[0] = gViewport->vp.vtrans[0] = SCREEN_WIDTH * 2; gViewport->vp.vscale[1] = gViewport->vp.vtrans[1] = SCREEN_HEIGHT * 2; gViewport->vp.vscale[2] = gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vscale[3] = gViewport->vp.vtrans[3] = 0; } -void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { - if ((arg1 != 1) && (arg1 == 4)) { - switch (arg2) { +void Game_InitViewport(Gfx** dList, u8 camCount, u8 camIndex) { + if ((camCount != 1) && (camCount == 4)) { + switch (camIndex) { case 0: gViewport->vp.vscale[0] = SCREEN_WIDTH * (D_game_80161A14 - 1.0f) * 2; gViewport->vp.vscale[1] = SCREEN_HEIGHT * (D_game_80161A14 - 1.0f) * 2; @@ -197,7 +197,7 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2, + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2); break; case 1: @@ -209,7 +209,7 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * (2.0f - D_game_80161A14) * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN, + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT / 2); break; case 2: @@ -221,7 +221,7 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_HEIGHT / 2, SCREEN_WIDTH / 2, SCREEN_HEIGHT - SCREEN_MARGIN); break; case 3: @@ -233,18 +233,18 @@ void func_game_800A1FB0(Gfx** arg0, u8 arg1, u8 arg2) { gViewport->vp.vtrans[1] = SCREEN_HEIGHT * D_game_80161A14 * 2; gViewport->vp.vtrans[2] = G_MAXZ / 2; gViewport->vp.vtrans[3] = 0; - gDPSetScissor((*arg0)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, + gDPSetScissor((*dList)++, G_SC_NON_INTERLACE, SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); break; default: - func_game_800A1F44(); + Game_InitFullViewport(); break; } } else { - func_game_800A1F44(); + Game_InitFullViewport(); if (1) {} } - gSPViewport((*arg0)++, gViewport++); + gSPViewport((*dList)++, gViewport++); } void Game_Draw(s32 playerNum) { @@ -252,23 +252,23 @@ void Game_Draw(s32 playerNum) { case DRAW_NONE: break; case DRAW_TITLE: - func_bg_8003DAF0(); + Background_DrawStarfield(); OvlMenu_CallFunction(OVLCALL_TITLE_DRAW, NULL); break; case DRAW_OPTION: - func_bg_8003DAF0(); + Background_DrawStarfield(); OvlMenu_CallFunction(OVLCALL_OPTION_DRAW, NULL); break; case DRAW_MAP: - func_bg_8003DAF0(); + Background_DrawStarfield(); OvlMenu_CallFunction(OVLCALL_MAP_DRAW, NULL); break; case DRAW_PLAY: gPlayerNum = playerNum; Play_Draw(); break; - case DRAW_UNK_MAP: - func_bg_8003DAF0(); + case DRAW_UNK_MAP: // likely game over + Background_DrawStarfield(); OvlMenu_CallFunction(OVLCALL_UNKMAP_DRAW, NULL); break; case DRAW_UNK_VS: @@ -279,63 +279,63 @@ void Game_Draw(s32 playerNum) { func_800A3CA0(); break; case DRAW_ENDING: - func_bg_8003DAF0(); + Background_DrawStarfield(); gPlayerNum = playerNum; - Ending_8018AAC4(); + Ending_Draw(); break; } } -void func_game_800A25DC(void) { +void Game_SetScene(void) { switch (gGameState) { case GSTATE_INIT: - gOverlaySetup = OVL_SETUP_TITLE; - gOverlayStage = 0; + gSceneId = SCENE_TITLE; + gSceneSetup = 0; break; case GSTATE_TITLE: - gOverlaySetup = OVL_SETUP_TITLE; - gOverlayStage = 0; + gSceneId = SCENE_TITLE; + gSceneSetup = 0; break; case GSTATE_MENU: - gOverlaySetup = OVL_SETUP_MENU; - gOverlayStage = 0; + gSceneId = SCENE_MENU; + gSceneSetup = 0; break; case GSTATE_MAP: - gOverlaySetup = OVL_SETUP_MAP; - gOverlayStage = 0; + gSceneId = SCENE_MAP; + gSceneSetup = 0; return; case GSTATE_VS_INIT: - gOverlaySetup = OVL_SETUP_VERSUS; + gSceneId = SCENE_VERSUS; break; case GSTATE_PLAY: - gOverlaySetup = sOverlaySetups[gCurrentLevel]; + gSceneId = sLevelSceneIds[gCurrentLevel]; break; case GSTATE_GAME_OVER: - gOverlaySetup = OVL_SETUP_GAME_OVER; - gOverlayStage = 0; + gSceneId = SCENE_GAME_OVER; + gSceneSetup = 0; break; case GSTATE_ENDING: - gOverlaySetup = OVL_SETUP_CREDITS; + gSceneId = SCENE_CREDITS; break; } } void Game_Update(void) { s32 i; - u8 spBB; - u8 var_v0_3; + u8 partialFill; + u8 soundMode; Game_SetGameState(); - if (D_game_80161A39) { - func_game_800A1E68(&gUnkDisp1); - D_game_80161A39 = false; + if (gGameStandby) { + Game_InitStandbyDL(&gUnkDisp1); + gGameStandby = false; return; } - func_game_800A1C14(&gUnkDisp1); - func_game_800A25DC(); - if (func_game_800A1B6C() != true) { + Game_InitMasterDL(&gUnkDisp1); + Game_SetScene(); + if (Game_ChangeScene() != true) { Lib_InitPerspective(&gUnkDisp1); - func_game_800A1FB0(&gUnkDisp1, gCamCount, 0); + Game_InitViewport(&gUnkDisp1, gCamCount, 0); if (gNextGameStateTimer != 0) { gNextGameStateTimer--; } @@ -378,8 +378,8 @@ void Game_Update(void) { break; case GSTATE_START: gGameState = GSTATE_INIT; - gOverlaySetup = OVL_SETUP_TITLE; - gOverlayStage = 0; + gSceneId = SCENE_TITLE; + gSceneSetup = 0; break; case GSTATE_INIT: gGameState = GSTATE_TITLE; @@ -390,9 +390,10 @@ void Game_Update(void) { gCamCount = 1; gLifeCount[0] = 2; D_ctx_80177D20 = 0.0f; - D_hud_8016170C = gCsFrameCount = D_ctx_80177830 = gLevelStatusScreenTimer = gLevelClearScreenTimer = - D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = D_ctx_80178410 = D_ctx_80177B40 = gPlayState = - gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = gBgColor = gFillScreenAlpha = 0; + D_hud_8016170C = gCsFrameCount = gShowLevelClearStatusScreen = gLevelStartStatusScreenTimer = + gLevelClearScreenTimer = D_versus_80178754 = gVersusMode = D_ctx_80177AE0 = gStarCount = + D_ctx_80177B40 = gPlayState = gOptionMenuStatus = gDrawMode = gShowBossHealth = gShowHud = + gBgColor = gFillScreenAlpha = 0; gNextGameState = D_ctx_80177C94 = D_ctx_80177CAC = D_ctx_80177CB4 = D_ctx_80177CBC = D_ctx_80177CC4 = D_ctx_80177C9C = D_ctx_80177CA4 = D_play_80161A5C = D_game_80161A34 = 0; for (i = 0; i < 4; i++) { @@ -404,9 +405,9 @@ void Game_Update(void) { D_ctx_80177958[i] = 1.0f; D_ctx_80177858[i] = 3; - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; gShowCrosshairs[i] = true; - gPlayerFillScreenAlphas[i] = 0; + gPlayerGlareAlphas[i] = 0; } gVersusStage = 0; D_ctx_801778A4 = 3; @@ -415,23 +416,23 @@ void Game_Update(void) { D_play_800D3180[i] = 0; } gExpertMode = false; - gSoundMode = gSaveFile.save.data.soundMode; - switch (gSoundMode) { + gOptionSoundMode = gSaveFile.save.data.soundMode; + switch (gOptionSoundMode) { case OPTIONSOUND_STEREO: - var_v0_3 = SOUNDMODE_STEREO; + soundMode = SOUNDMODE_STEREO; break; case OPTIONSOUND_MONO: - var_v0_3 = SOUNDMODE_MONO; + soundMode = SOUNDMODE_MONO; break; case OPTIONSOUND_HEADSET: - var_v0_3 = SOUNDMODE_HEADSET; + soundMode = SOUNDMODE_HEADSET; break; default: - gSoundMode = OPTIONSOUND_STEREO; - var_v0_3 = SOUNDMODE_STEREO; + gOptionSoundMode = OPTIONSOUND_STEREO; + soundMode = SOUNDMODE_STEREO; break; } - SEQCMD_SET_SOUND_MODE(var_v0_3); + SEQCMD_SET_SOUND_MODE(soundMode); gVolumeSettings[0] = gSaveFile.save.data.musicVolume; gVolumeSettings[1] = gSaveFile.save.data.voiceVolume; gVolumeSettings[2] = gSaveFile.save.data.sfxVolume; @@ -444,9 +445,9 @@ void Game_Update(void) { if (gVolumeSettings[2] > 99) { gVolumeSettings[2] = 99; } - func_8001D8A8(0, gVolumeSettings[0]); - func_8001D8A8(1, gVolumeSettings[1]); - func_8001D8A8(2, gVolumeSettings[2]); + Audio_SetVolume(0, gVolumeSettings[0]); + Audio_SetVolume(1, gVolumeSettings[1]); + Audio_SetVolume(2, gVolumeSettings[2]); break; case GSTATE_TITLE: OvlMenu_CallFunction(OVLCALL_TITLE_UPDATE, NULL); @@ -455,10 +456,10 @@ void Game_Update(void) { OvlMenu_CallFunction(OVLCALL_OPTION_UPDATE, NULL); break; case GSTATE_MAP: - Map_8019E8D0(); + Map_Main(); break; case GSTATE_VS_INIT: - func_versus_800C20B0(); + Versus_StartMatch(); break; case GSTATE_PLAY: Play_Main(); @@ -468,24 +469,24 @@ void Game_Update(void) { break; case GSTATE_ENDING: gDrawMode = DRAW_ENDING; - Ending_8018A96C(); + Ending_Main(); break; default: break; } Game_Draw(0); if (gCamCount == 2) { - func_game_800A1FB0(&gMasterDisp, gCamCount, 1); + Game_InitViewport(&gMasterDisp, gCamCount, 1); Game_Draw(1); gDPPipeSync(gMasterDisp++); gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, SCREEN_HEIGHT - SCREEN_MARGIN); } else if ((gCamCount == 4) && (gDrawMode != DRAW_NONE)) { - func_game_800A1FB0(&gMasterDisp, gCamCount, 3); + Game_InitViewport(&gMasterDisp, gCamCount, 3); Game_Draw(3); - func_game_800A1FB0(&gMasterDisp, gCamCount, 2); + Game_InitViewport(&gMasterDisp, gCamCount, 2); Game_Draw(2); - func_game_800A1FB0(&gMasterDisp, gCamCount, 1); + Game_InitViewport(&gMasterDisp, gCamCount, 1); Game_Draw(1); gDPPipeSync(gMasterDisp++); gDPSetScissor(gMasterDisp++, G_SC_NON_INTERLACE, SCREEN_MARGIN, SCREEN_MARGIN, SCREEN_WIDTH - SCREEN_MARGIN, @@ -513,13 +514,13 @@ void Game_Update(void) { func_hud_8008CB8C(); } - spBB = 0; + partialFill = false; if (gCamCount == 1) { - Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerFillScreenReds[0], - gPlayerFillScreenGreens[0], gPlayerFillScreenBlues[0], gPlayerFillScreenAlphas[0]); + Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gPlayerGlareReds[0], + gPlayerGlareGreens[0], gPlayerGlareBlues[0], gPlayerGlareAlphas[0]); if ((gDrawMode == DRAW_PLAY) || (gDrawMode == DRAW_ENDING)) { func_radio_800BB5D0(); - if (gShowHud != 0) { + if (gShowHud) { func_hud_8008FA84(); func_hud_8008CA44(); } @@ -532,11 +533,11 @@ void Game_Update(void) { Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i], sVsCameraLRy[i], gFillScreenRed, gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); - spBB = 1; + partialFill = true; } else { Graphics_FillRectangle(&gMasterDisp, sVsCameraULx[i], sVsCameraULy[i], sVsCameraLRx[i], - sVsCameraLRy[i], gPlayerFillScreenReds[i], gPlayerFillScreenGreens[i], - gPlayerFillScreenBlues[i], gPlayerFillScreenAlphas[i]); + sVsCameraLRy[i], gPlayerGlareReds[i], gPlayerGlareGreens[i], + gPlayerGlareBlues[i], gPlayerGlareAlphas[i]); } } } @@ -547,7 +548,7 @@ void Game_Update(void) { func_versus_800C1ED4(); } func_fade_80084688(0, D_ctx_80177C50); - if (spBB == 0) { + if (!partialFill) { Graphics_FillRectangle(&gMasterDisp, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1, gFillScreenRed, gFillScreenGreen, gFillScreenBlue, gFillScreenAlpha); } diff --git a/src/engine/fox_hud.c b/src/engine/fox_hud.c index a66e103f..03affb02 100644 --- a/src/engine/fox_hud.c +++ b/src/engine/fox_hud.c @@ -92,8 +92,7 @@ void func_hud_80087788(void); s16 D_hud_800D1970 = 0; -// unused -UNK_TYPE D_800D1974[14] = { 0 }; +UNK_TYPE D_800D1974[14] = { 0 }; // unused f32 D_800D19AC[] = { 255.0f, 255.0f, 255.0f, 255.0f, 255.0f }; @@ -465,7 +464,7 @@ void func_hud_80086110(f32 arg0, f32 arg1, s32 arg2) { } if ((arg2 <= 0) && (arg2 != -2) && - ((gPlayState == PLAY_PAUSE) || (D_ctx_80177830 == 1) || (gLevelStatusScreenTimer != 0))) { + ((gPlayState == PLAY_PAUSE) || (gShowLevelClearStatusScreen == 1) || (gLevelStartStatusScreenTimer != 0))) { RCP_SetupDL(&gMasterDisp, 0x4C); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 0, 255); if ((arg2 == 0) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE)) { @@ -723,11 +722,11 @@ void func_hud_80086CC8(void) { f32 sp18; f32 temp; - if ((gPlayState != PLAY_PAUSE) && (gLevelStatusScreenTimer != 0)) { - gLevelStatusScreenTimer -= 1; + if ((gPlayState != PLAY_PAUSE) && (gLevelStartStatusScreenTimer != 0)) { + gLevelStartStatusScreenTimer -= 1; } - if (gLevelStatusScreenTimer == 1) { + if (gLevelStartStatusScreenTimer == 1) { D_80161718 = 30; D_8016171C = 0; } @@ -735,7 +734,7 @@ void func_hud_80086CC8(void) { temp = 108.0f; sp18 = 81.0f; - if (gLevelStatusScreenTimer != 0) { + if (gLevelStartStatusScreenTimer != 0) { func_hud_80086C08(temp - 4.5f - 32.0f, sp18 - 24.0f - 4.0f, 7.4f, 3.9f); if (gCurrentLevel != LEVEL_TRAINING) { @@ -1052,12 +1051,12 @@ void func_hud_80087B5C(void) { f32 y5; f32 y6; - if (D_ctx_80177830 == 0) { + if (gShowLevelClearStatusScreen == 0) { Audio_KillSfxById(0x41007012); D_801617C0[0] = 0; } - if ((gPlayState != PLAY_PAUSE) && (D_ctx_80177830 == 1) && (!D_801617E8[0])) { + if ((gPlayState != PLAY_PAUSE) && (gShowLevelClearStatusScreen == 1) && (!D_801617E8[0])) { switch (D_801617C0[0]) { case 0: D_801617C0[5] = gHitCount; @@ -1175,7 +1174,7 @@ void func_hud_80087B5C(void) { D_801617C0[6]--; } - if (D_ctx_80177830 == 1) { + if (gShowLevelClearStatusScreen == 1) { x0 = 128.0f; y0 = 30.0f; @@ -1259,14 +1258,14 @@ void func_hud_800884E4(void) { s32 mask; s32 i; - D_ctx_80177B70[gCurrentPlanet] = gHitCount; + D_ctx_80177B70[gMissionNumber] = gHitCount; mask = 0x00FF0000; for (i = 0; i < 3; i++) { if (gTeamShields[3 - i] <= 0) { - D_ctx_80177B50[gCurrentPlanet] ^= mask; + D_ctx_80177B50[gMissionNumber] ^= mask; } else { - D_ctx_80177B50[gCurrentPlanet] |= mask; + D_ctx_80177B50[gMissionNumber] |= mask; } mask >>= 8; } @@ -1291,7 +1290,7 @@ void func_hud_80088564(void) { } if (D_play_800D3180[gCurrentLevel] == 2) { - D_ctx_80177BB0[gCurrentPlanet] = 1; + D_ctx_80177BB0[gMissionNumber] = 1; if (gExpertMode) { gSaveFile.save.data.planet[planetId].expertMedal = 1; @@ -1300,7 +1299,7 @@ void func_hud_80088564(void) { } } - gCurrentPlanet++; + gMissionNumber++; gHitCount = 0; Save_Write(); @@ -1415,7 +1414,7 @@ void func_hud_80088970(void) { player = &gPlayer[gPlayerNum]; - if ((gPlayState == PLAY_PAUSE) && !gLevelStatusScreenTimer && !gVersusMode) { + if ((gPlayState == PLAY_PAUSE) && !gLevelStartStatusScreenTimer && !gVersusMode) { switch (D_80161810[0]) { case 0: D_80161838[0] = 0; @@ -1491,7 +1490,7 @@ void func_hud_80088970(void) { gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; D_game_80161A34 = 7; - D_ctx_80178410 = 0; + gStarCount = 0; break; } else { if (gFillScreenAlpha == 0) { @@ -1570,7 +1569,7 @@ void func_hud_80088970(void) { gScreenFlashTimer = 0; gPlayer[0].timer_1F8 = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; - D_ctx_8017837C = 7; + gFadeoutType = 7; gDrawMode = DRAW_PLAY; gPlayState = PLAY_UPDATE; @@ -1584,7 +1583,7 @@ void func_hud_80088970(void) { } } - if ((D_80161810[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && (gLevelStatusScreenTimer == 0)) { + if ((D_80161810[3] == 0) && (gPlayState == PLAY_PAUSE) && !gVersusMode && (gLevelStartStatusScreenTimer == 0)) { switch (D_80161810[0]) { case 0: case 1: @@ -2014,7 +2013,7 @@ s32 func_hud_8008A4DC(void) { return 0; } - if (gLevelStatusScreenTimer) { + if (gLevelStartStatusScreenTimer) { D_800D1E10 = 60.0f; } else { Math_SmoothStepToF(&D_800D1E10, 0.0f, 0.3f, 10.0f, 0.1f); @@ -2101,9 +2100,9 @@ s32 func_hud_8008A4DC(void) { break; case LEVEL_SECTOR_Y: - if ((fabsf(gObjects58[0].obj.pos.x) < temp2 + 1000.0f) && - (fabsf(gObjects58[0].obj.pos.z) < temp2 + 1000.0f)) { - temp = 150.0f + ((12500.0f + gObjects58[0].obj.pos.z) / 446.42f); + if ((fabsf(gScenery360[0].obj.pos.x) < temp2 + 1000.0f) && + (fabsf(gScenery360[0].obj.pos.z) < temp2 + 1000.0f)) { + temp = 150.0f + ((12500.0f + gScenery360[0].obj.pos.z) / 446.42f); if ((y < 150.0f) || (y > 206.0f)) { break; @@ -2851,7 +2850,7 @@ void func_hud_8008CBE4(void) { D_80161748[gPlayerNum] = i + 1; } - if ((D_80161748[gPlayerNum] == (i + 1)) && (D_80161738[gPlayerNum])) { + if ((D_80161748[gPlayerNum] == (i + 1)) && (D_80161738[gPlayerNum] != 0)) { D_80161738[gPlayerNum]--; if (D_80161738[gPlayerNum] & 4) { continue; @@ -2948,12 +2947,12 @@ void func_hud_8008D4F0(f32 arg0, f32 arg1) { D_800D211C[var_v1] = arg1; } - temp_fs0 = gPlayer[gPlayerNum].unk_2BC * (1.0f / 90.0f); + temp_fs0 = gPlayer[gPlayerNum].boostMeter * (1.0f / 90.0f); temp_fv0 = 1.0f - temp_fs0; temp2 = sp68 * temp_fs0; - if (!gPlayer[gPlayerNum].unk_2B4) { + if (!gPlayer[gPlayerNum].boostCooldown) { Math_SmoothStepToF(&D_800D19AC[var_v1], 255.0f, 0.4f, 100.0f, 0.01f); } else { Math_SmoothStepToF(&D_800D19AC[var_v1], 100.0f, 0.4f, 100.0f, 0.01f); @@ -4159,22 +4158,22 @@ bool func_hud_800915FC(Actor* actor) { f32 y; Vec3f vec; Boss* boss; - Object_58* obj58; + Scenery360* scenery360; bool ret = false; Math_Vec3fFromAngles(&vec, 0.0f, actor->unk_0F4.y, 650.0f + actor->fwork[9] * 10.0f); if (gLevelMode == LEVELMODE_ALL_RANGE) { - for (i = 0, obj58 = &gObjects58[0]; i < 200; i++, obj58++) { - if (obj58->obj.status != OBJ_ACTIVE) { + for (i = 0, scenery360 = &gScenery360[0]; i < 200; i++, scenery360++) { + if (scenery360->obj.status != OBJ_ACTIVE) { continue; } - if (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + vec.x)) > 1200.0f) { + if (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + vec.x)) > 1200.0f) { continue; } - if (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + vec.z)) > 1200.0f) { + if (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + vec.z)) > 1200.0f) { continue; } @@ -4229,7 +4228,8 @@ bool func_hud_80091864(Actor* actor) { sp44 += 40.0f; if (sp44 >= 360.0f) { sp44 -= 360.0f; - } else if ((actor->obj.pos.y < (gGroundLevel + 50.0f)) && (gLevelType == LEVELTYPE_PLANET) && (sp44 > 180.0f)) { + } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (gLevelType == LEVELTYPE_PLANET) && + (sp44 > 180.0f)) { sp44 = 0.0f; } actor->iwork[0] = 0; @@ -4286,8 +4286,8 @@ bool func_hud_80091B90(Actor* actor) { actor->fwork[14] -= actor->fwork[14] * 0.1f; actor->fwork[12] -= actor->fwork[12] * 0.1f; - if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { - actor->obj.pos.y = gGroundLevel + 40.0f; + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f) && (gLevelType == LEVELTYPE_PLANET)) { + actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } actor->vel.z -= D_ctx_80177D08; @@ -4514,8 +4514,8 @@ bool func_hud_800924E0(Actor* actor) { actor->vel.y = dest.y; actor->vel.z = dest.z; - if (actor->obj.pos.y < gGroundLevel + 50.0f) { - actor->obj.pos.y = gGroundLevel + 50.0f; + if (actor->obj.pos.y < gGroundHeight + 50.0f) { + actor->obj.pos.y = gGroundHeight + 50.0f; actor->vel.y = 0.0f; } } @@ -4888,7 +4888,7 @@ f32 D_800D22CC = 260.0f; s32 D_800D22D0 = 50; s32 D_800D22D4 = 2; -void func_hud_800935E8(Player* player) { +void HUD_AquasStart(Player* player) { Vec3f D_800D22D8[] = { { -1730.0f, 1600.0f, -6690.0f }, { -830.0f, 1600.0f, -7380.0f }, { 0.0f, 1600.0f, -7380.0f } }; @@ -4923,7 +4923,7 @@ void func_hud_800935E8(Player* player) { func_hud_80093310(); gCsFrameCount = 0; D_ctx_80177AB0 = 1; - D_ctx_80177AC8 = 1; + gAqDrawMode = 1; player->unk_234 = 0; player->unk_1D0 = 1; player->unk_208 = 0; @@ -5058,7 +5058,7 @@ void func_hud_800935E8(Player* player) { break; case 2: - gPlayerFillScreenAlphas[0] = 0; + gPlayerGlareAlphas[0] = 0; D_ctx_80177A10[0] = gLight1R; D_ctx_80177A10[1] = gLight1G; @@ -5189,7 +5189,7 @@ void func_hud_800935E8(Player* player) { if (player->timer_1F8 < 736) { player->unk_1D0 = 4; - D_ctx_80177AC8 = 1; + gAqDrawMode = 1; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 255; } @@ -5226,7 +5226,7 @@ void func_hud_800935E8(Player* player) { player->timer_1F8 = 1000; - D_ctx_80177AC8 = 0; + gAqDrawMode = 0; gFillScreenAlphaTarget = 0; Object_Kill(&actor->obj, actor->sfxSource); @@ -5260,7 +5260,7 @@ void func_hud_800935E8(Player* player) { } if (player->timer_1F8 <= 900) { - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; @@ -5580,7 +5580,7 @@ void func_hud_80095538(Actor* actor, s32 arg1) { actor->unk_0B6 = 47; Object_SetInfo(&actor->info, actor->obj.id); } -void func_hud_80095604(Player* player) { +void HUD_AquasComplete(Player* player) { s32 i; s32 j; Actor* actor; @@ -5722,7 +5722,7 @@ void func_hud_80095604(Player* player) { case 10: player->unk_234 = 1; - D_ctx_80177AC8 = 2; + gAqDrawMode = 2; player->unk_1D0 = 11; player->unk_0F8 = player->unk_0EC = player->unk_12C = player->unk_130 = 0.0f; @@ -5865,7 +5865,7 @@ void func_hud_80095604(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; Audio_FadeOutAll(10); - D_ctx_8017837C = 4; + gFadeoutType = 4; } } @@ -5925,11 +5925,11 @@ void func_hud_80095604(Player* player) { break; case 1000: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1200: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; } @@ -6066,7 +6066,7 @@ void func_hud_80096A74(Player* player) { button = gControllerHold[player->num].button; gControllerHold[player->num].button = gBoostButton[player->num]; - player->unk_2BC = 1; + player->boostMeter = 1; player->timer_1F8 = 60; func_play_800B2574(player); @@ -6084,7 +6084,7 @@ void func_hud_80096A74(Player* player) { if (gCsFrameCount == 300) { D_ctx_80177CE8 = 0; - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_0D0 = D_play_80161A54; player->unk_1D0 = 0; diff --git a/src/engine/fox_load.c b/src/engine/fox_load.c index 10081372..14023192 100644 --- a/src/engine/fox_load.c +++ b/src/engine/fox_load.c @@ -7,7 +7,7 @@ u8 sFillTimer = 3; #include "fox_load_inits.c" -OverlayInit sCurrentOverlay = { +Scene sCurrentScene = { NO_OVERLAY, { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -26,7 +26,7 @@ OverlayInit sCurrentOverlay = { /* 0xF */ NO_SEGMENT }, }; -void Overlay_LoadSegment(void* vRomAddress, void* dest, ptrdiff_t size) { +void Load_RomFile(void* vRomAddress, void* dest, ptrdiff_t size) { s32 i; for (i = 0; gDmaTable[i].pRom.end != NULL; i++) { @@ -36,7 +36,7 @@ void Overlay_LoadSegment(void* vRomAddress, void* dest, ptrdiff_t size) { } else { Lib_FillScreen(true); sFillTimer = 3; - D_game_80161A39 = true; + gGameStandby = true; Lib_DmaRead(gDmaTable[i].pRom.start, gFrameBuffers, SEGMENT_SIZE(gDmaTable[i].pRom)); Mio0_Decompress(gFrameBuffers, dest); } @@ -45,43 +45,43 @@ void Overlay_LoadSegment(void* vRomAddress, void* dest, ptrdiff_t size) { } } -u8 Overlay_Init(OverlayInit* ovlInit) { +u8 Load_SceneFiles(Scene* scene) { u8* ramPtr = SEGMENT_VRAM_START(ovl_i1); u8 segment; - u8 changeOvl = false; + u8 changeScene = false; - if (ovlInit->ovl.rom.start == (0, sCurrentOverlay.ovl.rom.start)) { // fake because D_800CBDD4 is probably 2D array - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.rom); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.bss); + if (scene->ovl.rom.start == (0, sCurrentScene.ovl.rom.start)) { // fake because D_800CBDD4 is probably 2D array + ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.rom); + ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.bss); } else { - sCurrentOverlay.ovl.rom.start = ovlInit->ovl.rom.start; - sCurrentOverlay.ovl.rom.end = ramPtr; - if (ovlInit->ovl.rom.start != 0) { - changeOvl = true; - Overlay_LoadSegment(ovlInit->ovl.rom.start, ramPtr, SEGMENT_SIZE(ovlInit->ovl.rom)); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.rom); - bzero(ovlInit->ovl.bss.start, SEGMENT_SIZE(ovlInit->ovl.bss)); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->ovl.bss); + sCurrentScene.ovl.rom.start = scene->ovl.rom.start; + sCurrentScene.ovl.rom.end = ramPtr; + if (scene->ovl.rom.start != 0) { + changeScene = true; + Load_RomFile(scene->ovl.rom.start, ramPtr, SEGMENT_SIZE(scene->ovl.rom)); + ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.rom); + bzero(scene->ovl.bss.start, SEGMENT_SIZE(scene->ovl.bss)); + ramPtr = ramPtr + SEGMENT_SIZE(scene->ovl.bss); } } segment = 0; - while ((segment < 15) && (ovlInit->assets[segment].start == sCurrentOverlay.assets[segment].start) && - changeOvl == 0) { - if (ovlInit->assets[segment].start != 0) { + while ((segment < 15) && (scene->assets[segment].start == sCurrentScene.assets[segment].start) && + (changeScene == false)) { + if (scene->assets[segment].start != 0) { gSegments[segment + 1] = K0_TO_PHYS(ramPtr); gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr)); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->assets[segment]); + ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]); } segment += 1; } for (segment; segment < 15; segment += 1) { - sCurrentOverlay.assets[segment].start = ovlInit->assets[segment].start; - sCurrentOverlay.assets[segment].end = ramPtr; - if (ovlInit->assets[segment].start != 0) { + sCurrentScene.assets[segment].start = scene->assets[segment].start; + sCurrentScene.assets[segment].end = ramPtr; + if (scene->assets[segment].start != 0) { gSegments[segment + 1] = K0_TO_PHYS(ramPtr); gSPSegment(gUnkDisp1++, segment + 1, K0_TO_PHYS(ramPtr)); - Overlay_LoadSegment(ovlInit->assets[segment].start, ramPtr, SEGMENT_SIZE(ovlInit->assets[segment])); - ramPtr = ramPtr + SEGMENT_SIZE(ovlInit->assets[segment]); + Load_RomFile(scene->assets[segment].start, ramPtr, SEGMENT_SIZE(scene->assets[segment])); + ramPtr = ramPtr + SEGMENT_SIZE(scene->assets[segment]); } } @@ -90,112 +90,112 @@ u8 Overlay_Init(OverlayInit* ovlInit) { } else if (gStartNMI == 0) { Lib_FillScreen(false); } - return changeOvl; + return changeScene; } -u8 Overlay_Load(u8 ovlSetup, u8 ovlStage) { - u8 changeOvl; +u8 Load_SceneSetup(u8 sceneId, u8 sceneSetup) { + u8 changeScene; - switch (ovlSetup) { - case OVL_SETUP_TITLE: - changeOvl = Overlay_Init(&sOvlmenu_Title[ovlStage]); - if (changeOvl == true) { + switch (sceneId) { + case SCENE_TITLE: + changeScene = Load_SceneFiles(&sOvlmenu_Title[sceneSetup]); + if (changeScene == true) { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_22); } break; - case OVL_SETUP_MENU: - changeOvl = Overlay_Init(&sOvlmenu_Option[ovlStage]); + case SCENE_MENU: + changeScene = Load_SceneFiles(&sOvlmenu_Option[sceneSetup]); break; - case OVL_SETUP_MAP: - changeOvl = Overlay_Init(&sOvlmenu_Map[ovlStage]); + case SCENE_MAP: + changeScene = Load_SceneFiles(&sOvlmenu_Map[sceneSetup]); break; - case OVL_SETUP_GAME_OVER: - changeOvl = Overlay_Init(&sOvlmenu_GameOver[ovlStage]); + case SCENE_GAME_OVER: + changeScene = Load_SceneFiles(&sOvlmenu_GameOver[sceneSetup]); break; - case OVL_SETUP_CORNERIA: - changeOvl = Overlay_Init(&sOvli1_Corneria[ovlStage]); + case SCENE_CORNERIA: + changeScene = Load_SceneFiles(&sOvli1_Corneria[sceneSetup]); break; - case OVL_SETUP_METEO: - changeOvl = Overlay_Init(&sOvli2_Meteo[ovlStage]); + case SCENE_METEO: + changeScene = Load_SceneFiles(&sOvli2_Meteo[sceneSetup]); break; - case OVL_SETUP_TITANIA: - changeOvl = Overlay_Init(&sOvli5_Titania[ovlStage]); + case SCENE_TITANIA: + changeScene = Load_SceneFiles(&sOvli5_Titania[sceneSetup]); break; - case OVL_SETUP_SECTOR_X: - changeOvl = Overlay_Init(&sOvli2_SectorX[ovlStage]); + case SCENE_SECTOR_X: + changeScene = Load_SceneFiles(&sOvli2_SectorX[sceneSetup]); break; - case OVL_SETUP_SECTOR_Z: - changeOvl = Overlay_Init(&sOvli4_SectorZ[ovlStage]); + case SCENE_SECTOR_Z: + changeScene = Load_SceneFiles(&sOvli4_SectorZ[sceneSetup]); break; - case OVL_SETUP_AQUAS: - changeOvl = Overlay_Init(&sOvli3_Aquas[ovlStage]); + case SCENE_AQUAS: + changeScene = Load_SceneFiles(&sOvli3_Aquas[sceneSetup]); break; - case OVL_SETUP_AREA_6: - changeOvl = Overlay_Init(&sOvli3_Area6[ovlStage]); + case SCENE_AREA_6: + changeScene = Load_SceneFiles(&sOvli3_Area6[sceneSetup]); break; - case OVL_SETUP_FORTUNA: - changeOvl = Overlay_Init(&sOvli4_Fortuna[ovlStage]); + case SCENE_FORTUNA: + changeScene = Load_SceneFiles(&sOvli4_Fortuna[sceneSetup]); break; - case OVL_SETUP_UNK_4: - changeOvl = Overlay_Init(&sOvli3_Unk4[ovlStage]); + case SCENE_UNK_4: + changeScene = Load_SceneFiles(&sOvli3_Unk4[sceneSetup]); break; - case OVL_SETUP_SECTOR_Y: - changeOvl = Overlay_Init(&sOvli6_SectorY[ovlStage]); + case SCENE_SECTOR_Y: + changeScene = Load_SceneFiles(&sOvli6_SectorY[sceneSetup]); break; - case OVL_SETUP_SOLAR: - changeOvl = Overlay_Init(&sOvli3_Solar[ovlStage]); + case SCENE_SOLAR: + changeScene = Load_SceneFiles(&sOvli3_Solar[sceneSetup]); break; - case OVL_SETUP_ZONESS: - changeOvl = Overlay_Init(&sOvli3_Zoness[ovlStage]); + case SCENE_ZONESS: + changeScene = Load_SceneFiles(&sOvli3_Zoness[sceneSetup]); break; - case OVL_SETUP_VENOM_ANDROSS: - changeOvl = Overlay_Init(&sOvli6_Andross[ovlStage]); + case SCENE_VENOM_ANDROSS: + changeScene = Load_SceneFiles(&sOvli6_Andross[sceneSetup]); break; - case OVL_SETUP_TRAINING: - changeOvl = Overlay_Init(&sOvli1_Training[ovlStage]); + case SCENE_TRAINING: + changeScene = Load_SceneFiles(&sOvli1_Training[sceneSetup]); break; - case OVL_SETUP_VENOM_1: - changeOvl = Overlay_Init(&sOvli1_Venom1[ovlStage]); + case SCENE_VENOM_1: + changeScene = Load_SceneFiles(&sOvli1_Venom1[sceneSetup]); break; - case OVL_SETUP_VENOM_2: - changeOvl = Overlay_Init(&sOvli6_Venom2[ovlStage]); + case SCENE_VENOM_2: + changeScene = Load_SceneFiles(&sOvli6_Venom2[sceneSetup]); break; - case OVL_SETUP_20: - changeOvl = Overlay_Init(&sOvli2_Setup20[ovlStage]); + case SCENE_20: + changeScene = Load_SceneFiles(&sOvli2_Setup20[sceneSetup]); break; - case OVL_SETUP_BOLSE: - changeOvl = Overlay_Init(&sOvli4_Bolse[ovlStage]); + case SCENE_BOLSE: + changeScene = Load_SceneFiles(&sOvli4_Bolse[sceneSetup]); break; - case OVL_SETUP_KATINA: - changeOvl = Overlay_Init(&sOvli4_Katina[ovlStage]); + case SCENE_KATINA: + changeScene = Load_SceneFiles(&sOvli4_Katina[sceneSetup]); break; - case OVL_SETUP_MACBETH: - changeOvl = Overlay_Init(&sOvli5_Macbeth[ovlStage]); + case SCENE_MACBETH: + changeScene = Load_SceneFiles(&sOvli5_Macbeth[sceneSetup]); break; - case OVL_SETUP_VERSUS: - changeOvl = Overlay_Init(&sOvli2_Versus[ovlStage]); - if (changeOvl == true) { + case SCENE_VERSUS: + changeScene = Load_SceneFiles(&sOvli2_Versus[sceneSetup]); + if (changeScene == true) { AUDIO_SET_SPEC_ALT(SFXCHAN_3, AUDIOSPEC_16); } break; - case OVL_SETUP_LOGO: - changeOvl = Overlay_Init(&sNoOvl_Logo[ovlStage]); // Logo does not load an overlay file - if (changeOvl == true) { + case SCENE_LOGO: + changeScene = Load_SceneFiles(&sNoOvl_Logo[sceneSetup]); // Logo does not load an overlay file + if (changeScene == true) { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_14); } break; - case OVL_SETUP_CREDITS: - changeOvl = Overlay_Init(&sOvlending_Ending[ovlStage]); + case SCENE_CREDITS: + changeScene = Load_SceneFiles(&sOvlending_Ending[sceneSetup]); break; default: (void) "DMA MODE ERROR %d\n"; - changeOvl = false; + changeScene = false; break; } - return changeOvl; + return changeScene; } -void Overlay_InitDma(void) { +void Load_InitDmaAndMsg(void) { Lib_DmaRead(SEGMENT_ROM_START(dma_table), SEGMENT_VRAM_START(dma_table), SEGMENT_ROM_SIZE(dma_table)); - Overlay_LoadSegment(SEGMENT_ROM_START(ast_radio), SEGMENT_VRAM_START(ast_radio), SEGMENT_ROM_SIZE(ast_radio)); + Load_RomFile(SEGMENT_ROM_START(ast_radio), SEGMENT_VRAM_START(ast_radio), SEGMENT_ROM_SIZE(ast_radio)); } diff --git a/src/engine/fox_load_inits.c b/src/engine/fox_load_inits.c index 621f718b..c2cedfc0 100644 --- a/src/engine/fox_load_inits.c +++ b/src/engine/fox_load_inits.c @@ -21,7 +21,7 @@ #define ROM_SEGMENT(file) \ { SEGMENT_ROM_START(file), SEGMENT_ROM_END(file) } -OverlayInit sNoOvl_Logo[1] = { +Scene sNoOvl_Logo[1] = { { NO_OVERLAY, { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -40,7 +40,7 @@ OverlayInit sNoOvl_Logo[1] = { /* 0xF */ ROM_SEGMENT(ast_logo) } }, }; -OverlayInit sOvlending_Ending[6] = { +Scene sOvlending_Ending[6] = { { OVERLAY_OFFSETS(ovl_ending), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -139,7 +139,7 @@ OverlayInit sOvlending_Ending[6] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlmenu_Title[1] = { +Scene sOvlmenu_Title[1] = { { OVERLAY_OFFSETS(ovl_menu), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -158,7 +158,7 @@ OverlayInit sOvlmenu_Title[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlmenu_Option[1] = { +Scene sOvlmenu_Option[1] = { { OVERLAY_OFFSETS(ovl_menu), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -177,7 +177,7 @@ OverlayInit sOvlmenu_Option[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlmenu_Map[1] = { +Scene sOvlmenu_Map[1] = { { OVERLAY_OFFSETS(ovl_menu), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -196,7 +196,7 @@ OverlayInit sOvlmenu_Map[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvlmenu_GameOver[1] = { +Scene sOvlmenu_GameOver[1] = { { OVERLAY_OFFSETS(ovl_menu), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, @@ -215,7 +215,7 @@ OverlayInit sOvlmenu_GameOver[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli1_Corneria[1] = { +Scene sOvli1_Corneria[1] = { { OVERLAY_OFFSETS(ovl_i1), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -234,7 +234,7 @@ OverlayInit sOvli1_Corneria[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli2_Meteo[2] = { +Scene sOvli2_Meteo[2] = { { OVERLAY_OFFSETS(ovl_i2), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -269,7 +269,7 @@ OverlayInit sOvli2_Meteo[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli5_Titania[6] = { +Scene sOvli5_Titania[6] = { { OVERLAY_OFFSETS(ovl_i5), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -368,7 +368,7 @@ OverlayInit sOvli5_Titania[6] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli2_SectorX[2] = { +Scene sOvli2_SectorX[2] = { { OVERLAY_OFFSETS(ovl_i2), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -403,7 +403,7 @@ OverlayInit sOvli2_SectorX[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli4_SectorZ[1] = { +Scene sOvli4_SectorZ[1] = { { OVERLAY_OFFSETS(ovl_i4), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -422,7 +422,7 @@ OverlayInit sOvli4_SectorZ[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Aquas[1] = { +Scene sOvli3_Aquas[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -441,7 +441,7 @@ OverlayInit sOvli3_Aquas[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Area6[1] = { +Scene sOvli3_Area6[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -460,7 +460,7 @@ OverlayInit sOvli3_Area6[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli4_Fortuna[2] = { +Scene sOvli4_Fortuna[2] = { { OVERLAY_OFFSETS(ovl_i4), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -495,7 +495,7 @@ OverlayInit sOvli4_Fortuna[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Unk4[1] = { +Scene sOvli3_Unk4[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -514,7 +514,7 @@ OverlayInit sOvli3_Unk4[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli6_SectorY[1] = { +Scene sOvli6_SectorY[1] = { { OVERLAY_OFFSETS(ovl_i6), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -533,7 +533,7 @@ OverlayInit sOvli6_SectorY[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Solar[1] = { +Scene sOvli3_Solar[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -552,7 +552,7 @@ OverlayInit sOvli3_Solar[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli3_Zoness[1] = { +Scene sOvli3_Zoness[1] = { { OVERLAY_OFFSETS(ovl_i3), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -571,7 +571,7 @@ OverlayInit sOvli3_Zoness[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli1_Venom1[1] = { +Scene sOvli1_Venom1[1] = { { OVERLAY_OFFSETS(ovl_i1), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -590,7 +590,7 @@ OverlayInit sOvli1_Venom1[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli6_Andross[1] = { +Scene sOvli6_Andross[1] = { { OVERLAY_OFFSETS(ovl_i6), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -609,7 +609,7 @@ OverlayInit sOvli6_Andross[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli6_Venom2[2] = { +Scene sOvli6_Venom2[2] = { { OVERLAY_OFFSETS(ovl_i6), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -644,7 +644,7 @@ OverlayInit sOvli6_Venom2[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli2_Setup20[1] = { +Scene sOvli2_Setup20[1] = { { OVERLAY_OFFSETS(ovl_i2), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -663,7 +663,7 @@ OverlayInit sOvli2_Setup20[1] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli4_Bolse[1] = { +Scene sOvli4_Bolse[1] = { { OVERLAY_OFFSETS(ovl_i4), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_space), @@ -682,7 +682,7 @@ OverlayInit sOvli4_Bolse[1] = { /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, }; -OverlayInit sOvli4_Katina[1] = { +Scene sOvli4_Katina[1] = { { OVERLAY_OFFSETS(ovl_i4), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -701,7 +701,7 @@ OverlayInit sOvli4_Katina[1] = { /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, }; -OverlayInit sOvli5_Macbeth[2] = { +Scene sOvli5_Macbeth[2] = { { OVERLAY_OFFSETS(ovl_i5), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -736,7 +736,7 @@ OverlayInit sOvli5_Macbeth[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sOvli1_Training[1] = { +Scene sOvli1_Training[1] = { { OVERLAY_OFFSETS(ovl_i1), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -755,7 +755,7 @@ OverlayInit sOvli1_Training[1] = { /* 0xF */ ROM_SEGMENT(ast_star_wolf) } }, }; -OverlayInit sOvli2_Versus[2] = { +Scene sOvli2_Versus[2] = { { OVERLAY_OFFSETS(ovl_i2), { /* 0x1 */ ROM_SEGMENT(ast_common), /* 0x2 */ ROM_SEGMENT(ast_bg_planet), @@ -790,7 +790,7 @@ OverlayInit sOvli2_Versus[2] = { /* 0xF */ NO_SEGMENT } }, }; -OverlayInit sUnused_Overlay[1] = { +Scene sOvlUnused_Unk[1] = { { OVERLAY_OFFSETS(ovl_unused), { /* 0x1 */ NO_SEGMENT, /* 0x2 */ NO_SEGMENT, diff --git a/src/engine/fox_play.c b/src/engine/fox_play.c index 5a35483e..8f424900 100644 --- a/src/engine/fox_play.c +++ b/src/engine/fox_play.c @@ -22,13 +22,13 @@ #include "assets/ast_area_6.h" #include "assets/ast_zoness.h" -UNK_TYPE D_800D2F50 = 0; +UNK_TYPE D_800D2F50 = 0; // unused s32 D_800D2F54 = 0; f32 D_800D2F58 = 0.0f; f32 D_800D2F5C = 0.0f; f32 D_800D2F60 = 0.0f; f32 D_800D2F64 = 0.0f; -u8 D_play_800D2F68 = false; +u8 gVenomHardClear = 0; u8 D_800D2F6C[20] = { PLANET_CORNERIA, PLANET_METEO, PLANET_SECTOR_X, PLANET_AREA_6, PLANET_AREA_6, PLANET_SECTOR_Y, SAVE_SLOT_VENOM_1, SAVE_SLOT_SOLAR, PLANET_ZONESS, SAVE_SLOT_VENOM_1, @@ -241,18 +241,18 @@ void func_play_800A4C40(Player* player) { Matrix_RotateZ(gCalcMatrix, -(player->unk_0F8 * M_DTOR), MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &sp54, &sp3C); Matrix_MultVec3f(gCalcMatrix, &sp48, &sp30); - if (player->pos.y < (gGroundLevel + 100.0f)) { - if ((sp3C.y < gGroundLevel + 80.0f) && ((gGameFrameCount % 2) == 0)) { + if (player->pos.y < (gGroundHeight + 100.0f)) { + if ((sp3C.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { if (D_play_80161A64) {} - func_effect_8007ACE0(sp3C.x, gGroundLevel, sp3C.z, 0.1f, 2.0f, + func_effect_8007ACE0(sp3C.x, gGroundHeight, sp3C.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 + 20.0f); } - if ((sp30.y < gGroundLevel + 80.0f) && ((gGameFrameCount % 2) == 0)) { - func_effect_8007ACE0(sp30.x, gGroundLevel, sp30.z, 0.1f, 2.0f, + if ((sp30.y < gGroundHeight + 80.0f) && ((gGameFrameCount % 2) == 0)) { + func_effect_8007ACE0(sp30.x, gGroundHeight, sp30.z, 0.1f, 2.0f, player->unk_0E8 + player->unk_114 - 20.0f); } } - if ((sp30.y < gGroundLevel + 80.0f) || (sp3C.y < gGroundLevel + 80.0f)) { + if ((sp30.y < gGroundHeight + 80.0f) || (sp3C.y < gGroundHeight + 80.0f)) { if (D_play_80161A64 == 0) { D_play_80161A64 = 1; AUDIO_PLAY_SFX(0x1100000B, player->sfxSource, 0); @@ -264,11 +264,11 @@ void func_play_800A4C40(Player* player) { } } -void Object_58_Initialize(Object_58* obj58) { +void Scenery360_Initialize(Scenery360* scenery360) { s32 i; - u8* ptr = (u8*) obj58; + u8* ptr = (u8*) scenery360; - for (i = 0; i < sizeof(Object_58); i++, ptr++) { + for (i = 0; i < sizeof(Scenery360); i++, ptr++) { *ptr = 0; } } @@ -301,14 +301,14 @@ void func_play_800A4F7C(void) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id == OBJ_80_147) { - Object_58_Initialize(&gObjects58[i]); - gObjects58[i].obj.status = OBJ_ACTIVE; - gObjects58[i].obj.id = gLevelObjects[j].id; - gObjects58[i].obj.pos.x = gLevelObjects[j].xPos; - gObjects58[i].obj.pos.z = gLevelObjects[j].zPos1; - gObjects58[i].obj.pos.y = gLevelObjects[j].yPos; - Object_SetInfo(&gObjects58[i].info, gObjects58[i].obj.id); + if (gLevelObjects[j].id == OBJ_SCENERY_147) { + Scenery360_Initialize(&gScenery360[i]); + gScenery360[i].obj.status = OBJ_ACTIVE; + gScenery360[i].obj.id = gLevelObjects[j].id; + gScenery360[i].obj.pos.x = gLevelObjects[j].xPos; + gScenery360[i].obj.pos.z = gLevelObjects[j].zPos1; + gScenery360[i].obj.pos.y = gLevelObjects[j].yPos; + Object_SetInfo(&gScenery360[i].info, gScenery360[i].obj.id); i++; } } @@ -316,15 +316,15 @@ void func_play_800A4F7C(void) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } - if (gLevelObjects[j].id != OBJ_80_147) { - Object_58_Initialize(&gObjects58[i]); - gObjects58[i].obj.status = OBJ_ACTIVE; - gObjects58[i].obj.id = gLevelObjects[j].id; - gObjects58[i].obj.pos.x = gLevelObjects[j].xPos; - gObjects58[i].obj.pos.z = gLevelObjects[j].zPos1; - gObjects58[i].obj.pos.y = gLevelObjects[j].yPos; - gObjects58[i].obj.rot.y = gLevelObjects[j].rot.y; - Object_SetInfo(&gObjects58[i].info, gObjects58[i].obj.id); + if (gLevelObjects[j].id != OBJ_SCENERY_147) { + Scenery360_Initialize(&gScenery360[i]); + gScenery360[i].obj.status = OBJ_ACTIVE; + gScenery360[i].obj.id = gLevelObjects[j].id; + gScenery360[i].obj.pos.x = gLevelObjects[j].xPos; + gScenery360[i].obj.pos.z = gLevelObjects[j].zPos1; + gScenery360[i].obj.pos.y = gLevelObjects[j].yPos; + gScenery360[i].obj.rot.y = gLevelObjects[j].rot.y; + Object_SetInfo(&gScenery360[i].info, gScenery360[i].obj.id); i++; } } @@ -335,29 +335,29 @@ void func_play_800A5330(void) { void func_play_800A5338(void) { Sprite* sprite; - Object_58* obj58; + Scenery360* scenery360; s32 i; s32 j; gLevelObjects = SEGMENTED_TO_VIRTUAL(D_CO_603B074); - for (j = 0, obj58 = gObjects58; j < 200; j++) { + for (j = 0, scenery360 = gScenery360; j < 200; j++) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } if (gLevelObjects[j].id < OBJ_SPRITE_CO_POLE) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[j].id; - obj58->obj.pos.x = gLevelObjects[j].xPos; - obj58->obj.pos.z = gLevelObjects[j].zPos1; - obj58->obj.pos.y = gLevelObjects[j].yPos; - obj58->obj.rot.y = gLevelObjects[j].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - if (obj58->obj.id == OBJ_80_1) { - obj58->info.dList = D_CO_6020760; + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[j].id; + scenery360->obj.pos.x = gLevelObjects[j].xPos; + scenery360->obj.pos.z = gLevelObjects[j].zPos1; + scenery360->obj.pos.y = gLevelObjects[j].yPos; + scenery360->obj.rot.y = gLevelObjects[j].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + if (scenery360->obj.id == OBJ_SCENERY_1) { + scenery360->info.dList = D_CO_6020760; } - obj58++; + scenery360++; } } @@ -387,26 +387,26 @@ void func_play_800A5338(void) { } void func_play_800A55B0(void) { - Object_58* obj58; + Scenery360* scenery360; s32 i; s32 j; gLevelObjects = SEGMENTED_TO_VIRTUAL(D_SY_6030B14); - for (j = 0, obj58 = gObjects58; j < 200; j++) { + for (j = 0, scenery360 = gScenery360; j < 200; j++) { if (gLevelObjects[j].id <= OBJ_INVALID) { break; } if (gLevelObjects[j].id < OBJ_SPRITE_CO_POLE) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[j].id; - obj58->obj.pos.x = gLevelObjects[j].xPos; - obj58->obj.pos.z = gLevelObjects[j].zPos1; - obj58->obj.pos.y = gLevelObjects[j].yPos; - obj58->obj.rot.y = gLevelObjects[j].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[j].id; + scenery360->obj.pos.x = gLevelObjects[j].xPos; + scenery360->obj.pos.z = gLevelObjects[j].zPos1; + scenery360->obj.pos.y = gLevelObjects[j].yPos; + scenery360->obj.rot.y = gLevelObjects[j].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } i = 0; // fake? @@ -450,16 +450,16 @@ void func_play_800A57E0(void) { void Play_Setup(void) { s32 i; - D_ctx_80178410 = 0; - gLevelStage = 0; + gStarCount = 0; + gLevelPhase = 0; gMissedZoSearchlight = false; gSavedZoSearchlightStatus = false; - gOverlayStage = 0; + gSceneSetup = 0; gAllRangeCheckpoint = D_ctx_80177CA0 = 0; D_ctx_80177CB0 = 0.0f; - gSavedHitCount = gCsFrameCount = gLevelStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; + gSavedHitCount = gCsFrameCount = gLevelStartStatusScreenTimer = gLevelClearScreenTimer = gRadioState = 0; D_ctx_8017782C = 1; - if (((gCurrentLevel == LEVEL_VENOM_2) && (gNextLevelStage == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { + if (((gCurrentLevel == LEVEL_VENOM_2) && (gNextLevelPhase == 2)) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { return; } for (i = 1; i < 4; i++) { @@ -528,46 +528,46 @@ void func_play_800A594C(void) { gFovY = 45.0f; } -void func_play_800A5D6C(void) { +void Play_SetupStarfield(void) { u32 i; - MEM_ARRAY_ALLOCATE(D_ctx_80178288, 1000); - MEM_ARRAY_ALLOCATE(D_ctx_80178290, 1000); - MEM_ARRAY_ALLOCATE(D_ctx_80178298, 1000); + MEM_ARRAY_ALLOCATE(gStarOffsetsX, 1000); + MEM_ARRAY_ALLOCATE(gStarOffsetsY, 1000); + MEM_ARRAY_ALLOCATE(gStarFillColors, 1000); Rand_SetSeed(1, 29000, 9876); for (i = 0; i < 1000; i++) { - D_ctx_80178288[i] = RAND_FLOAT_SEEDED(480.0f) - 80.0f; - D_ctx_80178290[i] = RAND_FLOAT_SEEDED(360.0f) - 60.0f; - D_ctx_80178298[i] = FILL_COLOR(D_bg_800C9C3C[i % ARRAY_COUNT(D_bg_800C9C3C)]); + gStarOffsetsX[i] = RAND_FLOAT_SEEDED(480.0f) - 80.0f; + gStarOffsetsY[i] = RAND_FLOAT_SEEDED(360.0f) - 60.0f; + gStarFillColors[i] = FILL_COLOR(gStarColors[i % ARRAY_COUNT(gStarColors)]); } } void func_play_800A5EBC(void) { - func_play_800A5D6C(); - gGroundLevel = -25000.0f; - D_ctx_80178410 = 600; + Play_SetupStarfield(); + gGroundHeight = -25000.0f; + gStarCount = 600; if (gCurrentLevel == LEVEL_AREA_6) { - D_ctx_80178410 = 300; + gStarCount = 300; } if (gCurrentLevel == LEVEL_UNK_15) { - D_ctx_80178410 = 400; + gStarCount = 400; } if (gGameState != GSTATE_PLAY) { - D_ctx_80178410 = 800; + gStarCount = 800; } if (gCurrentLevel == LEVEL_FORTUNA) { - D_ctx_80178410 = 500; + gStarCount = 500; } if (gVersusMode) { - D_ctx_80178410 = 0; + gStarCount = 0; } if (gCurrentLevel == LEVEL_BOLSE) { - D_ctx_80178410 = 300; - gGroundLevel = -0.0f; + gStarCount = 300; + gGroundHeight = -0.0f; } if (gCurrentLevel == LEVEL_TRAINING) { - D_ctx_80178410 = 800; - gGroundLevel = -0.0f; + gStarCount = 800; + gGroundHeight = -0.0f; } } @@ -627,9 +627,9 @@ void Play_ClearObjectData(void) { for (i = 0; i < ARRAY_COUNT(gTexturedLines); i++) { TexturedLine_Initialize(&gTexturedLines[i]); } - for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { - Object_Kill(&gObjects80[i].obj, gObjects80[i].sfxSource); - Object_80_Initialize(&gObjects80[i]); + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + Object_Kill(&gScenery[i].obj, gScenery[i].sfxSource); + Scenery_Initialize(&gScenery[i]); } for (i = 0; i < ARRAY_COUNT(gSprites); i++) { Sprite_Initialize(&gSprites[i]); @@ -684,7 +684,7 @@ void Play_UpdateFillScreen(void) { } } gFillScreenAlphaStep = 16; - Math_SmoothStepToF(&D_ctx_8017836C, 0.0f, 1.0f, 0.04f, 0.001f); + Math_SmoothStepToF(&gLight3Brightness, 0.0f, 1.0f, 0.04f, 0.001f); if (gScreenFlashTimer != 0) { gScreenFlashTimer--; if (gScreenFlashTimer & 2) { @@ -777,7 +777,7 @@ bool func_play_800A6A74(void) { } void Player_DamageWings(Player* player, s32 side, s32 damage) { - if ((player->form == FORM_ARWING) && (D_ctx_80177AB8[player->num] < 1.0f)) { + if ((player->form == FORM_ARWING) && (gShieldAlpha[player->num] < 1.0f)) { if (side == 1) { D_ctx_80177D40[player->num] = 30; if (player->wings.rightState == WINGSTATE_INTACT) { @@ -842,10 +842,10 @@ void Player_ApplyDamage(Player* player, s32 direction, s32 damage) { } else { player->timer_498 = 20; } - if (D_ctx_80177AD0[player->num] != 0) { + if (gHasShield[player->num]) { func_play_800A5FA0(player->sfxSource, 0x0903900E, player->num); - D_ctx_80177AE8[player->num] = 5; - D_ctx_80177AB8[player->num] = 2.0f; + gShieldTimer[player->num] = 5; + gShieldAlpha[player->num] = 2.0f; player->damage = 0; } else { if (player->shields != 0) { @@ -1209,15 +1209,15 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, case OBJ_ACTOR_180: colId = COL1_0; break; - case OBJ_80_4: - case OBJ_80_5: + case OBJ_SCENERY_4: + case OBJ_SCENERY_5: colId = COL2_1; useCol2 = true; break; - case OBJ_80_149: + case OBJ_SCENERY_149: colId = COL1_5; break; - case OBJ_80_150: + case OBJ_SCENERY_150: colId = COL1_6; break; case OBJ_BOSS_308: @@ -1235,126 +1235,126 @@ bool func_play_800A8054(ObjectId objId, f32 arg1, f32 arg2, f32 arg3, f32 arg4, case OBJ_BOSS_313: colId = COL1_8; break; - case OBJ_80_39: + case OBJ_SCENERY_39: colId = COL1_1; break; - case OBJ_80_120: + case OBJ_SCENERY_120: colId = COL2_18; useCol2 = true; break; - case OBJ_80_124: + case OBJ_SCENERY_124: colId = COL2_15; useCol2 = true; break; - case OBJ_80_126: + case OBJ_SCENERY_126: colId = COL2_16; useCol2 = true; break; - case OBJ_80_47: + case OBJ_SCENERY_47: colId = COL2_7; useCol2 = true; break; - case OBJ_80_2: + case OBJ_SCENERY_2: colId = COL2_2; useCol2 = true; break; - case OBJ_80_3: - case OBJ_80_69: + case OBJ_SCENERY_3: + case OBJ_SCENERY_69: colId = COL2_3; useCol2 = true; break; - case OBJ_80_143: + case OBJ_SCENERY_143: colId = COL2_17; useCol2 = true; break; - case OBJ_80_140: + case OBJ_SCENERY_140: colId = COL2_4; useCol2 = true; break; - case OBJ_80_141: + case OBJ_SCENERY_141: colId = COL2_6; useCol2 = true; break; - case OBJ_80_117: + case OBJ_SCENERY_117: colId = COL2_14; useCol2 = true; break; - case OBJ_80_70: + case OBJ_SCENERY_70: colId = COL2_8; useCol2 = true; break; - case OBJ_80_72: + case OBJ_SCENERY_72: colId = COL2_9; useCol2 = true; break; - case OBJ_80_71: + case OBJ_SCENERY_71: colId = COL2_10; useCol2 = true; break; - case OBJ_80_73: + case OBJ_SCENERY_73: colId = COL2_11; useCol2 = true; break; - case OBJ_80_67: + case OBJ_SCENERY_67: colId = COL2_12; useCol2 = true; break; - case OBJ_80_74: + case OBJ_SCENERY_74: colId = COL2_13; useCol2 = true; break; - case OBJ_80_118: - case OBJ_80_119: - case OBJ_80_121: - case OBJ_80_122: - case OBJ_80_123: - case OBJ_80_125: - case OBJ_80_127: - case OBJ_80_128: - case OBJ_80_129: - case OBJ_80_130: - case OBJ_80_131: - case OBJ_80_132: - case OBJ_80_133: - case OBJ_80_134: - case OBJ_80_135: - case OBJ_80_136: - case OBJ_80_137: - case OBJ_80_138: - case OBJ_80_139: - case OBJ_80_142: - case OBJ_80_144: - case OBJ_80_145: - case OBJ_80_146: - case OBJ_80_147: - case OBJ_80_148: - case OBJ_80_40: - case OBJ_80_41: - case OBJ_80_42: - case OBJ_80_43: - case OBJ_80_44: - case OBJ_80_45: - case OBJ_80_46: - case OBJ_80_48: - case OBJ_80_49: - case OBJ_80_50: - case OBJ_80_51: - case OBJ_80_52: - case OBJ_80_53: - case OBJ_80_54: - case OBJ_80_55: - case OBJ_80_56: - case OBJ_80_57: - case OBJ_80_58: - case OBJ_80_59: - case OBJ_80_60: - case OBJ_80_61: - case OBJ_80_62: - case OBJ_80_63: - case OBJ_80_64: - case OBJ_80_65: - case OBJ_80_66: - case OBJ_80_68: + case OBJ_SCENERY_118: + case OBJ_SCENERY_119: + case OBJ_SCENERY_121: + case OBJ_SCENERY_122: + case OBJ_SCENERY_123: + case OBJ_SCENERY_125: + case OBJ_SCENERY_127: + case OBJ_SCENERY_128: + case OBJ_SCENERY_129: + case OBJ_SCENERY_130: + case OBJ_SCENERY_131: + case OBJ_SCENERY_132: + case OBJ_SCENERY_133: + case OBJ_SCENERY_134: + case OBJ_SCENERY_135: + case OBJ_SCENERY_136: + case OBJ_SCENERY_137: + case OBJ_SCENERY_138: + case OBJ_SCENERY_139: + case OBJ_SCENERY_142: + case OBJ_SCENERY_144: + case OBJ_SCENERY_145: + case OBJ_SCENERY_146: + case OBJ_SCENERY_147: + case OBJ_SCENERY_148: + case OBJ_SCENERY_40: + case OBJ_SCENERY_41: + case OBJ_SCENERY_42: + case OBJ_SCENERY_43: + case OBJ_SCENERY_44: + case OBJ_SCENERY_45: + case OBJ_SCENERY_46: + case OBJ_SCENERY_48: + case OBJ_SCENERY_49: + case OBJ_SCENERY_50: + case OBJ_SCENERY_51: + case OBJ_SCENERY_52: + case OBJ_SCENERY_53: + case OBJ_SCENERY_54: + case OBJ_SCENERY_55: + case OBJ_SCENERY_56: + case OBJ_SCENERY_57: + case OBJ_SCENERY_58: + case OBJ_SCENERY_59: + case OBJ_SCENERY_60: + case OBJ_SCENERY_61: + case OBJ_SCENERY_62: + case OBJ_SCENERY_63: + case OBJ_SCENERY_64: + case OBJ_SCENERY_65: + case OBJ_SCENERY_66: + case OBJ_SCENERY_68: default: colId = COL2_0; useCol2 = true; @@ -1574,7 +1574,7 @@ void func_play_800A8BA4(Player* player) { Boss* boss; // AC Sprite* sprite; // A8 s32 pad; // A4 - Object_80* obj80; // A0 + Scenery* scenery; // A0 Player* opponent; // 9C s32 sp98; f32 sp94; @@ -1595,7 +1595,7 @@ void func_play_800A8BA4(Player* player) { break; } } else if (player->form == FORM_ARWING) { - if ((player->hit1.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { + if ((player->hit1.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (gGroundType == GROUNDTYPE_WATER) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; @@ -1608,7 +1608,7 @@ void func_play_800A8BA4(Player* player) { func_effect_8007BC7C(player->hit1.x, player->hit1.y, player->hit1.z, 6.0f); } } - if ((player->hit2.y < (gGroundLevel + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { + if ((player->hit2.y < (gGroundHeight + 13.0f)) && (player->state_1C8 != PLAYERSTATE_1C8_DOWN)) { if (gGroundType == GROUNDTYPE_WATER) { player->unk_1F4 = 7; player->unk_0E4 = (player->unk_0D0 + player->unk_110) * 0.5f; @@ -1627,39 +1627,41 @@ void func_play_800A8BA4(Player* player) { if ((player->timer_498 == 0) || ((gCamCount != 1) && (player->form != FORM_ARWING))) { if (gLevelMode == LEVELMODE_ALL_RANGE) { - Object_58* obj58; + Scenery360* scenery360; sp8C = 1100.0f; if ((gCurrentLevel == LEVEL_SECTOR_Y) || (gCurrentLevel == LEVEL_VENOM_ANDROSS)) { sp8C = 4000.0f; } - for (i = 0, obj58 = gObjects58; i < 200; i++, obj58++) { - if (obj58->obj.status == OBJ_ACTIVE) { - spC8.x = obj58->obj.pos.x - player->pos.x; - spC8.z = obj58->obj.pos.z - player->unk_138; + for (i = 0, scenery360 = gScenery360; i < 200; i++, scenery360++) { + if (scenery360->obj.status == OBJ_ACTIVE) { + spC8.x = scenery360->obj.pos.x - player->pos.x; + spC8.z = scenery360->obj.pos.z - player->unk_138; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < sp8C) { - if ((obj58->obj.id == OBJ_80_117) || (obj58->obj.id == OBJ_80_143) || - (obj58->obj.id == OBJ_80_141) || (obj58->obj.id == OBJ_80_149) || - (obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_148) || - (obj58->obj.id == OBJ_80_160) || (obj58->obj.id == OBJ_80_1) || - (obj58->obj.id == OBJ_80_3) || (obj58->obj.id == OBJ_80_140)) { - temp_v0 = func_play_800A8304(player, obj58->obj.id, obj58->obj.pos.x, obj58->obj.pos.y, - obj58->obj.pos.z, obj58->obj.rot.x, obj58->obj.rot.y, - obj58->obj.rot.z); + if ((scenery360->obj.id == OBJ_SCENERY_117) || (scenery360->obj.id == OBJ_SCENERY_143) || + (scenery360->obj.id == OBJ_SCENERY_141) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_148) || + (scenery360->obj.id == OBJ_SCENERY_160) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3) || (scenery360->obj.id == OBJ_SCENERY_140)) { + temp_v0 = + func_play_800A8304(player, scenery360->obj.id, scenery360->obj.pos.x, + scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, + scenery360->obj.rot.y, scenery360->obj.rot.z); if (temp_v0 != 0) { if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { - func_play_800A729C(player, temp_v0, obj58->obj.pos.x, obj58->obj.pos.z); + func_play_800A729C(player, temp_v0, scenery360->obj.pos.x, scenery360->obj.pos.z); } else { - Player_ApplyDamage(player, temp_v0, obj58->info.damage); + Player_ApplyDamage(player, temp_v0, scenery360->info.damage); } } if ((gCurrentLevel == LEVEL_FORTUNA) || (gCurrentLevel == LEVEL_VENOM_2)) { - temp_v0 = func_play_800A7974(player, obj58->info.hitbox, &sp98, obj58->obj.pos.x, - obj58->obj.pos.y, obj58->obj.pos.z, obj58->obj.rot.x, - obj58->obj.rot.y, obj58->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = func_play_800A7974( + player, scenery360->info.hitbox, &sp98, scenery360->obj.pos.x, + scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, + scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); if ((temp_v0 != 0) && (temp_v0 < 0)) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&obj58->obj.pos, 0x19000001); + func_effect_8007A6F0(&scenery360->obj.pos, 0x19000001); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { @@ -1668,24 +1670,26 @@ void func_play_800A8BA4(Player* player) { } } } else { - temp_v0 = func_play_800A7974(player, obj58->info.hitbox, &sp98, obj58->obj.pos.x, - obj58->obj.pos.y, obj58->obj.pos.z, obj58->obj.rot.x, - obj58->obj.rot.y, obj58->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = + func_play_800A7974(player, scenery360->info.hitbox, &sp98, scenery360->obj.pos.x, + scenery360->obj.pos.y, scenery360->obj.pos.z, scenery360->obj.rot.x, + scenery360->obj.rot.y, scenery360->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (player->whooshTimer == 0) { - func_effect_8007A6F0(&obj58->obj.pos, 0x19000001); + func_effect_8007A6F0(&scenery360->obj.pos, 0x19000001); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { player->whooshTimer = 4; } } else if ((player->form == FORM_LANDMASTER) || (player->form == FORM_ON_FOOT)) { - func_play_800A729C(player, temp_v0, obj58->obj.pos.x, obj58->obj.pos.z); + func_play_800A729C(player, temp_v0, scenery360->obj.pos.x, scenery360->obj.pos.z); } else { - Player_ApplyDamage(player, temp_v0, obj58->info.damage); - if (obj58->obj.id == OBJ_80_131) { - Matrix_RotateY(gCalcMatrix, (obj58->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Player_ApplyDamage(player, temp_v0, scenery360->info.damage); + if (scenery360->obj.id == OBJ_SCENERY_131) { + Matrix_RotateY(gCalcMatrix, (scenery360->obj.rot.y + 180.0f) * M_DTOR, + MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); player->unk_0D8.x = spBC.x; player->unk_0D8.y = spBC.y; @@ -1695,15 +1699,17 @@ void func_play_800A8BA4(Player* player) { player->pos.x = player->unk_090.x; player->pos.y = player->unk_090.y; player->pos.z = player->unk_090.z; - player->unk_114 = obj58->obj.rot.y + 180.0f; + player->unk_114 = scenery360->obj.rot.y + 180.0f; player->timer_498 = 5; } - if ((obj58->obj.id == OBJ_80_135) || (obj58->obj.id == OBJ_80_136)) { - if (obj58->obj.id == OBJ_80_135) { - Matrix_RotateY(gCalcMatrix, (obj58->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); + if ((scenery360->obj.id == OBJ_SCENERY_135) || + (scenery360->obj.id == OBJ_SCENERY_136)) { + if (scenery360->obj.id == OBJ_SCENERY_135) { + Matrix_RotateY(gCalcMatrix, (scenery360->obj.rot.y + 180.0f) * M_DTOR, + MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D3088[sp98 - 1], &spBC); } else { - Matrix_RotateY(gCalcMatrix, obj58->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateY(gCalcMatrix, scenery360->obj.rot.y * M_DTOR, MTXF_NEW); Matrix_MultVec3f(gCalcMatrix, &D_800D30B8[sp98 - 1], &spBC); } player->unk_0D8.x = spBC.x; @@ -1714,10 +1720,10 @@ void func_play_800A8BA4(Player* player) { player->pos.x = player->unk_090.x; player->pos.y = player->unk_090.y; player->pos.z = player->unk_090.z; - if (obj58->obj.id == OBJ_80_135) { - player->unk_114 = obj58->obj.rot.y + 180.0f; + if (scenery360->obj.id == OBJ_SCENERY_135) { + player->unk_114 = scenery360->obj.rot.y + 180.0f; } else { - player->unk_114 = obj58->obj.rot.y; + player->unk_114 = scenery360->obj.rot.y; } player->timer_498 = 5; } @@ -1728,35 +1734,38 @@ void func_play_800A8BA4(Player* player) { } } } else { - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id != OBJ_80_58) && - (obj80->obj.id != OBJ_80_105) && (obj80->obj.id != OBJ_80_59) && (obj80->obj.id != OBJ_80_60) && - (obj80->obj.id != OBJ_80_61) && (obj80->obj.id != OBJ_80_66) && (obj80->obj.id != OBJ_80_67) && - (obj80->obj.id != OBJ_80_70) && (obj80->obj.id != OBJ_80_72) && (obj80->obj.id != OBJ_80_71) && - (obj80->obj.id != OBJ_80_73) && (obj80->obj.id != OBJ_80_74) && (obj80->obj.id != OBJ_80_69) && - ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) { - if ((obj80->obj.id == OBJ_80_1) || (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5) || - (obj80->obj.id == OBJ_80_47) || (obj80->obj.id == OBJ_80_117) || - (obj80->obj.id == OBJ_80_120) || (obj80->obj.id == OBJ_80_124) || - (obj80->obj.id == OBJ_80_126) || (obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_3)) { - spC8.x = obj80->obj.pos.x - player->pos.x; - spC8.z = obj80->obj.pos.z - player->unk_138; + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) && + (scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) && + (scenery->obj.id != OBJ_SCENERY_60) && (scenery->obj.id != OBJ_SCENERY_61) && + (scenery->obj.id != OBJ_SCENERY_66) && (scenery->obj.id != OBJ_SCENERY_67) && + (scenery->obj.id != OBJ_SCENERY_70) && (scenery->obj.id != OBJ_SCENERY_72) && + (scenery->obj.id != OBJ_SCENERY_71) && (scenery->obj.id != OBJ_SCENERY_73) && + (scenery->obj.id != OBJ_SCENERY_74) && (scenery->obj.id != OBJ_SCENERY_69) && + ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + if ((scenery->obj.id == OBJ_SCENERY_1) || (scenery->obj.id == OBJ_SCENERY_4) || + (scenery->obj.id == OBJ_SCENERY_5) || (scenery->obj.id == OBJ_SCENERY_47) || + (scenery->obj.id == OBJ_SCENERY_117) || (scenery->obj.id == OBJ_SCENERY_120) || + (scenery->obj.id == OBJ_SCENERY_124) || (scenery->obj.id == OBJ_SCENERY_126) || + (scenery->obj.id == OBJ_SCENERY_2) || (scenery->obj.id == OBJ_SCENERY_3)) { + spC8.x = scenery->obj.pos.x - player->pos.x; + spC8.z = scenery->obj.pos.z - player->unk_138; if (sqrtf(SQ(spC8.x) + SQ(spC8.z)) < 1100.0f) { - temp_v0 = func_play_800A8304(player, obj80->obj.id, obj80->obj.pos.x, obj80->obj.pos.y, - obj80->obj.pos.z, obj80->obj.rot.x, obj80->obj.rot.y, - obj80->obj.rot.z); + temp_v0 = func_play_800A8304(player, scenery->obj.id, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, + scenery->obj.rot.y, scenery->obj.rot.z); if (temp_v0 != 0) { - Player_ApplyDamage(player, temp_v0, obj80->info.damage); + Player_ApplyDamage(player, temp_v0, scenery->info.damage); } } } else { - padB0 = obj80->obj.rot.y; - if (obj80->info.action == (ObjectFunc) func_enmy_80066EA8) { + padB0 = scenery->obj.rot.y; + if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { padB0 = 0.0f; } - temp_v0 = func_play_800A7974(player, obj80->info.hitbox, &sp98, obj80->obj.pos.x, - obj80->obj.pos.y, obj80->obj.pos.z, obj80->obj.rot.x, padB0, - obj80->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = func_play_800A7974(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, padB0, + scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (temp_v0 == -1) { @@ -1767,25 +1776,25 @@ void func_play_800A8BA4(Player* player) { player->shadowing = 80; } if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19000001, obj80->sfxSource, 0); + AUDIO_PLAY_SFX(0x19000001, scenery->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { player->whooshTimer = 4; } - } else if (obj80->obj.id == OBJ_80_54) { + } else if (scenery->obj.id == OBJ_SCENERY_54) { if (player->whooshTimer == 0) { - AUDIO_PLAY_SFX(0x19832019, obj80->sfxSource, 0); + AUDIO_PLAY_SFX(0x19832019, scenery->sfxSource, 0); } player->whooshTimer += 2; if (player->whooshTimer >= 4) { player->whooshTimer = 4; } } else { - Player_ApplyDamage(player, temp_v0, obj80->info.damage); - if ((obj80->obj.id == OBJ_80_48) || (obj80->obj.id == OBJ_80_55) || - (obj80->obj.id == OBJ_80_49)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); + Player_ApplyDamage(player, temp_v0, scenery->info.damage); + if ((scenery->obj.id == OBJ_SCENERY_48) || (scenery->obj.id == OBJ_SCENERY_55) || + (scenery->obj.id == OBJ_SCENERY_49)) { + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); spC8.x = -(player->unk_0D0 + player->unk_110) * 0.7f; spC8.y = 0.0f; spC8.z = 0.0f; @@ -1795,8 +1804,8 @@ void func_play_800A8BA4(Player* player) { player->unk_0D8.y = spBC.y; player->pos.x = player->unk_090.x; player->timer_498 = 5; - } else if (obj80->obj.id == OBJ_80_50) { - if (player->pos.x < obj80->obj.pos.x) { + } else if (scenery->obj.id == OBJ_SCENERY_50) { + if (player->pos.x < scenery->obj.pos.x) { player->unk_0D8.x = -30.0f; player->unk_0E8 = 45.0f; } else { @@ -1806,9 +1815,9 @@ void func_play_800A8BA4(Player* player) { player->unk_0D8.y = 0.0f; player->pos.x = player->unk_090.x; player->timer_498 = 5; - } else if (obj80->obj.id == OBJ_80_131) { - Matrix_RotateY(gCalcMatrix, (obj80->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); - Matrix_RotateZ(gCalcMatrix, -obj80->obj.rot.z * M_DTOR, MTXF_APPLY); + } else if (scenery->obj.id == OBJ_SCENERY_131) { + Matrix_RotateY(gCalcMatrix, (scenery->obj.rot.y + 180.0f) * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, -scenery->obj.rot.z * M_DTOR, MTXF_APPLY); Matrix_MultVec3f(gCalcMatrix, &D_800D3040[sp98 - 1], &spBC); player->unk_0D8.x = spBC.x; player->unk_0D8.y = spBC.y; @@ -2109,8 +2118,8 @@ void func_play_800A8BA4(Player* player) { void func_play_800AA800(Player* player) { s32 sp144; - Object_58* obj58; - Object_80* obj80; + Scenery360* scenery360; + Scenery* scenery; s32 count; s32 colId; s32 i; @@ -2145,9 +2154,9 @@ void func_play_800AA800(Player* player) { player->unk_06C = player->unk_138 - player->pos.y; if (D_ctx_801784AC != 4) { if (gCamCount == 1) { - player->unk_068 = gGroundLevel + 3.0f; + player->unk_068 = gGroundHeight + 3.0f; } else { - player->unk_068 = gGroundLevel; + player->unk_068 = gGroundHeight; if (player->form == FORM_ON_FOOT) { player->unk_06C = player->unk_138; } @@ -2160,22 +2169,22 @@ void func_play_800AA800(Player* player) { if (gCamCount != 1) { if (player->form == FORM_ON_FOOT) { for (sp144 = 0; sp144 < 200; sp144++) { - obj58 = &gObjects58[sp144]; - if ((obj58->obj.status == OBJ_ACTIVE) && - ((obj58->obj.id == OBJ_80_143) || (obj58->obj.id == OBJ_80_140) || - (obj58->obj.id == OBJ_80_141)) && - (fabsf(obj58->obj.pos.x - player->pos.x) < 2000.0f) && - (fabsf(obj58->obj.pos.z - player->unk_138) < 2000.0f)) { - spC8.x = obj58->obj.pos.x; - spC8.y = obj58->obj.pos.y; - spC8.z = obj58->obj.pos.z; + scenery360 = &gScenery360[sp144]; + if ((scenery360->obj.status == OBJ_ACTIVE) && + ((scenery360->obj.id == OBJ_SCENERY_143) || (scenery360->obj.id == OBJ_SCENERY_140) || + (scenery360->obj.id == OBJ_SCENERY_141)) && + (fabsf(scenery360->obj.pos.x - player->pos.x) < 2000.0f) && + (fabsf(scenery360->obj.pos.z - player->unk_138) < 2000.0f)) { + spC8.x = scenery360->obj.pos.x; + spC8.y = scenery360->obj.pos.y; + spC8.z = scenery360->obj.pos.z; spD4.x = player->pos.x; - spD4.y = gGroundLevel; + spD4.y = gGroundHeight; spD4.z = player->unk_138; colId = COL2_4; - if (obj58->obj.id == OBJ_80_141) { + if (scenery360->obj.id == OBJ_SCENERY_141) { colId = COL2_6; - } else if (obj58->obj.id == OBJ_80_143) { + } else if (scenery360->obj.id == OBJ_SCENERY_143) { colId = COL2_17; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2191,16 +2200,17 @@ void func_play_800AA800(Player* player) { if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gLevelType == LEVELTYPE_PLANET)) { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138; - for (sp144 = 0, obj58 = gObjects58; sp144 < 200; sp144++, obj58++) { - if ((obj58->obj.status == OBJ_ACTIVE) && - ((obj58->obj.id == OBJ_80_150) || (obj58->obj.id == OBJ_80_149) || - (obj58->obj.id == OBJ_80_148) || (obj58->obj.id == OBJ_80_1) || (obj58->obj.id == OBJ_80_3)) && - (fabsf(obj58->obj.pos.x - player->pos.x) < 2500.0f) && - (fabsf(obj58->obj.pos.z - player->unk_138) < 2500.0f)) { - tempx = obj58->obj.pos.x; - tempy = obj58->obj.pos.y; - tempz = obj58->obj.pos.z; - sp120 = obj58->obj.rot.y; + for (sp144 = 0, scenery360 = gScenery360; sp144 < 200; sp144++, scenery360++) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + ((scenery360->obj.id == OBJ_SCENERY_150) || (scenery360->obj.id == OBJ_SCENERY_149) || + (scenery360->obj.id == OBJ_SCENERY_148) || (scenery360->obj.id == OBJ_SCENERY_1) || + (scenery360->obj.id == OBJ_SCENERY_3)) && + (fabsf(scenery360->obj.pos.x - player->pos.x) < 2500.0f) && + (fabsf(scenery360->obj.pos.z - player->unk_138) < 2500.0f)) { + tempx = scenery360->obj.pos.x; + tempy = scenery360->obj.pos.y; + tempz = scenery360->obj.pos.z; + sp120 = scenery360->obj.rot.y; Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); spEC.x = player->pos.x - tempx; spEC.y = 0.0f; @@ -2213,8 +2223,8 @@ void func_play_800AA800(Player* player) { spC8.y = tempy; spC8.z = tempz; - if ((obj58->obj.id == OBJ_80_149) || (obj58->obj.id == OBJ_80_150)) { - if (obj58->obj.id == OBJ_80_149) { + if ((scenery360->obj.id == OBJ_SCENERY_149) || (scenery360->obj.id == OBJ_SCENERY_150)) { + if (scenery360->obj.id == OBJ_SCENERY_149) { colId = COL1_5; } else { colId = COL1_6; @@ -2227,7 +2237,7 @@ void func_play_800AA800(Player* player) { } } else { colId = COL2_0; - if (obj58->obj.id == OBJ_80_3) { + if (scenery360->obj.id == OBJ_SCENERY_3) { colId = COL2_3; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2240,24 +2250,25 @@ void func_play_800AA800(Player* player) { } } } - for (sp144 = 0, obj80 = gObjects80; + for (sp144 = 0, scenery = gScenery; (sp144 < 50) && (gLevelMode == LEVELMODE_ON_RAILS) && (gCurrentLevel != LEVEL_VENOM_1); - sp144++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 3000.0f) < obj80->obj.pos.z) && - (obj80->obj.id != OBJ_80_0) && (obj80->obj.id != OBJ_80_8)) { - tempx = obj80->obj.pos.x; - tempy = obj80->obj.pos.y; - tempz = obj80->obj.pos.z; - sp120 = obj80->obj.rot.y; - if ((obj80->obj.id == OBJ_80_3) || (obj80->obj.id == OBJ_80_2) || (obj80->obj.id == OBJ_80_47) || - (obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5)) { + sp144++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 3000.0f) < scenery->obj.pos.z) && + (scenery->obj.id != OBJ_SCENERY_0) && (scenery->obj.id != OBJ_SCENERY_8)) { + tempx = scenery->obj.pos.x; + tempy = scenery->obj.pos.y; + tempz = scenery->obj.pos.z; + sp120 = scenery->obj.rot.y; + if ((scenery->obj.id == OBJ_SCENERY_3) || (scenery->obj.id == OBJ_SCENERY_2) || + (scenery->obj.id == OBJ_SCENERY_47) || (scenery->obj.id == OBJ_SCENERY_4) || + (scenery->obj.id == OBJ_SCENERY_5)) { Matrix_RotateY(gCalcMatrix, -sp120 * M_DTOR, MTXF_NEW); for (var_fs1 = var_fs0 = -50.0f; var_fs0 > -500.0f; var_fs0 -= 5.0f, var_fs1 -= 5.0f) { spEC.x = player->pos.x - tempx; spEC.y = player->pos.y + var_fs0 - tempy; spEC.z = player->unk_138 + var_fs1 - tempz; Matrix_MultVec3fNoTranslate(gCalcMatrix, &spEC, &spE0); - if ((player->pos.y + var_fs0) <= gGroundLevel) { + if ((player->pos.y + var_fs0) <= gGroundHeight) { break; } spD4.x = spE0.x + tempx; @@ -2269,14 +2280,14 @@ void func_play_800AA800(Player* player) { colId = COL2_0; - if (obj80->obj.id == OBJ_80_47) { + if (scenery->obj.id == OBJ_SCENERY_47) { colId = COL2_7; } - if (obj80->obj.id == OBJ_80_2) { + if (scenery->obj.id == OBJ_SCENERY_2) { colId = COL2_2; - } else if (obj80->obj.id == OBJ_80_3) { + } else if (scenery->obj.id == OBJ_SCENERY_3) { colId = COL2_3; - } else if ((obj80->obj.id == OBJ_80_4) || (obj80->obj.id == OBJ_80_5)) { + } else if ((scenery->obj.id == OBJ_SCENERY_4) || (scenery->obj.id == OBJ_SCENERY_5)) { colId = COL2_1; } if (func_col2_800A3690(&spD4, &spC8, colId, &spBC)) { @@ -2289,10 +2300,10 @@ void func_play_800AA800(Player* player) { } } } else { - hitboxData = obj80->info.hitbox; + hitboxData = scenery->info.hitbox; count = *hitboxData; if (count != 0) { - if (obj80->info.action == (ObjectFunc) func_enmy_80066EA8) { + if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { sp120 = 0.0f; } hitboxData++; @@ -2322,12 +2333,12 @@ void func_play_800AA800(Player* player) { tempx2 = spE0.x + tempx; tempy2 = spE0.y + tempy; tempz2 = spE0.z + tempz; - if (spEC.y + tempy <= gGroundLevel) { + if (spEC.y + tempy <= gGroundHeight) { break; } if (func_play_800A78C4(hitbox, tempx, tempy, tempz, tempx2, tempy2, tempz2)) { - if (gGroundLevel < player->unk_068) { + if (gGroundHeight < player->unk_068) { player->unk_068 = spEC.y + 15.0f + tempy; player->unk_06C = spEC.z + 10.0f + tempz; player->unk_248 = DEG_TO_RAD(sp100); @@ -2393,7 +2404,7 @@ void func_play_800AB334(void) { break; case LEVEL_METEO: case LEVEL_SECTOR_X: - if (gLevelStage == 1) { + if (gLevelPhase == 1) { gFogRed = 178; gFogGreen = 190; gFogBlue = 90; @@ -2434,7 +2445,7 @@ void func_play_800AB334(void) { /* fallthrough */ case LEVEL_SOLAR: D_ctx_80178294 = 1; - gGroundLevel = -20000.0f; + gGroundHeight = -20000.0f; fptr = MEM_ARRAY_ALLOCATE(D_ctx_801782CC, 17 * 17); for (i = 0; i < 17 * 17; i++, fptr++) { *fptr = 0.0f; @@ -2553,13 +2564,13 @@ void Play_Init(void) { D_ctx_80177C78 = D_ctx_80177C8C = gShowBossHealth = gStarWolfMsgTimer = gAllRangeWingRepairTimer = gAllRangeWingRepairSent = 0; D_display_800CA220 = 0; - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; if (gCurrentLevel != LEVEL_VERSUS) { - gOverlayStage = 0; + gSceneSetup = 0; } gShowHud = 1; D_ctx_80177A98 = D_ctx_80177AB0 = 1; - D_ctx_80177AC8 = D_800D2F54 = 0; + gAqDrawMode = D_800D2F54 = 0; D_display_800CA230 = D_800D2F58 = 0.0f; gLevelMode = LEVELMODE_ON_RAILS; D_ctx_80177CE8 = D_bg_8015F968 = 0.0f; @@ -2571,36 +2582,36 @@ void Play_Init(void) { func_play_800AB964(); } } - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { gLevelMode = LEVELMODE_ALL_RANGE; } D_ctx_80177E7C = 0; func_play_800A594C(); - gDropHitCountItem = D_ctx_8017796C = D_Timer_80177B44 = D_ctx_80177B4C = gAllRangeEventTimer = gAllRangeFrameCount = - gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = gCallTimer = - gAllRangeSupplyTimer = gNextPlanetPath = 0; + gDropHitCountItem = D_ctx_8017796C = gStartAndrossFightTimer = gSoShieldsEmpty = gAllRangeEventTimer = + gAllRangeFrameCount = gBossActive = gGameFrameCount = gCameraShake = D_ctx_801782FC = gBossFrameCount = + gCallTimer = gAllRangeSupplyTimer = gNextPlanetPath = 0; if (gCurrentLevel == LEVEL_SECTOR_X) { gNextPlanetPath = 1; } D_ctx_80177CC0 = -25000.0f; D_ctx_80177950 = 1.0f; - if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2)) { + if ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2)) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; } else { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; } - gScreenFlashTimer = D_ctx_80178360 = D_ctx_80178364 = D_ctx_80178368 = D_hud_80161704 = D_hud_80161708 = - gFillScreenAlpha = D_ctx_80177C50 = gShowAllRangeCountdown = D_ctx_80177B6C = 0; + gScreenFlashTimer = gLight3R = gLight3G = gLight3B = D_hud_80161704 = D_hud_80161708 = gFillScreenAlpha = + D_ctx_80177C50 = gShowAllRangeCountdown = gCoUturnCount = 0; gCsFrameCount = 0; gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenAlphaStep = 16; - D_ctx_8017836C = 0.0f; - D_bg_8015F960 = 0.0f; - gGroundLevel = 0.0f; - D_ctx_80178414 = D_ctx_80178420 = D_ctx_80178424 = D_ctx_80178428 = D_ctx_8017842C = D_ctx_80178430 = 0.0f; + gLight3Brightness = 0.0f; + gWarpZoneBgAlpha = 0.0f; + gGroundHeight = 0.0f; + gStarWarpDistortion = gStarfieldX = gStarfieldY = gStarfieldRoll = D_ctx_8017842C = D_ctx_80178430 = 0.0f; if ((gLevelType == LEVELTYPE_SPACE) || (gCurrentLevel == LEVEL_TRAINING)) { func_play_800A5EBC(); @@ -2608,7 +2619,7 @@ void Play_Init(void) { D_ctx_80177A98 = 0; } } else { - D_ctx_80178410 = 0; + gStarCount = 0; } gFogAlpha = 255; D_ctx_801784E8 = 5.0f; @@ -2634,14 +2645,14 @@ void Play_Init(void) { func_play_800AB2AC(); for (i = 0; i < gCamCount; i++) { gPlayer[i].state_1C8 = PLAYERSTATE_1C8_INIT; - gPlayerFillScreenAlphas[i] = D_ctx_801783C0[i] = 0; + gPlayerGlareAlphas[i] = D_ctx_801783C0[i] = 0; gControllerRumbleTimers[i] = 0; D_ctx_80177C30[i] = 0; } if (gLevelMode == LEVELMODE_ALL_RANGE) { - MEM_ARRAY_ALLOCATE(gObjects58, 200); + MEM_ARRAY_ALLOCATE(gScenery360, 200); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } switch (gCurrentLevel) { case LEVEL_SECTOR_Z: @@ -2668,12 +2679,12 @@ void Play_Init(void) { break; case LEVEL_VENOM_2: Venom2_80196968(); - if (gLevelStage == 0) { + if (gLevelPhase == 0) { ActorAllRange_SpawnTeam(); } break; case LEVEL_VENOM_ANDROSS: - if (gLevelStage == 1) { + if (gLevelPhase == 1) { if (gAllRangeCheckpoint == 0) { Andross_801878A8(); } else { @@ -2690,7 +2701,7 @@ void Play_Init(void) { func_play_800AB334(); } -void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 arg5) { +void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, PlayerShotId shotId, f32 speed) { Vec3f sp44; Vec3f sp38; Vec3f sp2C; @@ -2701,11 +2712,11 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl Matrix_RotateZ(gCalcMatrix, -((player->unk_0F8 + player->unk_0F0) * M_DTOR), MTXF_APPLY); Matrix_Translate(gCalcMatrix, player->unk_084, player->unk_080, 0.0f, MTXF_APPLY); if (gVersusMode && (shotId <= PLAYERSHOT_1)) { - arg5 *= 0.5f; + speed *= 0.5f; } sp44.x = 0.0f; sp44.y = 0.0f; - sp44.z = arg5; + sp44.z = speed; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); sp44.x = arg2; sp44.y = -5.0f + arg3; @@ -2747,7 +2758,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl } else { shot->unk_30 = player->unk_0E8 + player->unk_114; shot->unk_2C = player->unk_0E4 + player->unk_4D8; - if (arg5 <= 65.0f) { + if (speed <= 65.0f) { shot->unk_5C = 1; } shot->unk_64 = 30; @@ -2756,7 +2767,7 @@ void func_play_800AC290(Player* player, PlayerShot* shot, f32 arg2, f32 arg3, Pl shot->playerNum = player->num; } -void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f32 arg3) { +void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f32 speed) { Vec3f sp54; Vec3f sp48; Vec3f sp3C; @@ -2771,7 +2782,7 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f Matrix_RotateX(gCalcMatrix, player->unk_17C * M_DTOR, MTXF_APPLY); sp54.x = 0; sp54.y = 0; - sp54.z = arg3; + sp54.z = speed; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); Matrix_Translate(gCalcMatrix, 0.0f, player->unk_18C + 30.0f, 0, MTXF_NEW); Matrix_RotateX(gCalcMatrix, player->unk_0E4 * M_DTOR, MTXF_APPLY); @@ -2806,7 +2817,7 @@ void func_play_800AC650(Player* player, PlayerShot* shot, PlayerShotId shotId, f shot->playerNum = player->num; if (shotId == PLAYERSHOT_8) { - if (arg3 <= 65.0f) { + if (speed <= 65.0f) { shot->unk_5C = 1; } shot->unk_64 = 30; @@ -2873,11 +2884,12 @@ void func_play_800ACC7C(Player* player) { gBombCount[player->num]--; } if (player->form == FORM_ARWING) { - func_play_800AC290(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, PLAYERSHOT_3, 180.0f); + func_play_800AC290(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], 0.0f, 0.0f, PLAYERSHOT_BOMB, + 180.0f); } else if (player->form == FORM_LANDMASTER) { - func_play_800AC650(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_3, 180.0f); + func_play_800AC650(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB, 180.0f); } else { - func_play_800ACDC0(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_3); + func_play_800ACDC0(player, &gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1], PLAYERSHOT_BOMB); } gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_48 = 30.0f; gPlayerShots[ARRAY_COUNT(gPlayerShots) - 1].unk_60 = 0; @@ -2898,7 +2910,7 @@ void func_play_800ACDC0(Player* player, PlayerShot* shot, PlayerShotId shotId) { Matrix_RotateX(gCalcMatrix, player->unk_154 * M_DTOR, MTXF_APPLY); sp5C.x = 0.0f; sp5C.y = 0.0f; - if (shotId == PLAYERSHOT_3) { + if (shotId == PLAYERSHOT_BOMB) { sp5C.z = 100.0f; } else { sp5C.z = 150.0f; @@ -2950,7 +2962,7 @@ bool func_play_800AD118(s32 playerNum) { s32 i; for (i = 0, actor = gActors; i < ARRAY_COUNT(gActors); i++, actor++) { - if ((actor->obj.status == OBJ_ACTIVE) && (actor->timer_0CA[playerNum] != 0)) { + if ((actor->obj.status == OBJ_ACTIVE) && (actor->lockOnTimers[playerNum] != 0)) { return false; } } @@ -2958,7 +2970,7 @@ bool func_play_800AD118(s32 playerNum) { for (i = 0; i < gCamCount; i++) { if (((gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[playerNum].state_1C8 == PLAYERSTATE_1C8_U_TURN)) && - (D_ctx_80177B00[i][playerNum] != 0)) { + (gVsLockOnTimers[i][playerNum] != 0)) { return false; } } @@ -3002,7 +3014,7 @@ bool func_play_800AD1F4(Player* player) { if (gInputPress->button & A_BUTTON) { for (i = 0; i < ARRAY_COUNT(gActors); i++) { - if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].timer_0CA[player->num] != 0)) { + if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) { if ((gPlayerShots[14 - player->num].obj.status == 0) || (gPlayerShots[14 - player->num].obj.id != PLAYERSHOT_8) || ((gPlayerShots[14 - player->num].obj.id == PLAYERSHOT_8) && @@ -3040,13 +3052,13 @@ bool func_play_800AD1F4(Player* player) { if (gInputPress->button & B_BUTTON) { var_a2 = false; for (i = 0; i < ARRAY_COUNT(gActors); i++) { - if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].timer_0CA[player->num] != 0)) { + if ((gActors[i].obj.status == OBJ_ACTIVE) && (gActors[i].lockOnTimers[player->num] != 0)) { var_a2 = true; break; } } for (i = 0; i < gCamCount; i++) { - if (D_ctx_80177B00[i][player->num] != 0) { + if (gVsLockOnTimers[i][player->num] != 0) { var_a2 = true; break; } @@ -3141,7 +3153,7 @@ void func_play_800ADA28(Player* player) { Math_SmoothStepToF(&player->wings.unk_08, -70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->wings.unk_0C, 70.0f, 0.3f, 100.0f, 0.f); Math_SmoothStepToF(&player->wings.unk_10, 70.0f, 0.3f, 100.0f, 0.f); - if (player->pos.y < (gGroundLevel + 70.0f)) { + if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; } } @@ -3155,7 +3167,7 @@ void func_play_800ADA28(Player* player) { Math_SmoothStepToF(&player->wings.unk_08, 70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_0C, -70.0f, 0.3f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, -70.0f, 0.3f, 100.0f, 0.0f); - if (player->pos.y < (gGroundLevel + 70.0f)) { + if (player->pos.y < (gGroundHeight + 70.0f)) { player->pos.y += 6.0f; } } @@ -3189,7 +3201,7 @@ void func_play_800ADD98(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) { - if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->unk_2BC < 10.0f)) { + if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->boostMeter < 10.0f)) { player->unk_1DC = 1; player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = 20; @@ -3198,7 +3210,7 @@ void func_play_800ADD98(Player* player) { } } if (gInputPress->button & R_TRIG) { - if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->unk_2BC < 10.0f)) { + if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->boostMeter < 10.0f)) { player->unk_1DC = 1; player->timer_1E8 = 15; player->unk_1EC = player->unk_1F0 = -20; @@ -3296,8 +3308,8 @@ void func_play_800AE278(Player* player) { player->cam.at.z += 24000.0f; } if (var_v0) { - D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = - D_ctx_80177B00[player->num][3] = 0; + gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = + gVsLockOnTimers[player->num][3] = 0; } } else { var_fv1 = 12500.0f; @@ -3386,14 +3398,14 @@ void func_play_800AE4A4(Player* player) { D_ctx_80177968 = 2.3f; var_fa1 = 0.1f; temp = -sp78 * D_ctx_80177970; - if ((temp <= 0.0f) && (player->pos.y < (gGroundLevel + 50.0f))) { + if ((temp <= 0.0f) && (player->pos.y < (gGroundHeight + 50.0f))) { D_ctx_80177968 *= 2.0f; temp = 0.0f; var_fa1 = 0.2f; } Math_SmoothStepToF(&player->unk_0E4, temp, var_fa1, D_ctx_80177968, 0.03f); var_fv1 = 1.5f; - if (player->pos.y < (gGroundLevel + 70.0f)) { + if (player->pos.y < (gGroundHeight + 70.0f)) { var_fv1 = 0.8f; } if (!((gInputHold->button & R_TRIG) && (gInputHold->button & Z_TRIG)) && @@ -3456,8 +3468,8 @@ void func_play_800AECAC(Player* player) { sp58 = 60.0f; if (gVersusMode) { - D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = - D_ctx_80177B00[player->num][3] = 0; + gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = + gVsLockOnTimers[player->num][3] = 0; } if (player->unk_4D8 > 240.0f) { sp58 = -50.0f; @@ -3469,14 +3481,14 @@ void func_play_800AECAC(Player* player) { if (player->unk_4D8 < 180.0f) { player->pos.y += 2.0f; } - player->unk_2B4 = true; + player->boostCooldown = true; if (gLevelMode == LEVELMODE_ON_RAILS) { - player->unk_2BC += 2.0f; + player->boostMeter += 2.0f; } else { - player->unk_2BC += 1.0f; + player->boostMeter += 1.0f; } - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; } player->unk_190 = 2; Math_SmoothStepToF(&player->unk_4D8, 360.0f, 0.1f, 5.0f, 0.001f); @@ -3603,7 +3615,7 @@ void func_play_800AF07C(Player* player) { sp84 = 0.1f; var_fa1 = -stickY * D_ctx_80177970; - if ((var_fa1 <= 0.0f) && (player->pos.y < (gGroundLevel + 50.0f))) { + if ((var_fa1 <= 0.0f) && (player->pos.y < (gGroundHeight + 50.0f))) { var_fa1 = 0.0f; sp84 = 0.2f; D_ctx_80177968 *= 2.0f; @@ -3612,7 +3624,7 @@ void func_play_800AF07C(Player* player) { Math_SmoothStepToF(&player->unk_0E4, var_fa1, sp84, D_ctx_80177968, 0.03f); var_fv1 = 1.0f; - if (player->pos.y < (gGroundLevel + 70.0f)) { + if (player->pos.y < (gGroundHeight + 70.0f)) { var_fv1 = 0.8f; } @@ -3817,8 +3829,8 @@ void func_play_800AF928(Player* player) { Math_SmoothStepToF(&player->unk_000, 0.0f, 0.1f, 5.0f, 0.00001f); } player->unk_1D4 = 0; - if (player->pos.y <= gGroundLevel - 5.0f) { - player->pos.y = gGroundLevel - 5.0f; + if (player->pos.y <= gGroundHeight - 5.0f) { + player->pos.y = gGroundHeight - 5.0f; if (player->vel.y < -20.0f) { player->unk_1F4 = 20; } @@ -4034,7 +4046,7 @@ void func_play_800B0194(Player* player) { player->unk_1D4 = 0; player->vel.y -= player->unk_0D4; player->pos.y += player->vel.y; - if (player->pos.y <= gGroundLevel) { + if (player->pos.y <= gGroundHeight) { player->unk_1D4 = 1; player->pos.y = 0.0f; player->vel.y = 0.0f; @@ -4067,7 +4079,7 @@ void func_play_800B0F50(Player* playerx) { s16 sp2E; Player* player = playerx; // fake? - D_ctx_80177BAC = 0; + gTiStartLandmaster = 0; player->shields = 255; if (gVersusMode) { switch (gHandicap[gPlayerNum]) { @@ -4089,12 +4101,12 @@ void func_play_800B0F50(Player* playerx) { gRightWingHealth[gPlayerNum] = 60; } D_Timer_80177A00[gPlayerNum] = D_Timer_80177A38[gPlayerNum] = D_Timer_80177A70[gPlayerNum] = - D_Timer_80177A88[gPlayerNum] = D_ctx_80177AE8[gPlayerNum] = D_ctx_80177AD0[gPlayerNum] = - gChargeTimers[gPlayerNum] = D_ctx_80177B00[gPlayerNum][0] = D_ctx_80177B00[gPlayerNum][1] = - D_ctx_80177B00[gPlayerNum][2] = D_ctx_80177B00[gPlayerNum][3] = 0; + D_Timer_80177A88[gPlayerNum] = gShieldTimer[gPlayerNum] = gHasShield[gPlayerNum] = gChargeTimers[gPlayerNum] = + gVsLockOnTimers[gPlayerNum][0] = gVsLockOnTimers[gPlayerNum][1] = gVsLockOnTimers[gPlayerNum][2] = + gVsLockOnTimers[gPlayerNum][3] = 0; D_ctx_80177D40[gPlayerNum] = D_ctx_80177D58[gPlayerNum] = D_ctx_80177D70[gPlayerNum] = D_ctx_80177D88[gPlayerNum] = D_ctx_80177990[gPlayerNum] = D_ctx_801779A8[gPlayerNum] = D_ctx_80177AA0[gPlayerNum] = 0.0f; - D_ctx_80177AB8[gPlayerNum] = 0.0f; + gShieldAlpha[gPlayerNum] = 0.0f; player->unk_190 = 1.0f; player->unk_194 = 1.0f; gRadioState = D_ctx_80177D68 = D_ctx_801782A4 = 0; @@ -4119,7 +4131,7 @@ void func_play_800B0F50(Player* playerx) { } else { player->unk_09C = 700.0f; player->unk_0A0 = 680.0f; - player->unk_0A4 = gGroundLevel + 40.0f; + player->unk_0A4 = gGroundHeight + 40.0f; player->unk_0A8 = 3000.0f; } player->unk_0D0 = D_play_80161A54; @@ -4148,7 +4160,7 @@ void func_play_800B0F50(Player* playerx) { player->unk_09C = 700.0f; player->unk_0D0 = 20.0f; player->unk_0A0 = 720.0f; - player->unk_0A4 = gGroundLevel + 30.0f; + player->unk_0A4 = gGroundHeight + 30.0f; break; case LEVEL_SOLAR: case LEVEL_ZONESS: @@ -4169,7 +4181,7 @@ void func_play_800B0F50(Player* playerx) { gGoldRingCount[0] = 0; } gHitCount = gSavedHitCount; - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2))) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) || ((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2))) { if (D_ctx_80177C9C != 0) { player->shields = D_ctx_80177C9C - 1; gGoldRingCount[0] = D_ctx_80177C94; @@ -4216,7 +4228,7 @@ void func_play_800B0F50(Player* playerx) { player->pos.x = D_800D3114[gPlayerNum]; player->pos.z = D_800D3124[gPlayerNum]; player->unk_114 = D_800D3154[gPlayerNum]; - player->form = D_ctx_80177870[gPlayerNum]; + player->form = gPlayerForms[gPlayerNum]; switch (player->form) { case FORM_ARWING: break; @@ -4257,7 +4269,7 @@ void func_play_800B0F50(Player* playerx) { player->pos.y = 670.0f; player->unk_0A0 = 730.0f; player->unk_204 = 2; - if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelStage == 1)) { + if ((gCurrentLevel == LEVEL_VENOM_ANDROSS) && (gLevelPhase == 1)) { player->pos.x = -7910.0f; player->pos.y = 300.0f; @@ -4309,8 +4321,8 @@ void func_play_800B0F50(Player* playerx) { break; } } else { - if (!gVersusMode && !((gCurrentLevel == LEVEL_VENOM_2) && (gLevelStage == 2))) { - gLevelStatusScreenTimer = 80; + if (!gVersusMode && !((gCurrentLevel == LEVEL_VENOM_2) && (gLevelPhase == 2))) { + gLevelStartStatusScreenTimer = 80; } if (gCurrentLevel == LEVEL_BOLSE) { @@ -4405,7 +4417,7 @@ void func_play_800B0F50(Player* playerx) { func_display_80057814(player); if (!gVersusMode && (((gCurrentLevel != LEVEL_TITANIA) && (gCurrentLevel != LEVEL_SOLAR)) || gVersusMode || (player->state_1C8 != PLAYERSTATE_1C8_LEVEL_INTRO))) { - func_8001C8B8(gPlayerNum); + Audio_StartPlayerNoise(gPlayerNum); } if ((player->form == FORM_ARWING) && !gVersusMode) { switch (player->unk_204) { @@ -4568,8 +4580,8 @@ void func_play_800B22C0(Player* player) { } } if (gVersusMode) { - D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = - D_ctx_80177B00[player->num][3] = 0; + gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = + gVsLockOnTimers[player->num][3] = 0; } } } @@ -4579,9 +4591,9 @@ void func_play_800B2574(Player* player) { f32 sp28; s32 var; - if ((player->unk_2BC != 0.0f) && (gInputHold->button & gBrakeButton[player->num]) && + if ((player->boostMeter != 0.0f) && (gInputHold->button & gBrakeButton[player->num]) && (gInputHold->button & gBoostButton[player->num])) { - player->unk_2B4 = true; + player->boostCooldown = true; } if (gLevelMode == LEVELMODE_ON_RAILS) { sp28 = 3.0f; @@ -4620,7 +4632,7 @@ void func_play_800B2574(Player* player) { } if (player->timer_27C != 0) { player->timer_27C--; - player->unk_2B4 = true; + player->boostCooldown = true; if (gRingPassCount > 0) { Math_SmoothStepToF(&D_ctx_801779A8[player->num], gRingPassCount * 10.0f, 1.0f, 5.0f, 0.0f); } @@ -4644,14 +4656,14 @@ void func_play_800B2574(Player* player) { } } if (!(gInputHold->button & gBrakeButton[player->num]) && !(gInputHold->button & gBoostButton[player->num])) { - player->unk_2B4 = true; - if (player->unk_2BC == 0.0f) { - player->unk_2B4 = false; + player->boostCooldown = true; + if (player->boostMeter == 0.0f) { + player->boostCooldown = false; } } if ((gInputHold->button & gBoostButton[player->num]) && !(gInputHold->button & gBrakeButton[player->num]) && - (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); player->unk_194 = 5.0f; player->unk_190 = 5.0f; @@ -4666,10 +4678,10 @@ void func_play_800B2574(Player* player) { Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.5f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.5f, 100.0f, 0.0f); } - player->unk_2BC += sp28; - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; - player->unk_2B4 = true; + player->boostMeter += sp28; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; + player->boostCooldown = true; } player->unk_25C += 0.04f; if (player->unk_25C > 0.6f) { @@ -4684,11 +4696,11 @@ void func_play_800B2574(Player* player) { player->sfx.boost = 1; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 50.0f, 1.0f, 10.0f, 0.0f); } else { - if (player->unk_2BC > 0.0f) { - player->unk_2BC -= sp2C; - if (player->unk_2BC <= 0.0f) { - player->unk_2BC = 0.0f; - player->unk_2B4 = false; + if (player->boostMeter > 0.0f) { + player->boostMeter -= sp2C; + if (player->boostMeter <= 0.0f) { + player->boostMeter = 0.0f; + player->boostCooldown = false; } } if (player->unk_110 > 0.0f) { @@ -4740,12 +4752,12 @@ void func_play_800B2C00(Player* player) { player->unk_194 = 5.0f; player->unk_190 = 5.0f; if (gCurrentLevel == LEVEL_CORNERIA) { - D_ctx_80177B6C++; + gCoUturnCount++; } } if ((gInputHold->button & gBrakeButton[player->num]) && !(gInputHold->button & gBoostButton[player->num]) && - (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000003, player->num); if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gInputPress->button & gBrakeButton[player->num])) { D_Timer_80177A38[gPlayerNum] = 5; @@ -4757,10 +4769,10 @@ void func_play_800B2C00(Player* player) { Math_SmoothStepToF(&player->wings.unk_0C, 90.0f, 0.2f, 100.0f, 0.0f); Math_SmoothStepToF(&player->wings.unk_10, -90.0f, 0.2f, 100.0f, 0.0f); } - player->unk_2BC += sp30; - if (player->unk_2BC > 90.0f) { - player->unk_2B4 = true; - player->unk_2BC = 90.0f; + player->boostMeter += sp30; + if (player->boostMeter > 90.0f) { + player->boostCooldown = true; + player->boostMeter = 90.0f; } player->unk_190 = 0.3f; player->unk_110 -= 1.0f; @@ -4770,11 +4782,11 @@ void func_play_800B2C00(Player* player) { Math_SmoothStepToF(&player->unk_08C, 180.0f, 0.1f, 10.0f, 0.0f); player->sfx.brake = 1; Math_SmoothStepToF(&D_ctx_801779A8[player->num], 25.0f, 1.0f, 5.0f, 0.0f); - } else if (player->unk_2BC > 0.0f) { - player->unk_2BC -= sp34; - if (player->unk_2BC <= 0.0f) { - player->unk_2BC = 0.0f; - player->unk_2B4 = false; + } else if (player->boostMeter > 0.0f) { + player->boostMeter -= sp34; + if (player->boostMeter <= 0.0f) { + player->boostMeter = 0.0f; + player->boostCooldown = false; } if (player->unk_110 < 0.0f) { player->unk_110 += 0.5f; @@ -4789,19 +4801,19 @@ void func_play_800B2C00(Player* player) { void func_play_800B3010(Player* player) { f32 sp2C; - if (!player->unk_2B8) { - Math_SmoothStepToF(&player->unk_2BC, 0.0f, 1.0f, 1.0f, 0.0f); + if (!player->boostActive) { + Math_SmoothStepToF(&player->boostMeter, 0.0f, 1.0f, 1.0f, 0.0f); } - player->unk_2B8 = false; - if (player->unk_2BC == 0.0f) { - player->unk_2B4 = false; + player->boostActive = false; + if (player->boostMeter == 0.0f) { + player->boostCooldown = false; } else if (!(gInputHold->button & Z_TRIG) && !(gInputHold->button & R_TRIG) && !(gInputHold->button & gBoostButton[player->num]) && !(gInputHold->button & gBrakeButton[player->num])) { - player->unk_2B4 = true; + player->boostCooldown = true; } sp2C = 20.0f; - if ((gInputHold->button & gBoostButton[player->num]) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + if ((gInputHold->button & gBoostButton[player->num]) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { player->unk_194 = 4.0f; player->unk_190 = 4.0f; func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); @@ -4809,22 +4821,22 @@ void func_play_800B3010(Player* player) { Math_SmoothStepToF(&D_ctx_801779A8[player->num], 30.0f, 1.0f, 10.0f, 0.0f); player->unk_190 = 2.0f; sp2C = 35.0f; - player->unk_2B8 = true; - Math_SmoothStepToF(&player->unk_2BC, 90.0f, 1.0f, 1.0f, 0.0f); - if (player->unk_2BC >= 90.0f) { - player->unk_2B4 = true; + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 1.0f, 0.0f); + if (player->boostMeter >= 90.0f) { + player->boostCooldown = true; } } - if ((gInputHold->button & gBrakeButton[player->num]) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + if ((gInputHold->button & gBrakeButton[player->num]) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000003, player->num); } Math_SmoothStepToF(&D_ctx_801779A8[player->num], 20.0f, 1.0f, 10.0f, 0.0f); sp2C = 5.0f; - player->unk_2B8 = true; - Math_SmoothStepToF(&player->unk_2BC, 90.0f, 1.0f, 1.0f, 0.0f); - if (player->unk_2BC >= 90.0f) { - player->unk_2B4 = true; + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 1.0f, 0.0f); + if (player->boostMeter >= 90.0f) { + player->boostCooldown = true; } } Math_SmoothStepToF(&player->unk_0D0, sp2C, 0.1f, 2.0f, 0.001f); @@ -4835,8 +4847,8 @@ void func_play_800B3314(Player* player) { f32 temp2; player->unk_0D4 = 3.0f; - if ((gInputHold->button & Z_TRIG) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); } player->unk_188 = 0.0f; @@ -4845,10 +4857,10 @@ void func_play_800B3314(Player* player) { player->unk_12C = 50.0f; } Math_SmoothStepToF(&player->unk_170, 1.0f, 1.0f, 0.4f, 0.0f); - player->unk_2B8 = true; - Math_SmoothStepToF(&player->unk_2BC, 90.0f, 1.0f, 0.7f, 0.0f); - if (player->unk_2BC >= 90.0f) { - player->unk_2B4 = true; + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 0.7f, 0.0f); + if (player->boostMeter >= 90.0f) { + player->boostCooldown = true; } } else { if (player->unk_12C > 0.0f) { @@ -4863,8 +4875,8 @@ void func_play_800B3314(Player* player) { } } } - if ((gInputHold->button & R_TRIG) && !player->unk_2B4) { - if (player->unk_2BC == 0.0f) { + if ((gInputHold->button & R_TRIG) && !player->boostCooldown) { + if (player->boostMeter == 0.0f) { func_play_800A5FA0(player->sfxSource, 0x09000002, player->num); } player->unk_188 = 0.0f; @@ -4873,10 +4885,10 @@ void func_play_800B3314(Player* player) { player->unk_12C = -50.0f; } Math_SmoothStepToF(&player->unk_16C, 1.0f, 1.0f, 0.4f, 0.0f); - player->unk_2B8 = true; - Math_SmoothStepToF(&player->unk_2BC, 90.0f, 1.0f, 0.7f, 0.0f); - if (player->unk_2BC >= 90.0f) { - player->unk_2B4 = true; + player->boostActive = true; + Math_SmoothStepToF(&player->boostMeter, 90.0f, 1.0f, 0.7f, 0.0f); + if (player->boostMeter >= 90.0f) { + player->boostCooldown = true; } } else if (player->unk_12C < 0.0f) { player->unk_188 += 1.5f; @@ -4942,8 +4954,8 @@ void func_play_800B39E0(Player* player) { } if (gVersusMode) { for (i = 0; i < gCamCount; i++) { - if ((D_ctx_80177B00[player->num][i] != 0) && !(gControllerHold[i].button & A_BUTTON)) { - D_ctx_80177B00[player->num][i]--; + if ((gVsLockOnTimers[player->num][i] != 0) && !(gControllerHold[i].button & A_BUTTON)) { + gVsLockOnTimers[player->num][i]--; } } } @@ -4965,11 +4977,11 @@ void func_play_800B39E0(Player* player) { if (D_ctx_80177D70[player->num] != 0) { D_ctx_80177D70[player->num]--; } - if (D_ctx_80177AE8[player->num] != 0) { - D_ctx_80177AE8[player->num]--; - Math_SmoothStepToF(&D_ctx_80177AB8[player->num], 128.0f, 1.0f, 40.0f, 0.01f); + if (gShieldTimer[player->num] != 0) { + gShieldTimer[player->num]--; + Math_SmoothStepToF(&gShieldAlpha[player->num], 128.0f, 1.0f, 40.0f, 0.01f); } else { - Math_SmoothStepToF(&D_ctx_80177AB8[player->num], 0.0f, 1.0f, 10.0f, 0.01f); + Math_SmoothStepToF(&gShieldAlpha[player->num], 0.0f, 1.0f, 10.0f, 0.01f); } Math_SmoothStepToF(&D_ctx_80177AA0[player->num], 0.0f, 1.0f, 0.4f, 0.01f); if ((player->form == FORM_LANDMASTER) && (player->unk_1A0 != 0)) { @@ -5013,7 +5025,7 @@ void func_play_800B39E0(Player* player) { if ((gLevelMode != LEVELMODE_UNK_2) && ((player->unk_0D8.x != 0.f) || (player->unk_0D8.y != 0.f) || (player->unk_0D8.z != 0.f)) && ((player->unk_1A4 >= 40) || (player->unk_1A4 == 21))) { - player->unk_2B4 = true; + player->boostCooldown = true; player->unk_0E4 = 0; player->unk_0E8 = 0; Math_SmoothStepToF(&player->unk_110, 0, 1.0f, 5.0f, 0); @@ -5036,7 +5048,7 @@ void func_play_800B39E0(Player* player) { } } -void func_play_800B40AC(Player* player) { +void Player_UpdateShields(Player* player) { if (player->damage > 0) { player->damage -= 2; if (player->damage <= 0) { @@ -5066,7 +5078,7 @@ void func_play_800B40AC(Player* player) { void func_play_800B415C(Player* player) { s32 var_v0; - func_play_800B40AC(player); + Player_UpdateShields(player); if (player->shields < 128) { if (player->shields > 80) { @@ -5113,7 +5125,7 @@ void func_play_800B42B0(Player* player) { gInputPress->stick_y = 0; gInputPress->button = 0; gInputHold->button = gBoostButton[player->num]; - player->unk_2BC = 1.0f; + player->boostMeter = 1.0f; } func_play_800ADA28(player); func_play_800B2574(player); @@ -5237,7 +5249,7 @@ void func_play_800B46F8(Player* player) { if ((player->state_1C8 == PLAYERSTATE_1C8_ACTIVE) && (D_ctx_8017796C >= 0)) { D_ctx_8017796C++; - if (D_ctx_8017796C > 960) { + if (D_ctx_8017796C > 32 * 30) { D_ctx_8017796C = 0; if (1) {} if ((player->shields < 64) && ((gTeamShields[TEAM_ID_FALCO] > 0) || (gTeamShields[TEAM_ID_PEPPY] > 0) || @@ -5306,11 +5318,11 @@ void Player_Update(Player* player) { *gControllerRumble = 1; } } - if (player->state_1C8 >= PLAYERSTATE_1C8_LEVEL_INTRO) { + if (player->state_1C8 > PLAYERSTATE_1C8_INIT) { func_play_800B39E0(player); } player->flags_228 = 0; - if ((player->state_1C8 >= PLAYERSTATE_1C8_LEVEL_INTRO) && (player->form == FORM_ARWING) && !gVersusMode) { + if ((player->state_1C8 > PLAYERSTATE_1C8_INIT) && (player->form == FORM_ARWING) && !gVersusMode) { switch (player->unk_204) { case 0: sp1C4 = Animation_GetFrameData(&D_arwing_3015AF4, 0, sp58); @@ -5411,15 +5423,15 @@ void Player_Update(Player* player) { break; case PLAYERSTATE_1C8_U_TURN: if (gVersusMode) { - D_ctx_80177B00[player->num][0] = D_ctx_80177B00[player->num][1] = D_ctx_80177B00[player->num][2] = - D_ctx_80177B00[player->num][3] = 0; + gVsLockOnTimers[player->num][0] = gVsLockOnTimers[player->num][1] = gVsLockOnTimers[player->num][2] = + gVsLockOnTimers[player->num][3] = 0; } player->wings.modelId = 1; Math_SmoothStepToF(&player->wings.unk_04, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_08, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_0C, 0.0f, 0.1f, 5.0f, 0); Math_SmoothStepToF(&player->wings.unk_10, 0.0f, 0.1f, 5.0f, 0); - func_play_800B40AC(player); + Player_UpdateShields(player); Cutscene_UTurn(player); if (gCurrentLevel == LEVEL_KATINA) { func_play_800A8BA4(player); @@ -5431,20 +5443,20 @@ void Player_Update(Player* player) { case PLAYERSTATE_1C8_LEVEL_COMPLETE: player->cockpitView = false; gPauseEnabled = false; - func_play_800B40AC(player); + Player_UpdateShields(player); Cutscene_LevelComplete(player); func_play_800A4C40(player); gShowHud = gChargeTimers[player->num] = 0; break; case PLAYERSTATE_1C8_ENTER_WARP_ZONE: gPauseEnabled = 0; - func_play_800B40AC(player); + Player_UpdateShields(player); Cutscene_EnterWarpZone(player); gShowHud = 0; break; case PLAYERSTATE_1C8_START_360: gPauseEnabled = 0; - func_play_800B40AC(player); + Player_UpdateShields(player); Cutscene_AllRangeMode(player); func_play_800B2130(player); gChargeTimers[player->num] = player->cockpitView = gShowHud = 0; @@ -5456,7 +5468,7 @@ void Player_Update(Player* player) { break; case PLAYERSTATE_1C8_ANDROSS_MOUTH: Andross_8018C390(player); - func_play_800B40AC(player); + Player_UpdateShields(player); break; case PLAYERSTATE_1C8_12: break; @@ -5487,7 +5499,7 @@ void Player_Update(Player* player) { player->unk_234 = 0; player->vel.z = player->vel.x = player->vel.y = player->unk_0D8.x = player->unk_0D8.y = 0.0f; - if ((gLevelMode == LEVELMODE_ALL_RANGE) && (D_ctx_8017837C == 7)) { + if ((gLevelMode == LEVELMODE_ALL_RANGE) && (gFadeoutType == 7)) { player->cam.eye.x += 1.0f; player->cam.eye.z += 1.5f; } @@ -5506,7 +5518,7 @@ void Player_Update(Player* player) { if (gFillScreenAlpha == 255) { Play_ClearObjectData(); D_ctx_80177D20 = gPlayer[0].unk_144 = 0.0f; - gPlayerFillScreenAlphas[0] = 0; + gPlayerGlareAlphas[0] = 0; gShowAllRangeCountdown = gRadioState = 0; Audio_ClearVoice(); Audio_SetBaseSfxReverb(0); @@ -5514,7 +5526,7 @@ void Player_Update(Player* player) { if (gCurrentLevel == LEVEL_VENOM_ANDROSS) { D_ctx_80177C94 = gGoldRingCount[0]; } - switch (D_ctx_8017837C) { + switch (gFadeoutType) { case 7: if (gCurrentLevel == LEVEL_TRAINING) { gGameState = GSTATE_MENU; @@ -5522,10 +5534,10 @@ void Player_Update(Player* player) { gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; D_game_80161A34 = 7; - D_ctx_80178410 = 0; + gStarCount = 0; } else { if ((gCurrentLevel == LEVEL_SECTOR_X) || (gCurrentLevel == LEVEL_METEO)) { - gLevelStage = 0; + gLevelPhase = 0; } if (gLifeCount[gPlayerNum] < 0) { gNextGameState = GSTATE_GAME_OVER; @@ -5570,7 +5582,7 @@ void Player_Update(Player* player) { Math_SmoothStepToF(&player->unk_09C, sp1C8, 1.0f, 10.0f, 0.0f); if (player->form == FORM_ARWING) { Math_SmoothStepToF(&player->unk_194, player->unk_190, 0.5f, 5.0f, 0.0f); - if (player->unk_2B4 && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { + if (player->boostCooldown && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) { player->unk_190 = 0.5f; } else { player->unk_190 = 1.0f; @@ -5602,7 +5614,7 @@ void func_play_800B56BC(Player* player) { Math_SmoothStepToF(&player->unk_030, var_fv1 * 1.6f, 0.1f, 3.0f, 0.05f); if (gLevelType == LEVELTYPE_SPACE) { Math_SmoothStepToF(&player->unk_02C, var_fv0 * 0.8f, 0.1f, 3.0f, 0.05f); - } else if (player->pos.y < (gGroundLevel + 50.0f)) { + } else if (player->pos.y < (gGroundHeight + 50.0f)) { Math_SmoothStepToF(&player->unk_02C, var_fv0 * 0.3f, 0.1f, 3.0f, 0.05f); } else { Math_SmoothStepToF(&player->unk_02C, 2.0f * var_fv0, 0.1f, 4.0f, 0.05f); @@ -5957,15 +5969,15 @@ void func_play_800B6F50(f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt) } sp30 = (-pitch * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + D_ctx_80178430 + tempf; sp34 = (yaw * (-8.0f / 3.0f * M_RTOD) * 2.0f) + 3000.0f + D_ctx_8017842C; - sp20 = D_ctx_80178420; - D_ctx_80178420 = Math_ModF(sp34, SCREEN_WIDTH * 1.5f); - D_ctx_80178424 = Math_ModF(sp30, SCREEN_HEIGHT * 1.5f); + sp20 = gStarfieldX; + gStarfieldX = Math_ModF(sp34, SCREEN_WIDTH * 1.5f); + gStarfieldY = Math_ModF(sp30, SCREEN_HEIGHT * 1.5f); if ((gGameState == GSTATE_PLAY) && (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_INTRO) && (gCurrentLevel == LEVEL_METEO)) { - if (fabsf(D_ctx_80178420 - sp20) < 50.0f) { + if (fabsf(gStarfieldX - sp20) < 50.0f) { D_bg_8015F96C = 0.0f; - if (fabsf(D_ctx_80178420 - sp20) > 3.0f) { - D_bg_8015F96C = fabsf(D_ctx_80178420 - sp20 - 3.0f) * 0.5f; + if (fabsf(gStarfieldX - sp20) > 3.0f) { + D_bg_8015F96C = fabsf(gStarfieldX - sp20 - 3.0f) * 0.5f; } } } @@ -6150,7 +6162,7 @@ void Play_UpdateLevel(void) { } break; case LEVEL_VENOM_2: - if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelStage == 2)) { + if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && (gLevelPhase == 2)) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; gPlayer[0].unk_234 = 1; @@ -6165,12 +6177,12 @@ void Play_UpdateLevel(void) { break; case LEVEL_VENOM_ANDROSS: Andross_8018BDD8(); - gGroundLevel = -25000.0f; + gGroundHeight = -25000.0f; gPlayer[0].unk_0A0 = 612.0f; gPlayer[0].unk_0A4 = -544.0f; - if (D_Timer_80177B44 != 0) { - D_Timer_80177B44--; - if (D_Timer_80177B44 == 0) { + if (gStartAndrossFightTimer != 0) { + gStartAndrossFightTimer--; + if (gStartAndrossFightTimer == 0) { Andross_80189214(); } } @@ -6179,19 +6191,19 @@ void Play_UpdateLevel(void) { Texture_Scroll(D_102FF08, 8, 8, 1); /* fallthrough */ case LEVEL_SECTOR_X: - if (gLevelStage == 1) { + if (gLevelPhase == 1) { gBlurAlpha = 128; if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - Math_SmoothStepToF(&D_bg_8015F960, 0.0f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&gWarpZoneBgAlpha, 0.0f, 1.0f, 1.0f, 0.0f); } else { - Math_SmoothStepToF(&D_bg_8015F960, 128.0f, 1.0f, 1.0f, 0.0f); + Math_SmoothStepToF(&gWarpZoneBgAlpha, 128.0f, 1.0f, 1.0f, 0.0f); } } - if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelStage == 0) && (gRingPassCount == 4)) { + if ((gCurrentLevel == LEVEL_SECTOR_X) && (gLevelPhase == 0) && (gRingPassCount == 4)) { gRingPassCount++; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ENTER_WARP_ZONE; gPlayer[0].unk_1D0 = 0; - gOverlayStage = 1; + gSceneSetup = 1; AUDIO_PLAY_SFX(0x1900602A, gDefaultSfxSource, 0); gNextPlanetPath = 2; D_play_800D3180[gCurrentLevel] = 1; @@ -6264,7 +6276,7 @@ void Play_UpdateLevel(void) { } func_hud_8008C104(D_SO_60229A4, D_SO_6010198); if (gPlayer[0].shields == 0) { - D_ctx_80177B4C = 1; + gSoShieldsEmpty = 1; } break; case LEVEL_ZONESS: @@ -6350,9 +6362,9 @@ void Play_SpawnVsItem(ObjectId objId, Item* item) { if (item->obj.status == OBJ_FREE) { Item_Initialize(item); item->obj.status = OBJ_INIT; - item->obj.pos.x = gObjects58[spawnIndex].obj.pos.x; - item->obj.pos.y = gObjects58[spawnIndex].obj.pos.y; - item->obj.pos.z = gObjects58[spawnIndex].obj.pos.z; + item->obj.pos.x = gScenery360[spawnIndex].obj.pos.x; + item->obj.pos.y = gScenery360[spawnIndex].obj.pos.y; + item->obj.pos.z = gScenery360[spawnIndex].obj.pos.z; item->obj.id = objId; Object_SetInfo(&item->info, item->obj.id); } @@ -6386,10 +6398,10 @@ void Play_Main(void) { gChangeTo360 = false; gLevelMode = LEVELMODE_ALL_RANGE; if (gCurrentLevel != LEVEL_VENOM_ANDROSS) { - MEM_ARRAY_ALLOCATE(gObjects58, 200); + MEM_ARRAY_ALLOCATE(gScenery360, 200); } for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Play_ClearObjectData(); if (gCurrentLevel == LEVEL_CORNERIA) { @@ -6425,7 +6437,7 @@ void Play_Main(void) { gPlayState = PLAY_UPDATE; break; case PLAY_UPDATE: - if ((gLevelStatusScreenTimer != 0) || (gLevelClearScreenTimer != 0)) { + if ((gLevelStartStatusScreenTimer != 0) || (gLevelClearScreenTimer != 0)) { gPauseEnabled = false; } else { gPauseEnabled = true; @@ -6446,7 +6458,7 @@ void Play_Main(void) { gDrawMode = gVersusMode = 0; gCamCount = 1; gBgColor = 0; - gCsFrameCount = gLevelClearScreenTimer = gLevelStatusScreenTimer = gRadioState = 0; + gCsFrameCount = gLevelClearScreenTimer = gLevelStartStatusScreenTimer = gRadioState = 0; D_ctx_8017782C = 0; } if (gVersusMode) { diff --git a/src/engine/fox_std_lib.c b/src/engine/fox_std_lib.c index e3f89e81..df7a695f 100644 --- a/src/engine/fox_std_lib.c +++ b/src/engine/fox_std_lib.c @@ -176,7 +176,7 @@ void Animation_DrawLimb(s32 mode, Limb* limb, Limb** skeleton, Vec3f* jointTable if (mode >= 2) { Matrix_MultVec3f(gCalcMatrix, &origin, &pos); if (mode != 5) { - func_edisplay_8005F670(&pos); + Display_SetSecondLight(&pos); } } Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); diff --git a/src/engine/fox_tank.c b/src/engine/fox_tank.c index b5fb01ad..f69c4790 100644 --- a/src/engine/fox_tank.c +++ b/src/engine/fox_tank.c @@ -281,14 +281,14 @@ void func_tank_800441C8(Player* player, f32* hitboxData, f32 xPos, f32 yPos, f32 } void func_tank_800443DC(Player* player) { - Object_80* obj80; + Scenery* scenery; s32 i; - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_58) && - ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) { - func_tank_800441C8(player, obj80->info.hitbox, obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, - obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z); + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_58) && + ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + func_tank_800441C8(player, scenery->info.hitbox, scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, + scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } } } @@ -307,12 +307,12 @@ void func_tank_800444BC(Player* player) { sp30 = 0.0f; } sp40 = sp3C = 0.0f; - sp38 = gGroundLevel; + sp38 = gGroundHeight; if (D_ctx_801784AC == 4) { Ground_801B6E20(player->pos.x, player->unk_138 + player->unk_144, &sp40, &sp38, &sp3C); } if (gCurrentLevel == LEVEL_MACBETH) { - D_MA_801BE250[27] = gGroundLevel; + D_MA_801BE250[27] = gGroundHeight; D_MA_801BE250[28] = D_MA_801BE250[29] = 0.0f; D_800C9F10 = 0.0f; func_tank_80047754(player); @@ -328,10 +328,10 @@ void func_tank_800444BC(Player* player) { if (player->vel.y < -20.0f) { player->unk_1F4 = 20; } - if (D_ctx_80177BAC != 0) { - D_ctx_80177BAC = 0; + if (gTiStartLandmaster != 0) { + gTiStartLandmaster = 0; AUDIO_PLAY_BGM(SEQ_ID_TITANIA | SEQ_FLAG); - func_8001C8B8(0); + Audio_StartPlayerNoise(0); } player->pos.y = sp38 - 3.0f; @@ -508,7 +508,7 @@ void func_tank_80045130(Player* player) { Math_SmoothStepToF(&player->unk_16C, 0.0f, 1.0f, 0.2f, 0.0f); if (gInputPress->button & Z_TRIG) { player->sfx.bank = 1; - if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->unk_2BC < 10.0f)) { + if ((player->timer_1E0 != 0) && (player->unk_12C > 0.0f) && (player->boostMeter < 10.0f)) { player->unk_1DC = 1; player->timer_1E8 = 15; player->unk_1F0 = 20; @@ -521,7 +521,7 @@ void func_tank_80045130(Player* player) { } if (gInputPress->button & R_TRIG) { player->sfx.bank = 1; - if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->unk_2BC < 10.0f)) { + if ((player->timer_1E4 != 0) && (player->unk_12C < 0.0f) && (player->boostMeter < 10.0f)) { player->unk_1DC = 1; player->timer_1E8 = 15; player->unk_1F0 = -20; @@ -546,7 +546,7 @@ void func_tank_80045348(Player* player) { s16 sp2E = false; if (player->unk_19C >= 0) { - if ((gBoostButton[player->num] & gInputHold->button) && !player->unk_2B4) { + if ((gBoostButton[player->num] & gInputHold->button) && !player->boostCooldown) { D_800C9F14++; sp2E = true; if (D_800C9F24 == 0.0f) { @@ -569,7 +569,7 @@ void func_tank_80045348(Player* player) { } else { D_800C9F24 = 0.0f; } - if ((gBrakeButton[player->num] & gInputHold->button) && !player->unk_2B4 && !sp2E) { + if ((gBrakeButton[player->num] & gInputHold->button) && !player->boostCooldown && !sp2E) { D_800C9F14++; sp44 = 5.0f; sp40 = 100.0f; @@ -596,7 +596,7 @@ void func_tank_80045678(Player* player) { Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); } - if ((gInputHold->button & Z_TRIG) && !player->unk_2B4) { + if ((gInputHold->button & Z_TRIG) && !player->boostCooldown) { D_800C9F14++; if (D_800C9F20 == 0.0f) { AUDIO_PLAY_SFX(0x01004024, player->sfxSource, 0); @@ -626,7 +626,7 @@ void func_tank_80045678(Player* player) { Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); Audio_KillSfxBySourceAndId(player->sfxSource, 0x1100000A); } - if ((gInputHold->button & R_TRIG) && !player->unk_2B4) { + if ((gInputHold->button & R_TRIG) && !player->boostCooldown) { D_800C9F14++; if (player->unk_2C0 == 0.0f) { AUDIO_PLAY_SFX(0x01004024, player->sfxSource, 0); @@ -785,14 +785,14 @@ void func_tank_800460E0(Player* player, f32* hitboxData, f32 arg2, f32 arg3, f32 } void func_tank_80046260(Player* player) { - Object_80* obj80; + Scenery* scenery; s32 i; - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id == OBJ_80_58) && - ((player->unk_138 - 2000.0f) < obj80->obj.pos.z) && (obj80->obj.pos.y < player->pos.y)) { - func_tank_800460E0(player, obj80->info.hitbox, obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, - obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z); + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id == OBJ_SCENERY_58) && + ((player->unk_138 - 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, + scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } } } @@ -808,7 +808,7 @@ void func_tank_80046358(Player* player) { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138 + -20.0f; - player->unk_068 = gGroundLevel + 3.0f; + player->unk_068 = gGroundHeight + 3.0f; player->unk_248 = 0.0f; player->unk_24C = 0.0f; player->unk_070 = 0.0f; @@ -844,14 +844,14 @@ void func_tank_8004641C(Player* player, s32 arg1, f32 arg2, f32 arg3, f32 arg4, if (func_play_800A8054(arg1, arg2, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { if (D_MA_801BE250[27] < arg3 + sp58.y) { D_MA_801BE250[27] = arg3 + sp58.y; - if (arg1 == OBJ_80_67) { + if (arg1 == OBJ_SCENERY_67) { player->unk_1DC = 0; D_800C9F04 = 1; } } D_MA_801BE250[28] = sp58.x; D_MA_801BE250[29] = sp58.z; - } else if ((arg1 == OBJ_80_67) && (D_MA_801BE250[27] == 0.0f) && + } else if ((arg1 == OBJ_SCENERY_67) && (D_MA_801BE250[27] == 0.0f) && func_play_800A8054(arg1, arg2 + 20.0f, arg3, arg4, sp84, sp80, sp7C, &sp58, &sp4C)) { player->unk_1DC = 9; player->timer_1E8 = 15; @@ -875,7 +875,7 @@ static f32 D_800C9F4C[5] = { 0.0f, -1.0f, 1.0f, 0.5f, -0.5f }; void func_tank_80046704(Player* player) { s32 pad[7]; s16 i; - Object_80* obj80; + Scenery* scenery; f32 temp1; f32 temp2; @@ -883,35 +883,39 @@ void func_tank_80046704(Player* player) { D_800C9F00--; } if (1) {} - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) { - if ((obj80->obj.id == OBJ_80_69) || (obj80->obj.id == OBJ_80_70) || (obj80->obj.id == OBJ_80_71) || - (obj80->obj.id == OBJ_80_72) || (obj80->obj.id == OBJ_80_73) || (obj80->obj.id == OBJ_80_67)) { - temp1 = obj80->obj.pos.x - player->pos.x; - temp2 = obj80->obj.pos.z - player->unk_138; + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + if ((scenery->obj.id == OBJ_SCENERY_69) || (scenery->obj.id == OBJ_SCENERY_70) || + (scenery->obj.id == OBJ_SCENERY_71) || (scenery->obj.id == OBJ_SCENERY_72) || + (scenery->obj.id == OBJ_SCENERY_73) || (scenery->obj.id == OBJ_SCENERY_67)) { + temp1 = scenery->obj.pos.x - player->pos.x; + temp2 = scenery->obj.pos.z - player->unk_138; if (sqrtf(SQ(temp1) + SQ(temp2)) < 2000.0f) { - func_tank_8004641C(player, obj80->obj.id, obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, - obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z); + func_tank_8004641C(player, scenery->obj.id, scenery->obj.pos.x, scenery->obj.pos.y, + scenery->obj.pos.z, scenery->obj.rot.x, scenery->obj.rot.y, scenery->obj.rot.z); } - } else if (obj80->obj.id == OBJ_80_74) { - if (((player->pos.x - 820.0f) <= obj80->obj.pos.x) && (obj80->obj.pos.x <= (player->pos.x + 820.0f)) && - ((player->pos.y - 50.0f) <= obj80->obj.pos.y) && (obj80->obj.pos.y <= (player->pos.y + 50.0f)) && - (player->unk_138 <= obj80->obj.pos.z) && (obj80->obj.pos.z <= (player->unk_138 + 960.0f))) { - D_MA_801BE250[27] = obj80->obj.pos.y; + } else if (scenery->obj.id == OBJ_SCENERY_74) { + if (((player->pos.x - 820.0f) <= scenery->obj.pos.x) && + (scenery->obj.pos.x <= (player->pos.x + 820.0f)) && + ((player->pos.y - 50.0f) <= scenery->obj.pos.y) && + (scenery->obj.pos.y <= (player->pos.y + 50.0f)) && (player->unk_138 <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->unk_138 + 960.0f))) { + D_MA_801BE250[27] = scenery->obj.pos.y; player->unk_064 = player->pos.x; player->unk_068 = D_MA_801BE250[27] - 3.0f; } } - if ((obj80->obj.id == OBJ_80_59) || (obj80->obj.id == OBJ_80_60) || (obj80->obj.id == OBJ_80_61) || - (obj80->obj.id == OBJ_80_63) || (obj80->obj.id == OBJ_80_105) || (obj80->obj.id == OBJ_80_66) || - (obj80->obj.id == OBJ_80_67) || (obj80->obj.id == OBJ_80_68)) { + if ((scenery->obj.id == OBJ_SCENERY_59) || (scenery->obj.id == OBJ_SCENERY_60) || + (scenery->obj.id == OBJ_SCENERY_61) || (scenery->obj.id == OBJ_SCENERY_63) || + (scenery->obj.id == OBJ_SCENERY_105) || (scenery->obj.id == OBJ_SCENERY_66) || + (scenery->obj.id == OBJ_SCENERY_67) || (scenery->obj.id == OBJ_SCENERY_68)) { s32 temp_v0; s32 sp94; - temp_v0 = func_tank_80046E40(player, obj80->info.hitbox, &sp94, obj80->obj.pos.x, obj80->obj.pos.y, - obj80->obj.pos.z, obj80->obj.rot.x, obj80->obj.rot.y, obj80->obj.rot.z, - 0.0f, 0.0f, 0.0f); + temp_v0 = func_tank_80046E40(player, scenery->info.hitbox, &sp94, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, + scenery->obj.rot.y, scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); switch (temp_v0) { case 0: break; @@ -929,9 +933,9 @@ void func_tank_80046704(Player* player) { player->pos.x += (D_800C9F4C[temp_v0] * 5.0f); break; case 3: - if ((obj80->obj.id == OBJ_80_59) || (obj80->obj.id == OBJ_80_60) || - (obj80->obj.id == OBJ_80_63) || (obj80->obj.id == OBJ_80_66) || - (obj80->obj.id == OBJ_80_68)) { + if ((scenery->obj.id == OBJ_SCENERY_59) || (scenery->obj.id == OBJ_SCENERY_60) || + (scenery->obj.id == OBJ_SCENERY_63) || (scenery->obj.id == OBJ_SCENERY_66) || + (scenery->obj.id == OBJ_SCENERY_68)) { Player_ApplyDamage(player, temp_v0, 5); } player->unk_0D0 = -(D_800C9F00 * 1.5f); @@ -940,37 +944,37 @@ void func_tank_80046704(Player* player) { AUDIO_PLAY_SFX(0x09008015, player->sfxSource, 0); break; } - if (obj80->obj.id == OBJ_80_59) { - if (((player->pos.x - 230.0f) <= obj80->obj.pos.x) && - (obj80->obj.pos.x <= (player->pos.x + 230.0f)) && - ((80.0f <= player->pos.y - obj80->obj.pos.y)) && - ((player->pos.y - obj80->obj.pos.y) < 210.0f) && - ((player->unk_138 - 220.0f) <= obj80->obj.pos.z) && - (obj80->obj.pos.z <= (player->unk_138 + 220.0f))) { + if (scenery->obj.id == OBJ_SCENERY_59) { + if (((player->pos.x - 230.0f) <= scenery->obj.pos.x) && + (scenery->obj.pos.x <= (player->pos.x + 230.0f)) && + ((80.0f <= player->pos.y - scenery->obj.pos.y)) && + ((player->pos.y - scenery->obj.pos.y) < 210.0f) && + ((player->unk_138 - 220.0f) <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->unk_138 + 220.0f))) { - if (!(((player->pos.x - 210.0f) <= obj80->obj.pos.x) && - (obj80->obj.pos.x <= (player->pos.x + 210.0f))) && + if (!(((player->pos.x - 210.0f) <= scenery->obj.pos.x) && + (scenery->obj.pos.x <= (player->pos.x + 210.0f))) && (D_MA_801BE250[27] == 0.f) && (player->vel.y < 0.f)) { player->unk_1DC = 9; player->timer_1E8 = 15; - if ((player->pos.x - 200.0f) <= obj80->obj.pos.x) { + if ((player->pos.x - 200.0f) <= scenery->obj.pos.x) { player->unk_1EC = player->unk_1F0 = 20; } else { player->unk_1EC = player->unk_1F0 = -20; } } else { D_800C9F04 = 1; - D_MA_801BE250[27] = obj80->obj.pos.y + 206.0f; + D_MA_801BE250[27] = scenery->obj.pos.y + 206.0f; player->unk_1DC = 0; } } - if (((player->pos.x - 220.0f) <= obj80->obj.pos.x) && - (obj80->obj.pos.x <= (player->pos.x + 220.0f)) && - ((player->unk_138 - 220.0f) <= obj80->obj.pos.z) && - (obj80->obj.pos.z <= (player->unk_138 + 220.0f)) && (player->pos.y >= 200.0f)) { - player->unk_068 = obj80->obj.pos.y + 204.0f; + if (((player->pos.x - 220.0f) <= scenery->obj.pos.x) && + (scenery->obj.pos.x <= (player->pos.x + 220.0f)) && + ((player->unk_138 - 220.0f) <= scenery->obj.pos.z) && + (scenery->obj.pos.z <= (player->unk_138 + 220.0f)) && (player->pos.y >= 200.0f)) { + player->unk_068 = scenery->obj.pos.y + 204.0f; } - } else if ((obj80->obj.id == OBJ_80_105) && Macbeth_801A3C20(player->unk_138)) { + } else if ((scenery->obj.id == OBJ_SCENERY_105) && Macbeth_801A3C20(player->unk_138)) { if (((player->pos.x - 200.0f) < D_MA_801BE250[21]) && (D_MA_801BE250[21] < (player->pos.x + 200.0f))) { player->unk_068 = D_MA_801BE250[22] - 1.0f; @@ -1106,31 +1110,31 @@ void func_tank_80047504(Player* player) { D_800C9F14 = 0; func_tank_80045678(player); func_tank_80045348(player); - if (!player->unk_2B4) { + if (!player->boostCooldown) { if (D_800C9F14 != 0) { if (D_800C9F14 >= 2) { - player->unk_2BC += 2.0f; + player->boostMeter += 2.0f; } else { - player->unk_2BC += 1.0f; + player->boostMeter += 1.0f; } - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; - player->unk_2B4 = true; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; + player->boostCooldown = true; Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); } } else { - if (player->unk_2BC > 0.0f) { - player->unk_2B4 = true; + if (player->boostMeter > 0.0f) { + player->boostCooldown = true; Audio_KillSfxBySourceAndId(player->sfxSource, 0x01004024); Audio_KillSfxBySourceAndId(player->sfxSource, 0x01008016); } } } else { - player->unk_2BC -= 1.0f; - if (player->unk_2BC <= 0.0f) { - player->unk_2B4 = false; - player->unk_2BC = 0.0f; + player->boostMeter -= 1.0f; + if (player->boostMeter <= 0.0f) { + player->boostCooldown = false; + player->boostMeter = 0.0f; } } func_play_800B41E0(player); @@ -1144,7 +1148,7 @@ void func_tank_80047504(Player* player) { } else { player->unk_064 = player->pos.x; player->unk_06C = player->unk_138 + -10.0f; - player->unk_068 = gGroundLevel - 4.0f; + player->unk_068 = gGroundHeight - 4.0f; player->unk_248 = 0.0f; player->unk_24C = 0.0f; player->unk_070 = 0.0f; @@ -1329,7 +1333,7 @@ void func_tank_800481F4(Player* player) { Actor* actor; Boss* boss; Sprite* sprite; - Object_80* obj80; + Scenery* scenery; s32 sp98; s32 pad2; f32 var_fv1; @@ -1337,20 +1341,22 @@ void func_tank_800481F4(Player* player) { func_play_800A887C(player); func_tank_800444BC(player); if (player->timer_498 == 0) { - for (i = 0, obj80 = gObjects80; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id != OBJ_80_58) && (obj80->obj.id != OBJ_80_105) && - (obj80->obj.id != OBJ_80_59) && (obj80->obj.id != OBJ_80_60) && (obj80->obj.id != OBJ_80_63) && - (obj80->obj.id != OBJ_80_66) && (obj80->obj.id != OBJ_80_67) && (obj80->obj.id != OBJ_80_68) && - (obj80->obj.id != OBJ_80_70) && (obj80->obj.id != OBJ_80_72) && (obj80->obj.id != OBJ_80_71) && - (obj80->obj.id != OBJ_80_73) && (obj80->obj.id != OBJ_80_74) && (obj80->obj.id != OBJ_80_69) && - ((player->unk_138 - 2000.0f) < obj80->obj.pos.z)) { - var_fv1 = obj80->obj.rot.y; - if (obj80->info.action == (ObjectFunc) func_enmy_80066EA8) { + for (i = 0, scenery = gScenery; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_58) && + (scenery->obj.id != OBJ_SCENERY_105) && (scenery->obj.id != OBJ_SCENERY_59) && + (scenery->obj.id != OBJ_SCENERY_60) && (scenery->obj.id != OBJ_SCENERY_63) && + (scenery->obj.id != OBJ_SCENERY_66) && (scenery->obj.id != OBJ_SCENERY_67) && + (scenery->obj.id != OBJ_SCENERY_68) && (scenery->obj.id != OBJ_SCENERY_70) && + (scenery->obj.id != OBJ_SCENERY_72) && (scenery->obj.id != OBJ_SCENERY_71) && + (scenery->obj.id != OBJ_SCENERY_73) && (scenery->obj.id != OBJ_SCENERY_74) && + (scenery->obj.id != OBJ_SCENERY_69) && ((player->unk_138 - 2000.0f) < scenery->obj.pos.z)) { + var_fv1 = scenery->obj.rot.y; + if (scenery->info.action == (ObjectFunc) func_enmy_80066EA8) { var_fv1 = 0.0f; } - temp_v0 = - func_play_800A7974(player, obj80->info.hitbox, &sp98, obj80->obj.pos.x, obj80->obj.pos.y, - obj80->obj.pos.z, obj80->obj.rot.x, var_fv1, obj80->obj.rot.z, 0.0f, 0.0f, 0.0f); + temp_v0 = func_play_800A7974(player, scenery->info.hitbox, &sp98, scenery->obj.pos.x, + scenery->obj.pos.y, scenery->obj.pos.z, scenery->obj.rot.x, var_fv1, + scenery->obj.rot.z, 0.0f, 0.0f, 0.0f); if (temp_v0 != 0) { if (temp_v0 < 0) { if (temp_v0 == -1) { @@ -1370,7 +1376,7 @@ void func_tank_800481F4(Player* player) { AUDIO_PLAY_SFX(0x19000001, player->sfxSource, 0); } } else { - Player_ApplyDamage(player, temp_v0, obj80->info.damage); + Player_ApplyDamage(player, temp_v0, scenery->info.damage); } } } diff --git a/src/engine/fox_versus.c b/src/engine/fox_versus.c index c9814cdc..6340a806 100644 --- a/src/engine/fox_versus.c +++ b/src/engine/fox_versus.c @@ -68,11 +68,11 @@ void func_versus_800BC760(void) { gOptionMenuStatus = OPTION_WAIT; D_ctx_80177B40 = 0; gBgColor = 0; - gPlayerFillScreenAlphas[0] = 0; - gPlayerFillScreenAlphas[1] = 0; - gPlayerFillScreenAlphas[2] = 0; - gPlayerFillScreenAlphas[3] = 0; - gOverlayStage = 0; + gPlayerGlareAlphas[0] = 0; + gPlayerGlareAlphas[1] = 0; + gPlayerGlareAlphas[2] = 0; + gPlayerGlareAlphas[3] = 0; + gSceneSetup = 0; gRadioState = 0; gVersusMode = 0; gFillScreenAlphaTarget = 0; @@ -441,7 +441,7 @@ s32 func_versus_800BE564(void) { continue; } D_80178780[i] = 1; - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; ret++; } return ret; @@ -461,16 +461,16 @@ s32 func_versus_800BE564(void) { } } - if (D_801787F8[i]) { + if (D_801787F8[i] != 0) { D_801787F8[i]--; } - if ((sUnlockLandmaster) && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { + if (sUnlockLandmaster && (D_80178780[i] == 0) && (gControllerPress[i].button & B_BUTTON)) { AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); D_80178780[i] = 2; } - if ((sUnlockOnFoot) && (D_80178780[i] == 0) && + if (sUnlockOnFoot && (D_80178780[i] == 0) && ((gControllerPress[i].button & L_CBUTTONS) || (gControllerPress[i].button & D_CBUTTONS) || (gControllerPress[i].button & U_CBUTTONS) || (gControllerPress[i].button & R_CBUTTONS))) { AUDIO_PLAY_SFX(0x49000003, gDefaultSfxSource, 4); @@ -482,19 +482,19 @@ s32 func_versus_800BE564(void) { D_80178780[i] = 1; } - if (D_80178780[i]) { + if (D_80178780[i] != 0) { switch (D_80178780[i]) { case 1: - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; break; case 2: - D_ctx_80177870[i] = 1; + gPlayerForms[i] = FORM_LANDMASTER; break; case 3: - D_ctx_80177870[i] = 3; + gPlayerForms[i] = FORM_ON_FOOT; break; default: - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; break; } ret++; @@ -664,7 +664,7 @@ s32 func_versus_800BF17C(void) { } else { D_80178780[i] = 0; gPlayer[i].unk_1D0 = 0; - if ((!D_80178780[i]) && (D_801787F8[i] == 0)) { + if ((D_80178780[i] == 0) && (D_801787F8[i] == 0)) { if (sUnlockLandmaster && sUnlockOnFoot) { D_80178780[i] = RAND_INT(3.0f) + 1; } @@ -699,19 +699,19 @@ s32 func_versus_800BF17C(void) { if (D_80178780[i] != 0) { switch (D_80178780[i]) { case 1: - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; break; case 2: - D_ctx_80177870[i] = 1; + gPlayerForms[i] = FORM_LANDMASTER; break; case 3: - D_ctx_80177870[i] = 3; + gPlayerForms[i] = FORM_ON_FOOT; break; default: - D_ctx_80177870[i] = 0; + gPlayerForms[i] = FORM_ARWING; break; } @@ -771,7 +771,7 @@ void func_versus_800BF750(void) { continue; } for (j = 0, temp = 0; j < 4; j++) { - if ((D_ctx_80177B00[i][j] != 0) && (gGameFrameCount & 4)) { + if ((gVsLockOnTimers[i][j] != 0) && (gGameFrameCount & 4)) { gDPSetPrimColor(gMasterDisp++, 0, 0, D_800D4C3C[j], D_800D4C4C[j], D_800D4C5C[j], 255); func_versus_800BDA54(D_800D4C1C[i] + temp * 9.0f, D_800D4C2C[i]); temp++; @@ -1806,12 +1806,12 @@ void func_versus_800C1ED4(void) { func_fade_80084688(2, var_a1); } -void func_versus_800C20B0(void) { +void Versus_StartMatch(void) { switch (gOptionMenuStatus) { case 0: if (gNextGameStateTimer == 0) { gOptionMenuStatus = OPTION_SETUP; - D_ctx_80178410 = 0; + gStarCount = 0; } break; @@ -1824,7 +1824,7 @@ void func_versus_800C20B0(void) { Play_Setup(); if (gVersusStage == VS_STAGE_SECTOR_Z) { - gOverlayStage = 1; + gSceneSetup = 1; } gCurrentLevel = LEVEL_VERSUS; @@ -1919,7 +1919,7 @@ void func_versus_800C2244(Actor* actor) { x3 += 360.0f; } - } else if (actor->obj.pos.y < gGroundLevel + 50.0f) { + } else if (actor->obj.pos.y < gGroundHeight + 50.0f) { if (x3 > 180.0f) { x3 = 0.0f; actor->unk_0F4.x = 0.0f; @@ -1955,8 +1955,8 @@ void func_versus_800C2244(Actor* actor) { actor->fwork[14] -= actor->fwork[14] * 0.1f; actor->fwork[12] -= actor->fwork[12] * 0.1f; - if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = gGroundLevel + 40.0f; + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { + actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } diff --git a/src/mods/sfxjukebox.c b/src/mods/sfxjukebox.c index 7182cc35..4f2f5773 100644 --- a/src/mods/sfxjukebox.c +++ b/src/mods/sfxjukebox.c @@ -2,7 +2,7 @@ #include "fox_map.h" #include "fox_option.h" -extern s32 spectrumAnalizerMode; +extern s32 spectrumAnalyzerMode; extern bool D_menu_801B9320; extern s32 D_menu_801B9244; extern OptionId D_menu_801B9124; @@ -108,11 +108,11 @@ void Option_ExpertSoundUpdate(void) { } } - // Spectrum Analizer mode selector + // Spectrum Analyzer mode selector if (gControllerPress[gMainController].button & R_CBUTTONS) { - spectrumAnalizerMode++; - if (spectrumAnalizerMode > 2) { - spectrumAnalizerMode = 0; + spectrumAnalyzerMode++; + if (spectrumAnalyzerMode > 2) { + spectrumAnalyzerMode = 0; } } diff --git a/src/overlays/ovl_ending/fox_end1.c b/src/overlays/ovl_ending/fox_end1.c index bdd9c787..77c42de2 100644 --- a/src/overlays/ovl_ending/fox_end1.c +++ b/src/overlays/ovl_ending/fox_end1.c @@ -942,7 +942,7 @@ void Ending_8018A570(void) { D_ending_8019858C = 0; D_ending_80196F8C = 4; gCsFrameCount = 0; - gOverlayStage = 1; + gSceneSetup = 1; break; case 4: @@ -955,7 +955,7 @@ void Ending_8018A570(void) { D_ending_8019858C = 0; D_ending_80196F8C = 6; gCsFrameCount = 0; - gOverlayStage = 4; + gSceneSetup = 4; break; case 6: @@ -1028,7 +1028,7 @@ void Ending_8018A8FC(void) { gFillScreenAlphaStep = 16; } -void Ending_8018A96C(void) { +void Ending_Main(void) { gCsFrameCount++; gGameFrameCount++; @@ -1036,7 +1036,7 @@ void Ending_8018A96C(void) { case 0: gRadioState = 0; gGameFrameCount = 0; - gOverlayStage = 0; + gSceneSetup = 0; gCsCamEyeX = gCsCamEyeY = gCsCamEyeZ = 0.0f; gCsCamAtX = gCsCamAtY = 0.0f; gCsCamAtZ = -100.0f; @@ -1056,7 +1056,7 @@ void Ending_8018A96C(void) { break; } case 4: - gOverlayStage = 2; + gSceneSetup = 2; D_ending_80196D00 = 5; break; @@ -1076,7 +1076,7 @@ void Ending_8018A96C(void) { Ending_8018ABE8(); } -void Ending_8018AAC4(void) { +void Ending_Draw(void) { Matrix_Push(&gGfxMatrix); Matrix_LookAt(gGfxMatrix, gCsCamEyeX, gCsCamEyeY, gCsCamEyeZ, gCsCamAtX, gCsCamAtY, gCsCamAtZ, 0.0f, 100.0f, 0.0f, MTXF_NEW); @@ -1517,7 +1517,7 @@ void Ending_8018B860(void) { D_ctx_80177A10[0] = 0; D_ending_8019858C = 0; gBgColor = 0x4AE5; // 72, 88, 144 - D_ctx_80178410 = 0; + gStarCount = 0; } void Ending_8018BAD0(void) { @@ -1554,7 +1554,7 @@ void Ending_8018BAD0(void) { D_ctx_80177A10[0] = 1; D_ending_8019858C = 0; gBgColor = 0x4AE5; // 72, 88, 144 - D_ctx_80178410 = 0; + gStarCount = 0; } f32 D_ending_80192DF0[8] = { diff --git a/src/overlays/ovl_ending/fox_end2.c b/src/overlays/ovl_ending/fox_end2.c index 71ed3037..567ab4e1 100644 --- a/src/overlays/ovl_ending/fox_end2.c +++ b/src/overlays/ovl_ending/fox_end2.c @@ -31,9 +31,9 @@ void Ending_8018CE20(u32 arg0) { D_ending_80192E74[i].unk_13; } - if ((D_ending_80192E74[i].unk_11 == 0) || (D_play_800D2F68 == true)) { + if ((D_ending_80192E74[i].unk_11 == 0) || (gVenomHardClear == 1)) { if (D_ending_80192E74[i].unk_10 == 1) { - xPos = (320 - Graphics_GetLargeTextWidth(D_ending_80192E74[i].unk_00)) / 2; + xPos = (SCREEN_WIDTH - Graphics_GetLargeTextWidth(D_ending_80192E74[i].unk_00)) / 2; RCP_SetupDL(&gMasterDisp, 0x53); gDPSetTextureFilter(gMasterDisp++, G_TF_POINT); gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, alpha); @@ -71,9 +71,9 @@ void Ending_8018CE20(u32 arg0) { } void Ending_8018D250(u32 arg0, AssetInfo* asset) { - gOverlayStage = asset->unk_08; + gSceneSetup = asset->unk_08; gVIsPerFrame = asset->unk_70; - D_ctx_80178410 = asset->unk_14; + gStarCount = asset->unk_14; } void Ending_8018D28C(s32 arg0, AssetInfo* asset) { @@ -157,7 +157,7 @@ void Ending_8018D638(u32 arg0, AssetInfo* asset) { if (gExpertMode != 0) { for (i = 0; i < 240; i += 4) { - if (!D_play_800D2F68) { + if (gVenomHardClear == 0) { TextureRect_16bRGBA(&gMasterDisp, gEndingNormalReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); } else { TextureRect_16bRGBA(&gMasterDisp, gEndingExpertReward + 316 * i, 316, 4, 0.0f, i, 1.0f, 1.0f); @@ -240,7 +240,7 @@ bool Ending_8018DCB4(void) { s32 unk_5E[10][7]; s32 unk40[10]; - for (i = 0; i < gCurrentPlanet + 1; i++) { + for (i = 0; i < gMissionNumber + 1; i++) { temp2 += ((D_ctx_80177B50[i] & 0x00FF0000) >> 16) & 1; temp2 += ((D_ctx_80177B50[i] & 0x0000FF00) >> 8) & 1; temp2 += (D_ctx_80177B50[i] & 0x000000FF) & 1; @@ -430,7 +430,7 @@ void Ending_8018E7B8(u32 arg0, AssetInfo* asset) { void Ending_8018EDB8(u32 arg0, AssetInfo* asset) { f32 temp; - D_ctx_80178410 = 0; + gStarCount = 0; RCP_SetupDL(&gMasterDisp, asset->unk_08); @@ -740,7 +740,7 @@ void Ending_80190CF0(u32 arg0, AssetInfo* asset) { u8 alpha = 255; f32 temp; - if (D_play_800D2F68 == true) { + if (gVenomHardClear == 1) { return; } @@ -810,7 +810,7 @@ void Ending_80191234(s32 arg0, s32 arg1) { gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; gBgColor = 0; - D_ctx_80178410 = 0; + gStarCount = 0; gControllerLock = 10; } diff --git a/src/overlays/ovl_i1/fox_co.c b/src/overlays/ovl_i1/fox_co.c index 83dbc589..5ff17edc 100644 --- a/src/overlays/ovl_i1/fox_co.c +++ b/src/overlays/ovl_i1/fox_co.c @@ -12,10 +12,10 @@ u8 D_i1_8019B6D0; f32 D_i1_8019B6D8[68]; -void Corneria_80187530(Object_80* obj80) { +void Corneria_80187530(Scenery* scenery) { } -void Corneria_8018753C(Object_80* obj80) { +void Corneria_8018753C(Scenery* scenery) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_CO_60199D0); @@ -439,7 +439,7 @@ void Corneria_80188A18(Boss* boss) { } } if ((gBossFrameCount > 800) && ((gBossFrameCount % 512) == 0)) { - if (D_ctx_80177B6C < 2) { + if (gCoUturnCount < 2) { Radio_PlayMessage(gMsg_ID_20237, RCID_PEPPY); } else if (D_edisplay_801615D0.z > 0.0f) { Radio_PlayMessage(gMsg_ID_2233, RCID_FALCO); @@ -1116,7 +1116,8 @@ s32 Corneria_8018AB64(Actor* actor) { sp7C.z = sp50[i] + actor->obj.pos.z; temp_v0 = Object_CheckCollision(actor->index, &sp7C, &sp70, 1); if ((temp_v0 != 0) && (temp_v0 >= 10)) { - if ((gObjects80[temp_v0 - 10].obj.status == OBJ_ACTIVE) && (gObjects80[temp_v0 - 10].obj.id == OBJ_80_40)) { + if ((gScenery[temp_v0 - 10].obj.status == OBJ_ACTIVE) && + (gScenery[temp_v0 - 10].obj.id == OBJ_SCENERY_40)) { return temp_v0 - 9; } } @@ -1139,7 +1140,7 @@ void Corneria_8018ACE0(Actor* actor) { Object_SetInfo(&actor->info, actor->obj.id); actor->state = 100; actor->timer_0BC = 10; - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; } } @@ -1186,7 +1187,7 @@ void Corneria_8018AED0(Actor* actor) { actor->fwork[1] += 20.0f; actor->fwork[0] = 0.0f; if (actor->unk_0B6 == 50) { - gObjects80[actor->iwork[0] - 1].state = 1; + gScenery[actor->iwork[0] - 1].state = 1; } if (actor->unk_0B6 >= Animation_GetFrameCount(&D_CO_602991C)) { actor->state++; @@ -1203,15 +1204,15 @@ void Corneria_8018B0B4(Actor* actor) { s32 i; for (i = 0; i < 50; i++) { - if (gObjects80[i].obj.status == OBJ_FREE) { - Object_80_Initialize(&gObjects80[i]); - gObjects80[i].obj.status = OBJ_INIT; - gObjects80[i].obj.id = OBJ_80_42; - gObjects80[i].obj.pos.x = actor->obj.pos.x; - gObjects80[i].obj.pos.y = actor->obj.pos.y; - gObjects80[i].obj.pos.z = actor->obj.pos.z; - gObjects80[i].obj.rot.y = actor->obj.rot.y; - Object_SetInfo(&gObjects80[i].info, gObjects80[i].obj.id); + if (gScenery[i].obj.status == OBJ_FREE) { + Scenery_Initialize(&gScenery[i]); + gScenery[i].obj.status = OBJ_INIT; + gScenery[i].obj.id = OBJ_SCENERY_42; + gScenery[i].obj.pos.x = actor->obj.pos.x; + gScenery[i].obj.pos.y = actor->obj.pos.y; + gScenery[i].obj.pos.z = actor->obj.pos.z; + gScenery[i].obj.rot.y = actor->obj.rot.y; + Object_SetInfo(&gScenery[i].info, gScenery[i].obj.id); actor->iwork[0] = i; return; } @@ -1222,13 +1223,13 @@ void Corneria_8018B15C(Actor* actor) { Vec3f sp60[20]; Vec3f sp54; Vec3f sp48; - Object_80* obj80; + Scenery* scenery; f32 temp_sin; f32 temp_cos; Corneria_8018ACE0(actor); - obj80 = &gObjects80[actor->iwork[0]]; + scenery = &gScenery[actor->iwork[0]]; temp_sin = SIN_DEG(actor->obj.rot.y); actor->vel.x = actor->fwork[0] * temp_sin; temp_cos = COS_DEG(actor->obj.rot.y); @@ -1265,25 +1266,25 @@ void Corneria_8018B15C(Actor* actor) { } if (actor->unk_0B6 == (Animation_GetFrameCount(&D_CO_602AA04) - actor->iwork[2])) { actor->iwork[1] = 1; - obj80->state = 1; + scenery->state = 1; sp54.x = 0.0f; sp54.y = 0.0f; sp54.z = 30.0f; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp54, &sp48); - obj80->vel.x = sp48.x; - obj80->vel.y = sp48.y; - obj80->vel.z = sp48.z; + scenery->vel.x = sp48.x; + scenery->vel.y = sp48.y; + scenery->vel.z = sp48.z; AUDIO_PLAY_SFX(0x2902401C, actor->sfxSource, 4); } break; } if (actor->iwork[1] == 0) { - obj80->obj.pos.x = actor->fwork[2]; - obj80->obj.pos.y = actor->fwork[6]; - obj80->obj.pos.z = actor->fwork[10]; - obj80->obj.rot.y = actor->obj.rot.y; - obj80->vel.y = 0.0f; + scenery->obj.pos.x = actor->fwork[2]; + scenery->obj.pos.y = actor->fwork[6]; + scenery->obj.pos.z = actor->fwork[10]; + scenery->obj.rot.y = actor->obj.rot.y; + scenery->vel.y = 0.0f; } Math_SmoothStepToVec3fArray(sp60, actor->vwork, 0, Animation_GetFrameData(&D_CO_602AA04, actor->unk_0B6, sp60), @@ -1293,7 +1294,7 @@ void Corneria_8018B15C(Actor* actor) { void Corneria_8018B418(Actor* actor) { s32 pad; Vec3f sp54[20]; - Object_80* temp_v0_2; + Scenery* temp_v0_2; f32 temp_sin; f32 temp_cos; s32 pad2[4]; @@ -1322,7 +1323,7 @@ void Corneria_8018B418(Actor* actor) { } if (actor->iwork[1] == 0) { - temp_v0_2 = &gObjects80[actor->iwork[0]]; + temp_v0_2 = &gScenery[actor->iwork[0]]; temp_v0_2->obj.pos.x = actor->fwork[2]; temp_v0_2->obj.pos.y = actor->fwork[6]; temp_v0_2->obj.pos.z = actor->fwork[10]; @@ -1405,7 +1406,7 @@ void Corneria_8018BAFC(s32 limbIndex, Vec3f* rot, void* data) { actor->fwork[6] = sp1C.y; actor->fwork[10] = sp1C.z; if (actor->iwork[1] == 0) { - gObjects80[actor->iwork[0]].obj.rot.x = -rot->y; + gScenery[actor->iwork[0]].obj.rot.x = -rot->y; } } } @@ -1518,10 +1519,10 @@ void Corneria_Boss293_Init(Boss293* this) { } void Corneria_8018C0B0(Boss* boss) { - func_effect_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 0); - func_effect_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 5); - func_effect_8007D9DC(boss->obj.pos.x, gGroundLevel + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 10); - func_effect_8007ADF4(boss->obj.pos.x, gGroundLevel, boss->obj.pos.z, 1.0f, 10.0f); + func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 0); + func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 5); + func_effect_8007D9DC(boss->obj.pos.x, gGroundHeight + 2.0f, boss->obj.pos.z, 5.0f, 100.0f, 10); + func_effect_8007ADF4(boss->obj.pos.x, gGroundHeight, boss->obj.pos.z, 1.0f, 10.0f); } static Vec3f D_i1_801998CC = { 442.0f, 5.0f, 360.0f }; @@ -1987,7 +1988,7 @@ void Corneria_8018C19C(Boss* boss) { Math_SmoothStepToF(&boss->vel.z, 0.0f, 0.1f, 2.0f, 0.00001f); boss->obj.rot.z -= 2.0f; boss->gravity = 1.0f; - if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { gCameraShake = 100; func_effect_80081A8C(boss->obj.pos.x, boss->obj.pos.y, boss->obj.pos.z, 40.0f, 12); boss->timer_050 = 20; @@ -2126,7 +2127,7 @@ void Corneria_8018DDAC(Boss* boss) { boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2218,7 +2219,7 @@ void Corneria_8018E290(Boss* boss) { boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2310,7 +2311,7 @@ void Corneria_8018E76C(Boss* boss) { func_effect_8007C120(boss->obj.pos.x + sp4C.x, boss->obj.pos.y + sp4C.y, boss->obj.pos.z + sp4C.z, boss->vel.x, boss->vel.y, boss->vel.z, 0.2f, 10); } - if (boss->obj.pos.y < (gGroundLevel + 150.0f)) { + if (boss->obj.pos.y < (gGroundHeight + 150.0f)) { if (boss->swork[0] == 0) { boss->vel.y = -5.0f; boss->swork[0] = 1; @@ -2396,48 +2397,48 @@ void Corneria_8018EF90(Boss* boss) { Animation_DrawSkeleton(1, D_CO_602D5AC, boss->vwork, Corneria_8018EF38, NULL, &boss->index, &gIdentityMatrix); } -void Corneria_8018F044(Object_80* obj80) { +void Corneria_8018F044(Scenery* scenery) { - switch (obj80->state) { + switch (scenery->state) { case 0: - if (obj80->dmgType != 0) { - obj80->dmgType = 0; - if (obj80->dmgPart < 2) { - obj80->unk_44++; - obj80->timer_4C = 5; - obj80->vel.x += 2.0f; - obj80->vel.y += 2.0f; - if (obj80->unk_44 >= 3) { - obj80->state = 1; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_CO_603E924); - AUDIO_PLAY_SFX(0x1900000D, obj80->sfxSource, 0); + if (scenery->dmgType != 0) { + scenery->dmgType = 0; + if (scenery->dmgPart < 2) { + scenery->unk_44++; + scenery->timer_4C = 5; + scenery->vel.x += 2.0f; + scenery->vel.y += 2.0f; + if (scenery->unk_44 >= 3) { + scenery->state = 1; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_CO_603E924); + AUDIO_PLAY_SFX(0x1900000D, scenery->sfxSource, 0); return; } - AUDIO_PLAY_SFX(0x2903300E, obj80->sfxSource, 0); + AUDIO_PLAY_SFX(0x2903300E, scenery->sfxSource, 0); } } break; case 1: - Math_SmoothStepToF(&obj80->vel.x, 80.0f, 0.2f, 10.0f, 0.0f); - Math_SmoothStepToF(&obj80->vel.y, 80.0f, 0.2f, 10.0f, 0.0f); + Math_SmoothStepToF(&scenery->vel.x, 80.0f, 0.2f, 10.0f, 0.0f); + Math_SmoothStepToF(&scenery->vel.y, 80.0f, 0.2f, 10.0f, 0.0f); break; } } bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Object_80* obj80 = (Object_80*) data; + Scenery* scenery = (Scenery*) data; RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); switch (limbIndex) { case 1: - rot->y -= obj80->vel.x; - if ((obj80->timer_4C % 2) != 0) { + rot->y -= scenery->vel.x; + if ((scenery->timer_4C % 2) != 0) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; case 2: - rot->y += obj80->vel.y; - if ((obj80->timer_4C % 2) != 0) { + rot->y += scenery->vel.y; + if ((scenery->timer_4C % 2) != 0) { RCP_SetupDL_60(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } break; @@ -2445,28 +2446,28 @@ bool Corneria_8018F1C8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return 0; } -void Corneria_8018F31C(Object_80* obj80) { +void Corneria_8018F31C(Scenery* scenery) { Vec3f sp28[10]; Animation_GetFrameData(&D_CO_602AA7C, 0, sp28); - Animation_DrawSkeleton(3, D_CO_602AB48, sp28, Corneria_8018F1C8, NULL, obj80, gCalcMatrix); + Animation_DrawSkeleton(3, D_CO_602AB48, sp28, Corneria_8018F1C8, NULL, scenery, gCalcMatrix); RCP_SetupDL_29(gFogRed, gFogGreen, gFogBlue, gFogAlpha, gFogNear, gFogFar); } -void Corneria_8018F3BC(Object_80* obj80, f32 arg1) { - Object_80_Initialize(obj80); - obj80->obj.status = OBJ_INIT; - obj80->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + arg1; - obj80->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f; +void Corneria_8018F3BC(Scenery* scenery, f32 arg1) { + Scenery_Initialize(scenery); + scenery->obj.status = OBJ_INIT; + scenery->obj.pos.x = RAND_FLOAT_CENTERED(1000.0f) + arg1; + scenery->obj.rot.y = RAND_FLOAT(90.0f) + 45.0f; if (arg1 > 0.0f) { - obj80->obj.rot.y *= -1.0f; + scenery->obj.rot.y *= -1.0f; } - obj80->obj.pos.y = 0.0f; - obj80->obj.id = OBJ_80_1; - obj80->unk_60 = 60.0f; - Object_SetInfo(&obj80->info, obj80->obj.id); - obj80->obj.pos.z = -2000.0f; - obj80->info.unk_10 = 15000.0f; + scenery->obj.pos.y = 0.0f; + scenery->obj.id = OBJ_SCENERY_1; + scenery->unk_60 = 60.0f; + Object_SetInfo(&scenery->info, scenery->obj.id); + scenery->obj.pos.z = -2000.0f; + scenery->info.unk_10 = 15000.0f; } void Corneria_8018F4A4(void) { @@ -2474,15 +2475,15 @@ void Corneria_8018F4A4(void) { if (((gGameFrameCount % 16) == 0) && !(gPlayer[0].unk_1D0 < 4)) { for (i = 0; i < 50; i++) { - if (gObjects80[i].obj.status == OBJ_FREE) { - Corneria_8018F3BC(&gObjects80[i], 4000.0f); + if (gScenery[i].obj.status == OBJ_FREE) { + Corneria_8018F3BC(&gScenery[i], 4000.0f); break; } } - for (i = 0; i < ARRAY_COUNT(gObjects80); i++) { - if (gObjects80[i].obj.status == OBJ_FREE) { - Corneria_8018F3BC(&gObjects80[i], -4000.0f); + for (i = 0; i < ARRAY_COUNT(gScenery); i++) { + if (gScenery[i].obj.status == OBJ_FREE) { + Corneria_8018F3BC(&gScenery[i], -4000.0f); break; } } @@ -2550,7 +2551,7 @@ void Corneria_8018F6F8(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Corneria_8018F880(Player* player) { +void Corneria_LevelStart(Player* player) { s32 i; Actor* actor0 = &gActors[0]; Actor* actor1 = &gActors[1]; @@ -2924,7 +2925,7 @@ void Corneria_8018F880(Player* player) { Object_Kill(&actor1->obj, actor1->sfxSource); Object_Kill(&actor2->obj, actor2->sfxSource); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; player->pos.y = 350.0f; player->cam.eye.x = player->pos.x; player->cam.eye.y = (player->pos.y * player->unk_148) + 50.0f; @@ -2935,8 +2936,7 @@ void Corneria_8018F880(Player* player) { player->cam.at.y = (player->pos.y * player->unk_148) + 20.0f; player->cam.at.z = player->unk_138; D_ctx_80177950 = 1.0f; - gPlayerFillScreenAlphas[0] = gPlayerFillScreenAlphas[1] = gPlayerFillScreenAlphas[2] = - gPlayerFillScreenAlphas[3] = 0; + gPlayerGlareAlphas[0] = gPlayerGlareAlphas[1] = gPlayerGlareAlphas[2] = gPlayerGlareAlphas[3] = 0; gLoadLevelObjects = 1; gFillScreenAlphaTarget = 0; player->timer_1F8 = 15; @@ -3016,7 +3016,7 @@ void Corneria_80190F74(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Corneria_80191160(Player* player) { +void Corneria_LevelComplete1(Player* player) { Vec3f sp64; Vec3f sp58; f32 sp54; @@ -3167,7 +3167,7 @@ void Corneria_80191160(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[gCurrentLevel] = Play_CheckMedalStatus(150) + 1; } } @@ -3176,10 +3176,10 @@ void Corneria_80191160(Player* player) { switch (gCsFrameCount) { case 981: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1181: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 240: AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); diff --git a/src/overlays/ovl_i1/fox_tr360.c b/src/overlays/ovl_i1/fox_tr360.c index b543564b..0387d8e4 100644 --- a/src/overlays/ovl_i1/fox_tr360.c +++ b/src/overlays/ovl_i1/fox_tr360.c @@ -8,25 +8,25 @@ #include "assets/ast_training.h" void Training_80198C50(void) { - Object_58* obj58; + Scenery360* scenery360; s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(D_TR_6008EF8); Rand_SetSeed(1, 29000, 9876); - obj58 = gObjects58; + scenery360 = gScenery360; for (i = 0; i < 1000; i++) { if (gLevelObjects[i].id >= 0) { if (gLevelObjects[i].id <= 160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->obj.pos.y = gLevelObjects[i].yPos - RAND_FLOAT_SEEDED(300.0f); - obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.pos.y = gLevelObjects[i].yPos - RAND_FLOAT_SEEDED(300.0f); + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } else { break; @@ -35,38 +35,38 @@ void Training_80198C50(void) { } bool Training_80198DCC(Actor* actor, f32 x, f32 z) { - Object_58* obj58; + Scenery360* scenery360; s32 i; - for (i = 0, obj58 = gObjects58; i < 200;) { - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && + for (i = 0, scenery360 = gScenery360; i < 200;) { + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { return true; } - obj58++; - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && + scenery360++; + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { return true; } - obj58++; - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && + scenery360++; + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { return true; } - obj58++; - if ((obj58->obj.status == OBJ_ACTIVE) && - (fabsf(obj58->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && - (fabsf(obj58->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && + scenery360++; + if ((scenery360->obj.status == OBJ_ACTIVE) && + (fabsf(scenery360->obj.pos.x - (actor->obj.pos.x + ((x * 650.0f) + 350.0f))) < 1200.0f) && + (fabsf(scenery360->obj.pos.z - (actor->obj.pos.z + ((z * 650.0f) + 350.0f))) < 1200.0f) && (actor->obj.pos.y < 650.0f)) { return true; } - obj58++; + scenery360++; i += 4; } @@ -120,7 +120,7 @@ void Training_80199024(Actor* actor) { if (var_fv0 < 0.0f) { var_fv0 += 360.0f; } - } else if ((actor->obj.pos.y < (gGroundLevel + 50.0f)) && (var_fv0 > 180.0f)) { + } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (var_fv0 > 180.0f)) { var_fv0 = 0.0f; actor->unk_0F4.x = 0.0f; } @@ -143,8 +143,8 @@ void Training_80199024(Actor* actor) { actor->fwork[13] -= (actor->fwork[13] * 0.1f); actor->fwork[14] -= (actor->fwork[14] * 0.1f); actor->fwork[12] -= (actor->fwork[12] * 0.1f); - if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = gGroundLevel + 40.0f; + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { + actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } ActorAllRange_ApplyDamage(actor); diff --git a/src/overlays/ovl_i1/fox_ve1.c b/src/overlays/ovl_i1/fox_ve1.c index f24a407a..f98852e5 100644 --- a/src/overlays/ovl_i1/fox_ve1.c +++ b/src/overlays/ovl_i1/fox_ve1.c @@ -311,14 +311,14 @@ void Venom1_BossTrigger4_Update(Ve1BossTrigger4* this) { } } -void Venom1_801924A8(Object_80* obj80) { - switch (obj80->state) { +void Venom1_801924A8(Scenery* scenery) { + switch (scenery->state) { case 0: - if (gPlayer[0].pos.z < obj80->obj.pos.z) { + if (gPlayer[0].pos.z < scenery->obj.pos.z) { D_ctx_80177AB0 = 0; D_ctx_80177A98 = 0; - obj80->state++; + scenery->state++; } case 1: @@ -330,7 +330,7 @@ void Venom1_8019250C(Actor* actor) { } void Venom1_80192518(Actor* actor) { - Object_80* obj80; + Scenery* scenery; f32 var_ft4; f32 var_ft5; s32 i; @@ -359,23 +359,24 @@ void Venom1_80192518(Actor* actor) { var_ft5 = 450.0f; var_ft4 = 0.0f; - obj80 = &gObjects80[0]; + scenery = &gScenery[0]; - for (i = 0; i < 50; i++, obj80++) { - if ((obj80->obj.id == OBJ_80_128) || (obj80->obj.id == OBJ_80_129) || (obj80->obj.id == OBJ_80_130)) { - if (((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) < 2200.0f) && - ((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) > 0.0f)) { - switch (obj80->obj.id) { - case OBJ_80_128: - case OBJ_80_130: + for (i = 0; i < 50; i++, scenery++) { + if ((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || + (scenery->obj.id == OBJ_SCENERY_130)) { + if (((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && + ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { + switch (scenery->obj.id) { + case OBJ_SCENERY_128: + case OBJ_SCENERY_130: break; - case OBJ_80_129: + case OBJ_SCENERY_129: var_ft5 = 600.0f; break; } - var_ft4 = obj80->obj.pos.x; + var_ft4 = scenery->obj.pos.x; break; } } @@ -671,7 +672,7 @@ void Venom1_80192EA4(Actor* actor) { } void Venom1_80192EB0(Actor* actor) { - Object_80* obj80; + Scenery* scenery; Vec3f sp50; Vec3f sp44; f32 sp40; @@ -689,13 +690,14 @@ void Venom1_80192EB0(Actor* actor) { break; case 1: var_ft4 = 0.0f; - obj80 = gObjects80; + scenery = gScenery; - for (i = 0; i < 50; i++, obj80++) { - if (((obj80->obj.id == OBJ_80_128) || (obj80->obj.id == OBJ_80_129) || (obj80->obj.id == OBJ_80_130)) && - ((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) < 2200.0f) && - ((actor->obj.pos.z + 1100.0f - obj80->obj.pos.z) > 0.0f)) { - var_ft4 = obj80->obj.pos.y; + for (i = 0; i < 50; i++, scenery++) { + if (((scenery->obj.id == OBJ_SCENERY_128) || (scenery->obj.id == OBJ_SCENERY_129) || + (scenery->obj.id == OBJ_SCENERY_130)) && + ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) < 2200.0f) && + ((actor->obj.pos.z + 1100.0f - scenery->obj.pos.z) > 0.0f)) { + var_ft4 = scenery->obj.pos.y; break; } } @@ -801,9 +803,9 @@ void Venom1_801934D0(Actor* actor) { Animation_DrawSkeleton(0, D_VE1_900D164, actor->vwork, NULL, NULL, actor, &gIdentityMatrix); } -void Venom1_80193540(Object_80* obj80) { - if (((gPlayer[0].unk_138 - obj80->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { - func_effect_8007C120(obj80->obj.pos.x, obj80->obj.pos.y, obj80->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); +void Venom1_80193540(Scenery* scenery) { + if (((gPlayer[0].unk_138 - scenery->obj.pos.z) <= 3500.0f) && ((gGameFrameCount % 4) == 0)) { + func_effect_8007C120(scenery->obj.pos.x, scenery->obj.pos.y, scenery->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.2f, 10); } } @@ -1913,7 +1915,7 @@ void Venom1_80194398(Boss* boss) { boss->swork[28] = 9; AUDIO_PLAY_SFX(0x29405084, boss->sfxSource, 4); boss->swork[26] = 1; - boss->info.hitbox = gHitboxNone; + boss->info.hitbox = gNoHitbox; boss->unk_05E = 0; func_effect_8007A568(boss->obj.pos.x, boss->obj.pos.y + 10.0f, boss->obj.pos.z, 40.0f); gCameraShake = 40; @@ -2340,7 +2342,7 @@ void Venom1_80198414(void) { gBgColor = 0xFFFF; // 248, 248, 248 gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_2; - gNextLevelStage = 2; + gNextLevelPhase = 2; D_ctx_80177C94 = gGoldRingCount[0]; D_ctx_80177C9C = gPlayer[0].shields + 1; D_ctx_80177CA4 = gHitCount; @@ -2409,6 +2411,6 @@ void Venom1_8019864C(PlayerShot* playerShot) { } } -void Venom1_801988B8(Player* player) { +void Venom1_LevelStart(Player* player) { func_hud_80096A74(player); } diff --git a/src/overlays/ovl_i2/fox_me.c b/src/overlays/ovl_i2/fox_me.c index be3b5c55..9d917b32 100644 --- a/src/overlays/ovl_i2/fox_me.c +++ b/src/overlays/ovl_i2/fox_me.c @@ -69,7 +69,7 @@ void Meteo_8018756C(Actor* actor) { vec.z = actor->vel.z; if ((Object_CheckCollision(actor->index, &actor->obj.pos, &vec, 0) != 0) || - (actor->obj.pos.y < (gGroundLevel + 20.0f))) { + (actor->obj.pos.y < (gGroundHeight + 20.0f))) { actor->obj.status = OBJ_DYING; } Meteo_80187530(actor); @@ -106,7 +106,7 @@ void Meteo_80187650(Actor* actor) { vec.y = actor->vel.y; vec.z = actor->vel.z; if ((Object_CheckCollision(actor->index, &actor->obj.pos, &vec, 0) != 0) || - (actor->obj.pos.y < (gGroundLevel + 20.0f))) { + (actor->obj.pos.y < (gGroundHeight + 20.0f))) { func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); actor->obj.status = OBJ_DYING; } @@ -1878,7 +1878,7 @@ void Meteo_8018CCF8(Actor* actor) { } } -void Meteo_8018CD8C(Player* player) { +void Meteo_LevelStart(Player* player) { u8 sp8F; s32 i; Actor* actor0 = &gActors[0]; @@ -2065,7 +2065,7 @@ void Meteo_8018CD8C(Player* player) { if (player->timer_1F8 == 0) { AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -2205,7 +2205,7 @@ void Meteo_8018DF08(Actor* actor, s32 idx) { } } -void Meteo_8018E084(Player* player) { +void Meteo_LevelComplete(Player* player) { Vec3f src; Vec3f dest; s32 pad[5]; @@ -2329,7 +2329,7 @@ void Meteo_8018E084(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_METEO] = Play_CheckMedalStatus(0xC8) + 1; } } @@ -2410,11 +2410,11 @@ void Meteo_8018E084(Player* player) { break; case 976: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1176: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1300: diff --git a/src/overlays/ovl_i2/fox_sx.c b/src/overlays/ovl_i2/fox_sx.c index a8397cc9..256d58ab 100644 --- a/src/overlays/ovl_i2/fox_sx.c +++ b/src/overlays/ovl_i2/fox_sx.c @@ -473,7 +473,7 @@ void SectorX_80190078(Boss* boss) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); func_boss_80042EC0(boss); - boss->info.hitbox = gHitboxNone; + boss->info.hitbox = gNoHitbox; } boss->timer_054 = 20; @@ -1183,7 +1183,7 @@ bool SectorX_80192AF0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Push(&gGfxMatrix); Matrix_Push(&gCalcMatrix); Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - func_edisplay_8005F670(&sp58); + Display_SetSecondLight(&sp58); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); @@ -1446,7 +1446,7 @@ void SectorX_801938D8(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x09000002, actor->sfxSource, 0); } -void SectorX_80193A30(Player* player) { +void SectorX_LevelStart(Player* player) { s32 i; Vec3f src; Vec3f dest; @@ -1591,7 +1591,7 @@ void SectorX_80193A30(Player* player) { if (player->timer_1F8 == 0) { player->unk_0D0 = D_play_80161A54; AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = 0; player->cam.eye.y = player->pos.y * player->unk_148 + 50.0f; @@ -1673,7 +1673,7 @@ void SectorX_801944D4(Actor* actor, s32 arg1) { } } -void SectorX_80194728(Player* player) { +void SectorX_LevelComplete(Player* player) { Vec3f sp54; Vec3f sp48; s32 pad[5]; @@ -1755,7 +1755,7 @@ void SectorX_80194728(Player* player) { gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - D_ctx_8017837C = 4; + gFadeoutType = 4; player->timer_1F8 = 0; Play_ClearObjectData(); D_play_800D3180[LEVEL_SECTOR_X] = Play_CheckMedalStatus(150) + 1; @@ -1766,11 +1766,11 @@ void SectorX_80194728(Player* player) { switch (gCsFrameCount) { case 706: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 906: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 100: @@ -1794,7 +1794,7 @@ void SectorX_80194728(Player* player) { break; case 910: - gOverlayStage = 1; + gSceneSetup = 1; break; case 920: diff --git a/src/overlays/ovl_i3/fox_a6.c b/src/overlays/ovl_i3/fox_a6.c index 86b39cbc..80b7722e 100644 --- a/src/overlays/ovl_i3/fox_a6.c +++ b/src/overlays/ovl_i3/fox_a6.c @@ -2273,7 +2273,7 @@ void Area6_8018DA58(Actor* actor) { actor->obj.rot.z = -actor->unk_0F4.z; } -void Area6_8018DF74(Player* player) { +void Area6_LevelStart(Player* player) { Vec3f sp74; Vec3f sp68; Vec3f sp5C; @@ -2373,7 +2373,7 @@ void Area6_8018DF74(Player* player) { } if (gCsFrameCount == 540) { gLoadLevelObjects = 1; - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->pos.x = 0.0f; player->pos.z = 0.0f; player->pos.y = 350.0f; @@ -2537,7 +2537,7 @@ void Area6_8018EC38(Actor* actor, s32 arg1) { } } -void Area6_8018ED78(Player* player) { +void Area6_LevelComplete(Player* player) { s32 i; Vec3f spf90; f32 sp8C; @@ -2763,10 +2763,10 @@ void Area6_8018ED78(Player* player) { gLevelClearScreenTimer = 100; break; case 700: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 900: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 940: Radio_PlayMessage(gMsg_ID_7093, RCID_FOX); diff --git a/src/overlays/ovl_i3/fox_aq.c b/src/overlays/ovl_i3/fox_aq.c index 4e98a895..a5531d11 100644 --- a/src/overlays/ovl_i3/fox_aq.c +++ b/src/overlays/ovl_i3/fox_aq.c @@ -417,7 +417,7 @@ void Aquas_801A9728(Actor* actor, f32 radius, f32 scale, s32 spread) { for (i = 0; i < 36; i += spread) { temp_fs1 = SIN_DEG(i * 10.0f) * radius; temp_fs0 = COS_DEG(i * 10.0f) * radius; - temp = gGroundLevel + 30.0f; + temp = gGroundHeight + 30.0f; func_effect_8007B8F8(actor->obj.pos.x + temp_fs1, temp, actor->obj.pos.z + temp_fs0, scale); } } @@ -794,7 +794,7 @@ void Aquas_801AA8E8(Player* player) { Math_SmoothStepToF(&player->unk_030, var_fv0, 0.05f, 1.0f, 0.05f); - if (player->pos.y < (gGroundLevel + 50.0f)) { + if (player->pos.y < (gGroundHeight + 50.0f)) { Math_SmoothStepToF(&player->unk_02C, var_fv1 * 0.3f, 0.05f, 1.0f, 0.05f); } else { Math_SmoothStepToF(&player->unk_02C, var_fv1, 0.05f, 2.0f, 0.05f); @@ -919,7 +919,7 @@ void Aquas_801AACF8(Player* player) { sp58 = D_i3_801C41B8[4] * 0.8f; D_ctx_80177968 = 10.0f; - if (player->pos.y < (gGroundLevel + 50.0f)) { + if (player->pos.y < (gGroundHeight + 50.0f)) { if (sp58 <= 0.0f) { sp58 = 0.0f; D_ctx_80177968 = 2.0f; @@ -1007,7 +1007,7 @@ void Aquas_801AACF8(Player* player) { if (player->pos.y > (player->unk_0B0 + (player->unk_0A0 - 100.0f))) { player->flags_228 = PFLAG_228_3; } - if (player->pos.y <= (gGroundLevel + 100)) { + if (player->pos.y <= (gGroundHeight + 100)) { player->flags_228 = PFLAG_228_2; } @@ -1076,8 +1076,8 @@ void Aquas_801ABA40(PlayerShot* shot) { shot->unk_64 = 0; } - if (shot->obj.pos.y < gGroundLevel) { - shot->obj.pos.y = gGroundLevel + 2.0f; + if (shot->obj.pos.y < gGroundHeight) { + shot->obj.pos.y = gGroundHeight + 2.0f; func_beam_800365E4(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 0.0f, 0.0f, 0.0f, 0.0f, 90.0f, 2.0f, 0, 0); func_effect_8007CF30(shot->obj.pos.x, shot->obj.pos.y, shot->obj.pos.z, 1.2f); @@ -1148,20 +1148,20 @@ void Aquas_801ABA40(PlayerShot* shot) { shot->vel.x = sp54.x; shot->vel.y = sp54.y; shot->vel.z = sp54.z; - if ((shot->obj.pos.y < (gGroundLevel + 30.0f)) && (shot->vel.y < 0.0f) && (D_i3_801C4190[3] != 0)) { + if ((shot->obj.pos.y < (gGroundHeight + 30.0f)) && (shot->vel.y < 0.0f) && (D_i3_801C4190[3] != 0)) { shot->vel.y = 0.0f; } break; } if (D_i3_801C4454 < 297) { - D_ctx_80178370 = shot->obj.pos.x; - D_ctx_80178374 = shot->obj.pos.y; - D_ctx_80178378 = shot->obj.pos.z; - D_ctx_80178360 = 255; - D_ctx_80178364 = 200; - D_ctx_80178368 = 150; - Math_SmoothStepToF(&D_ctx_8017836C, 0.8f, 1.0f, 0.08f, 0.001f); + gLight3x = shot->obj.pos.x; + gLight3y = shot->obj.pos.y; + gLight3z = shot->obj.pos.z; + gLight3R = 255; + gLight3G = 200; + gLight3B = 150; + Math_SmoothStepToF(&gLight3Brightness, 0.8f, 1.0f, 0.08f, 0.001f); } if (D_i3_801C4454 != 0) { @@ -1182,7 +1182,7 @@ void Aquas_801AC09C(Player* player) { D_i3_801C4454 = 300; D_i3_801C4458 = -100.0f; D_i3_801C445C = 0.1f; - D_ctx_8017836C = 1.0f; + gLight3Brightness = 1.0f; break; } } @@ -1296,23 +1296,23 @@ void Aquas_801AC274(Player* player) { } if (D_i3_801C4190[5] == 0) { - D_ctx_80178370 = player->pos.x; - D_ctx_80178374 = player->pos.y - 5.0f; - D_ctx_80178378 = player->unk_138 - 60.0f; + gLight3x = player->pos.x; + gLight3y = player->pos.y - 5.0f; + gLight3z = player->unk_138 - 60.0f; - D_ctx_80178360 += 4; - D_ctx_80178364 += 3; - D_ctx_80178368 += 2; - if (D_ctx_80178360 >= 255) { - D_ctx_80178360 = 255; + gLight3R += 4; + gLight3G += 3; + gLight3B += 2; + if (gLight3R >= 255) { + gLight3R = 255; } - if (D_ctx_80178364 > 200) { - D_ctx_80178364 = 200; + if (gLight3G > 200) { + gLight3G = 200; } - if (D_ctx_80178368 > 150) { - D_ctx_80178368 = 150; + if (gLight3B > 150) { + gLight3B = 150; } - Math_SmoothStepToF(&D_ctx_8017836C, 0.2f, 1.0f, 0.04f, 0.001f); + Math_SmoothStepToF(&gLight3Brightness, 0.2f, 1.0f, 0.04f, 0.001f); } } @@ -1468,21 +1468,21 @@ void Aquas_801ACE50(Player* player) { } if (!(gBrakeButton[player->num] & gInputHold->button) && !(gBoostButton[player->num] & gInputHold->button)) { - player->unk_2B4 = 1; - if (player->unk_2BC == 0.0f) { - player->unk_2B4 = 0; + player->boostCooldown = 1; + if (player->boostMeter == 0.0f) { + player->boostCooldown = 0; } } if ((gBoostButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && - (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->unk_2B4 == 0)) { - if (player->unk_2BC == 0) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { + if (player->boostMeter == 0) { AUDIO_PLAY_SFX(0x09004030, player->sfxSource, 4); } - player->unk_2BC += 3.0f; - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; - player->unk_2B4 = 1; + player->boostMeter += 3.0f; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; + player->boostCooldown = 1; } player->unk_110 += 2.0f; if (player->unk_110 > 10.0f) { @@ -1494,11 +1494,11 @@ void Aquas_801ACE50(Player* player) { Math_SmoothStepToF(&D_ctx_801779A8[0], 50.0f, 1.0f, 10.0f, 0.0f); } else { D_i3_801C41B8[27] = 0.0f; - if (player->unk_2BC > 0.0f) { - player->unk_2BC -= 0.50f; - if (player->unk_2BC <= 0.0f) { - player->unk_2BC = 0.0f; - player->unk_2B4 = 0; + if (player->boostMeter > 0.0f) { + player->boostMeter -= 0.50f; + if (player->boostMeter <= 0.0f) { + player->boostMeter = 0.0f; + player->boostCooldown = 0; } } if (player->unk_110 > 0.0f) { @@ -1515,14 +1515,14 @@ void Aquas_801ACE50(Player* player) { void Aquas_801AD328(Player* player) { player->sfx.brake = 0; if ((gBrakeButton[player->num] & gInputHold->button) && (player->unk_230 == 0) && - (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->unk_2B4 == 0)) { - if (player->unk_2BC == 0) { + (player->state_1C8 != PLAYERSTATE_1C8_U_TURN) && (player->boostCooldown == 0)) { + if (player->boostMeter == 0) { AUDIO_PLAY_SFX(0x09004031, player->sfxSource, 4); } - player->unk_2BC += 3.0f; - if (player->unk_2BC > 90.0f) { - player->unk_2BC = 90.0f; - player->unk_2B4 = 1; + player->boostMeter += 3.0f; + if (player->boostMeter > 90.0f) { + player->boostMeter = 90.0f; + player->boostCooldown = 1; } player->unk_110 -= 1.0f; if (player->unk_110 < -20.0f) { @@ -1533,11 +1533,11 @@ void Aquas_801AD328(Player* player) { player->sfx.brake = 1; Math_SmoothStepToF(&D_ctx_801779A8[0], 25.0f, 1.0f, 5.0f, 0.0f); } else { - if (player->unk_2BC > 0.0f) { - player->unk_2BC -= 0.5f; - if (player->unk_2BC <= 0.0f) { - player->unk_2BC = 0.0f; - player->unk_2B4 = 0; + if (player->boostMeter > 0.0f) { + player->boostMeter -= 0.5f; + if (player->boostMeter <= 0.0f) { + player->boostMeter = 0.0f; + player->boostCooldown = 0; D_i3_801C41B8[28] = 0.0f; } @@ -2245,7 +2245,7 @@ void Aquas_801AFA5C(Actor* actor) { AUDIO_PLAY_SFX(0x1902102F, actor->sfxSource, 4); break; case 5: - if (actor->obj.pos.y > (gGroundLevel + 70.0f)) { + if (actor->obj.pos.y > (gGroundHeight + 70.0f)) { Math_SmoothStepToF(&actor->fwork[0], 1.0f, 0.1f, 0.2f, 0.0001f); Math_SmoothStepToF(&actor->fwork[1], 1.0f, 0.1f, 0.2f, 0.0001f); Math_SmoothStepToF(&actor->fwork[2], 1.0f, 0.1f, 0.2f, 0.0001f); @@ -2267,7 +2267,7 @@ void Aquas_801AFA5C(Actor* actor) { for (i = 0; i < 36; i += 2) { sp6C = __sinf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; sp68 = __cosf(sp70 + (i * 10.0f * M_DTOR)) * actor->fwork[6] * 10.0f; - pad64 = gGroundLevel + 30.0f; + pad64 = gGroundHeight + 30.0f; func_effect_8007B8F8(actor->obj.pos.x + sp6C, pad64, actor->obj.pos.z + sp68, 20.0f); } } @@ -2288,8 +2288,8 @@ void Aquas_801AFA5C(Actor* actor) { Math_SmoothStepToF(&actor->obj.pos.y, -300.0f, 0.1f, 1.0f, 0.001f); if (actor->fwork[0] <= 0.2f) { for (i = 0; i < 5; i++) { - func_effect_8007BC7C(actor->obj.pos.x, gGroundLevel + 50.0f, actor->obj.pos.z, 20.0f); - Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), gGroundLevel + (i * 20.0f), + func_effect_8007BC7C(actor->obj.pos.x, gGroundHeight + 50.0f, actor->obj.pos.z, 20.0f); + Aquas_801AC8A8(actor->obj.pos.x + RAND_FLOAT_CENTERED(300.0f), gGroundHeight + (i * 20.0f), actor->obj.pos.z, 5.0f, 2); } if (gBosses[0].state < 13) { @@ -2810,7 +2810,7 @@ void Aquas_801B134C(Boss* bossAQ) { for (i3 = 0; i3 < 9; i3++) { var_fs0 = SIN_DEG((27 + 2 * i3) * (10.0f + 3 * i2)) * var_fs3 * 10.0f; var_fs1 = COS_DEG((27 + 2 * i3) * (10.0f + 3 * i2)) * var_fs3 * 10.0f; - temp3 = gGroundLevel + 30.0f; + temp3 = gGroundHeight + 30.0f; func_effect_8007B8F8(bossAQ->obj.pos.x + var_fs0, temp3, bossAQ->obj.pos.z + 1000.0f + var_fs1, 20.0f); } @@ -2825,14 +2825,14 @@ void Aquas_801B134C(Boss* bossAQ) { Math_SmoothStepToF(D_ctx_801779A8, 20.0f, 1.0f, 5.0f, 0.0f); } if (bossAQ->timer_058 != 0) { - gPlayer[0].unk_2B4 = 1; + gPlayer[0].boostCooldown = 1; Math_SmoothStepToF(&D_i3_801C41B8[24], 20.0f, 0.1f, 1.0f, 0.0f); Math_SmoothStepToF(&gPlayer[0].unk_08C, 180.0f, 0.4f, 20.0f, 0.0f); } else { Math_SmoothStepToF(&D_i3_801C41B8[24], 0.0f, 0.01f, 0.1f, 0.0f); Math_SmoothStepToF(&gPlayer[0].unk_08C, 0.0f, 0.1f, 2.0f, 0.0f); if (gPlayer[0].unk_08C < 0.1f) { - gPlayer[0].unk_2B4 = 0; + gPlayer[0].boostCooldown = 0; gPlayer[0].unk_08C = D_i3_801C41B8[24] = 0.0f; bossAQ->swork[AQ_SWK_0] = 0; } @@ -3466,7 +3466,7 @@ bool Aquas_801B42AC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp6C, &sp60); - func_edisplay_8005F670(&sp60); + Display_SetSecondLight(&sp60); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp5C, sp58, sp54, MTXF_APPLY); @@ -3698,7 +3698,7 @@ void Aquas_801B50E8(Actor* actor) { actor->state = 3; actor->vel.y = 30.0f; } else if (((gGameFrameCount % 16) == 0)) { - func_effect_8007B8F8(actor->obj.pos.x, gGroundLevel + 30.0f, actor->obj.pos.z, 10.0f); + func_effect_8007B8F8(actor->obj.pos.x, gGroundHeight + 30.0f, actor->obj.pos.z, 10.0f); } break; @@ -3856,7 +3856,7 @@ bool Aquas_801B5C18(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th Matrix_RotateX(gCalcMatrix, rot->x * M_DTOR, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp4C, &sp58); - func_edisplay_8005F670(&sp58); + Display_SetSecondLight(&sp58); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp6C, sp68, sp64, MTXF_APPLY); @@ -3907,7 +3907,7 @@ void Aquas_801B5F68(s32 limbIndex, Vec3f* rot, void* thisx) { sp30.z = 0.0f; Matrix_MultVec3f(gCalcMatrix, &sp30, &sp24); this->fwork[8] = sp24.x; - this->fwork[9] = gGroundLevel; + this->fwork[9] = gGroundHeight; this->fwork[10] = sp24.z; break; case 8: @@ -4250,9 +4250,9 @@ void Aquas_801B6FF8(Actor* actor) { actor->timer_0C6 = 15; actor->health -= actor->damage; for (i = 0; i < 10; i++) { - func_effect_80081A8C(actor->unk_0D8.x + RAND_FLOAT_CENTERED(70.0f), - actor->unk_0D8.y + RAND_FLOAT_CENTERED(70.0f), - actor->unk_0D8.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); + func_effect_80081A8C(actor->hitPos.x + RAND_FLOAT_CENTERED(70.0f), + actor->hitPos.y + RAND_FLOAT_CENTERED(70.0f), + actor->hitPos.z + RAND_FLOAT_CENTERED(70.0f), 1.0f, 1); } AUDIO_PLAY_SFX(0x2903408F, actor->sfxSource, 4); if (actor->health <= -100) { @@ -4440,7 +4440,7 @@ void Aquas_801B7C78(Actor* actor) { Math_SmoothStepToF(&actor->fwork[6], 255.0f, 0.1f, 10.0f, 0); } if (((actor->state < 5) || (actor->state == 7)) && (actor->health != 0) && ((gGameFrameCount % 16) == 0)) { - func_effect_8007B8F8(actor->vwork[22].x, gGroundLevel, actor->vwork[22].z, 5.0f); + func_effect_8007B8F8(actor->vwork[22].x, gGroundHeight, actor->vwork[22].z, 5.0f); } Math_SmoothStepToF(&actor->fwork[1], actor->fwork[2], 0.1f, 2.0f, 0.00001f); @@ -5165,7 +5165,7 @@ void Aquas_801BA6A4(Actor* actor) { actor->fwork[1] += 10.0f; actor->vel.x = SIN_DEG(actor->fwork[1]) * 10.0f; - if (actor->obj.pos.y < (gGroundLevel + 30.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 30.0f)) { AUDIO_PLAY_SFX(0x19400007, actor->sfxSource, 4); actor->iwork[1] = 1; actor->vel.x = actor->vel.y = actor->vel.z = 0.0f; @@ -5189,7 +5189,7 @@ void Aquas_801BA6A4(Actor* actor) { Math_SmoothStepToF(&actor->vel.y, -7.0f, 0.1f, 1.0f, 0.0001f); - if (actor->obj.pos.y < (gGroundLevel + 20.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 20.0f)) { actor->gravity = 0.0f; if (actor->vel.y < 0.0f) { actor->vel.y = 0.0f; @@ -5467,7 +5467,7 @@ void Aquas_801BB79C(Actor* actor) { Vec3f sp74; Actor* sp70; Actor* sp6C; - Object_80* actor122; + Scenery* actor122; if (actor->timer_0C0 == 0) { switch (actor->iwork[18]) { @@ -5483,8 +5483,8 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[20] = 50; } } else { - for (i = 0, actor122 = gObjects80; i < 50; i++, actor122++) { - if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_80_122) && + for (i = 0, actor122 = gScenery; i < 50; i++, actor122++) { + if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_SCENERY_122) && Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, 0.0f) && (actor->iwork[20] == 0)) { @@ -5509,11 +5509,11 @@ void Aquas_801BB79C(Actor* actor) { actor->iwork[20] = 50; } } else { - for (i = 0, actor122 = gObjects80; i < 50; i++, actor122++) { - if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_80_122) && + for (i = 0, actor122 = gScenery; i < 50; i++, actor122++) { + if ((actor122->obj.status == OBJ_ACTIVE) && (actor122->obj.id == OBJ_SCENERY_122) && (Object_CheckHitboxCollision(&actor->obj.pos, actor122->info.hitbox, &actor122->obj, 0.0f, 0.0f, 0.0f) || - (actor->obj.pos.y < (gGroundLevel + 30.0f))) && + (actor->obj.pos.y < (gGroundHeight + 30.0f))) && (actor->iwork[20] == 0)) { actor->iwork[20] = 50; actor->iwork[19]++; @@ -5811,7 +5811,7 @@ bool Aquas_801BC530(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* th if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp64, &sp58); - func_edisplay_8005F670(&sp58); + Display_SetSecondLight(&sp58); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_Push(&gGfxMatrix); Matrix_Scale(gGfxMatrix, sp54, sp50, sp4C, MTXF_APPLY); @@ -5977,7 +5977,7 @@ void Aquas_801BC9A0(Actor* actor) { actor->obj.pos.z + RAND_FLOAT_CENTERED(200.0f), 6.0f, 2); } - if ((actor->obj.pos.y < (gGroundLevel + 30.0f)) && (actor->iwork[2] == 0)) { + if ((actor->obj.pos.y < (gGroundHeight + 30.0f)) && (actor->iwork[2] == 0)) { actor->iwork[2] = 1; actor->vel.x = actor->vel.y = actor->vel.z = actor->gravity = 0.0f; func_effect_8007A6F0(&actor->obj.pos, 0x19400007); @@ -6134,8 +6134,8 @@ void Aquas_801BD54C(Actor* actor) { break; case 2: - if (actor->obj.pos.y < gGroundLevel + 30.0f) { - actor->obj.pos.y = gGroundLevel + 30.0f; + if (actor->obj.pos.y < gGroundHeight + 30.0f) { + actor->obj.pos.y = gGroundHeight + 30.0f; } if ((actor->iwork[2] != 0) || (actor->timer_0BE != 0)) { @@ -6150,8 +6150,8 @@ void Aquas_801BD54C(Actor* actor) { actor->timer_0BC = 60; actor->fwork[1] = RAND_FLOAT_CENTERED(300.0f); actor->fwork[2] = 50.0f + RAND_FLOAT_CENTERED(100.0f); - if (actor->fwork[2] < gGroundLevel + 30.0f) { - actor->fwork[2] = gGroundLevel + 30.0f; + if (actor->fwork[2] < gGroundHeight + 30.0f) { + actor->fwork[2] = gGroundHeight + 30.0f; } actor->iwork[1]++; actor->iwork[1] &= 3; @@ -6337,8 +6337,8 @@ void Aquas_801BE0F0(Actor* actor) { gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } -// OBJ_80_126 draw -void Aquas_801BE1FC(Object_80* obj80) { +// OBJ_SCENERY_126 draw +void Aquas_801BE1FC(Scenery* scenery) { Matrix_Scale(gGfxMatrix, 0.5f, 0.5f, 0.5f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_AQ_600EEF0); diff --git a/src/overlays/ovl_i3/fox_so.c b/src/overlays/ovl_i3/fox_so.c index f982e8ea..abf5560d 100644 --- a/src/overlays/ovl_i3/fox_so.c +++ b/src/overlays/ovl_i3/fox_so.c @@ -953,7 +953,7 @@ void Solar_801A0FD4(Actor* actor, s32 index) { } } -void Solar_801A10F4(Player* player) { +void Solar_LevelStart(Player* player) { s32 i; Vec3f sp50; Vec3f sp44; @@ -1051,7 +1051,7 @@ void Solar_801A10F4(Player* player) { Audio_KillSfxBySourceAndId(player->sfxSource, 0x3140807E); AUDIO_PLAY_BGM(SEQ_ID_INTRO_51); func_display_80057814(player); - func_8001C8B8(gPlayerNum); + Audio_StartPlayerNoise(gPlayerNum); D_ctx_80177A48[0] = 0.01f; } break; @@ -1114,7 +1114,7 @@ void Solar_801A10F4(Player* player) { player->pos.z = 0.0f; player->unk_0D0 = D_play_80161A54; Play_ClearObjectData(); - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->pos.y = 350.0f; @@ -1802,7 +1802,7 @@ void Solar_801A3C4C(Boss* bossSO) { bossSO->state = 0; bossSO->swork[SO_SWK_1] = 1; bossSO->fwork[SO_FWK_0] = 0.01f; - bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + bossSO->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); bossSO->timer_058 = 20000; D_ctx_8017796C = -1; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = gFillScreenAlpha = 255; @@ -2800,7 +2800,7 @@ void Solar_801A7750(void) { } } -void Solar_801A7930(Player* player) { +void Solar_LevelComplete(Player* player) { s32 i; f32 sp78; f32 sp74; @@ -2894,7 +2894,7 @@ void Solar_801A7930(Player* player) { player->pos.z = -(D_ctx_80177D20 - 500.0f); player->unk_1D0++; player->wings.modelId = 1; - func_8001C8B8(0); + Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 1; Play_ClearObjectData(); @@ -3020,7 +3020,7 @@ void Solar_801A7930(Player* player) { Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_SOLAR] = Play_CheckMedalStatus(100) + 1; } } @@ -3073,10 +3073,10 @@ void Solar_801A7930(Player* player) { } break; case 1186: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1386: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1460: AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); diff --git a/src/overlays/ovl_i3/fox_zo.c b/src/overlays/ovl_i3/fox_zo.c index 00eaf94d..bc1163af 100644 --- a/src/overlays/ovl_i3/fox_zo.c +++ b/src/overlays/ovl_i3/fox_zo.c @@ -1007,7 +1007,7 @@ void Zoness_80191680(Actor* actor) { sp54 = Math_RadToDeg(Math_Atan2F(sp64, sp5C)); otherActor = &gActors[actor->iwork[0]]; if ((actor->state != 0) || (otherActor->obj.status == OBJ_FREE)) { - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.unk_1C = 0.0f; sp54 += 180.0f; if (sp54 > 360.0f) { @@ -4412,7 +4412,7 @@ void Zoness_8019D15C(Actor* actor) { actor->unk_0D0 = 0; if (actor->unk_0D2 < 2) { AUDIO_PLAY_SFX(0x1903001E, actor->sfxSource, 4); - if ((actor->obj.pos.y + 268.0f) < actor->unk_0D8.y) { + if ((actor->obj.pos.y + 268.0f) < actor->hitPos.y) { actor->fwork[1] = 20.0f; } else { actor->fwork[1] = -20.0f; @@ -4466,7 +4466,7 @@ void Zoness_8019D3C4(Actor* actor) { Animation_DrawSkeleton(1, D_ZO_601FC90, sp28, Zoness_8019D340, NULL, actor, &gIdentityMatrix); } -void Zoness_8019D428(Player* player) { +void Zoness_LevelStart(Player* player) { s32 sp2C; player->unk_088 += 10.0f; @@ -4494,7 +4494,7 @@ void Zoness_8019D428(Player* player) { sp2C = gControllerHold[gMainController].button; gControllerHold[gMainController].button = gBoostButton[gMainController]; player->timer_1F8 = 60; - player->unk_2BC = 1.0f; + player->boostMeter = 1.0f; func_play_800B2574(player); if (gCsFrameCount > 195) { D_ctx_801779A8[0] = 50.0f; @@ -4504,7 +4504,7 @@ void Zoness_8019D428(Player* player) { gControllerHold[gMainController].button = sp2C; if (gCsFrameCount >= 270) { AUDIO_PLAY_BGM(SEQ_ID_ZONESS | SEQ_FLAG); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -4516,7 +4516,7 @@ void Zoness_8019D428(Player* player) { D_ctx_80177CE8 += 40.0f; } -void Zoness_8019D76C(Player* player) { +void Zoness_LevelComplete(Player* player) { f32 temp_fa0; f32 temp_ft5; f32 dx; @@ -4600,7 +4600,7 @@ void Zoness_8019D76C(Player* player) { player->pos.y = 200.0f; player->pos.z = -(D_ctx_80177D20 + 1500.0f); player->unk_1D0++; - func_8001C8B8(0); + Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 1; Play_ClearObjectData(); @@ -4676,7 +4676,7 @@ void Zoness_8019D76C(Player* player) { Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_ZONESS] = Play_CheckMedalStatus(250) + 1; } } @@ -4737,10 +4737,10 @@ void Zoness_8019D76C(Player* player) { } break; case 906: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1106: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1180: AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); diff --git a/src/overlays/ovl_i4/fox_bo.c b/src/overlays/ovl_i4/fox_bo.c index 3e63b8f3..dcf0f275 100644 --- a/src/overlays/ovl_i4/fox_bo.c +++ b/src/overlays/ovl_i4/fox_bo.c @@ -195,21 +195,21 @@ void Bolse_8018BEF8(Actor* actor, s32 arg1) { } } -void Bolse_8018C158(Actor* actor) { +void Bolse_UpdateEventHandler(Actor* this) { s32 i; Player* player = &gPlayer[0]; s32 pad; - Actor* actorPtr; + Actor* actor; - D_bg_800C9C34 = 1; + gBolseDynamicGround = true; D_i4_801A0530++; - switch (actor->state) { + switch (this->state) { case 0: D_360_800C9B4C = 500000; gAllRangeEventTimer = 0; gStarWolfMsgTimer = 0; - actor->state = 2; + this->state = 2; if (gAllRangeCheckpoint == 0) { gBosses[0].fwork[1] = 0.3f; @@ -219,7 +219,7 @@ void Bolse_8018C158(Actor* actor) { gHitCount = gSavedHitCount; gBosses[1].state = 2; gAllRangeEventTimer = 3000; - actor->iwork[1] = gHitCount; + this->iwork[1] = gHitCount; } for (i = 0; i < 6; i++) { @@ -227,7 +227,7 @@ void Bolse_8018C158(Actor* actor) { } case 2: - Bolse_8018BD60(actor); + Bolse_8018BD60(this); switch (gAllRangeEventTimer) { case 300: @@ -254,7 +254,7 @@ void Bolse_8018C158(Actor* actor) { } if ((D_i4_801A0530 < 9600) && (D_i4_801A0530 & 0x400)) { - Bolse_8018BEF8(actor, 8); + Bolse_8018BEF8(this, 8); } if (gBosses[2].state == 10) { @@ -268,23 +268,23 @@ void Bolse_8018C158(Actor* actor) { gPlayer[0].unk_000 = 0.0f; } AllRange_ClearRadio(); - actor->state = 6; - AUDIO_PLAY_SFX(0x31009063, actor->sfxSource, 0); - AUDIO_PLAY_SFX(0x2940D09A, actor->sfxSource, 4); + this->state = 6; + AUDIO_PLAY_SFX(0x31009063, this->sfxSource, 0); + AUDIO_PLAY_SFX(0x2940D09A, this->sfxSource, 4); gScreenFlashTimer = 8; - for (actorPtr = &gActors[10], i = 0; i < 20; i++, actorPtr++) { - if (actorPtr->obj.status == OBJ_ACTIVE) { - actorPtr->obj.status = OBJ_DYING; - actorPtr->timer_0BC = 30; + for (actor = &gActors[10], i = 0; i < 20; i++, actor++) { + if (actor->obj.status == OBJ_ACTIVE) { + actor->obj.status = OBJ_DYING; + actor->timer_0BC = 30; } } } if ((gBosses[1].state == 2) && (gBosses[1].obj.status == OBJ_ACTIVE)) { - actor->iwork[1] = gHitCount; - actor->state = 10; - actor->timer_0BC = 150; + this->iwork[1] = gHitCount; + this->state = 10; + this->timer_0BC = 150; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_STANDBY; AUDIO_PLAY_BGM(SEQ_ID_BO_BOSS | SEQ_FLAG); AllRange_ClearRadio(); @@ -297,10 +297,9 @@ void Bolse_8018C158(Actor* actor) { for (i = 10; i < 30; i++) { Object_Kill(&gActors[i].obj, gActors[i].sfxSource); } - } else if ((gAllRangeCheckpoint == 1) && - (((gHitCount - actor->iwork[1]) >= 5) || (D_i4_801A0530 == 4000))) { + } else if ((gAllRangeCheckpoint == 1) && (((gHitCount - this->iwork[1]) >= 5) || (D_i4_801A0530 == 4000))) { gAllRangeCheckpoint = 2; - actor->iwork[1] = gHitCount; + this->iwork[1] = gHitCount; if ((gStarWolfTeamAlive[0] != 0) || (gStarWolfTeamAlive[1] != 0) || (gStarWolfTeamAlive[2] != 0) || (gStarWolfTeamAlive[3] != 0)) { D_360_800C9B4C = gAllRangeEventTimer + 120; @@ -310,31 +309,31 @@ void Bolse_8018C158(Actor* actor) { break; case 3: - D_bg_800C9C34 = 0; + gBolseDynamicGround = false; for (i = 0; i < 4; i++) { if (gStarWolfTeamAlive[i] != 0) { - actorPtr = &gActors[i + 4]; + actor = &gActors[i + 4]; break; } if (i == 3) { - actor->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; return; } } - player->cam.eye.x += actorPtr->vel.x * 0.23f; - player->cam.eye.y += actorPtr->vel.y * 0.23f; - player->cam.eye.z += actorPtr->vel.z * 0.23f; + player->cam.eye.x += actor->vel.x * 0.23f; + player->cam.eye.y += actor->vel.y * 0.23f; + player->cam.eye.z += actor->vel.z * 0.23f; - Math_SmoothStepToF(&player->cam.at.x, actorPtr->obj.pos.x, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.y, actorPtr->obj.pos.y, 1.0f, 20000.0f, 0.0f); - Math_SmoothStepToF(&player->cam.at.z, actorPtr->obj.pos.z, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.x, actor->obj.pos.x, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.y, actor->obj.pos.y, 1.0f, 20000.0f, 0.0f); + Math_SmoothStepToF(&player->cam.at.z, actor->obj.pos.z, 1.0f, 20000.0f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.1f, 0.2f, 0); if ((gControllerPress->button & START_BUTTON) || ((D_360_800C9B4C + 300) == gAllRangeEventTimer)) { - actor->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; @@ -368,7 +367,7 @@ void Bolse_8018C158(Actor* actor) { Math_SmoothStepToF(&player->camRoll, 0.0f, 1.0f, 1000.0f, 0); - if (actor->timer_0BC == 130) { + if (this->timer_0BC == 130) { Radio_PlayMessage(gMsg_ID_11060, RCID_FALCO); gAllRangeCheckpoint = 1; gSavedHitCount = gHitCount; @@ -377,18 +376,18 @@ void Bolse_8018C158(Actor* actor) { } } - if ((actor->timer_0BC % 8) == 0) { - Bolse_8018BEF8(actor, 15); + if ((this->timer_0BC % 8) == 0) { + Bolse_8018BEF8(this, 15); } - if (!actor->timer_0BC) { + if (!this->timer_0BC) { gAllRangeEventTimer = 3000; - actor->state = 2; + this->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B7184(player, 1); player->unk_014 = 0.0f; Audio_KillSfxBySource(gBosses[1].sfxSource); - actor->iwork[1] = gHitCount; + this->iwork[1] = gHitCount; } break; @@ -629,7 +628,7 @@ bool Bolse_8018D278(Actor* actor) { Object_Kill(&actor->obj, actor->sfxSource); actor->info.bonus = 0; - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.unk_1C = 0.0f; return true; @@ -744,7 +743,7 @@ void Bolse_8018D7F0(Actor* actor) { Bolse_8018D4F0(actor); Bolse_8018D584(actor); } else { - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.bonus = 0; actor->info.unk_1C = 0.0f; } @@ -1132,7 +1131,7 @@ f32 D_i4_8019F078[] = { -30.0f, -60.0f, -90.0f }; f32 D_i4_8019F084[] = { 200.0f, 260.0f, 400.0f }; f32 D_i4_8019F090[] = { 70.0f, -80.0f, -65.0f }; -void Bolse_8018EF6C(Player* player) { +void Bolse_LevelStart(Player* player) { s32 i; f32 sp60 = 0.0f; Vec3f sp54; @@ -1150,7 +1149,7 @@ void Bolse_8018EF6C(Player* player) { gAmbientG = 15; gAmbientB = 30; - D_ctx_80178410 = 1000; + gStarCount = 1000; gCsFrameCount = 0; @@ -1269,7 +1268,7 @@ void Bolse_8018EF6C(Player* player) { gCsCamAtX = player->pos.x; gCsCamAtY = player->pos.y; gCsCamAtZ = player->pos.z; - D_ctx_80178410 = 300; + gStarCount = 300; D_ctx_80177A98 = 1; gLight1R = 200; @@ -1309,7 +1308,7 @@ void Bolse_8018EF6C(Player* player) { actor->timer_0BC = 80; } AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; } break; } @@ -1357,7 +1356,7 @@ void Bolse_8018F83C(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Bolse_8018F94C(Player* player) { +void Bolse_LevelComplete(Player* player) { f32 sp8C; f32 sp88; s32 i; @@ -1413,7 +1412,7 @@ void Bolse_8018F94C(Player* player) { Play_ClearObjectData(); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Bolse_8018EC1C(); @@ -1439,7 +1438,7 @@ void Bolse_8018F94C(Player* player) { } D_ctx_80177A48[0] = 1.0f; - D_ctx_80178410 = 1000; + gStarCount = 1000; D_ctx_80177A98 = 0; gCsCamEyeY = 0; gCsCamEyeX = 200.0f; @@ -1451,11 +1450,11 @@ void Bolse_8018F94C(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 50); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 50); gCsFrameCount = 0; - gGroundLevel = -10000.0f; + gGroundHeight = -10000.0f; player->unk_240 = 1; player->wings.modelId = 1; AUDIO_PLAY_SFX(0x31009063, actor50->sfxSource, 0); - func_8001C8B8(0); + Audio_StartPlayerNoise(0); } break; @@ -1653,11 +1652,11 @@ void Bolse_8018F94C(Player* player) { switch (gCsFrameCount) { case 400: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 600: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 620: @@ -1813,8 +1812,8 @@ void Bolse_80191054(Effect* effect) { Object_Kill(&effect->obj, effect->sfxSource); } - if (effect->obj.pos.y < gGroundLevel + 50.0f) { - Bolse_80190FE8(effect->obj.pos.x, gGroundLevel + 50.0f, effect->obj.pos.z, 3.0f); + if (effect->obj.pos.y < gGroundHeight + 50.0f) { + Bolse_80190FE8(effect->obj.pos.x, gGroundHeight + 50.0f, effect->obj.pos.z, 3.0f); Object_Kill(&effect->obj, effect->sfxSource); } break; @@ -2072,16 +2071,16 @@ void Bolse_80191BAC(Boss* boss) { if (D_ctx_8017812C == 0) { if (((gGameFrameCount % 2) == 0)) { - D_ctx_8017836C = 0.0f; + gLight3Brightness = 0.0f; } else { - D_ctx_8017836C = 0.5f; + gLight3Brightness = 0.5f; } - D_ctx_80178370 = boss->obj.pos.x; - D_ctx_80178374 = boss->obj.pos.y; - D_ctx_80178378 = boss->obj.pos.z; - D_ctx_80178360 = 255; - D_ctx_80178364 = 128; - D_ctx_80178368 = 128; + gLight3x = boss->obj.pos.x; + gLight3y = boss->obj.pos.y; + gLight3z = boss->obj.pos.z; + gLight3R = 255; + gLight3G = 128; + gLight3B = 128; } } @@ -2106,24 +2105,24 @@ void Bolse_80191ED8(void) { s32 i; Actor* actor; Boss* boss; - Object_58* obj58; + Scenery360* scenery360; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { if (gLevelObjects[i].id < 0) { break; } if (gLevelObjects[i].id < 161) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->sfxSource[0] = scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->sfxSource[1] = scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->sfxSource[2] = scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->unk_54 = scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } @@ -2175,7 +2174,7 @@ void Bolse_80191ED8(void) { Object_SetInfo(&boss->info, boss->obj.id); } -void Bolse_80192264(void) { +void Bolse_DrawDynamicGround(void) { Vec3f spDC = { 0.0f, 0.0f, 0.0f }; Vec3f spD0; f32 rnd; diff --git a/src/overlays/ovl_i4/fox_fo.c b/src/overlays/ovl_i4/fox_fo.c index e7777490..301525cc 100644 --- a/src/overlays/ovl_i4/fox_fo.c +++ b/src/overlays/ovl_i4/fox_fo.c @@ -264,7 +264,7 @@ void Fortuna_80187960(Actor* actor) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; } }; break; @@ -390,7 +390,7 @@ void Fortuna_80187960(Actor* actor) { Object_SetInfo(&actor19->info, actor19->obj.id); } } - gOverlayStage = 1; + gSceneSetup = 1; gProjectFar = 30000.0f; break; @@ -494,7 +494,7 @@ void Fortuna_80188AD0(Actor* actor) { actor->state = 1; actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_FO_600FF64); actor->info.unk_1C = 0.0f; - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.bonus = 0; AUDIO_PLAY_SFX(0x2903B009, actor->sfxSource, 4); } @@ -630,7 +630,7 @@ void Fortuna_801890EC(Actor* actor, s32 arg1) { } } -void Fortuna_8018927C(Player* player) { +void Fortuna_LevelComplete(Player* player) { s32 i; Vec3f src; Vec3f dest; @@ -787,11 +787,11 @@ void Fortuna_8018927C(Player* player) { } for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } func_play_800A5EBC(); - gLevelType = 1; + gLevelType = LEVELTYPE_SPACE; D_ctx_801784AC = gBgColor = gFogRed = gFogGreen = gFogBlue = 0; gLight1R = gLight2R = D_ctx_80161A70 = 86; gLight1G = gLight2G = D_ctx_80161A74 = 58; @@ -828,7 +828,7 @@ void Fortuna_8018927C(Player* player) { player->unk_204 = 1; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 100); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 100); - func_8001C8B8(0); + Audio_StartPlayerNoise(0); if (gNextPlanetPath == 0) { Fortuna_801890EC(actor0, 3); } @@ -1096,7 +1096,7 @@ void Fortuna_8018927C(Player* player) { if (gCsFrameCount == 1382) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; Audio_FadeOutAll(10); for (i = 0; i < 6; i++) { gSavedStarWolfTeamAlive[i] = gStarWolfTeamAlive[i]; @@ -1273,7 +1273,7 @@ void Fortuna_8018927C(Player* player) { break; case 1080: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1240: @@ -1298,7 +1298,7 @@ void Fortuna_8018927C(Player* player) { actor2->fwork[29] = 5.0f; actor2->iwork[11] = 2; } - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1300: @@ -1319,7 +1319,7 @@ void Fortuna_8018927C(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; Audio_FadeOutAll(10); // clang-format off @@ -1406,10 +1406,10 @@ void Fortuna_8018927C(Player* player) { if (player->unk_1D0 < 20) { switch (gCsFrameCount) { case 1020: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1220: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; } } @@ -1437,30 +1437,30 @@ void Fortuna_8018BA2C(void) { s32 i; Actor* actor; Sprite* sprite; - Object_58* obj58; + Scenery360* scenery360; Boss* boss = &gBosses[0]; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (obj58 = &gObjects58[0], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = &gScenery360[0], i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id < 161) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.z = gLevelObjects[i].zPos1; - obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = gLevelObjects[i].zPos1; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } for (actor = &gActors[20], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } if ((gLevelObjects[i].id >= OBJ_ACTOR_176) && (gLevelObjects[i].id < OBJ_BOSS_292)) { @@ -1476,10 +1476,10 @@ void Fortuna_8018BA2C(void) { } for (sprite = &gSprites[0], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id == 163) { + if (gLevelObjects[i].id == OBJ_SPRITE_FO_POLE) { Sprite_Initialize(sprite); sprite->obj.status = OBJ_INIT; sprite->obj.id = gLevelObjects[i].id; diff --git a/src/overlays/ovl_i4/fox_i4.c b/src/overlays/ovl_i4/fox_i4.c index 48f02e41..68bbbe7d 100644 --- a/src/overlays/ovl_i4/fox_i4.c +++ b/src/overlays/ovl_i4/fox_i4.c @@ -1,6 +1,6 @@ #include "global.h" -void Fortuna_8018927C(Player*); +void Fortuna_LevelComplete(Player*); void Bolse_8018D394(Boss*); void Bolse_8018D454(Boss*); void Bolse_8018D7F0(Boss*); @@ -16,7 +16,7 @@ s32 D_i4_8019EDD0 = 0; void OvlI4_CallFunction(u32 mode, void* ptr) { switch (mode) { case OVLCALL_FO_CS_COMPLETE: - Fortuna_8018927C(ptr); + Fortuna_LevelComplete(ptr); break; case OVLCALL_BOSS309_UPDATE: Bolse_8018E710(ptr); diff --git a/src/overlays/ovl_i4/fox_ka.c b/src/overlays/ovl_i4/fox_ka.c index cfe34452..8154ae20 100644 --- a/src/overlays/ovl_i4/fox_ka.c +++ b/src/overlays/ovl_i4/fox_ka.c @@ -187,7 +187,7 @@ void Katina_80192C8C(void) { } } -void Katina_80192E20(Player* player) { +void Katina_LevelStart(Player* player) { s32 j; s32 i; Vec3f src; @@ -274,7 +274,7 @@ void Katina_80192E20(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; for (actor = &gActors[1], i = 1; i < 4; i += 1, actor++) { actor->timer_0BC = 0; } @@ -1062,7 +1062,7 @@ void Katina_801946C4(Boss* boss) { case 20: gShowAllRangeCountdown = 0; Math_SmoothStepToF(&boss->fwork[10], 0.0f, 0.1f, 3.0f, 0.0f); - if ((boss->timer_050 == 0) && (((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE)) || + if ((boss->timer_050 == 0) && ((gPlayer[0].state_1C8 == PLAYERSTATE_1C8_ACTIVE) || (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_U_TURN))) { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; gPlayer[0].unk_1D0 = 0; @@ -1396,7 +1396,7 @@ void Katina_80197024(void) { } } -void Katina_80197290(Player* player) { +void Katina_LevelComplete(Player* player) { s32 i; Boss* boss = &gBosses[1]; Vec3f src; @@ -1498,7 +1498,7 @@ void Katina_80197290(Player* player) { player->pos.y = 3500.0f; player->pos.z = 150.0f; player->unk_1D0 = 3; - func_8001C8B8(0); + Audio_StartPlayerNoise(0); if (gNextPlanetPath != 0) { AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); } else { @@ -1552,7 +1552,7 @@ void Katina_80197290(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_KATINA] = Play_CheckMedalStatus(150) + 1; } } @@ -1562,11 +1562,11 @@ void Katina_80197290(Player* player) { break; case 350: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 550: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1010: @@ -2065,7 +2065,7 @@ void Katina_80198AA0(Actor* actor) { if (xAngle < 0.0f) { xAngle += 360.0f; } - } else if ((actor->obj.pos.y < (gGroundLevel + 50.0f)) && (xAngle > 180.0f)) { + } else if ((actor->obj.pos.y < (gGroundHeight + 50.0f)) && (xAngle > 180.0f)) { xAngle = 0.0f; actor->unk_0F4.x = 0.0f; } @@ -2096,8 +2096,8 @@ void Katina_80198AA0(Actor* actor) { actor->fwork[14] -= actor->fwork[14] * 0.1f; actor->fwork[12] -= actor->fwork[12] * 0.1f; - if ((actor->obj.pos.y < gGroundLevel + 40.0f) && (actor->vel.y < 0.0f)) { - actor->obj.pos.y = gGroundLevel + 40.0f; + if ((actor->obj.pos.y < gGroundHeight + 40.0f) && (actor->vel.y < 0.0f)) { + actor->obj.pos.y = gGroundHeight + 40.0f; actor->vel.y = 0.0f; } diff --git a/src/overlays/ovl_i4/fox_sz.c b/src/overlays/ovl_i4/fox_sz.c index b7ccfbbf..466a905a 100644 --- a/src/overlays/ovl_i4/fox_sz.c +++ b/src/overlays/ovl_i4/fox_sz.c @@ -777,7 +777,7 @@ void SectorZ_8019B888(void) { } } -void SectorZ_8019BA64(Player* player) { +void SectorZ_LevelStart(Player* player) { s32 i; s32 j; Vec3f sp74; @@ -933,7 +933,7 @@ void SectorZ_8019BA64(Player* player) { player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_01C = player->unk_018 = player->unk_014 = 0.f; AUDIO_PLAY_BGM(gBgmSeqId); - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; } break; } @@ -1093,7 +1093,7 @@ void SectorZ_8019C70C(void) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void SectorZ_8019C85C(Player* player) { +void SectorZ_LevelComplete(Player* player) { s32 i; Vec3f src; Vec3f dest; @@ -1291,7 +1291,7 @@ void SectorZ_8019C85C(Player* player) { D_ctx_80177A48[3] = 300.0f; for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } } break; @@ -1352,7 +1352,7 @@ void SectorZ_8019C85C(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_SECTOR_Z] = Play_CheckMedalStatus(100) + 1; } } @@ -1476,11 +1476,11 @@ void SectorZ_8019C85C(Player* player) { break; case 2277: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 2477: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1370: @@ -1792,33 +1792,33 @@ void SectorZ_8019EA68(void) { s32 i; s32 j; Actor* actor; - Object_58* obj58; + Scenery360* scenery360; Boss* boss = &gBosses[0]; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); Rand_SetSeed(1, 29000, 9876); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id < 161) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } for (j = 50, actor = &gActors[j], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } diff --git a/src/overlays/ovl_i5/fox_ma.c b/src/overlays/ovl_i5/fox_ma.c index 50ce8b23..c3fdd879 100644 --- a/src/overlays/ovl_i5/fox_ma.c +++ b/src/overlays/ovl_i5/fox_ma.c @@ -11,6 +11,22 @@ #include "assets/ast_enmy_planet.h" // #include "prevent_bss_reordering2.h" +typedef struct { + /* 0x00 */ f32 unk_00; + /* 0x04 */ f32 unk_04; + /* 0x08 */ f32 unk_08; + /* 0x0C */ f32 unk_0C; + /* 0x10 */ s16 unk_10; +} UnkStruct_D_i5_801B8E50; // size = 0x14 + +typedef struct { + /* 0x00 */ f32 unk_00; + /* 0x04 */ s16 unk_04; + /* 0x08 */ f32 unk_08; + /* 0x0C */ f32 unk_0C; + /* 0x10 */ s16 unk_10; +} UnkStruct_D_i5_801BA1EC; // size = 0x14 + void Macbeth_801AD624(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, s16, s16, f32); bool Macbeth_801A0308(Actor*, f32, f32, u8); void Macbeth_801AF200(f32, f32, f32, f32, f32, f32); @@ -45,130 +61,130 @@ Vec3f D_i5_801BE6E8[6]; s32 D_i5_801BE734[4]; static UnkStruct_D_i5_801B8E50 D_i5_801B8E50[156] = { - { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_80_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_80_94 }, - { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_80_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_80_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_80_96 }, - { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_80_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_80_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_80_96 }, - { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_80_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_80_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_80_100 }, - { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_80_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_80_100 }, - { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_80_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_80_95 }, - { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_80_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_80_94 }, - { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_80_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_80_95 }, - { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_80_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_80_96 }, - { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_80_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_80_94 }, - { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_80_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_80_94 }, - { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_80_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_80_101 }, - { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_80_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_80_101 }, - { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_80_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_80_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_80_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_80_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -116479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -118279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -120079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -121879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -123679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -125479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -127279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_95 }, { -129068.2f, -274.0f, 0.0f, 350.0f, OBJ_80_94 }, - { -130841.2f, 38.0f, 0.0f, 350.0f, OBJ_80_96 }, { -132630.4f, 194.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -134430.4f, 194.0f, 0.0f, 0.0f, OBJ_80_96 }, { -136219.4f, 37.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -138009.0f, -119.0f, 0.0f, 0.0f, OBJ_80_96 }, { -139798.6f, -277.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -141587.6f, -433.0f, 0.0f, 0.0f, OBJ_80_95 }, { -143376.3f, -276.0f, 0.0f, 350.0f, OBJ_80_94 }, - { -145149.0f, 35.0f, 0.0f, 350.0f, OBJ_80_96 }, { -146883.3f, 192.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -148683.3f, 192.0f, 0.0f, 0.0f, OBJ_80_96 }, { -150471.9f, 34.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -152244.8f, -278.0f, 0.0f, 10.0f, OBJ_80_95 }, { -154034.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -155834.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, { -157634.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -159434.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, { -161234.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -163034.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, { -164834.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -166634.2f, -434.0f, 0.0f, 0.0f, OBJ_80_94 }, { -168435.2f, -435.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -170223.8f, -278.0f, 0.0f, 350.0f, OBJ_80_94 }, { -171996.6f, 34.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -173785.4f, 191.0f, 0.0f, 0.0f, OBJ_80_96 }, { -175574.2f, 33.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -177364.0f, -123.0f, 0.0f, 0.0f, OBJ_80_94 }, { -179164.9f, -122.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -180954.4f, 32.0f, 0.0f, 350.0f, OBJ_80_94 }, { -182727.1f, 345.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -184515.8f, 501.0f, 0.0f, 0.0f, OBJ_80_96 }, { -186304.5f, 344.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -188077.7f, 30.0f, 0.0f, 10.0f, OBJ_80_95 }, { -189866.6f, -125.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -191667.3f, -125.0f, 0.0f, 0.0f, OBJ_80_95 }, { -193455.9f, 31.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -195245.1f, 187.0f, 0.0f, 0.0f, OBJ_80_95 }, { -197033.7f, 344.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -198823.2f, 500.0f, 0.0f, 0.0f, OBJ_80_96 }, { -200612.3f, 343.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -202385.6f, 30.0f, 0.0f, 10.0f, OBJ_80_95 }, { -204175.1f, -125.0f, 0.0f, 0.0f, OBJ_80_96 }, - { -205964.3f, -282.0f, 0.0f, 10.0f, OBJ_80_95 }, { -207754.0f, -440.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -209542.5f, -283.0f, 0.0f, 350.0f, OBJ_80_94 }, { -211315.1f, 29.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -213104.5f, 185.0f, 0.0f, 0.0f, OBJ_80_96 }, { -214893.4f, 28.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -216683.2f, -128.0f, 0.0f, 0.0f, OBJ_80_95 }, { -218471.8f, 28.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -220261.3f, 184.0f, 0.0f, 0.0f, OBJ_80_96 }, { -222050.1f, 27.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -223839.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -225639.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -227439.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -229239.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -231039.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -232839.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -234639.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -236439.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -238239.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -240039.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -241839.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -243639.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -245439.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -247239.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -249039.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -250839.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -252639.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -254439.6f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -256240.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -258040.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -259840.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -261640.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -263440.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -265240.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -267040.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, { -268840.5f, -129.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -507035.0f, -319.0f, 0.0f, 0.0f, OBJ_80_94 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0 }, + { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, + { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_SCENERY_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_SCENERY_96 }, + { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_SCENERY_96 }, + { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_SCENERY_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_SCENERY_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_SCENERY_100 }, + { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_SCENERY_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_SCENERY_100 }, + { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_SCENERY_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, + { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, + { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_SCENERY_95 }, + { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_SCENERY_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, + { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_SCENERY_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_SCENERY_94 }, + { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_SCENERY_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, + { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_SCENERY_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_SCENERY_101 }, + { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_SCENERY_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_SCENERY_101 }, + { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_SCENERY_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -116479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -118279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -120079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -121879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -123679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -125479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -127279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -129068.2f, -274.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, + { -130841.2f, 38.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -132630.4f, 194.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -134430.4f, 194.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -136219.4f, 37.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -138009.0f, -119.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -139798.6f, -277.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -141587.6f, -433.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -143376.3f, -276.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, + { -145149.0f, 35.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -146883.3f, 192.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -148683.3f, 192.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -150471.9f, 34.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -152244.8f, -278.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -154034.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -155834.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -157634.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -159434.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -161234.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -163034.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -164834.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -166634.2f, -434.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -168435.2f, -435.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -170223.8f, -278.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -171996.6f, 34.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -173785.4f, 191.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -175574.2f, 33.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -177364.0f, -123.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -179164.9f, -122.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -180954.4f, 32.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -182727.1f, 345.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -184515.8f, 501.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -186304.5f, 344.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -188077.7f, 30.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -189866.6f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -191667.3f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -193455.9f, 31.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -195245.1f, 187.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -197033.7f, 344.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -198823.2f, 500.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -200612.3f, 343.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -202385.6f, 30.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -204175.1f, -125.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, + { -205964.3f, -282.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -207754.0f, -440.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -209542.5f, -283.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -211315.1f, 29.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -213104.5f, 185.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -214893.4f, 28.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -216683.2f, -128.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -218471.8f, 28.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -220261.3f, 184.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -222050.1f, 27.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -223839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -225639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -227439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -229239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -231039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -232839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -234639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -236439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -238239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -240039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -241839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -243639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -245439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -247239.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -249039.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -250839.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -252639.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -254439.6f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -256240.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -258040.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -259840.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -261640.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -263440.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -265240.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -267040.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -268840.5f, -129.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -507035.0f, -319.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0 }, }; static UnkStruct_D_i5_801B8E50 D_i5_801B9A80[86] = { - { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_80_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_80_94 }, - { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_80_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_80_95 }, - { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_80_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_80_96 }, - { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_80_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_80_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_80_96 }, - { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_80_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_80_95 }, - { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_80_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_80_100 }, - { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_80_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_80_100 }, - { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_80_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_80_95 }, - { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_80_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_80_94 }, - { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_80_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_80_95 }, - { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_80_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_80_96 }, - { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_80_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_80_94 }, - { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_80_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_80_94 }, - { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_80_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_80_101 }, - { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_80_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_80_101 }, - { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_80_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_80_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_80_94 }, - { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_80_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_80_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_80_96 }, - { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, - { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_80_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_80_104 }, - { -116453.5f, -118.0f, 0.0f, 350.0f, OBJ_80_98 }, { -118188.5f, 346.0f, 0.0f, 340.0f, OBJ_80_98 }, - { -119815.5f, 1105.0f, 0.0f, 330.0f, OBJ_80_97 }, { -121374.3f, 2005.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -122933.3f, 2905.0f, 0.0f, 330.0f, OBJ_80_97 }, { -124491.9f, 3806.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -126051.4f, 4707.0f, 0.0f, 330.0f, OBJ_80_97 }, { -127609.9f, 5607.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -129168.9f, 6507.0f, 0.0f, 330.0f, OBJ_80_97 }, { -130728.1f, 7408.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -132287.2f, 8308.0f, 0.0f, 330.0f, OBJ_80_97 }, { -133846.4f, 9208.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -135405.4f, 10109.0f, 0.0f, 330.0f, OBJ_80_97 }, { -136964.0f, 11009.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -138522.9f, 11909.0f, 0.0f, 330.0f, OBJ_80_97 }, { -140082.1f, 12810.0f, 0.0f, 330.0f, OBJ_80_97 }, - { -507035.0f, -489.0f, 0.0f, 0.0f, OBJ_80_97 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }, + { 5174.4f, -2141.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { 3401.4f, -1828.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, + { 1627.8999f, -1515.0f, 0.0f, 350.0f, OBJ_SCENERY_94 }, { -145.0f, -1202.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -1933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -3733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -5533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -7333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -9133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -10933.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -12733.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -14533.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -16333.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -18133.0f, -1046.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, + { -19921.6f, -889.0f, 0.0f, 350.0f, OBJ_SCENERY_95 }, { -21656.4f, -423.0f, 0.0f, 340.0f, OBJ_SCENERY_96 }, + { -23390.7f, 40.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, { -25125.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -26925.0f, 197.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -28713.6f, 40.0f, 0.0f, 10.0f, OBJ_SCENERY_96 }, + { -30447.3f, -424.0f, 0.0f, 20.0f, OBJ_SCENERY_95 }, { -32181.3f, -889.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, + { -33971.1f, -1045.0f, 0.0f, 0.0f, OBJ_SCENERY_100 }, { -35771.1f, -1045.0f, 90.0f, 0.0f, OBJ_SCENERY_100 }, + { -37571.1f, -1045.0f, 180.0f, 0.0f, OBJ_SCENERY_100 }, { -39371.1f, -1045.0f, 270.0f, 0.0f, OBJ_SCENERY_100 }, + { -41171.1f, -1045.0f, 360.0f, 0.0f, OBJ_SCENERY_100 }, { -42971.1f, -1045.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, + { -44760.0f, -889.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, { -46547.9f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, + { -48347.5f, -733.0f, 450.0f, 0.0f, OBJ_SCENERY_95 }, { -50136.4f, -576.0f, 450.0f, 350.0f, OBJ_SCENERY_95 }, + { -51872.1f, -111.0f, 450.0f, 340.0f, OBJ_SCENERY_96 }, { -53606.4f, 352.0f, 450.0f, 350.0f, OBJ_SCENERY_96 }, + { -55395.4f, 509.0f, 450.0f, 0.0f, OBJ_SCENERY_96 }, { -57184.2f, 353.0f, 450.0f, 10.0f, OBJ_SCENERY_94 }, + { -58957.5f, 40.0f, 450.0f, 10.0f, OBJ_SCENERY_95 }, { -60746.9f, -115.0f, 450.0f, 0.0f, OBJ_SCENERY_94 }, + { -62548.2f, -114.0f, 450.0f, 0.0f, OBJ_SCENERY_101 }, { -64349.1f, -114.0f, 360.0f, 0.0f, OBJ_SCENERY_101 }, + { -66149.3f, -115.0f, 270.0f, 0.0f, OBJ_SCENERY_101 }, { -67950.3f, -115.0f, 180.0f, 0.0f, OBJ_SCENERY_101 }, + { -69751.2f, -115.0f, 90.0f, 0.0f, OBJ_SCENERY_101 }, { -71551.2f, -115.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -73351.0f, -116.0f, 0.0f, 0.0f, OBJ_SCENERY_96 }, { -75139.2f, -273.0f, 0.0f, 10.0f, OBJ_SCENERY_94 }, + { -76912.4f, -587.0f, 0.0f, 10.0f, OBJ_SCENERY_95 }, { -78702.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -80502.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -82302.2f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -84102.0f, -743.0f, 0.0f, 0.0f, OBJ_SCENERY_95 }, { -85890.6f, -586.0f, 0.0f, 350.0f, OBJ_SCENERY_96 }, + { -87679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -89479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -91279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -93079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -94879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -96680.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -98480.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -100280.0f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -102079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -103879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -105679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -107479.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -109279.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -111079.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, + { -112879.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_94 }, { -114679.9f, -431.0f, 0.0f, 0.0f, OBJ_SCENERY_104 }, + { -116453.5f, -118.0f, 0.0f, 350.0f, OBJ_SCENERY_98 }, { -118188.5f, 346.0f, 0.0f, 340.0f, OBJ_SCENERY_98 }, + { -119815.5f, 1105.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -121374.3f, 2005.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -122933.3f, 2905.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -124491.9f, 3806.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -126051.4f, 4707.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -127609.9f, 5607.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -129168.9f, 6507.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -130728.1f, 7408.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -132287.2f, 8308.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -133846.4f, 9208.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -135405.4f, 10109.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -136964.0f, 11009.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -138522.9f, 11909.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, { -140082.1f, 12810.0f, 0.0f, 330.0f, OBJ_SCENERY_97 }, + { -507035.0f, -489.0f, 0.0f, 0.0f, OBJ_SCENERY_97 }, { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }, }; static UnkStruct_D_i5_801B8E50 D_i5_801BA138[8] = { @@ -1782,10 +1798,10 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { if (sp28 >= 180.0f) { sp28 -= 360.0f; } - if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_80_104) { + if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_SCENERY_104) { sp38 = 0.0f; } - if (D_i5_801B8E50[var_a0].unk_10 == OBJ_80_104) { + if (D_i5_801B8E50[var_a0].unk_10 == OBJ_SCENERY_104) { sp28 = 0.0f; } actor->fwork[arg3 + 16] = var_a0; @@ -1818,10 +1834,10 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { if (sp28 >= 180.0f) { sp28 -= 360.0f; } - if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_80_104) { + if (D_i5_801B8E50[var_a0 - 1].unk_10 == OBJ_SCENERY_104) { sp38 = 0.0f; } - if (D_i5_801B8E50[var_a0].unk_10 == OBJ_80_104) { + if (D_i5_801B8E50[var_a0].unk_10 == OBJ_SCENERY_104) { sp28 = 0.0f; } actor->fwork[arg3 + 16] = var_a0; @@ -1835,13 +1851,13 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { } sp24 = 1.0f - ((sp2C - arg1) / (sp2C - sp3C)); - if ((sp4C == OBJ_80_95) || (sp4C == OBJ_80_96) || (sp4C == OBJ_80_98) || (sp4C == OBJ_80_99)) { + if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_96) || (sp4C == OBJ_SCENERY_98) || (sp4C == OBJ_SCENERY_99)) { if ((actor->iwork[5] < (s32) D_i5_801BA1E4) && (actor->iwork[5] < D_MA_801BE2F0[3])) { actor->vel.z *= 0.98f; } temp_fv0 = fabsf((sp2C - sp3C) / 3.0f); if (sp24 < 0.3333333f) { - if ((sp4C == OBJ_80_95) || (sp4C == OBJ_80_98)) { + if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - (52.160667f * (1.0f - (((sp3C - temp_fv0) - arg1) / ((sp3C - temp_fv0) - sp3C)))); } else { @@ -1849,12 +1865,12 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { (52.160667f * (1.0f - (((sp3C - temp_fv0) - arg1) / ((sp3C - temp_fv0) - sp3C)))); } } else if (sp24 < 0.666666f) { - if ((sp4C == OBJ_80_95) || (sp4C == OBJ_80_98)) { + if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - 52.160667f; } else { actor->fwork[19] = ((sp34 - sp44) * sp24) + sp44 + 52.160667f; } - } else if ((sp4C == OBJ_80_95) || (sp4C == OBJ_80_98)) { + } else if ((sp4C == OBJ_SCENERY_95) || (sp4C == OBJ_SCENERY_98)) { actor->fwork[19] = (((sp34 - sp44) * sp24) + sp44) - (52.160667f * (1.0f - (1.0f - ((sp2C - arg1) / (sp2C - (sp3C - (temp_fv0 * 2))))))); } else { @@ -1862,7 +1878,7 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { (52.160667f * (1.0f - (1.0f - ((sp2C - arg1) / (sp2C - (sp3C - (temp_fv0 * 2))))))); } } else { - if (sp4C == OBJ_80_104) { + if (sp4C == OBJ_SCENERY_104) { if ((actor->iwork[5] < (s32) D_i5_801BA1E4) && (actor->iwork[5] < D_MA_801BE2F0[3])) { actor->vel.z *= 0.94f; } @@ -1870,9 +1886,9 @@ bool Macbeth_801A0308(Actor* actor, f32 arg1, f32 arg2, u8 arg3) { actor->fwork[19] = ((sp34 - sp44) * sp24) + sp44; } actor->fwork[5] = ((sp30 - sp40) * sp24) + sp40; - if ((sp4C == OBJ_80_100) || (sp4C == OBJ_80_102)) { + if ((sp4C == OBJ_SCENERY_100) || (sp4C == OBJ_SCENERY_102)) { Math_SmoothStepToF(&actor->fwork[9], 3.0f, 0.05f, 1.0f, 0.001f); - } else if ((sp4C == OBJ_80_101) || (sp4C == OBJ_80_103)) { + } else if ((sp4C == OBJ_SCENERY_101) || (sp4C == OBJ_SCENERY_103)) { Math_SmoothStepToF(&actor->fwork[9], -3.0f, 0.05f, 1.0f, 0.001f); } else { Math_SmoothStepToF(&actor->fwork[9], 0.0f, 0.05f, 1.0f, 0.0f); @@ -1919,54 +1935,54 @@ bool Macbeth_801A0B20(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Macbeth_801A0BD8(Object_80* obj80) { - switch (obj80->state) { +void Macbeth_801A0BD8(Scenery* scenery) { + switch (scenery->state) { case 0: - obj80->vel.y = 0.0f; - obj80->vel.x = 0.0f; + scenery->vel.y = 0.0f; + scenery->vel.x = 0.0f; if (D_i5_801BE312 != 0) { - obj80->state = 1; - obj80->timer_4C = 20; + scenery->state = 1; + scenery->timer_4C = 20; } break; case 1: - if (obj80->timer_4C == 1) { + if (scenery->timer_4C == 1) { AUDIO_PLAY_SFX(0x01004024, gPlayer[0].sfxSource, 0); } - if (obj80->timer_4C <= 0) { - Math_SmoothStepToF(&obj80->vel.x, 1751.0f, 0.2f, 80.0f, 1.0f); - if (obj80->vel.x >= 1750.0) { - AUDIO_PLAY_SFX(0x1940807B, obj80->sfxSource, 0); + if (scenery->timer_4C <= 0) { + Math_SmoothStepToF(&scenery->vel.x, 1751.0f, 0.2f, 80.0f, 1.0f); + if (scenery->vel.x >= 1750.0) { + AUDIO_PLAY_SFX(0x1940807B, scenery->sfxSource, 0); Audio_KillSfxBySourceAndId(gPlayer[0].sfxSource, 0x01004024); - obj80->timer_4C = 5; - obj80->state = 2; + scenery->timer_4C = 5; + scenery->state = 2; } } break; case 2: - Math_SmoothStepToF(&obj80->vel.y, -11.0f, 0.1f, 2.5f, 0.01f); - if (obj80->vel.y <= -10.0f) { - obj80->state = 3; + Math_SmoothStepToF(&scenery->vel.y, -11.0f, 0.1f, 2.5f, 0.01f); + if (scenery->vel.y <= -10.0f) { + scenery->state = 3; } break; case 3: break; } - if (obj80->timer_4C != 0) { - obj80->vel.z = 2.0f + RAND_FLOAT(1.0f); + if (scenery->timer_4C != 0) { + scenery->vel.z = 2.0f + RAND_FLOAT(1.0f); } else { - obj80->vel.z = 1.0f + RAND_FLOAT(1.0f); + scenery->vel.z = 1.0f + RAND_FLOAT(1.0f); } } bool Macbeth_801A0DD8(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { - Object_80* obj80 = (Object_80*) data; + Scenery* scenery = (Scenery*) data; if (limbIndex == 5) { - rot->y += obj80->vel.y; + rot->y += scenery->vel.y; } if ((limbIndex == 1) || (limbIndex == 2)) { - pos->z -= obj80->vel.x; + pos->z -= scenery->vel.x; } return false; } @@ -2278,49 +2294,50 @@ void Macbeth_801A12C4(Actor* actor) { } } -void Macbeth_801A23AC(Object_80* obj80) { +void Macbeth_801A23AC(Scenery* scenery) { Vec3f sp78[50]; RCP_SetupDL(&gMasterDisp, 0x39); - switch (obj80->obj.id) { - case OBJ_80_94: - case OBJ_80_97: + switch (scenery->obj.id) { + case OBJ_SCENERY_94: + case OBJ_SCENERY_97: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && - ((gPlayer[0].unk_138 - obj80->obj.pos.z) < -2500.0f)) { - Object_Kill(&obj80->obj, obj80->sfxSource); + ((gPlayer[0].unk_138 - scenery->obj.pos.z) < -2500.0f)) { + Object_Kill(&scenery->obj, scenery->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_6026860); break; - case OBJ_80_95: - case OBJ_80_98: + case OBJ_SCENERY_95: + case OBJ_SCENERY_98: if ((gPlayer[0].state_1C8 != PLAYERSTATE_1C8_LEVEL_COMPLETE) && - ((gPlayer[0].unk_138 - obj80->obj.pos.z) < -2500.0f)) { - Object_Kill(&obj80->obj, obj80->sfxSource); + ((gPlayer[0].unk_138 - scenery->obj.pos.z) < -2500.0f)) { + Object_Kill(&scenery->obj, scenery->sfxSource); } gSPDisplayList(gMasterDisp++, D_MA_602FBF0); break; - case OBJ_80_96: - case OBJ_80_99: + case OBJ_SCENERY_96: + case OBJ_SCENERY_99: gSPDisplayList(gMasterDisp++, D_MA_6022610); break; - case OBJ_80_100: - case OBJ_80_102: + case OBJ_SCENERY_100: + case OBJ_SCENERY_102: gSPDisplayList(gMasterDisp++, D_MA_60309D0); break; - case OBJ_80_101: - case OBJ_80_103: + case OBJ_SCENERY_101: + case OBJ_SCENERY_103: gSPDisplayList(gMasterDisp++, D_MA_6030750); break; - case OBJ_80_105: + case OBJ_SCENERY_105: RCP_SetupDL(&gMasterDisp, 0x1D); gSPDisplayList(gMasterDisp++, D_MA_602D380); break; - case OBJ_80_104: + case OBJ_SCENERY_104: Matrix_Push(&gGfxMatrix); Animation_GetFrameData(&D_MA_6025CA0, 0, sp78); - Animation_DrawSkeleton(1, D_MA_6025DAC, sp78, Macbeth_801A0DD8, Macbeth_801A0E2C, obj80, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_MA_6025DAC, sp78, Macbeth_801A0DD8, Macbeth_801A0E2C, scenery, + &gIdentityMatrix); Matrix_Pop(&gGfxMatrix); - if ((obj80->state == 1) && (obj80->timer_4C <= 0)) { + if ((scenery->state == 1) && (scenery->timer_4C <= 0)) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2328,7 +2345,7 @@ void Macbeth_801A23AC(Object_80* obj80) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[0].x, D_i5_801BE688[0].y + 50.0f, D_i5_801BE688[0].z + 100.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); Matrix_Pop(&gGfxMatrix); @@ -2336,12 +2353,12 @@ void Macbeth_801A23AC(Object_80* obj80) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x, D_i5_801BE688[1].y + 50.0f, D_i5_801BE688[1].z + 100.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x1D); Matrix_Pop(&gGfxMatrix); - } else if (obj80->state == 2) { + } else if (scenery->state == 2) { Matrix_Push(&gGfxMatrix); RCP_SetupDL_49(); gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, 255, 255, 255, 255); @@ -2349,7 +2366,7 @@ void Macbeth_801A23AC(Object_80* obj80) { Matrix_Translate(gGfxMatrix, D_i5_801BE688[1].x - 50.0f, D_i5_801BE688[1].y + 50.0f, D_i5_801BE688[1].z + 50.0f, MTXF_APPLY); Matrix_RotateX(gCalcMatrix, (D_PI / 2), MTXF_APPLY); - Matrix_Scale(gGfxMatrix, obj80->vel.z, obj80->vel.z / 2, obj80->vel.z, MTXF_APPLY); + Matrix_Scale(gGfxMatrix, scenery->vel.z, scenery->vel.z / 2, scenery->vel.z, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, D_1024AC0); RCP_SetupDL(&gMasterDisp, 0x1D); @@ -2370,17 +2387,17 @@ void Macbeth_801A23AC(Object_80* obj80) { Matrix_Pop(&gGfxMatrix); } break; - case OBJ_80_92: + case OBJ_SCENERY_92: gSPDisplayList(gMasterDisp++, D_MA_60014A0); break; - case OBJ_80_93: + case OBJ_SCENERY_93: gSPDisplayList(gMasterDisp++, D_MA_6001180); break; } RCP_SetupDL(&gMasterDisp, 0x1D); } -void Macbeth_801A2A78(Object_80* obj80) { +void Macbeth_801A2A78(Scenery* scenery) { RCP_SetupDL(&gMasterDisp, 0x39); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); gSPDisplayList(gMasterDisp++, D_MA_60253E0); @@ -2389,83 +2406,83 @@ void Macbeth_801A2A78(Object_80* obj80) { RCP_SetupDL(&gMasterDisp, 0x1D); } -void Macbeth_801A2B24(Object_80* obj80) { +void Macbeth_801A2B24(Scenery* scenery) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_LEVEL_COMPLETE) { - Object_Kill(&obj80->obj, obj80->sfxSource); + Object_Kill(&scenery->obj, scenery->sfxSource); } RCP_SetupDL(&gMasterDisp, 0x39); - switch (obj80->obj.id) { - case OBJ_80_77: + switch (scenery->obj.id) { + case OBJ_SCENERY_77: gSPDisplayList(gMasterDisp++, D_MA_60066A0); break; - case OBJ_80_78: + case OBJ_SCENERY_78: gSPDisplayList(gMasterDisp++, D_MA_6007430); break; - case OBJ_80_79: + case OBJ_SCENERY_79: gSPDisplayList(gMasterDisp++, D_MA_6007360); break; - case OBJ_80_80: + case OBJ_SCENERY_80: gSPDisplayList(gMasterDisp++, D_MA_6007290); break; - case OBJ_80_81: + case OBJ_SCENERY_81: gSPDisplayList(gMasterDisp++, D_MA_60071C0); break; - case OBJ_80_82: + case OBJ_SCENERY_82: gSPDisplayList(gMasterDisp++, D_MA_6007500); break; - case OBJ_80_84: + case OBJ_SCENERY_84: gSPDisplayList(gMasterDisp++, D_MA_600AD50); break; - case OBJ_80_85: + case OBJ_SCENERY_85: gSPDisplayList(gMasterDisp++, D_MA_600AA70); break; - case OBJ_80_86: + case OBJ_SCENERY_86: gSPDisplayList(gMasterDisp++, D_MA_6003070); break; - case OBJ_80_87: + case OBJ_SCENERY_87: gSPDisplayList(gMasterDisp++, D_MA_600A7D0); break; - case OBJ_80_88: + case OBJ_SCENERY_88: gSPDisplayList(gMasterDisp++, D_MA_600A4D0); break; - case OBJ_80_89: + case OBJ_SCENERY_89: gSPDisplayList(gMasterDisp++, D_MA_600A1F0); break; - case OBJ_80_90: + case OBJ_SCENERY_90: gSPDisplayList(gMasterDisp++, D_MA_6009F10); break; - case OBJ_80_91: + case OBJ_SCENERY_91: gSPDisplayList(gMasterDisp++, D_MA_6009C50); break; } RCP_SetupDL(&gMasterDisp, 0x1D); } -void Macbeth_801A2DD8(Object_80* obj80) { +void Macbeth_801A2DD8(Scenery* scenery) { s16 i; - switch (obj80->state) { + switch (scenery->state) { case 0: - if ((D_i5_801BE312 != 0) && (gActors[D_i5_801BE314].obj.pos.z - 900.0f < obj80->obj.pos.z)) { - obj80->state = 1; + if ((D_i5_801BE312 != 0) && (gActors[D_i5_801BE314].obj.pos.z - 900.0f < scenery->obj.pos.z)) { + scenery->state = 1; } break; case 1: - func_effect_8007A6F0(&obj80->obj.pos, 0x2903B009); + func_effect_8007A6F0(&scenery->obj.pos, 0x2903B009); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 15; for (i = 0; i < 6; i++) { - func_effect_8007D2C8(obj80->obj.pos.x + D_i5_801BE6A0[i].x, obj80->obj.pos.y + D_i5_801BE6A0[i].y, - obj80->obj.pos.z + D_i5_801BE6A0[i].z, 18.0f); - Macbeth_801AD624(obj80->obj.pos.x + D_i5_801BE6A0[i].x, obj80->obj.pos.y + D_i5_801BE6A0[i].y, - obj80->obj.pos.z + D_i5_801BE6A0[i].z, RAND_FLOAT_CENTERED(30.0f), - RAND_FLOAT(30.0f) + 30.0f, RAND_FLOAT(-50.0f), - obj80->obj.rot.x + D_i5_801BE6A0[i + 6].x, obj80->obj.rot.y + D_i5_801BE6A0[i + 6].y, - obj80->obj.rot.z + D_i5_801BE6A0[i + 6].z, RAND_FLOAT_CENTERED(5.0f), - RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), - (s32) (RAND_FLOAT(50.0f) + 70.0f), i + 12, 1.0f); + func_effect_8007D2C8(scenery->obj.pos.x + D_i5_801BE6A0[i].x, scenery->obj.pos.y + D_i5_801BE6A0[i].y, + scenery->obj.pos.z + D_i5_801BE6A0[i].z, 18.0f); + Macbeth_801AD624( + scenery->obj.pos.x + D_i5_801BE6A0[i].x, scenery->obj.pos.y + D_i5_801BE6A0[i].y, + scenery->obj.pos.z + D_i5_801BE6A0[i].z, RAND_FLOAT_CENTERED(30.0f), RAND_FLOAT(30.0f) + 30.0f, + RAND_FLOAT(-50.0f), scenery->obj.rot.x + D_i5_801BE6A0[i + 6].x, + scenery->obj.rot.y + D_i5_801BE6A0[i + 6].y, scenery->obj.rot.z + D_i5_801BE6A0[i + 6].z, + RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), RAND_FLOAT_CENTERED(5.0f), + (s32) (RAND_FLOAT(50.0f) + 70.0f), i + 12, 1.0f); } - Object_Kill(&obj80->obj, obj80->sfxSource); + Object_Kill(&scenery->obj, scenery->sfxSource); break; } } @@ -2503,13 +2520,13 @@ void Macbeth_801A30B8(s32 limbIndex, Vec3f* rot, void* data) { } } -void Macbeth_801A3240(Object_80* obj80) { +void Macbeth_801A3240(Scenery* scenery) { Vec3f sp38[50]; RCP_SetupDL(&gMasterDisp, 0x1D); gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); Animation_GetFrameData(&D_MA_600C4D0, 0, sp38); - Animation_DrawSkeleton(1, D_MA_600C65C, sp38, NULL, Macbeth_801A30B8, obj80, &gIdentityMatrix); + Animation_DrawSkeleton(1, D_MA_600C65C, sp38, NULL, Macbeth_801A30B8, scenery, &gIdentityMatrix); gSPSetGeometryMode(gMasterDisp++, G_CULL_BACK); } @@ -2547,15 +2564,15 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { if (var_v1 != D_MA_801BE250[6]) { D_MA_801BE250[7] = arg2; switch (D_i5_801B8E50[var_v1 - 1].unk_10) { - case OBJ_80_94: - case OBJ_80_100: - case OBJ_80_101: + case OBJ_SCENERY_94: + case OBJ_SCENERY_100: + case OBJ_SCENERY_101: D_MA_801BE250[8] = 0.0f; break; - case OBJ_80_95: + case OBJ_SCENERY_95: D_MA_801BE250[8] = -10.0f; break; - case OBJ_80_96: + case OBJ_SCENERY_96: D_MA_801BE250[8] = 10.0f; break; } @@ -2569,10 +2586,11 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { sp2C = 1.0f - ((sp30 - arg1) / (sp30 - temp_ft4)); - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_96) || (temp_a0 == OBJ_80_98) || (temp_a0 == OBJ_80_99)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_96) || (temp_a0 == OBJ_SCENERY_98) || + (temp_a0 == OBJ_SCENERY_99)) { temp_fv0_2 = fabsf((sp30 - temp_ft4) / 3.0f); if (sp2C < 0.3333333f) { - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); @@ -2582,12 +2600,12 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); } } else if (sp2C < 0.666666f) { - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - 52.160667f; } else { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0 + 52.160667f); } - } else if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + } else if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[9] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (1.0f - ((sp30 - arg1) / (sp30 - (temp_ft4 - (temp_fv0_2 * 2))))))); @@ -2600,9 +2618,9 @@ bool Macbeth_801A3300(Player* player, f32 arg1, f32 arg2) { D_MA_801BE250[9] = ((sp38 - temp_fa0) * sp2C) + temp_fa0; } D_MA_801BE250[2] = (((sp34 - sp40) * sp2C) + sp40); - if ((temp_a0 == 100) || (temp_a0 == OBJ_80_102)) { + if ((temp_a0 == 100) || (temp_a0 == OBJ_SCENERY_102)) { Math_SmoothStepToF(&D_MA_801BE250[3], 3.0f, 0.05f, 1.0f, 0.0f); - } else if ((temp_a0 == OBJ_80_101) || (temp_a0 == OBJ_80_103)) { + } else if ((temp_a0 == OBJ_SCENERY_101) || (temp_a0 == OBJ_SCENERY_103)) { Math_SmoothStepToF(&D_MA_801BE250[3], -3.0f, 0.05f, 1.0f, 0.0f); } else { Math_SmoothStepToF(&D_MA_801BE250[3], 0.0f, 0.05f, 1.0f, 0.0f); @@ -2646,15 +2664,15 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { if (var_v1 != D_MA_801BE250[16]) { D_MA_801BE250[17] = arg2; switch (D_i5_801B9A80[var_v1 - 1].unk_10) { - case OBJ_80_97: - case OBJ_80_100: - case OBJ_80_101: + case OBJ_SCENERY_97: + case OBJ_SCENERY_100: + case OBJ_SCENERY_101: D_MA_801BE250[18] = 0.0f; break; - case OBJ_80_98: + case OBJ_SCENERY_98: D_MA_801BE250[18] = -10.0f; break; - case OBJ_80_99: + case OBJ_SCENERY_99: D_MA_801BE250[18] = 10.0f; break; } @@ -2668,10 +2686,11 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { sp2C = 1.0f - ((sp30 - arg1) / (sp30 - temp_ft4)); - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_96) || (temp_a0 == OBJ_80_98) || (temp_a0 == OBJ_80_99)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_96) || (temp_a0 == OBJ_SCENERY_98) || + (temp_a0 == OBJ_SCENERY_99)) { temp_fv0_2 = fabsf((sp30 - temp_ft4) / 3.0f); if (sp2C < 0.3333333f) { - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); @@ -2681,12 +2700,12 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { (52.160667f * (1.0f - (((temp_ft4 - temp_fv0_2) - arg1) / ((temp_ft4 - temp_fv0_2) - temp_ft4)))); } } else if (sp2C < 0.666666f) { - if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - 52.160667f; } else { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0 + 52.160667f); } - } else if ((temp_a0 == OBJ_80_95) || (temp_a0 == OBJ_80_98)) { + } else if ((temp_a0 == OBJ_SCENERY_95) || (temp_a0 == OBJ_SCENERY_98)) { D_MA_801BE250[19] = (((sp38 - temp_fa0) * sp2C) + temp_fa0) - (52.160667f * (1.0f - (1.0f - ((sp30 - arg1) / (sp30 - (temp_ft4 - (temp_fv0_2 * 2))))))); @@ -2699,9 +2718,9 @@ bool Macbeth_801A3790(Player* player, f32 arg1, f32 arg2) { D_MA_801BE250[19] = ((sp38 - temp_fa0) * sp2C) + temp_fa0; } D_MA_801BE250[12] = (((sp34 - sp40) * sp2C) + sp40); - if ((temp_a0 == OBJ_80_100) || (temp_a0 == OBJ_80_102)) { + if ((temp_a0 == OBJ_SCENERY_100) || (temp_a0 == OBJ_SCENERY_102)) { Math_SmoothStepToF(&D_MA_801BE250[13], 2.0f, 0.05f, 1.0f, 0.0f); - } else if ((temp_a0 == OBJ_80_101) || (temp_a0 == OBJ_80_103)) { + } else if ((temp_a0 == OBJ_SCENERY_101) || (temp_a0 == OBJ_SCENERY_103)) { Math_SmoothStepToF(&D_MA_801BE250[13], -2.0f, 0.05f, 1.0f, 0.0f); } else { Math_SmoothStepToF(&D_MA_801BE250[13], 0.0f, 0.05f, 1.0f, 0.0f); @@ -3115,15 +3134,15 @@ void Macbeth_801A54E8(Actor* actor) { } s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { - Object_80* obj80; + Scenery* scenery; Actor* actor; s32 i; - obj80 = &gObjects80[0]; - for (i = 0; i < ARRAY_COUNT(gObjects80); i++, obj80++) { - if ((obj80->obj.status == OBJ_ACTIVE) && (obj80->obj.id != OBJ_80_68) && - (fabsf(arg1->x - obj80->obj.pos.x) < 2000.0f) && (fabsf(arg1->z - obj80->obj.pos.z) < 2000.0f) && - (Object_CheckHitboxCollision(arg1, obj80->info.hitbox, &obj80->obj, 0.0f, 0.0f, 0.0f) != 0)) { + scenery = &gScenery[0]; + for (i = 0; i < ARRAY_COUNT(gScenery); i++, scenery++) { + if ((scenery->obj.status == OBJ_ACTIVE) && (scenery->obj.id != OBJ_SCENERY_68) && + (fabsf(arg1->x - scenery->obj.pos.x) < 2000.0f) && (fabsf(arg1->z - scenery->obj.pos.z) < 2000.0f) && + (Object_CheckHitboxCollision(arg1, scenery->info.hitbox, &scenery->obj, 0.0f, 0.0f, 0.0f) != 0)) { return i + 10; } } @@ -3135,9 +3154,9 @@ s32 Macbeth_801A55D4(s32 arg0, Vec3f* arg1, Vec3f* arg2, s32 arg3) { (actor->timer_0C2 == 0) && (Object_CheckSingleHitbox(arg1, actor->info.hitbox, &actor->obj.pos) != 0)) { actor->unk_0D0 = 1; actor->unk_0D2 = -1; - actor->unk_0D8.x = arg1->x; - actor->unk_0D8.y = arg1->y; - actor->unk_0D8.z = arg1->z; + actor->hitPos.x = arg1->x; + actor->hitPos.y = arg1->y; + actor->hitPos.z = arg1->z; return 1; } } @@ -3184,11 +3203,11 @@ void Macbeth_801A57D0(Effect* effect) { } } - if (effect->obj.pos.y < gGroundLevel) { + if (effect->obj.pos.y < gGroundHeight) { Macbeth_801ADCEC(effect->obj.pos.x, effect->obj.pos.y, effect->obj.pos.z, 999.9f, -10.0f, 5.0f); Object_Kill(&effect->obj, effect->sfxSource); if (gGroundType != GROUNDTYPE_WATER) { - effect->obj.pos.y = gGroundLevel; + effect->obj.pos.y = gGroundHeight; } } sp38.x = effect->vel.x; @@ -3231,7 +3250,7 @@ void Macbeth_801A5B4C(Effect* effect) { } Object_Kill(&effect->obj, effect->sfxSource); } - if (effect->obj.pos.y < (gGroundLevel - 100.0f)) { + if (effect->obj.pos.y < (gGroundHeight - 100.0f)) { Object_Kill(&effect->obj, effect->sfxSource); } @@ -3360,23 +3379,23 @@ void Macbeth_801A6540(Actor* actor) { RCP_SetupDL(&gMasterDisp, 0x1D); } -void Macbeth_801A65E0(Object_80* obj80) { - obj80->vel.x = obj80->obj.pos.x; - obj80->vel.y = obj80->obj.pos.y; - obj80->vel.z = obj80->obj.rot.z; - obj80->obj.rot.z = 0.0f; +void Macbeth_801A65E0(Scenery* scenery) { + scenery->vel.x = scenery->obj.pos.x; + scenery->vel.y = scenery->obj.pos.y; + scenery->vel.z = scenery->obj.rot.z; + scenery->obj.rot.z = 0.0f; } -void Macbeth_801A6608(Object_80* obj80) { - if ((gPlayer[0].unk_138 - obj80->obj.pos.z) < obj80->vel.z) { +void Macbeth_801A6608(Scenery* scenery) { + if ((gPlayer[0].unk_138 - scenery->obj.pos.z) < scenery->vel.z) { if (gPlayState != PLAY_PAUSE) { - Math_SmoothStepToF(&obj80->vel.x, 30, 0.5f, 30.0f, 0.0f); - if (obj80->vel.x < 31.0f) { - obj80->vel.x = 255.0f; + Math_SmoothStepToF(&scenery->vel.x, 30, 0.5f, 30.0f, 0.0f); + if (scenery->vel.x < 31.0f) { + scenery->vel.x = 255.0f; } } RCP_SetupDL(&gMasterDisp, 0x22); - gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, obj80->vel.x, 0, 0, 255); + gDPSetPrimColor(gMasterDisp++, 0x00, 0x00, scenery->vel.x, 0, 0, 255); } gSPDisplayList(gMasterDisp++, D_MA_6010700); RCP_SetupDL(&gMasterDisp, 0x1D); @@ -3756,7 +3775,7 @@ void Macbeth_801A7D98(Actor* actor) { D_i5_801BE320[29] = 250; D_i5_801BE320[9] = 200; D_i5_801BE320[10] = 250; - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); D_i5_801BE320[14] = 0; D_i5_801BE320[15] = 0; gBossFrameCount = 0; @@ -3970,7 +3989,7 @@ void Macbeth_801A7E7C(Actor* actor) { AUDIO_PLAY_SFX(0x2902405E, actor->sfxSource, 4); } } else { - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); if ((gPlayer[0].pos.y + 1200.0f) < actor->obj.pos.y) { actor->info.hitbox = SEGMENTED_TO_VIRTUAL(D_MA_603677C); D_i5_801BE320[3] = 0; @@ -4899,7 +4918,7 @@ void Macbeth_801AC6B4(Actor* actor) { static f32 D_i5_801BA768 = 0.0f; -void Macbeth_801AC754(Player* player) { +void Macbeth_LevelStart(Player* player) { f32 sp4C; f32 sp48; f32 sp44; @@ -4991,7 +5010,7 @@ void Macbeth_801AC754(Player* player) { break; case 3: AUDIO_PLAY_BGM(SEQ_ID_MACBETH | SEQ_FLAG); - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; player->unk_0D4 = 3.0f; @@ -5187,12 +5206,12 @@ void Macbeth_801AD6F0(Actor* actor) { case 0: if ((actor->timer_0BC == 0) && ((actor->vel.y -= 0.5f, (Object_CheckCollision(actor->index, &actor->obj.pos, &sp4C, 1) != 0)) || - (actor->obj.pos.y < (gGroundLevel + 10.0f)) || (actor->iwork[0] != 0))) { + (actor->obj.pos.y < (gGroundHeight + 10.0f)) || (actor->iwork[0] != 0))) { actor->vel.x = 0.0f; actor->vel.y = 0.0f; actor->vel.z = 0.0f; - if (actor->obj.pos.y < (gGroundLevel + 10.0f)) { - actor->obj.pos.y = gGroundLevel; + if (actor->obj.pos.y < (gGroundHeight + 10.0f)) { + actor->obj.pos.y = gGroundHeight; } actor->state = 1; actor->timer_0BC = 200; @@ -5203,7 +5222,7 @@ void Macbeth_801AD6F0(Actor* actor) { func_effect_8007D0E0(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 7.0f); func_effect_8007BFFC(actor->obj.pos.x, actor->obj.pos.y + 30.0f, actor->obj.pos.z, 0.0f, 0.0f, 0.0f, 4.0f, 5); - if (actor->obj.pos.y < (gGroundLevel + 10.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 10.0f)) { func_beam_800365E4(actor->obj.pos.x, 3.0f, actor->obj.pos.z, actor->obj.pos.x, actor->obj.pos.z, 0.0f, 0.0f, 90.0f, 5.0f, 0, 0); } @@ -5326,19 +5345,19 @@ void Macbeth_801ADD68(Actor* actor) { } } if ((Object_CheckCollision(actor->index, &actor->obj.pos, &sp3C, 1) != 0) || - (actor->obj.pos.y < (gGroundLevel + 200.0f))) { + (actor->obj.pos.y < (gGroundHeight + 200.0f))) { AUDIO_PLAY_SFX(0x19032064, actor->sfxSource, 4); gControllerRumbleFlags[gMainController] = 1; gControllerRumbleTimers[gMainController] = 5; actor->vel.x = 0.0f; actor->vel.y = 0.0f; actor->vel.z = 0.0f; - if (actor->obj.pos.y < gGroundLevel + 200.0f) { - actor->obj.pos.y = gGroundLevel + 200.0f; + if (actor->obj.pos.y < gGroundHeight + 200.0f) { + actor->obj.pos.y = gGroundHeight + 200.0f; } actor->state = 1; } - if (actor->obj.pos.y < (gGroundLevel + 800.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 800.0f)) { if (actor->iwork[0] > 10) { actor->iwork[0] -= 10; } else if (actor->iwork[0] > 0) { @@ -5556,12 +5575,12 @@ void Macbeth_801AEC04(Actor* actor) { switch (actor->state) { case 0: actor->vel.y -= 0.5f; - if (actor->obj.pos.y < (gGroundLevel + 35.0f)) { + if (actor->obj.pos.y < (gGroundHeight + 35.0f)) { actor->vel.x = 0.0f; actor->vel.y = 0.0f; actor->vel.z = 0.0f; - if (actor->obj.pos.y < gGroundLevel + 35.0f) { - actor->obj.pos.y = gGroundLevel + 35.0f; + if (actor->obj.pos.y < gGroundHeight + 35.0f) { + actor->obj.pos.y = gGroundHeight + 35.0f; } actor->state = 1; actor->timer_0BC = 200; @@ -5789,7 +5808,7 @@ static f32 D_i5_801BA890 = 100.0f; // unused? static f32 D_i5_801BA894[5] = { 200.0f, 250.0f, 220.0f, 0.0f, 200.0f }; static f32 D_i5_801BA8A8[3] = { 230.0f, 220.0f, 350.0f }; // unused? -void Macbeth_801AF8F4(Player* player) { +void Macbeth_LevelComplete2(Player* player) { s32 i; s32 j; Vec3f spE4; @@ -6213,9 +6232,9 @@ void Macbeth_801AF8F4(Player* player) { D_ctx_80177A48[3] = D_ctx_80177A48[6] = D_ctx_80177A48[7] = D_ctx_80177A48[8] = 0.0f; player->unk_1D4 = 1; player->unk_1F4 = 0; - player->pos.y = gGroundLevel - 3.0f; + player->pos.y = gGroundHeight - 3.0f; player->vel.y = -3.0f; - player->unk_1DC = player->unk_2B4 = player->unk_2BC = player->unk_184 = player->unk_108 = + player->unk_1DC = player->boostCooldown = player->boostMeter = player->unk_184 = player->unk_108 = player->unk_10C = player->unk_0E8 = player->unk_0E4 = player->unk_104 = 0.0f; player->timer_1E0 = player->sfx.bank = 0; } @@ -6379,17 +6398,17 @@ void Macbeth_801AF8F4(Player* player) { break; case 1810: Object_Kill(&gActors[8].obj, gActors[8].sfxSource); - gOverlayStage = 1; + gSceneSetup = 1; break; case 1817: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1960: Macbeth_801AF27C(&gActors[3], 3); - gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + gActors[3].info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); break; case 2017: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 2040: gActors[5].state++; @@ -6439,7 +6458,7 @@ void Macbeth_801AF8F4(Player* player) { gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - D_ctx_8017837C = 4; + gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; @@ -6696,9 +6715,9 @@ void Macbeth_801B38E0(void) { } for (i = 0; i < 50; i++) { - if (gObjects80[i].obj.id <= OBJ_80_91 || gObjects80[i].obj.id >= OBJ_80_97) { - Object_Kill(&gObjects80[i].obj, gObjects80[i].sfxSource); - Object_80_Initialize(&gObjects80[i]); + if (gScenery[i].obj.id <= OBJ_SCENERY_91 || gScenery[i].obj.id >= OBJ_SCENERY_97) { + Object_Kill(&gScenery[i].obj, gScenery[i].sfxSource); + Scenery_Initialize(&gScenery[i]); } } @@ -6749,7 +6768,7 @@ void Macbeth_801B38E0(void) { } } -void Macbeth_801B3D04(Player* player) { +void Macbeth_LevelComplete1(Player* player) { f32 zeroVar = 0.0f; gCsCamEyeX = player->pos.x; @@ -6883,10 +6902,10 @@ void Macbeth_801B3D04(Player* player) { } switch (gCsFrameCount) { case 755: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1025: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 50: AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); @@ -6981,7 +7000,7 @@ void Macbeth_801B3D04(Player* player) { } /* fallthrough */ case 1195: - gOverlayStage = 1; + gSceneSetup = 1; break; case 1200: Macbeth_801B3554(&gActors[3], 3); @@ -7008,7 +7027,7 @@ void Macbeth_801B3D04(Player* player) { gFillScreenAlphaTarget = 255; if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - D_ctx_8017837C = 4; + gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_MACBETH] = Play_CheckMedalStatus(150) + 1; diff --git a/src/overlays/ovl_i5/fox_ti.c b/src/overlays/ovl_i5/fox_ti.c index 0a0e8203..7ff65057 100644 --- a/src/overlays/ovl_i5/fox_ti.c +++ b/src/overlays/ovl_i5/fox_ti.c @@ -360,7 +360,7 @@ void Titania_80189CC8(Actor* actor) { if (actor->health <= 0) { actor->health = 0; AUDIO_PLAY_SFX(0x2903A008, actor->sfxSource, 4); - actor->timer_0CA[0] = actor->itemDrop = 0; + actor->lockOnTimers[0] = actor->itemDrop = 0; actor->info.unk_1C = 0.0f; Actor_Despawn(actor); actor->info.bonus = 0; @@ -866,7 +866,7 @@ void Titania_8018B268(Actor* actor) { Animation_DrawSkeleton(0, D_TI1_700D700, actor->vwork, Titania_8018AFD4, Titania_8018B1B4, actor, &gIdentityMatrix); func_effect_8007D2C8(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z, 10.0f); - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.unk_1C = 0.0f; } } @@ -1020,7 +1020,7 @@ void Titania_8018B9D0(Actor* actor) { if (actor->unk_0D0 == 1) { AUDIO_PLAY_SFX(0x19020008, actor->sfxSource, 4); - sp44 = actor->obj.pos.x - actor->unk_0D8.x; + sp44 = actor->obj.pos.x - actor->hitPos.x; sp40 = fabsf(sp44); actor->unk_0D0 = 0; actor->state = 1; @@ -1679,7 +1679,7 @@ void Titania_8018C8A8(Actor* actor) { if (actor->health > 0) { actor->info.unk_1C = actor->fwork[27]; } else { - actor->timer_0CA[0] = 0; + actor->lockOnTimers[0] = 0; actor->info.unk_1C = 0.0f; } actor->unk_0D0 = 0; @@ -1882,7 +1882,7 @@ void Titania_8018E5F8(Actor* actor) { if (actor->health <= 0) { BonusText_Display(actor->obj.pos.x, actor->obj.pos.y, actor->obj.pos.z + actor->fwork[27], 2); gHitCount += 2; - actor->timer_0CA[0] = actor->health = actor->itemDrop = 0; + actor->lockOnTimers[0] = actor->health = actor->itemDrop = 0; actor->info.unk_1C = 0.0f; Actor_Despawn(actor); actor->info.bonus = 0; @@ -2005,17 +2005,17 @@ void Titania_Cactus_Update(Sprite* sprite) { } } -void Titania_8018F0D8(Object_80* obj80) { +void Titania_8018F0D8(Scenery* scenery) { - if (obj80->obj.rot.x != 0.0f) { - if (obj80->obj.rot.x >= 10000.0f) { - obj80->unk_44 = 1; - obj80->obj.rot.x -= 10000.0f; + if (scenery->obj.rot.x != 0.0f) { + if (scenery->obj.rot.x >= 10000.0f) { + scenery->unk_44 = 1; + scenery->obj.rot.x -= 10000.0f; } - obj80->vel.y = obj80->obj.rot.x; - obj80->obj.rot.x = 0.0f; + scenery->vel.y = scenery->obj.rot.x; + scenery->obj.rot.x = 0.0f; } - obj80->vel.z = obj80->obj.pos.x; + scenery->vel.z = scenery->obj.pos.x; } static Vec3f D_i5_801B7690 = { 0.0f, 460.0f, 0.0f }; @@ -2028,103 +2028,103 @@ Gfx* D_TI_801B769C[39] = { D_TI2_7004400, D_TI2_7009890, D_TI_8001A80, D_TI_A001DB0, D_TI_A001EC0, D_TI_A001BE0, D_TI2_7004270, }; -void Titania_8018F134(Object_80* obj80) { +void Titania_8018F134(Scenery* scenery) { Vec3f sp7C; Vec3f sp70; f32 i; f32* j = &D_i5_801B7690.x; - switch (obj80->unk_44) { + switch (scenery->unk_44) { case 0: - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); - if ((obj80->obj.rot.y <= 30.0f) || (obj80->obj.rot.y >= 330.0f)) { + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); + if ((scenery->obj.rot.y <= 30.0f) || (scenery->obj.rot.y >= 330.0f)) { for (*j = -80.0f; *j <= 80.0f; *j += 40.0f) { Matrix_MultVec3fNoTranslate(gCalcMatrix, &D_i5_801B7690, &sp70); - func_effect_8007A900(obj80->obj.pos.x + sp70.x, obj80->obj.pos.y + sp70.y, - obj80->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); + func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, + scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); } } else { sp7C.z = 0.0f; sp7C.x = -80.0f; - if (obj80->obj.rot.y > 90.0f) { + if (scenery->obj.rot.y > 90.0f) { sp7C.x = 80.0f; } for (i = 0.0f; i <= 450.0f; i += 50.0f) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); sp7C.y = i; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); - func_effect_8007A900(obj80->obj.pos.x + sp70.x, obj80->obj.pos.y + sp70.y, - obj80->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); + func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, + scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); } } break; case 1: - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_NEW); + Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_NEW); sp7C.z = 0.0f; sp7C.x = 0.0f; for (i = 0.0f; i <= 450.0f; i += 50.0f) { sp7C.y = i; Matrix_MultVec3fNoTranslate(gCalcMatrix, &sp7C, &sp70); - func_effect_8007A900(obj80->obj.pos.x + sp70.x, obj80->obj.pos.y + sp70.y, obj80->obj.pos.z + sp70.z, - 10.0f, 255, 15, 0); + func_effect_8007A900(scenery->obj.pos.x + sp70.x, scenery->obj.pos.y + sp70.y, + scenery->obj.pos.z + sp70.z, 10.0f, 255, 15, 0); } break; } } -void Titania_8018F4D8(Object_80* obj80) { +void Titania_8018F4D8(Scenery* scenery) { f32 temp; - switch (obj80->state) { + switch (scenery->state) { case 0: - temp = gPlayer[0].pos.z - obj80->obj.pos.z; - if ((obj80->vel.y != 0.0f) && (temp < obj80->vel.y)) { - if ((obj80->unk_44 == 1) && (obj80->obj.pos.x < gPlayer[0].pos.x)) { - obj80->unk_44 = 2; + temp = gPlayer[0].pos.z - scenery->obj.pos.z; + if ((scenery->vel.y != 0.0f) && (temp < scenery->vel.y)) { + if ((scenery->unk_44 == 1) && (scenery->obj.pos.x < gPlayer[0].pos.x)) { + scenery->unk_44 = 2; } - obj80->state++; + scenery->state++; } break; case 1: - obj80->state++; + scenery->state++; /* fallthrough */ case 2: - obj80->vel.x += 0.05f; - switch (obj80->unk_44) { + scenery->vel.x += 0.05f; + switch (scenery->unk_44) { case 0: - obj80->obj.rot.x += obj80->vel.x; - if (obj80->obj.rot.x >= 90.0f) { - obj80->obj.rot.x = 90.0f; - obj80->state++; + scenery->obj.rot.x += scenery->vel.x; + if (scenery->obj.rot.x >= 90.0f) { + scenery->obj.rot.x = 90.0f; + scenery->state++; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(obj80); - AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); + Titania_8018F134(scenery); + AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); } break; case 1: - obj80->obj.rot.z += obj80->vel.x; - if (obj80->obj.rot.z >= 90.0f) { - obj80->obj.rot.z = 90.0f; + scenery->obj.rot.z += scenery->vel.x; + if (scenery->obj.rot.z >= 90.0f) { + scenery->obj.rot.z = 90.0f; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(obj80); - AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); - obj80->state++; + Titania_8018F134(scenery); + AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); + scenery->state++; } break; case 2: - obj80->obj.rot.z -= obj80->vel.x; - if (obj80->obj.rot.z <= -90.0f) { - obj80->obj.rot.z = -90.0f; + scenery->obj.rot.z -= scenery->vel.x; + if (scenery->obj.rot.z <= -90.0f) { + scenery->obj.rot.z = -90.0f; gControllerRumbleTimers[0] = 7; gCameraShake = 12; - Titania_8018F134(obj80); - AUDIO_PLAY_SFX(0x19130003, obj80->sfxSource, 4); - obj80->state++; + Titania_8018F134(scenery); + AUDIO_PLAY_SFX(0x19130003, scenery->sfxSource, 4); + scenery->state++; } break; } @@ -2132,25 +2132,25 @@ void Titania_8018F4D8(Object_80* obj80) { case 3: break; } - if (obj80->unk_44 != 0) { - if (obj80->obj.rot.z == 0.0f) { - obj80->obj.pos.x = obj80->vel.z; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006BF0); - } else if (obj80->obj.rot.z > 0.0f) { - obj80->obj.pos.x = obj80->vel.z - 75.0f; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C28); + if (scenery->unk_44 != 0) { + if (scenery->obj.rot.z == 0.0f) { + scenery->obj.pos.x = scenery->vel.z; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006BF0); + } else if (scenery->obj.rot.z > 0.0f) { + scenery->obj.pos.x = scenery->vel.z - 75.0f; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C28); } else { - obj80->obj.pos.x = obj80->vel.z + 75.0f; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C0C); + scenery->obj.pos.x = scenery->vel.z + 75.0f; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_TI_6006C0C); } } } -void Titania_8018F8B8(Object_80* obj80) { +void Titania_8018F8B8(Scenery* scenery) { - switch (obj80->unk_44) { + switch (scenery->unk_44) { case 0: - if (obj80->unk_44 == 0) { + if (scenery->unk_44 == 0) { gSPDisplayList(gMasterDisp++, D_TI1_7002270); } else { gSPDisplayList(gMasterDisp++, D_TI1_7000A80); @@ -2158,8 +2158,8 @@ void Titania_8018F8B8(Object_80* obj80) { break; case 1: case 2: - if (obj80->obj.rot.z != 0.0f) { - if (obj80->obj.rot.z > 0.0f) { + if (scenery->obj.rot.z != 0.0f) { + if (scenery->obj.rot.z > 0.0f) { Matrix_Translate(gGfxMatrix, 75.0f, 0.0f, 0.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); } else { @@ -2167,7 +2167,7 @@ void Titania_8018F8B8(Object_80* obj80) { Matrix_SetGfxMtx(&gMasterDisp); } } - if (obj80->unk_44 == 0) { + if (scenery->unk_44 == 0) { gSPDisplayList(gMasterDisp++, D_TI1_7002270); } else { gSPDisplayList(gMasterDisp++, D_TI1_7000A80); @@ -2185,7 +2185,7 @@ void Titania_Boss306_Init(Boss306* this) { if (this->swork[0] < 4) { this->swork[0]++; - gOverlayStage = this->swork[0]; + gSceneSetup = this->swork[0]; this->timer_050 = 1; } diff --git a/src/overlays/ovl_i5/fox_ti_cs.c b/src/overlays/ovl_i5/fox_ti_cs.c index 8efa8b54..0d7c3fd8 100644 --- a/src/overlays/ovl_i5/fox_ti_cs.c +++ b/src/overlays/ovl_i5/fox_ti_cs.c @@ -38,7 +38,7 @@ void Titania_801875D0(Actor* actor, s32 arg1) { AUDIO_PLAY_SFX(0x3100000C, actor->sfxSource, 4); } -void Titania_8018769C(Player* player) { +void Titania_LevelStart(Player* player) { f32 sp64; Actor* actor = &gActors[3]; Vec3f sp54; @@ -49,7 +49,7 @@ void Titania_8018769C(Player* player) { switch (player->unk_1D0) { case 0: gCsFrameCount = 0; - D_ctx_80177BAC = 1; + gTiStartLandmaster = 1; player->unk_0D4 = 0.0f; Titania_80187530(&gActors[3]); @@ -219,7 +219,7 @@ void Titania_8018769C(Player* player) { Math_SmoothStepToF(&player->unk_0F0, SIN_DEG(gGameFrameCount * 5.0f) * 10.0f, 0.1f, 100.0f, 0.0f); if (gCsFrameCount == 580) { - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = player->timer_1F8 = player->timer_1FC = player->unk_240 = 0; player->unk_0D4 = 3.0f; @@ -282,7 +282,7 @@ void Titania_80188108(Actor* actor, s32 arg1) { } } -void Titania_801882CC(Player* player) { +void Titania_LevelComplete(Player* player) { f32 x; f32 camAtY = 0.0f; Vec3f src; @@ -414,11 +414,11 @@ void Titania_801882CC(Player* player) { switch (gCsFrameCount) { case 831: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1031: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 50: @@ -487,7 +487,7 @@ void Titania_801882CC(Player* player) { break; case 1280: - gOverlayStage = 5; + gSceneSetup = 5; break; case 1300: @@ -523,7 +523,7 @@ void Titania_801882CC(Player* player) { if (gFillScreenAlpha == 255) { player->state_1C8 = PLAYERSTATE_1C8_NEXT; - D_ctx_8017837C = 4; + gFadeoutType = 4; Play_ClearObjectData(); Audio_FadeOutAll(10); D_play_800D3180[LEVEL_TITANIA] = Play_CheckMedalStatus(150) + 1; diff --git a/src/overlays/ovl_i6/fox_andross.c b/src/overlays/ovl_i6/fox_andross.c index a1dd4acd..e3d18707 100644 --- a/src/overlays/ovl_i6/fox_andross.c +++ b/src/overlays/ovl_i6/fox_andross.c @@ -92,35 +92,35 @@ void Andross_801876FC(void) { void Andross_801878A8() { Actor* actor; Item* item; - Object_58* obj58; + Scenery360* scenery360; s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C0356CC); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_80_160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->obj.pos.z += gLevelObjects[i].zPos2; - obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - if (obj58->obj.id == OBJ_80_131) { - obj58->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.pos.z += gLevelObjects[i].zPos2; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + if (scenery360->obj.id == OBJ_SCENERY_131) { + scenery360->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); } - obj58++; + scenery360++; } } for (actor = &gActors[1], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -139,7 +139,7 @@ void Andross_801878A8() { } for (item = gItems, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) { @@ -159,7 +159,7 @@ void Andross_801878A8() { void Andross_80187C5C(void) { Actor* actor; Item* item; - Object_58* obj58; + Scenery360* scenery360; s32 i; switch (RAND_INT(2.9f)) { @@ -175,33 +175,33 @@ void Andross_80187C5C(void) { break; } - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_80_160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->obj.pos.z += gLevelObjects[i].zPos2; - obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->obj.rot.y = gLevelObjects[i].rot.y; - if (obj58->obj.id == OBJ_80_147) { - obj58->unk_40 = gLevelObjects[i].rot.z; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->obj.pos.z += gLevelObjects[i].zPos2; + scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->obj.rot.y = gLevelObjects[i].rot.y; + if (scenery360->obj.id == OBJ_SCENERY_147) { + scenery360->unk_40 = gLevelObjects[i].rot.z; } - Object_SetInfo(&obj58->info, obj58->obj.id); - if (obj58->obj.id == OBJ_80_131) { - obj58->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); + Object_SetInfo(&scenery360->info, scenery360->obj.id); + if (scenery360->obj.id == OBJ_SCENERY_131) { + scenery360->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038CCC); } - obj58++; + scenery360++; } } for (actor = &gActors[1], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -220,7 +220,7 @@ void Andross_80187C5C(void) { } for (item = gItems, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } if ((gLevelObjects[i].id <= OBJ_ITEM_TRAINING_RING) && (gLevelObjects[i].id >= OBJ_ITEM_LASERS)) { @@ -242,18 +242,18 @@ void Andross_801880E4(Actor* actor) { f32 xDisplacement; f32 yDisplacement; f32 zDisplacement; - Object_58* obj58; + Scenery360* scenery360; f32 yaw; f32 var_fv0; Vec3f sp48; Vec3f vel; f32 temp_fv1; - for (obj58 = gObjects58, i = 0; i < 200; i++, obj58++) { - if ((obj58->obj.id == OBJ_80_147) && (obj58->unk_40 == (u8) actor->unk_04E)) { - actor->fwork[3] = obj58->obj.pos.x; - actor->fwork[4] = obj58->obj.pos.y; - actor->fwork[5] = obj58->obj.pos.z; + for (scenery360 = gScenery360, i = 0; i < 200; i++, scenery360++) { + if ((scenery360->obj.id == OBJ_SCENERY_147) && (scenery360->unk_40 == (u8) actor->unk_04E)) { + actor->fwork[3] = scenery360->obj.pos.x; + actor->fwork[4] = scenery360->obj.pos.y; + actor->fwork[5] = scenery360->obj.pos.z; break; } } @@ -543,7 +543,7 @@ void Andross_80189098(Boss* boss) { actor->obj.pos.y = 0.0f; actor->obj.pos.z = boss->obj.pos.z; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gDefaultCubeHitbox150); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gCubeHitbox150); actor++; @@ -557,7 +557,7 @@ void Andross_80189098(Boss* boss) { actor->obj.pos.y = 0.0f; actor->obj.pos.z = boss->obj.pos.z; Object_SetInfo(&actor->info, actor->obj.id); - actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gDefaultCubeHitbox150); + actor->info.hitbox = SEGMENTED_TO_VIRTUAL(&gCubeHitbox150); gActors[0].state = 2; } @@ -569,7 +569,7 @@ void Andross_80189214(void) { Play_ClearObjectData(); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } gLevelMode = LEVELMODE_ON_RAILS; @@ -597,7 +597,7 @@ void Andross_80189214(void) { void Andross_8018933C(Actor* actor) { if ((fabsf(actor->obj.pos.x - gPlayer[0].pos.x) < 1000.0f) && (fabsf(actor->obj.pos.z - gPlayer[0].unk_138) < 1000.0f)) { - D_Timer_80177B44 = 50; + gStartAndrossFightTimer = 50; Object_Kill(&actor->obj, actor->sfxSource); } } @@ -641,8 +641,8 @@ void Andross_80189470(Actor* actor) { Audio_KillSfxById(0x11403076); Audio_SetBaseSfxReverb(0); gCurrentLevel = LEVEL_VENOM_2; - gLevelStage = 1; - D_play_800D2F68 = 1; + gLevelPhase = 1; + gVenomHardClear = 1; player->state_1C8 = PLAYERSTATE_1C8_LEVEL_COMPLETE; player->unk_1D0 = 3; player->unk_144 = D_ctx_80177D20 = 0.0f; @@ -659,7 +659,7 @@ void Andross_80189470(Actor* actor) { Play_ClearObjectData(); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Andross_80193710(); @@ -763,7 +763,7 @@ void Andross_80189B70(Boss* boss) { Andross_80188A4C(boss); Andross_80188CB8(boss); boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&D_ANDROSS_C038F24); - Math_SmoothStepToF(&D_bg_800C9C30, 255.0f, 1.0f, 4.0f, 0); + Math_SmoothStepToF(&gAndrossUnkAlpha, 255.0f, 1.0f, 4.0f, 0); Math_SmoothStepToF(&boss->unk_3F8, 10.0f, 0.2f, 0.2f, 0); if (!(gGameFrameCount & 0x10)) { Math_SmoothStepToF(&boss->fwork[25], 255.0f, 1.0f, 10.0f, 0); @@ -834,7 +834,7 @@ void Andross_80189B70(Boss* boss) { } break; case 11: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); if (boss->timer_050 < 120) { gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; gFillScreenAlphaTarget = 80; @@ -883,7 +883,7 @@ void Andross_80189B70(Boss* boss) { boss->fwork[5] = gPlayer[0].unk_138; break; case 12: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); boss->fwork[1] = 0; boss->fwork[24] = 0.2f; boss->fwork[22] = 0.0f; @@ -904,7 +904,7 @@ void Andross_80189B70(Boss* boss) { } break; case 13: - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gHitboxNone); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(&gNoHitbox); boss->fwork[24] = 0.0f; boss->fwork[22] = 255.0f; if (250.0f < boss->fwork[22]) { @@ -969,11 +969,11 @@ void Andross_80189B70(Boss* boss) { gCsFrameCount++; gCameraShake = 10; if (gCsFrameCount < 200) { - gPlayerFillScreenAlphas[0] += 4; - if (gPlayerFillScreenAlphas[0] >= 255) { - gPlayerFillScreenAlphas[0] = 255; + gPlayerGlareAlphas[0] += 4; + if (gPlayerGlareAlphas[0] >= 255) { + gPlayerGlareAlphas[0] = 255; } - gPlayerFillScreenReds[0] = gPlayerFillScreenGreens[0] = gPlayerFillScreenBlues[0] = 255; + gPlayerGlareReds[0] = gPlayerGlareGreens[0] = gPlayerGlareBlues[0] = 255; Math_SmoothStepToF(&D_display_800CA230, 0.15f, 0.2f, 0.004f, 0.0f); Math_SmoothStepToF(&D_ctx_801779A8[gMainController], 70.0f, 1.0f, 4.0f, 0.0f); } @@ -999,7 +999,7 @@ void Andross_80189B70(Boss* boss) { gFogFar = 1007; gBgColor = 0x4081; // 64, 16, 0 gProjectFar = 30000.0f; - gGroundLevel = -50.0f; + gGroundHeight = -50.0f; gPlayer[0].pos.x = -25995.0f; gPlayer[0].pos.y = 300.0f; gPlayer[0].pos.z = -11140.0f; @@ -1019,7 +1019,7 @@ void Andross_80189B70(Boss* boss) { Andross_80187C5C(); gPlayer[0].unk_014 = 1.0f; func_play_800B7184(gPlayer, 1); - func_8001C8B8(0); + Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(D_boss_800C9E90[gCurrentLevel]); AUDIO_PLAY_SFX(0x11403076, gDefaultSfxSource, 0); @@ -1290,7 +1290,7 @@ void Andross_8018BDD8(void) { void Andross_8018C390(Player* player) { - player->unk_2B4 = 1; + player->boostCooldown = 1; player->unk_280 = 0; switch (player->unk_1D0) { case 2: @@ -1560,7 +1560,7 @@ void Andross_8018D0D8(Boss* boss) { void Andross_Boss320_Init(Boss320* this) { Audio_SetBaseSfxReverb(0x18); D_i6_801A7F5C = D_i6_801A7F64 = D_i6_801A7F6C = D_i6_801A7F74 = D_i6_801A7F7C = D_i6_801A8430 = 0.0f; - D_bg_800C9C30 = 0.0f; + gAndrossUnkAlpha = 0.0f; this->health = 100; this->fwork[18] = 1.0f; this->fwork[17] = 1.0f; @@ -1612,7 +1612,7 @@ void Andross_8018D2B0(Boss* boss) { AUDIO_PLAY_SFX(0x19403070, boss->sfxSource, 4); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM, 1); SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 1); - if (gLevelStage == 0) { + if (gLevelPhase == 0) { boss->state = 30; } else { boss->state = 32; @@ -1912,7 +1912,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&D_i6_801A7F7C, gAmbientG, 1.0f, 2.0f, 0.0f); Math_SmoothStepToF(&D_i6_801A8430, gAmbientB, 1.0f, 2.0f, 0.0f); } - Math_SmoothStepToF(&D_bg_800C9C30, 32.0f, 1.0f, 0.5f, 0.0f); + Math_SmoothStepToF(&gAndrossUnkAlpha, 32.0f, 1.0f, 0.5f, 0.0f); Math_SmoothStepToF(&player->camRoll, 0.0f, 0.2f, 3.0f, 0); boss->fwork[8] = 0.1f; Math_SmoothStepToF(&boss->fwork[7], 200.0f, 1.0f, 10.0f, 0); @@ -2381,7 +2381,7 @@ void Andross_8018DBF0(Boss* boss) { Math_SmoothStepToF(&playerShot->obj.pos.y, boss->obj.pos.y - 100.0f, 0.5f, boss->fwork[16], 0); Math_SmoothStepToF(&playerShot->vel.x, 0.0f, 0.9f, 5.0f, 0); Math_SmoothStepToF(&playerShot->vel.y, 0.0f, 0.9f, 5.0f, 0); - if ((playerShot->obj.id == PLAYERSHOT_3) && (playerShot->obj.status == 1) && + if ((playerShot->obj.id == PLAYERSHOT_BOMB) && (playerShot->obj.status == 1) && (playerShot->unk_5C == 0) && (fabsf(playerShot->obj.pos.x - boss->obj.pos.x) < 200.0f) && (fabsf(playerShot->obj.pos.y - (boss->obj.pos.y - 100.0f)) < 200.0f) && (fabsf(playerShot->obj.pos.z - (boss->obj.pos.z - 200.0f)) < 100.0f)) { @@ -2750,7 +2750,7 @@ void Andross_8018DBF0(Boss* boss) { Radio_PlayMessage(gMsg_ID_19330, RCID_ANDROSS_RED); break; } - Math_SmoothStepToF(&D_bg_800C9C30, 0.0f, 1.0f, 0.3f, 0.0f); + Math_SmoothStepToF(&gAndrossUnkAlpha, 0.0f, 1.0f, 0.3f, 0.0f); break; } if (boss->swork[4] >= 0) { @@ -3032,7 +3032,7 @@ bool Andross_801917F0(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* Matrix_Scale(gCalcMatrix, scale, scale, scale, MTXF_APPLY); if (*dList != NULL) { Matrix_MultVec3f(gCalcMatrix, &sp94, &sp88); - func_edisplay_8005F670(&sp88); + Display_SetSecondLight(&sp88); Matrix_Mult(gGfxMatrix, gCalcMatrix, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); gSPDisplayList(gMasterDisp++, *dList); @@ -3280,26 +3280,26 @@ void Andross_80193244(Actor* actor) { } } -void Andross_80193380(Object_80* obj80) { +void Andross_80193380(Scenery* scenery) { - switch (obj80->state) { + switch (scenery->state) { case 0: - if (fabsf(obj80->obj.pos.z - gPlayer[0].unk_138) < 1800.0f) { - obj80->state = 1; - obj80->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C038AC4); + if (fabsf(scenery->obj.pos.z - gPlayer[0].unk_138) < 1800.0f) { + scenery->state = 1; + scenery->info.hitbox = SEGMENTED_TO_VIRTUAL(D_ANDROSS_C038AC4); } break; case 1: - obj80->info.hitbox[7] = -130.0f - (obj80->unk_44 * 1.6f); - obj80->info.hitbox[17] = -130.0f - (obj80->unk_44 * 1.6f); - obj80->info.hitbox[27] = -130.0f - (obj80->unk_44 * 1.6f); - obj80->unk_44 += 2; - if (obj80->unk_44 >= Animation_GetFrameCount(&D_VE2_6014658)) { - obj80->unk_44 = Animation_GetFrameCount(&D_VE2_6014658) - 1; + scenery->info.hitbox[7] = -130.0f - (scenery->unk_44 * 1.6f); + scenery->info.hitbox[17] = -130.0f - (scenery->unk_44 * 1.6f); + scenery->info.hitbox[27] = -130.0f - (scenery->unk_44 * 1.6f); + scenery->unk_44 += 2; + if (scenery->unk_44 >= Animation_GetFrameCount(&D_VE2_6014658)) { + scenery->unk_44 = Animation_GetFrameCount(&D_VE2_6014658) - 1; } break; } - obj80->obj.rot.z = D_Andross_801A7F68; + scenery->obj.rot.z = D_Andross_801A7F68; } bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* data) { @@ -3309,18 +3309,18 @@ bool Andross_801934EC(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Andross_8019350C(Object_80* obj80) { +void Andross_8019350C(Scenery* scenery) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, obj80->unk_44, frameTable); + Animation_GetFrameData(&D_VE2_6014658, scenery->unk_44, frameTable); Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801934EC, NULL, NULL, &gIdentityMatrix); } -void Andross_8019356C(Object_80* obj80) { - obj80->obj.rot.z = D_Andross_801A7F68; - obj80->obj.pos.z += obj80->unk_60; - if (obj80->timer_4C == 1) { - Object_Kill(&obj80->obj, obj80->sfxSource); +void Andross_8019356C(Scenery* scenery) { + scenery->obj.rot.z = D_Andross_801A7F68; + scenery->obj.pos.z += scenery->unk_60; + if (scenery->timer_4C == 1) { + Object_Kill(&scenery->obj, scenery->sfxSource); } } @@ -3331,57 +3331,57 @@ bool Andross_801935B4(s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3f* rot, void* return false; } -void Andross_801935D4(Object_80* obj80) { +void Andross_801935D4(Scenery* scenery) { Vec3f frameTable[20]; - Animation_GetFrameData(&D_VE2_6014658, obj80->unk_44, frameTable); + Animation_GetFrameData(&D_VE2_6014658, scenery->unk_44, frameTable); if (gLevelMode == LEVELMODE_ALL_RANGE) { gSPClearGeometryMode(gMasterDisp++, G_CULL_BACK); } Animation_DrawSkeleton(1, D_VE2_6014844, frameTable, Andross_801935B4, NULL, NULL, &gIdentityMatrix); } -void Andross_80193668(Object_80* obj80, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { - Object_80_Initialize(obj80); - obj80->obj.status = OBJ_ACTIVE; - obj80->obj.id = OBJ_80_131; - obj80->obj.pos.x = xPos; - obj80->obj.pos.y = yPos; - obj80->obj.pos.z = zPos; - obj80->unk_60 = -40.0f; - Object_SetInfo(&obj80->info, obj80->obj.id); - obj80->timer_4C = (arg4 * 50) + 100; - obj80->info.unk_10 = 100000.0f; +void Andross_80193668(Scenery* scenery, f32 xPos, f32 yPos, f32 zPos, s32 arg4) { + Scenery_Initialize(scenery); + scenery->obj.status = OBJ_ACTIVE; + scenery->obj.id = OBJ_SCENERY_131; + scenery->obj.pos.x = xPos; + scenery->obj.pos.y = yPos; + scenery->obj.pos.z = zPos; + scenery->unk_60 = -40.0f; + Object_SetInfo(&scenery->info, scenery->obj.id); + scenery->timer_4C = (arg4 * 50) + 100; + scenery->info.unk_10 = 100000.0f; } void Andross_80193710(void) { Actor* actor; - Object_58* obj58; + Scenery360* scenery360; Boss* boss; s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_80_160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); - obj58++; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->sfxSource[0] = scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->sfxSource[1] = scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->sfxSource[2] = scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->unk_54 = scenery360->obj.rot.y = gLevelObjects[i].rot.y; + Object_SetInfo(&scenery360->info, scenery360->obj.id); + scenery360++; } } for (actor = &gActors[30], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -3462,8 +3462,8 @@ void Andross_80193AE4(s32 actorIndex) { } //! @bug This references a variable in another overlay, causing undefined behavior. -//! In US v1.1, that address contains the store instruction for player->vel.y = vel.y; in Venom2_80196BF8. Setting this -//! to nop is harmless, as the overlay will be unloaded next frame. +//! In US v1.1, that address contains the store instruction for player->vel.y = vel.y; in Venom2_LevelStart. Setting +//! this to nop is harmless, as the overlay will be unloaded next frame. extern s32 D_ending_80196D00; f32 D_i6_801A7F40; @@ -3623,7 +3623,7 @@ void Andross_80193C4C(Player* player) { break; case 25: for (i = 0; i < 12; i++) { - Andross_80193668(&gObjects80[i], player->pos.x, player->pos.y, + Andross_80193668(&gScenery[i], player->pos.x, player->pos.y, (player->cam.eye.z - D_ctx_80177D20) + (2195.0f * i), i); } break; @@ -3633,10 +3633,10 @@ void Andross_80193C4C(Player* player) { case 340: Audio_KillSfxBySourceAndId(player->sfxSource, 0x11403071); Audio_SetBaseSfxReverb(0); - D_play_800D2F68 = 0; + gVenomHardClear = 0; gBlurAlpha = 255; gCurrentLevel = LEVEL_VENOM_2; - gLevelStage = 1; + gLevelPhase = 1; gLevelMode = LEVELMODE_ALL_RANGE; player->unk_1D0 = 3; player->unk_144 = D_ctx_80177D20 = 0.0f; @@ -3651,9 +3651,9 @@ void Andross_80193C4C(Player* player) { player->unk_234 = 0; D_ctx_80177A48[0] = 1.0f; Play_ClearObjectData(); - gObjects58 = Memory_Allocate(200 * sizeof(Object_58)); + gScenery360 = Memory_Allocate(200 * sizeof(Scenery360)); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Andross_80193710(); D_ctx_8017782C = 1; @@ -3675,14 +3675,14 @@ void Andross_80193C4C(Player* player) { gFillScreenAlpha = gFillScreenAlphaTarget = 255; } - if ((gCsFrameCount == 20) && (D_play_800D2F68 != 0)) { + if ((gCsFrameCount == 20) && (gVenomHardClear != 0)) { Andross_801939A0(1); } if (gCsFrameCount == 40) { Andross_801939A0(10); AUDIO_PLAY_SFX(0x2940F026, boss->sfxSource, 4); gCameraShake = 30; - gOverlayStage = 1; + gSceneSetup = 1; gControllerRumbleTimers[0] = 30; } if (gCsFrameCount > 40) { @@ -3722,7 +3722,7 @@ void Andross_80193C4C(Player* player) { D_ctx_801784D4 = -50.0f; gNextPlanetPath = 1; for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } } break; @@ -3778,8 +3778,8 @@ void Andross_80193C4C(Player* player) { } if (gCsFrameCount == 190) { - func_play_800A5D6C(); - D_ctx_80178410 = 1000; + Play_SetupStarfield(); + gStarCount = 1000; player->unk_204 = 0; } if (gCsFrameCount == 360) { @@ -3805,7 +3805,7 @@ void Andross_80193C4C(Player* player) { gFillScreenAlpha = gFillScreenAlphaTarget = 255; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 0; player->timer_1F8 = 3; - D_ctx_80178410 = 500; + gStarCount = 500; } if (gCsFrameCount == 250) { gLevelClearScreenTimer = 100; @@ -3815,7 +3815,7 @@ void Andross_80193C4C(Player* player) { if (player->timer_1F8 == 1) { gFillScreenAlpha = gFillScreenAlphaTarget = 0; } - if (D_play_800D2F68 != 0) { + if (gVenomHardClear != 0) { if (gCsFrameCount >= 1000) { gCsCamAtX += D_ctx_80177A48[4] * 0.15f; gCsCamEyeZ += D_ctx_80177A48[4]; @@ -3884,7 +3884,7 @@ void Andross_80193C4C(Player* player) { Math_SmoothStepToF(&player->cam.eye.y, gCsCamEyeY, D_ctx_80177A48[0], 50000.0f, 0); Math_SmoothStepToF(&player->cam.eye.z, gCsCamEyeZ, D_ctx_80177A48[0], 50000.0f, 0); } - if (D_play_800D2F68 != 0) { + if (gVenomHardClear != 0) { switch (gCsFrameCount) { case 400: Radio_PlayMessage(gMsg_ID_19400, RCID_PEPPY); @@ -3904,17 +3904,17 @@ void Andross_80193C4C(Player* player) { } break; case 1050: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1250: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; } if (gCsFrameCount > 1300) { - D_ctx_80178288[109] += 1.0f; - D_ctx_80178290[109] += 0.5f; + gStarOffsetsX[109] += 1.0f; + gStarOffsetsY[109] += 0.5f; temp_v0_2 = RAND_INT(100.0f); - D_ctx_80178298[109] = FILL_COLOR(D_bg_800C9C3C[temp_v0_2 % 16U]); + gStarFillColors[109] = FILL_COLOR(gStarColors[temp_v0_2 % 16U]); } } else { switch (gCsFrameCount) { @@ -3929,10 +3929,10 @@ void Andross_80193C4C(Player* player) { gCsFrameCount += 230; break; case 1050: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1250: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; } } @@ -3952,9 +3952,9 @@ void Andross_80193C4C(Player* player) { } break; case 100: - gPlayerFillScreenAlphas[0] -= 4; - if (gPlayerFillScreenAlphas[0] > 255) { - gPlayerFillScreenAlphas[0] = 0; + gPlayerGlareAlphas[0] -= 4; + if (gPlayerGlareAlphas[0] > 255) { + gPlayerGlareAlphas[0] = 0; } Matrix_RotateY(gCalcMatrix, (player->unk_114 + player->unk_0E8 + 180.0f) * M_DTOR, MTXF_NEW); Matrix_RotateX(gCalcMatrix, -((player->unk_120 + player->unk_0E4 + player->unk_4D8) * M_DTOR), MTXF_APPLY); diff --git a/src/overlays/ovl_i6/fox_sy.c b/src/overlays/ovl_i6/fox_sy.c index 60d62f06..882f55ef 100644 --- a/src/overlays/ovl_i6/fox_sy.c +++ b/src/overlays/ovl_i6/fox_sy.c @@ -48,7 +48,7 @@ void SectorY_80197C64(Effect* effect) { RCP_SetupDL(&gMasterDisp, 0x40); } -void SectorY_80197CB8(Object_80* obj80) { +void SectorY_80197CB8(Scenery* scenery) { } void SectorY_Boss314_Init(Boss314* this) { @@ -68,7 +68,7 @@ void SectorY_Boss314_Init(Boss314* this) { if (gPlayer[0].state_1C8 == PLAYERSTATE_1C8_START_360) { this->obj.pos.z = -28900.0f; - gObjects58[0].obj.pos.z = -30000.0f; + gScenery360[0].obj.pos.z = -30000.0f; } this->unk_078.y = 0.0f; @@ -415,7 +415,7 @@ void SectorY_80198F5C(Boss* boss) { boss->unk_04C = 0; boss->swork[36] = 0; boss->swork[21] = 9; - boss->info.hitbox = SEGMENTED_TO_VIRTUAL(gHitboxNone); + boss->info.hitbox = SEGMENTED_TO_VIRTUAL(gNoHitbox); if (boss->index == 0) { boss->timer_058 = 20000; @@ -596,8 +596,8 @@ void SectorY_80199438(Boss* boss) { 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].unk_04A = 1; - gObjects58[0].info.dList = D_SY_601F3D0; - gObjects58[0].info.drawType = 0; + gScenery360[0].info.dList = D_SY_601F3D0; + gScenery360[0].info.drawType = 0; } else { gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; func_play_800B63BC(&gPlayer[0], 1); @@ -1039,7 +1039,7 @@ void SectorY_8019AEEC(Boss* boss) { boss->vel.z = 80.0f; boss->fwork[13] = 80.0f; boss->obj.pos.z = -12000.0f; - gObjects58[0].obj.pos.z = -20000.0f; + gScenery360[0].obj.pos.z = -20000.0f; boss->fwork[43] = 0.0f; boss->vel.y = 0.0f; gPlayer[0].state_1C8 = PLAYERSTATE_1C8_ACTIVE; @@ -1081,9 +1081,9 @@ bool SectorY_8019B5CC(Boss* boss) { } Math_Vec3fFromAngles(&pos, boss->unk_078.x, boss->unk_078.y, 700.0f); - if ((fabsf(gObjects58[0].obj.pos.x - (boss->obj.pos.x + pos.x)) < 2500.0f) && - (fabsf(gObjects58[0].obj.pos.z - (boss->obj.pos.z + pos.z)) < 5000.0f) && - (fabsf(gObjects58[0].obj.pos.y - (boss->obj.pos.y + pos.y)) < 1800.0f)) { + if ((fabsf(gScenery360[0].obj.pos.x - (boss->obj.pos.x + pos.x)) < 2500.0f) && + (fabsf(gScenery360[0].obj.pos.z - (boss->obj.pos.z + pos.z)) < 5000.0f) && + (fabsf(gScenery360[0].obj.pos.y - (boss->obj.pos.y + pos.y)) < 1800.0f)) { return true; } @@ -1345,9 +1345,9 @@ void SectorY_8019C888(Boss* boss) { if (gPlayer[0].state_1C8 != PLAYERSTATE_1C8_START_360) { if (boss->swork[34] == 1) { if (boss->health > 0) { - gObjects58[0].obj.pos.z += 20.0f; + gScenery360[0].obj.pos.z += 20.0f; } - if (gObjects58[0].obj.pos.z == 0.0f) { + if (gScenery360[0].obj.pos.z == 0.0f) { boss->swork[34]++; } } @@ -1944,7 +1944,7 @@ void SectorY_8019EB80(void) { } } -void SectorY_8019EE60(Player* player) { +void SectorY_LevelComplete(Player* player) { s32 i; f32 temp1; f32 temp2; @@ -2045,12 +2045,12 @@ void SectorY_8019EE60(Player* player) { player->pos.y = 3500.0f; player->pos.z = 0.0f; player->unk_1D0++; - func_8001C8B8(0); + Audio_StartPlayerNoise(0); AUDIO_PLAY_BGM(SEQ_ID_GOOD_END); D_ctx_80177A98 = 0; for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } Play_ClearObjectData(); @@ -2124,7 +2124,7 @@ void SectorY_8019EE60(Player* player) { Audio_FadeOutAll(10); player->state_1C8 = PLAYERSTATE_1C8_NEXT; player->timer_1F8 = 0; - D_ctx_8017837C = 4; + gFadeoutType = 4; D_play_800D3180[LEVEL_SECTOR_Y] = Play_CheckMedalStatus(150) + 1; } } @@ -2197,10 +2197,10 @@ void SectorY_8019EE60(Player* player) { } break; case 1163: - D_ctx_80177830 = 1; + gShowLevelClearStatusScreen = 1; break; case 1363: - D_ctx_80177830 = 0; + gShowLevelClearStatusScreen = 0; break; case 1440: AUDIO_PLAY_SFX(0x09000002, player->sfxSource, 0); @@ -3180,7 +3180,7 @@ void SectorY_801A0AC0(Player* player) { player->pos.z = player->unk_138 = 0.0f; player->unk_0D0 = D_play_80161A54; AUDIO_PLAY_BGM(SEQ_ID_SECTOR_Y | SEQ_FLAG); - gLevelStatusScreenTimer = 100; + gLevelStartStatusScreenTimer = 100; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_1D0 = 0; player->timer_1F8 = 0; @@ -3529,8 +3529,8 @@ void SectorY_Actor204_Update(Actor204* this) { } else { AUDIO_PLAY_SFX(0x2903300E, this->sfxSource, 4); this->timer_0C6 = 15; - func_effect_8007C120(this->unk_0D8.x, this->unk_0D8.y, this->unk_0D8.z, this->vel.x, this->vel.y, - this->vel.z, 0.1f, 10); + func_effect_8007C120(this->hitPos.x, this->hitPos.y, this->hitPos.z, this->vel.x, this->vel.y, this->vel.z, + 0.1f, 10); this->health -= this->damage; if (this->health <= 0) { @@ -3623,68 +3623,68 @@ void SectorY_Actor204_Draw(Actor204* this) { } } -void SectorY_801A4E44(Object_80* obj80) { +void SectorY_801A4E44(Scenery* scenery) { Vec3f sp3C; Vec3f sp30; - if (obj80->state == 0) { - AUDIO_PLAY_SFX(0x1900404F, obj80->sfxSource, 4); - obj80->state++; + if (scenery->state == 0) { + AUDIO_PLAY_SFX(0x1900404F, scenery->sfxSource, 4); + scenery->state++; } if (((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_APPLY); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -150.0f; sp3C.z = 90.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f); sp3C.z = 80.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + 500.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -50.0f; sp3C.z = 1900.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); sp3C.x = RAND_FLOAT_CENTERED(100.0f) + -1000.0f; sp3C.y = RAND_FLOAT_CENTERED(900.0f) + -250.0f; sp3C.z = 1100.0f - RAND_FLOAT(50.0f); Matrix_MultVec3f(gCalcMatrix, &sp3C, &sp30); - func_effect_8007C120(obj80->obj.pos.x + sp30.x, obj80->obj.pos.y + sp30.y, obj80->obj.pos.z + sp30.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp30.x, scenery->obj.pos.y + sp30.y, scenery->obj.pos.z + sp30.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); } } -void SectorY_801A52B8(Object_80* obj80) { +void SectorY_801A52B8(Scenery* scenery) { Vec3f sp44; Vec3f sp38; - if (obj80->state == 0) { - AUDIO_PLAY_SFX(0x1900404F, obj80->sfxSource, 4); - obj80->state++; + if (scenery->state == 0) { + AUDIO_PLAY_SFX(0x1900404F, scenery->sfxSource, 4); + scenery->state++; } if (((gGameFrameCount % 4) == 0)) { - Matrix_RotateY(gCalcMatrix, obj80->obj.rot.y * M_DTOR, MTXF_NEW); - Matrix_RotateX(gCalcMatrix, obj80->obj.rot.x * M_DTOR, MTXF_APPLY); - Matrix_RotateZ(gCalcMatrix, obj80->obj.rot.z * M_DTOR, MTXF_APPLY); + Matrix_RotateY(gCalcMatrix, scenery->obj.rot.y * M_DTOR, MTXF_NEW); + Matrix_RotateX(gCalcMatrix, scenery->obj.rot.x * M_DTOR, MTXF_APPLY); + Matrix_RotateZ(gCalcMatrix, scenery->obj.rot.z * M_DTOR, MTXF_APPLY); sp44.x = RAND_FLOAT_CENTERED(100.0f) + -800.0f; sp44.y = RAND_FLOAT_CENTERED(300.0f) + -100.0f; sp44.z = RAND_FLOAT_CENTERED(5000.0f) + 500.0f; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); - func_effect_8007C120(obj80->obj.pos.x + sp38.x, obj80->obj.pos.y + sp38.y, obj80->obj.pos.z + sp38.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.3f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.3f, 5); sp44.x = RAND_FLOAT_CENTERED(100.0f) + -600.0f; sp44.y = RAND_FLOAT_CENTERED(250.0f) + 300.0f; sp44.z = RAND_FLOAT_CENTERED(1500.0f) + -1650.0f; Matrix_MultVec3f(gCalcMatrix, &sp44, &sp38); - func_effect_8007C120(obj80->obj.pos.x + sp38.x, obj80->obj.pos.y + sp38.y, obj80->obj.pos.z + sp38.z, - obj80->unk_58, obj80->unk_5C, obj80->unk_60, 0.2f, 5); + func_effect_8007C120(scenery->obj.pos.x + sp38.x, scenery->obj.pos.y + sp38.y, scenery->obj.pos.z + sp38.z, + scenery->unk_58, scenery->unk_5C, scenery->unk_60, 0.2f, 5); } } diff --git a/src/overlays/ovl_i6/fox_turret.c b/src/overlays/ovl_i6/fox_turret.c index 9842cf8d..e517ea3d 100644 --- a/src/overlays/ovl_i6/fox_turret.c +++ b/src/overlays/ovl_i6/fox_turret.c @@ -146,7 +146,7 @@ void Turret_801A5AD4(Player* player) { if (player->unk_1BC == 0) { gControllerLock = 0; player->unk_1B0++; - gLevelStatusScreenTimer = 50; + gLevelStartStatusScreenTimer = 50; } } sp2C = (f32) gControllerPress[player->num].stick_x; diff --git a/src/overlays/ovl_i6/fox_ve2.c b/src/overlays/ovl_i6/fox_ve2.c index 06822e6d..72866fae 100644 --- a/src/overlays/ovl_i6/fox_ve2.c +++ b/src/overlays/ovl_i6/fox_ve2.c @@ -86,7 +86,7 @@ void Venom2_80196314(Actor* actor) { actor->state = 2; player->state_1C8 = PLAYERSTATE_1C8_ACTIVE; player->unk_014 = 0.0001f; - gLevelStatusScreenTimer = 80; + gLevelStartStatusScreenTimer = 80; } } if (gAllRangeEventTimer == 80) { @@ -169,33 +169,33 @@ void Venom2_80196314(Actor* actor) { void Venom2_80196968(void) { Actor* actor; Boss* boss; - Object_58* obj58; + Scenery360* scenery360; s32 i; gLevelObjects = SEGMENTED_TO_VIRTUAL(gLevelObjectInits[gCurrentLevel]); - for (obj58 = gObjects58, i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + for (scenery360 = gScenery360, i = 0; i < 1000; i++) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } - if (gLevelObjects[i].id <= OBJ_80_160) { - Object_58_Initialize(obj58); - obj58->obj.status = OBJ_ACTIVE; - obj58->obj.id = gLevelObjects[i].id; - obj58->sfxSource[0] = obj58->obj.pos.x = gLevelObjects[i].xPos; - obj58->sfxSource[1] = obj58->obj.pos.y = gLevelObjects[i].yPos; - obj58->sfxSource[2] = obj58->obj.pos.z = -gLevelObjects[i].zPos1; - obj58->unk_54 = obj58->obj.rot.y = gLevelObjects[i].rot.y; + if (gLevelObjects[i].id <= OBJ_SCENERY_160) { + Scenery360_Initialize(scenery360); + scenery360->obj.status = OBJ_ACTIVE; + scenery360->obj.id = gLevelObjects[i].id; + scenery360->sfxSource[0] = scenery360->obj.pos.x = gLevelObjects[i].xPos; + scenery360->sfxSource[1] = scenery360->obj.pos.y = gLevelObjects[i].yPos; + scenery360->sfxSource[2] = scenery360->obj.pos.z = -gLevelObjects[i].zPos1; + scenery360->unk_54 = scenery360->obj.rot.y = gLevelObjects[i].rot.y; - Object_SetInfo(&obj58->info, obj58->obj.id); + Object_SetInfo(&scenery360->info, scenery360->obj.id); - obj58++; + scenery360++; } } for (actor = &gActors[30], i = 0; i < 1000; i++) { - if (gLevelObjects[i].id < 0) { + if (gLevelObjects[i].id <= OBJ_INVALID) { break; } @@ -218,7 +218,7 @@ void Venom2_80196968(void) { Object_SetInfo(&boss->info, boss->obj.id); } -void Venom2_80196BF8(Player* player) { +void Venom2_LevelStart(Player* player) { Vec3f vec; Vec3f vel; f32 temp_fv0; @@ -250,7 +250,7 @@ void Venom2_80196BF8(Player* player) { player->cam.at.z = player->pos.z; } -void Venom2_80196D88(Player* player) { +void Venom2_LevelComplete(Player* player) { s32 i; s32 pad; f32 sp94; @@ -316,7 +316,7 @@ void Venom2_80196D88(Player* player) { D_ctx_80177A48[5] = sp58.x; D_ctx_80177A48[6] = sp58.z; } - if (gLevelStage == 2) { + if (gLevelPhase == 2) { player->timer_1FC = 240; } else { player->timer_1FC = 180; @@ -325,7 +325,7 @@ void Venom2_80196D88(Player* player) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); /* fallthrough */ case 1: - if (gLevelStage == 2) { + if (gLevelPhase == 2) { gFillScreenAlphaStep = 2; gFillScreenAlphaTarget = 0; gFillScreenRed = gFillScreenGreen = gFillScreenBlue = 255; @@ -416,13 +416,13 @@ void Venom2_80196D88(Player* player) { gNextGameState = GSTATE_PLAY; gNextLevel = LEVEL_VENOM_ANDROSS; if (D_play_800D3180[gCurrentLevel] != 0) { - gNextLevelStage = 1; + gNextLevelPhase = 1; } func_8001CA24(0); Audio_KillSfxBySource(player->sfxSource); for (i = 0; i < 200; i++) { - gObjects58[i].obj.status = OBJ_FREE; + gScenery360[i].obj.status = OBJ_FREE; } } } diff --git a/src/overlays/ovl_menu/fox_i_menu.c b/src/overlays/ovl_menu/fox_i_menu.c index 3525f6e4..75b53315 100644 --- a/src/overlays/ovl_menu/fox_i_menu.c +++ b/src/overlays/ovl_menu/fox_i_menu.c @@ -1,13 +1,13 @@ #include "global.h" -void Title_80187754(void); -void Title_801878D8(void); -void Option_Init(void); +void Title_Main(void); +void Title_Draw(void); +void Option_Main(void); void Option_DrawEntry(void); void Map_8019E85C(void); void Map_8019E8C8(void); -void Map_8019E8D0(void); -void Map_801A01A8(void); +void Map_Main(void); +void Map_Draw(void); s32 D_menu_801B7BA0; s32 D_menu_801AD9F0 = 0; @@ -15,23 +15,23 @@ s32 D_menu_801AD9F0 = 0; void OvlMenu_CallFunction(u32 mode, void* ptr) { switch (mode) { case OVLCALL_TITLE_UPDATE: - Title_80187754(); + Title_Main(); break; case OVLCALL_TITLE_DRAW: - Title_801878D8(); + Title_Draw(); break; case OVLCALL_MAP_UPDATE: - Map_8019E8D0(); + Map_Main(); break; case OVLCALL_MAP_DRAW: - Map_801A01A8(); + Map_Draw(); break; case OVLCALL_OPTION_UPDATE: - Option_Init(); + Option_Main(); break; case OVLCALL_OPTION_DRAW: diff --git a/src/overlays/ovl_menu/fox_map.c b/src/overlays/ovl_menu/fox_map.c index a8beb028..3d1795ce 100644 --- a/src/overlays/ovl_menu/fox_map.c +++ b/src/overlays/ovl_menu/fox_map.c @@ -1204,8 +1204,8 @@ void Map_801AD048(void); void Map_8019E800(void) { Memory_FreeAll(); - func_play_800A5D6C(); - D_ctx_80178410 = 0; + Play_SetupStarfield(); + gStarCount = 0; gNextGameState = GSTATE_MAP; D_game_80161A34 = 5; D_ctx_80177868 = 2; @@ -1232,7 +1232,7 @@ void Map_8019E85C(void) { void Map_8019E8C8(void) { } -void Map_8019E8D0(void) { +void Map_Main(void) { if (D_menu_801CD9B8 > 0) { D_menu_801CD9B8--; } @@ -1462,7 +1462,7 @@ void Map_8019F164(void) { if (D_play_800D3180[gCurrentLevel] == 2) { D_menu_801CD98C = 1; - D_ctx_80177BB0[gCurrentPlanet] = 1; + D_ctx_80177BB0[gMissionNumber] = 1; Map_8019FD1C(gCurrentLevel, 1); } @@ -1488,7 +1488,7 @@ void Map_8019F164(void) { break; } - gCurrentPlanet++; + gMissionNumber++; Map_8019FC04(); @@ -1521,7 +1521,7 @@ void Map_8019F42C(void) { D_menu_801CD974 = 1; sCurrentPlanetId = Map_GetPlanetId(gCurrentLevel); - D_ctx_80177B70[gCurrentPlanet] = gHitCount; + D_ctx_80177B70[gMissionNumber] = gHitCount; Map_8019F910(); Map_8019FD1C(gCurrentLevel, 0); @@ -1532,8 +1532,8 @@ void Map_8019F42C(void) { D_menu_801CD8E0[i] = 0; } - if (gCurrentPlanet != 0) { - for (i = 0; i < gCurrentPlanet; i++) { + if (gMissionNumber != 0) { + for (i = 0; i < gMissionNumber; i++) { D_menu_801CD8E0[i] = Map_GetPathId(D_ctx_80177B90[i], D_ctx_80177B90[i + 1]); } } @@ -1607,7 +1607,7 @@ void Map_8019F600(void) { sPaths[i].alpha = 255; } - gCurrentPlanet = 0; + gMissionNumber = 0; gCurrentLevel = 0; sCurrentPlanetId = 9; @@ -1648,9 +1648,9 @@ void Map_8019F910(void) { for (i = 0; i < 3; i++) { if (gTeamShields[3 - i] <= 0) { - D_ctx_80177B50[gCurrentPlanet] ^= mask; + D_ctx_80177B50[gMissionNumber] ^= mask; } else { - D_ctx_80177B50[gCurrentPlanet] |= mask; + D_ctx_80177B50[gMissionNumber] |= mask; } mask >>= 8; } @@ -1684,7 +1684,7 @@ void Map_8019FA1C(void) { void Map_8019FC04(void) { s32 i; - if (gCurrentPlanet != PLANET_METEO) { + if (gMissionNumber != PLANET_METEO) { D_menu_801CEB48[1] = true; D_menu_801CEB48[2] = true; } @@ -1769,7 +1769,7 @@ bool Map_8019FD1C(LevelId levelId, s32 arg1) { break; case LEVEL_VENOM_ANDROSS: - if (gLevelStage == 0) { + if (gLevelPhase == 0) { planetSaveSlot = SAVE_SLOT_VENOM_1; } else { planetSaveSlot = SAVE_SLOT_VENOM_2; @@ -1877,7 +1877,7 @@ void Map_8019FF48(void) { #endif } -void Map_801A01A8(void) { +void Map_Draw(void) { s32 i; s32* ptr; @@ -2009,13 +2009,13 @@ s32 Map_801A05B4(void) { } void Map_801A0788(void) { - D_ctx_80178410 = 800; + gStarCount = 800; Memory_FreeAll(); - func_play_800A5D6C(); + Play_SetupStarfield(); - D_ctx_80178420 = SCREEN_WIDTH; - D_ctx_80178424 = SCREEN_HEIGHT; + gStarfieldX = SCREEN_WIDTH; + gStarfieldY = SCREEN_HEIGHT; D_ctx_8017842C = 0.0f; D_ctx_80178430 = 0.0f; } @@ -2071,7 +2071,7 @@ void Map_801A0954(void) { D_menu_801CD9E8 = 0; D_menu_801CD9E4 = 0; D_menu_801CD9EC = 0.29f; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801CD9C0 = 5; D_menu_801CD948++; break; @@ -2179,8 +2179,8 @@ void Map_801A0D14(void) { TextureRect_8bIA(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B694C, 40.0f, 1.66f); TextureRect_8bIA_MirY(&gMasterDisp, D_MAP_6019030, 8, 16, 0.0f, D_menu_801B6950, 40.0f, 1.68f); - func_bg_8003DE68(71, 118); - func_bg_8003DE68(205, 239); + Background_DrawPartialStarfield(71, 118); + Background_DrawPartialStarfield(205, 239); RCP_SetupDL(&gMasterDisp, 0x4C); @@ -2444,7 +2444,7 @@ void Map_801A1C14(void) { for (i = 0; i < 24; i++) { sPaths[i].alpha = 0; } - D_ctx_80178410 = 0; + gStarCount = 0; gFillScreenRed = 255; gFillScreenGreen = 255; @@ -2918,7 +2918,7 @@ void Map_801A2EB8(void) { if (D_menu_801CD9C4 == 80) { sCurrentPlanetId = sNextPlanetId; - D_ctx_80177B90[gCurrentPlanet] = sCurrentPlanetId; + D_ctx_80177B90[gMissionNumber] = sCurrentPlanetId; Map_801A6368(); } @@ -3131,7 +3131,7 @@ void Map_801A36A8(void) { gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = 0; - D_ctx_80178410 = 0; + gStarCount = 0; break; } @@ -3335,7 +3335,7 @@ void Map_801A4394(void) { switch (D_menu_801CD94C) { case 0: - if (gCurrentPlanet == 0) { + if (gMissionNumber == 0) { D_menu_801CD9C0 = 45; D_menu_801CD94C = 3; } else { @@ -3344,7 +3344,7 @@ void Map_801A4394(void) { break; case 1: - if (gCurrentPlanet == D_menu_801CD9AC) { + if (gMissionNumber == D_menu_801CD9AC) { D_menu_801CD94C = 3; D_menu_801CD9C0 = 45; break; @@ -3603,7 +3603,7 @@ void Map_801A4D7C(void) { } void Map_801A4F8C(void) { - D_ctx_80178410 = 0; + gStarCount = 0; gGameState = GSTATE_GAME_OVER; D_ctx_80177868 = 0; gNextGameStateTimer = 2; @@ -3656,13 +3656,13 @@ void Map_801A4FC4(void) { D_menu_801CEEA8 = 255; D_menu_801CEEAC = 255; - gTotalHits -= D_ctx_80177B70[gCurrentPlanet - 1]; - D_ctx_80177B90[gCurrentPlanet] = PLANET_NONE; - D_ctx_80177B70[gCurrentPlanet - 1] = 0; - D_ctx_80177BB0[gCurrentPlanet - 1] = 0; - D_ctx_80177B50[gCurrentPlanet - 1] = 0x00FFFFFF; + gTotalHits -= D_ctx_80177B70[gMissionNumber - 1]; + D_ctx_80177B90[gMissionNumber] = PLANET_NONE; + D_ctx_80177B70[gMissionNumber - 1] = 0; + D_ctx_80177BB0[gMissionNumber - 1] = 0; + D_ctx_80177B50[gMissionNumber - 1] = 0x00FFFFFF; gHitCount = 0; - gCurrentPlanet--; + gMissionNumber--; D_menu_801CD83C = Map_801A05B4(); @@ -3747,7 +3747,7 @@ void Map_801A53C8(void) { D_menu_801CEEAC = 255; sCurrentPlanetId = sNextPlanetId; - D_ctx_80177B90[gCurrentPlanet] = sCurrentPlanetId; + D_ctx_80177B90[gMissionNumber] = sCurrentPlanetId; Map_801A6368(); @@ -4098,7 +4098,7 @@ bool Map_801A62FC(PlanetId planet) { } #if MODS_LEVEL_SELECT == 1 - if (gCurrentPlanet == 6) { + if (gMissionNumber == 6) { return false; } #endif @@ -5401,7 +5401,7 @@ void Map_801A9A8C(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); #if MODS_LEVEL_SELECT == 1 - if (gCurrentPlanet == 6) { + if (gMissionNumber == 6) { return; } #endif @@ -5466,10 +5466,10 @@ void Map_801A9FD4(s32 arg0) { f32 temp = 16.0f; if (arg0) { - var_s3 = gCurrentPlanet; + var_s3 = gMissionNumber; } else { if ((D_game_80161A34 == 7) || (D_game_80161A34 == 8)) { - var_s3 = gCurrentPlanet; + var_s3 = gMissionNumber; } if (D_game_80161A34 == 5) { var_s3 = D_menu_801CD9AC; @@ -5571,10 +5571,10 @@ void Map_801AA434(s32 arg0, f32 x, f32 y, s32 idx) { D_ctx_80177B70[arg0]); if (D_game_80161A34 == 7) { - temp = gCurrentPlanet; + temp = gMissionNumber; } if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) { - temp = gCurrentPlanet + 1; + temp = gMissionNumber + 1; } if (arg0 < temp) { diff --git a/src/overlays/ovl_menu/fox_option.c b/src/overlays/ovl_menu/fox_option.c index 00e95496..af8ece76 100644 --- a/src/overlays/ovl_menu/fox_option.c +++ b/src/overlays/ovl_menu/fox_option.c @@ -111,7 +111,7 @@ s32 D_menu_801B9284; s32 D_menu_801B9288; // gap UnkStruct_D_menu_801B9250 D_menu_801B9290; f32 D_menu_801B9298[32]; -s32 spectrumAnalizerMode; +s32 spectrumAnalyzerMode; s32 D_menu_801B931C; bool D_menu_801B9320; // MusicPlaying status in the expert sound options extern s32 BSS_PAD_0; @@ -431,11 +431,11 @@ void Option_Setup(void) { D_menu_801B9178 = 0; D_menu_801B917C = 0; - D_menu_801B9124 = OPTION_MAIN; + D_menu_801B9124 = OPTION_MAIN_MENU; if ((D_game_80161A34 == 5) || (D_game_80161A34 == 8)) { if (D_game_80161A34 == 8) { - D_ctx_80177B90[gCurrentPlanet] = PLANET_VENOM; + D_ctx_80177B90[gMissionNumber] = PLANET_VENOM; if (D_play_800D3180[LEVEL_VENOM_ANDROSS] == 1) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_1].played = 1; if (playedExpertMode) { @@ -445,7 +445,7 @@ void Option_Setup(void) { } Save_Write(); } else if (D_play_800D3180[LEVEL_VENOM_ANDROSS] == 2) { - D_ctx_80177BB0[gCurrentPlanet] = 1; + D_ctx_80177BB0[gMissionNumber] = 1; gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].played = 1; if (playedExpertMode) { gSaveFile.save.data.planet[SAVE_SLOT_VENOM_2].expertClear = 1; @@ -501,7 +501,7 @@ void Option_Setup(void) { D_menu_801B9124 = OPTION_VERSUS; } else { - D_menu_801B9124 = OPTION_MAIN; + D_menu_801B9124 = OPTION_MAIN_MENU; } } @@ -513,10 +513,10 @@ void Option_Setup(void) { Memory_FreeAll(); - D_ctx_80178420 = SCREEN_WIDTH; - D_ctx_80178424 = SCREEN_HEIGHT; + gStarfieldX = SCREEN_WIDTH; + gStarfieldY = SCREEN_HEIGHT; - func_play_800A5D6C(); + Play_SetupStarfield(); gCsCamEyeX = 0.0f; gCsCamEyeY = 0.0f; @@ -546,7 +546,7 @@ void Option_Setup(void) { AUDIO_PLAY_BGM(SEQ_ID_MENU); } -void Option_Init(void) { +void Option_Main(void) { if (D_menu_801B9178 > 0) { D_menu_801B9178--; } @@ -577,7 +577,7 @@ void Option_Init(void) { void Option_UpdateEntry(void) { switch (D_menu_801B9124) { - case OPTION_MAIN: + case OPTION_MAIN_MENU: Option_MainMenuUpdate(); break; @@ -640,7 +640,7 @@ void Option_UpdateEntry(void) { void Option_DrawEntry(void) { switch (D_menu_801B9124) { - case OPTION_MAIN: + case OPTION_MAIN_MENU: Option_MainMenuDraw(); break; @@ -779,7 +779,7 @@ void Option_80192738(void) { void Option_MapUpdate(void) { if (gFillScreenAlpha == 255) { - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B9124 = 100; gGameState = GSTATE_MAP; gNextGameStateTimer = 2; @@ -821,7 +821,7 @@ void Option_801929F0(void) { D_game_800D2870 = 0; gBlurAlpha = 255; gControllerLock = 0; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B9248 = 0; if (D_menu_801B9244 == 0) { @@ -1049,7 +1049,7 @@ void Option_MainMenuUpdate(void) { if (D_menu_801B8284 < 120) { D_menu_801B8284 += 18; } else { - D_ctx_80178410 = 0; + gStarCount = 0; gGameState = GSTATE_TITLE; gNextGameStateTimer = 2; D_ctx_80177AE0 = 0; @@ -1098,7 +1098,7 @@ void Option_80193B04(void) { gBlurAlpha = 255; gControllerLock = 0; - D_ctx_80178410 = 800; + gStarCount = 800; if (D_menu_801B9248 == 0) { D_menu_801B91BC = 1; @@ -1300,15 +1300,15 @@ void Option_VersusDraw(void) { void Option_SoundInit(void) { s32 i; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B91B4 = 0; D_menu_801B91B8 = 0; D_menu_801B91BC = 1; D_menu_801B91A0 = 0; - gSoundMode = gSaveFile.save.data.soundMode; - SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gSoundMode]); + gOptionSoundMode = gSaveFile.save.data.soundMode; + SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); gVolumeSettings[0] = gSaveFile.save.data.musicVolume; gVolumeSettings[1] = gSaveFile.save.data.voiceVolume; @@ -1324,9 +1324,9 @@ void Option_SoundInit(void) { gVolumeSettings[2] = 99; } - func_8001D8A8(0, gVolumeSettings[0]); - func_8001D8A8(1, gVolumeSettings[1]); - func_8001D8A8(2, gVolumeSettings[2]); + Audio_SetVolume(0, gVolumeSettings[0]); + Audio_SetVolume(1, gVolumeSettings[1]); + Audio_SetVolume(2, gVolumeSettings[2]); D_menu_801AEB48[0].unk_18 = gVolumeSettings[0] + 146.0f; D_menu_801AEB48[1].unk_18 = gVolumeSettings[1] + 146.0f; @@ -1404,17 +1404,17 @@ void Option_SoundUpdate(void) { } void Option_80194AEC(void) { - s32 sp3C = gSoundMode; + s32 sp3C = gOptionSoundMode; s32 pad; if (Option_8019C418(&sp3C, 2, 0, 0, 20, 5, 4, gMainController, &D_menu_801B9260)) { AUDIO_PLAY_SFX(0x49000002, gDefaultSfxSource, 4); - gSoundMode = sp3C; - if (gSoundMode >= OPTIONSOUND_MAX) { - gSoundMode = OPTIONSOUND_STEREO; + gOptionSoundMode = sp3C; + if (gOptionSoundMode >= OPTIONSOUND_MAX) { + gOptionSoundMode = OPTIONSOUND_STEREO; } - gSaveFile.save.data.soundMode = gSoundMode; - SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gSoundMode]); + gSaveFile.save.data.soundMode = gOptionSoundMode; + SEQCMD_SET_SOUND_MODE(D_menu_801AE998[gOptionSoundMode]); } } @@ -1445,7 +1445,7 @@ void Option_80194BD0(void) { gSaveFile.save.data.sfxVolume = var_v1; break; } - func_8001D8A8(D_menu_801B924C, var_v1); + Audio_SetVolume(D_menu_801B924C, var_v1); } } @@ -1506,7 +1506,7 @@ void Option_SoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, 255, 255, 255, 255); - switch (gSoundMode) { + switch (gOptionSoundMode) { case OPTIONSOUND_STEREO: TextureRect_8bIA(&gMasterDisp, D_OPT_800CD90, 56, 13, D_menu_801AEFA8[8], D_menu_801AEFD4[8], 1.0f, 1.0f); break; @@ -1638,13 +1638,13 @@ void Option_801952B4(void) { void Option_ExpertSoundInit(void) { s32 i; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B931C = 0; D_menu_801B9290.unk_0 = 0; D_menu_801B9290.unk_4 = 0; - spectrumAnalizerMode = 0; + spectrumAnalyzerMode = 0; D_menu_801B9320 = 0; // clang-format off @@ -1686,11 +1686,11 @@ void Option_ExpertSoundUpdate(void) { } } - // Spectrum Analizer mode selector + // Spectrum Analyzer mode selector if (gControllerPress[gMainController].button & R_CBUTTONS) { - spectrumAnalizerMode++; - if (spectrumAnalizerMode > 2) { - spectrumAnalizerMode = 0; + spectrumAnalyzerMode++; + if (spectrumAnalyzerMode > 2) { + spectrumAnalyzerMode = 0; } } } @@ -1753,12 +1753,12 @@ void Option_ExpertSoundDraw(void) { temp_v0_4 = Audio_UpdateFrequencyAnalysis(); var_fv1 = 60.0f; - if (spectrumAnalizerMode == 2) { + if (spectrumAnalyzerMode == 2) { var_fv1 = 30.0f; } for (i = 0; i < 32; i++) { - if (spectrumAnalizerMode == 0 || spectrumAnalizerMode == 2) { + if (spectrumAnalyzerMode == 0 || spectrumAnalyzerMode == 2) { D_menu_801B9298[i] = (var_fv1 / 255.0f) * temp_v0_4[i]; } else { D_menu_801B9298[i] = var_fv1 - ((var_fv1 / 255.0f) * temp_v0_4[i]); @@ -1786,11 +1786,11 @@ void Option_ExpertSoundDraw(void) { gDPSetPrimColor(gMasterDisp++, 0, 0, (s32) r, (s32) g, (s32) b, 255); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[spectrumAnalizerMode], D_menu_801AF008, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, var_fs0, D_menu_801AF078[spectrumAnalyzerMode], D_menu_801AF008, MTXF_APPLY); Matrix_Scale(gGfxMatrix, D_menu_801AF00C, D_menu_801B9298[i], 1.0f, MTXF_APPLY); Matrix_SetGfxMtx(&gMasterDisp); - gSPDisplayList(gMasterDisp++, D_menu_801AF06C[spectrumAnalizerMode]); + gSPDisplayList(gMasterDisp++, D_menu_801AF06C[spectrumAnalyzerMode]); Matrix_Pop(&gGfxMatrix); } @@ -1800,7 +1800,7 @@ void Option_ExpertSoundDraw(void) { } void Option_DataInit(void) { - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B91E4 = 255.0f; D_menu_801B9330[0] = 0; D_menu_801B9330[1] = 0; @@ -2035,7 +2035,7 @@ static s32 D_menu_801AF0E8[3] = { 0, 67, 255 }; void Option_RankingInit(void) { Title_80188010(); - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B91D0 = 1; D_menu_801B93E4 = 0; @@ -2193,8 +2193,8 @@ void Option_8019752C(void) { TextureRect_8bIA(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[0], 40.0f, 1.5f); TextureRect_8bIA_MirY(&gMasterDisp, D_OPT_800D170, 8, 16, 0.0f, D_menu_801AF0F8[1], 40.0f, 1.5f); - func_bg_8003DE68(0, 70); - func_bg_8003DE68(170, 239); + Background_DrawPartialStarfield(0, 70); + Background_DrawPartialStarfield(170, 239); RCP_SetupDL(&gMasterDisp, 0x53); if (D_menu_801B91D4 >= 114.0f) { @@ -2637,7 +2637,7 @@ void Option_VersusMenuInit(void) { D_menu_801B9340 = 2; D_game_80161A28 = 0; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B93C4 = 0; @@ -2879,7 +2879,7 @@ void Option_80199EA8(void) { void Option_VersusStageInit(void) { s32 i; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B933C = 0; D_menu_801B91E8 = 255.0f; D_menu_801B93D4 = D_ctx_801778A4 - 1; @@ -3835,7 +3835,7 @@ s32 Option_8019C8C4(void) { s32 var_a0 = 0; s32 temp[10]; - for (i = 0; i < gCurrentPlanet + 1; i++) { + for (i = 0; i < gMissionNumber + 1; i++) { var_v0 += ((D_ctx_80177B50[i] & 0x00FF0000) >> 16) & 1; var_v0 += ((D_ctx_80177B50[i] & 0x0000FF00) >> 8) & 1; var_v0 += (D_ctx_80177B50[i] & 0x000000FF) & 1; @@ -3925,7 +3925,7 @@ void Option_8019CBC0(void) { AUDIO_PLAY_BGM(SEQ_ID_MENU); gBlurAlpha = 208; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B9130 = 1; D_menu_801B9128 = 0; @@ -4148,7 +4148,7 @@ void Option_8019D624(void) { sp142[10][1] = D_menu_801B9150[1][0]; sp142[10][2] = D_menu_801B9150[2][0]; - sp122[10] = gCurrentPlanet + 1; + sp122[10] = gMissionNumber + 1; sp116[10] = gLifeCount[0]; @@ -4345,7 +4345,7 @@ void Option_8019DE74(void) { D_menu_801B912C = 0; if (D_game_80161A34 == 5) { - D_ctx_80178410 = 0; + gStarCount = 0; gGameState = GSTATE_INIT; gLifeCount[0] = 2; gTotalHits = 0; @@ -4368,7 +4368,7 @@ void Option_8019DF64(void) { void Option_InvoiceUpdate(void) { switch (D_menu_801B912C) { case 0: - D_ctx_80178410 = 0; + gStarCount = 0; gBgColor = 0; gFillScreenRed = 0; gFillScreenGreen = 0; @@ -4405,7 +4405,7 @@ void Option_InvoiceUpdate(void) { case 3: if (D_menu_801B9178 == 0) { - D_ctx_80178410 = 0; + gStarCount = 0; gGameState = GSTATE_INIT; gDrawMode = DRAW_NONE; *gLifeCount = 2; diff --git a/src/overlays/ovl_menu/fox_title.c b/src/overlays/ovl_menu/fox_title.c index 72ffe63b..d6f6897c 100644 --- a/src/overlays/ovl_menu/fox_title.c +++ b/src/overlays/ovl_menu/fox_title.c @@ -161,7 +161,7 @@ u16* D_menu_801ADA30[5] = { gMsg_ID_10, gMsg_ID_20, gMsg_ID_30, gMsg_ID_40, gMsg_ID_50, }; -void Title_801875E0(void) { +void Title_Init(void) { gVIsPerFrame = 2; gGameFrameCount = 0; @@ -198,9 +198,9 @@ void Title_801875E0(void) { Memory_FreeAll(); - func_play_800A5D6C(); - D_ctx_80178420 = SCREEN_WIDTH; - D_ctx_80178424 = SCREEN_HEIGHT; + Play_SetupStarfield(); + gStarfieldX = SCREEN_WIDTH; + gStarfieldY = SCREEN_HEIGHT; Title_80188010(); @@ -215,7 +215,7 @@ void Title_801875E0(void) { gControllerLock = 30; } -void Title_80187754(void) { +void Title_Main(void) { switch (D_ctx_80177AE0) { case 0: if (gNextGameStateTimer == 0) { @@ -226,18 +226,18 @@ void Title_80187754(void) { case 1: gDrawMode = DRAW_NONE; - Title_801875E0(); + Title_Init(); break; case 2: gDrawMode = DRAW_TITLE; - Title_801877F0(); + Title_UpdateEntry(); break; } gGameFrameCount++; } -void Title_801877F0(void) { +void Title_UpdateEntry(void) { if (D_menu_801B82A8 > 0) { D_menu_801B82A8 -= 1; } @@ -273,7 +273,7 @@ void Title_801877F0(void) { Title_80190E64(); } -void Title_801878D8(void) { +void Title_Draw(void) { switch (D_menu_801B82C4) { case 7: Title_80187CA8(); @@ -360,7 +360,7 @@ void Title_80187B00(void) { switch (D_menu_801B82C0) { case 0: D_menu_801B8288 = 0; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B82BC = 450; D_menu_801B82C0++; D_menu_801B82A8 = 20; @@ -375,7 +375,7 @@ void Title_80187B00(void) { SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_FANFARE, 60); } } else { - D_ctx_80178410 = 0; + gStarCount = 0; gRadioState = 0; D_menu_801B82C0 = 0; gDrawMode = DRAW_NONE; @@ -509,7 +509,7 @@ void Title_801881FC(void) { D_menu_801B869C = 255; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B9040 = 0; D_menu_801B86C8 = 0.0f; @@ -857,7 +857,7 @@ void Title_801888E8(void) { return; } - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B82C0 = 0; @@ -908,7 +908,7 @@ void Title_80189208(void) { void Title_801894E8(void) { s32 i; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B7C98 = 10; for (i = 0; i < 10; i++) { @@ -1207,7 +1207,7 @@ void Title_8018A2F8(void) { } void Title_8018A338(void) { - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B869C = 255; @@ -1451,7 +1451,7 @@ void Title_8018A990(void) { } void Title_8018ABC0(void) { - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B869C = 255; @@ -1574,7 +1574,7 @@ void Title_8018B058(void) { gFillScreenRed = 255; gFillScreenGreen = 255; gFillScreenBlue = 255; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B8334 = 0; D_menu_801B8338 = 1; @@ -1840,7 +1840,7 @@ void Title_8018B5C4(void) { D_menu_801B82B4 = 0; - D_ctx_80178410 = 800; + gStarCount = 800; D_menu_801B82C0++; } @@ -1898,7 +1898,7 @@ void Title_8018C114(void) { void Title_8018C1C0(void) { s32 i; - D_ctx_80178410 = 1; + gStarCount = 1; D_menu_801B7C98 = 10; for (i = 0; i < 10; i++) { @@ -2089,7 +2089,7 @@ void Title_8018C644(void) { case 2: gFillScreenAlpha = 0; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B86A0 = 0; D_menu_801B82A8 = 20; D_menu_801B82C0++; @@ -3002,11 +3002,11 @@ void Title_80190144(void) { gFillScreenAlpha -= 4; } - D_ctx_801783D0 = D_menu_801B7BB8; - D_ctx_801783D4 = D_menu_801B7BBC; + gSunViewX = D_menu_801B7BB8; + gSunViewY = D_menu_801B7BBC; - if (D_ctx_801783D0 < 950.0f) { - if (D_ctx_801783D0 > -900.0f) { + if (gSunViewX < 950.0f) { + if (gSunViewX > -900.0f) { gFillScreenAlpha += 8; if (gFillScreenAlpha > 60) { gFillScreenAlpha = 60; @@ -3024,7 +3024,7 @@ void Title_80190144(void) { gDPSetColorDither(gMasterDisp++, G_CD_NOISE); Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); for (i = 0; i < 4; i++) { Matrix_Push(&gGfxMatrix); @@ -3055,8 +3055,8 @@ void Title_801903B8(void) { gDPSetColorDither(gMasterDisp++, G_CD_NOISE); if (gFillScreenAlpha > 0) { - temp_fs3 = D_ctx_801783D0 * -0.03f; - temp_fs4 = D_ctx_801783D4 * 0.03f; + temp_fs3 = gSunViewX * -0.03f; + temp_fs4 = gSunViewY * 0.03f; var_fs1 = 1.0f; if (gFillScreenAlpha < 10) { @@ -3066,7 +3066,7 @@ void Title_801903B8(void) { var_fs1 *= 0.5f; Matrix_Push(&gGfxMatrix); - Matrix_Translate(gGfxMatrix, D_ctx_801783D0, D_ctx_801783D4, -200.0f, MTXF_APPLY); + Matrix_Translate(gGfxMatrix, gSunViewX, gSunViewY, -200.0f, MTXF_APPLY); for (i = 4; i < 12; i++) { Matrix_Push(&gGfxMatrix); @@ -3217,7 +3217,7 @@ void Title_80190EA4(void) { D_menu_801B8284 += 18; } else { AUDIO_SET_SPEC(SFXCHAN_0, AUDIOSPEC_23); - D_ctx_80178410 = 0; + gStarCount = 0; gRadioState = 0; D_menu_801B82C0 = 0; gDrawMode = DRAW_NONE; @@ -3253,7 +3253,7 @@ void Title_80190FD0(void) { gNextGameStateTimer = 2; gOptionMenuStatus = OPTION_WAIT; gDrawMode = DRAW_NONE; - D_ctx_80178410 = 0; + gStarCount = 0; D_menu_801B8280 = 0; D_menu_801B8284 = 0; gControllerLock = 3; diff --git a/src/overlays/ovl_menu/fox_title.h b/src/overlays/ovl_menu/fox_title.h index f75cf80c..bffc2512 100644 --- a/src/overlays/ovl_menu/fox_title.h +++ b/src/overlays/ovl_menu/fox_title.h @@ -242,7 +242,7 @@ void Title_80190C9C(void); void Title_8018D2B8(s32); void Title_8018EA78(s32); void Title_801906A0(void); -void Title_801877F0(void); +void Title_UpdateEntry(void); s32 Title_80187ABC(void); void Title_80187B00(void); void Title_80187E28(void); diff --git a/tools/comptool.py b/tools/comptool.py index 16a64aad..da44ef20 100644 --- a/tools/comptool.py +++ b/tools/comptool.py @@ -8,11 +8,11 @@ import sys file_names = [ "makerom", "main", "dma_table", "audio_seq", "audio_bank", "audio_table", "ast_common", "ast_bg_space", "ast_bg_planet", - "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_vs_player", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", + "ast_arwing", "ast_landmaster", "ast_blue_marine", "ast_versus", "ast_enmy_planet", "ast_enmy_space", "ast_great_fox", "ast_star_wolf", "ast_allies", "ast_corneria", "ast_meteo", "ast_titania", "ast_7_ti_2", "ast_8_ti", "ast_9_ti", "ast_A_ti", "ast_7_ti_1", "ast_sector_x", "ast_sector_z", "ast_aquas", "ast_area_6", "ast_venom_1", "ast_venom_2", "ast_ve1_boss", "ast_bolse", "ast_fortuna", "ast_sector_y", "ast_solar", "ast_zoness", "ast_katina", "ast_macbeth", "ast_warp_zone", - "ast_title", "ast_menu", "ast_option", "ast_versus", "ast_font", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", + "ast_title", "ast_map", "ast_option", "ast_vs_menu", "ast_font", "ast_font_3d", "ast_andross", "ast_logo", "ast_ending", "ast_ending_award_front", "ast_ending_award_back", "ast_reward", "ast_training", "ast_radio", "ovl_i1", "ovl_i2", "ovl_i3", "ovl_i4", "ovl_i5", "ovl_i6", "ovl_menu", "ovl_ending", "ovl_unused" ]