From 9ac20c80b817a5b49af148bd342dd60ce7a28802 Mon Sep 17 00:00:00 2001 From: coco875 <59367621+coco875@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:00:08 +0200 Subject: [PATCH] fix a lot of warning in code (#598) * Fix warnings * Fix building --- Makefile | 2 +- courses/banshee_boardwalk/course_offsets.c | 1 + courses/big_donut/course_displaylists.inc.c | 2 +- courses/bowsers_castle/course_offsets.c | 2 +- courses/courseTable.c | 40 +- courses/courseTable.h | 2 +- courses/kalimari_desert/course_offsets.c | 2 +- courses/koopa_troopa_beach/course_data.c | 14 +- courses/luigi_raceway/course_offsets.c | 2 +- courses/mario_raceway/course_offsets.c | 2 +- courses/moo_moo_farm/course_offsets.c | 2 +- courses/rainbow_road/course_data.c | 10 +- courses/yoshi_valley/course_data.c | 14 +- include/PR/gu.h | 1 + include/defines.h | 4 +- include/save_data.h | 2 +- include/spline.h | 47 +-- src/actors/banana/update.inc.c | 2 +- src/actors/blue_and_red_shells/update.inc.c | 2 +- src/actors/fake_item_box/render.inc.c | 2 +- src/actors/fake_item_box/update.inc.c | 2 +- src/actors/green_shell/update.inc.c | 3 +- src/actors/item_box/render.inc.c | 2 +- src/actors/item_box/update.inc.c | 2 +- src/actors/palm_tree/render.inc.c | 2 +- src/audio/external.c | 32 +- src/audio/load.c | 6 +- src/code_80004740.c | 2 +- src/code_80005FD0.c | 350 ++++++++--------- src/code_80005FD0.h | 14 +- src/code_80057C60.c | 6 +- src/code_8006E9C0.c | 35 +- src/code_80086E70.c | 2 +- src/code_80091750.c | 412 ++++++++++---------- src/code_80091750.h | 12 +- src/data/some_data.c | 53 +-- src/data/some_data.h | 42 +- src/effects.c | 11 +- src/ending/ceremony_and_credits.c | 2 +- src/ending/ceremony_and_credits.h | 2 +- src/ending/code_80281780.c | 20 +- src/ending/code_80281C40.c | 2 +- src/kart_dma.c | 2 +- src/math_util_2.c | 2 +- src/menus.c | 4 +- src/racing/collision.c | 24 +- src/racing/collision.h | 1 + src/racing/math_util.c | 4 +- src/racing/math_util.h | 1 + src/racing/memory.c | 4 +- src/racing/render_courses.c | 26 +- src/render_objects.c | 56 +-- src/render_objects.h | 2 - src/render_player.c | 62 +-- src/spawn_players.c | 9 +- src/update_objects.c | 55 +-- src/update_objects.h | 9 +- yamls/us/data_segment2.yml | 364 ++++++++--------- 58 files changed, 893 insertions(+), 901 deletions(-) diff --git a/Makefile b/Makefile index 6996913ab3..70a9aca9ea 100644 --- a/Makefile +++ b/Makefile @@ -607,7 +607,7 @@ $(BUILD_DIR)/%.o: %.c $(BUILD_DIR)/%.o: $(BUILD_DIR)/%.c $(call print,Compiling:,$<,$@) - @$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $< + $(V)$(CC_CHECK) $(CC_CHECK_CFLAGS) -MMD -MP -MT $@ -MF $(BUILD_DIR)/$*.d $< $(V)$(CC) -c $(CFLAGS) -o $@ $< $(BUILD_DIR)/%.o: %.s $(MIO0_FILES) $(RAW_TEXTURE_FILES) diff --git a/courses/banshee_boardwalk/course_offsets.c b/courses/banshee_boardwalk/course_offsets.c index 39c00b5701..379e3f5fd1 100644 --- a/courses/banshee_boardwalk/course_offsets.c +++ b/courses/banshee_boardwalk/course_offsets.c @@ -2,6 +2,7 @@ #include "PR/gbi.h" #include "course_offsets.h" #include "courses/banshee_boardwalk/course_data.h" +#include extern u8 gTexture6447C4[]; extern u8 gTexture676FB0[]; diff --git a/courses/big_donut/course_displaylists.inc.c b/courses/big_donut/course_displaylists.inc.c index f5184e620a..2a1cbe3cd2 100644 --- a/courses/big_donut/course_displaylists.inc.c +++ b/courses/big_donut/course_displaylists.inc.c @@ -614,4 +614,4 @@ Gfx d_course_big_donut_packed_dl_1070[] = { gsSPDisplayList(d_course_big_donut_packed_dl_1040), gsSPEndDisplayList(), -}; \ No newline at end of file +}; diff --git a/courses/bowsers_castle/course_offsets.c b/courses/bowsers_castle/course_offsets.c index 3d840e8735..976b884fbb 100644 --- a/courses/bowsers_castle/course_offsets.c +++ b/courses/bowsers_castle/course_offsets.c @@ -63,7 +63,7 @@ const course_texture bowsers_castle_textures[] = { {0x00000000, 0x0000, 0x0000, 0x0}, }; -const u8 *bowsers_castle_dls[] = { +const Gfx *bowsers_castle_dls[] = { d_course_bowsers_castle_dl_0, d_course_bowsers_castle_dl_230, d_course_bowsers_castle_dl_110, diff --git a/courses/courseTable.c b/courses/courseTable.c index b4b59a4533..df73617972 100644 --- a/courses/courseTable.c +++ b/courses/courseTable.c @@ -10,140 +10,140 @@ struct CourseTable gCourseTable[] = {{ _mario_raceway_vertexSegmentRomStart, _mario_raceway_vertexSegmentRomEnd, _course_mario_raceway_offsetsSegmentRomStart, _course_mario_raceway_offsetsSegmentRomEnd, d_course_mario_raceway_vertex, d_course_mario_raceway_vertex_count, - d_course_mario_raceway_packed, d_course_mario_raceway_packed_end, + d_course_mario_raceway_packed, (Gfx*) d_course_mario_raceway_packed_end, mario_raceway_textures, 0, 0x0000, }, { _course_choco_mountain_dl_mio0SegmentRomStart, _course_choco_mountain_dl_mio0SegmentRomEnd, _choco_mountain_vertexSegmentRomStart, _choco_mountain_vertexSegmentRomEnd, _course_choco_mountain_offsetsSegmentRomStart, _course_choco_mountain_offsetsSegmentRomEnd, d_course_choco_mountain_vertex, d_course_choco_mountain_vertex_count, - d_course_choco_mountain_packed, d_course_choco_mountain_packed_end, + d_course_choco_mountain_packed, (Gfx*) d_course_choco_mountain_packed_end, choco_mountain_textures, 1, 0x0000, }, { _course_bowsers_castle_dl_mio0SegmentRomStart, _course_bowsers_castle_dl_mio0SegmentRomEnd, _bowsers_castle_vertexSegmentRomStart, _bowsers_castle_vertexSegmentRomEnd, _course_bowsers_castle_offsetsSegmentRomStart, _course_bowsers_castle_offsetsSegmentRomEnd, d_course_bowsers_castle_vertex, d_course_bowsers_castle_vertex_count, - d_course_bowsers_castle_packed, d_course_bowsers_castle_packed_end, + d_course_bowsers_castle_packed, (Gfx*) d_course_bowsers_castle_packed_end, bowsers_castle_textures, 0, 0x0000, }, { _course_banshee_boardwalk_dl_mio0SegmentRomStart, _course_banshee_boardwalk_dl_mio0SegmentRomEnd, _banshee_boardwalk_vertexSegmentRomStart, _banshee_boardwalk_vertexSegmentRomEnd, _course_banshee_boardwalk_offsetsSegmentRomStart, _course_banshee_boardwalk_offsetsSegmentRomEnd, d_course_banshee_boardwalk_vertex, d_course_banshee_boardwalk_vertex_count, - d_course_banshee_boardwalk_packed, d_course_banshee_boardwalk_packed_end, + d_course_banshee_boardwalk_packed, (Gfx*) d_course_banshee_boardwalk_packed_end, banshee_boardwalk_textures, 1, 0x0000, }, { _course_yoshi_valley_dl_mio0SegmentRomStart, _course_yoshi_valley_dl_mio0SegmentRomEnd, _yoshi_valley_vertexSegmentRomStart, _yoshi_valley_vertexSegmentRomEnd, _course_yoshi_valley_offsetsSegmentRomStart, _course_yoshi_valley_offsetsSegmentRomEnd, d_course_yoshi_valley_vertex, d_course_yoshi_valley_vertex_count, - d_course_yoshi_valley_packed, d_course_yoshi_valley_packed_end, + d_course_yoshi_valley_packed, (Gfx*) d_course_yoshi_valley_packed_end, yoshi_valley_textures, 0, 0x0000, }, { _course_frappe_snowland_dl_mio0SegmentRomStart, _course_frappe_snowland_dl_mio0SegmentRomEnd, _frappe_snowland_vertexSegmentRomStart, _frappe_snowland_vertexSegmentRomEnd, _course_frappe_snowland_offsetsSegmentRomStart, _course_frappe_snowland_offsetsSegmentRomEnd, d_course_frappe_snowland_vertex, d_course_frappe_snowland_vertex_count, - d_course_frappe_snowland_packed, d_course_frappe_snowland_packed_end, + d_course_frappe_snowland_packed, (Gfx*) d_course_frappe_snowland_packed_end, frappe_snowland_textures, 0, 0x0000, }, { _course_koopa_troopa_beach_dl_mio0SegmentRomStart, _course_koopa_troopa_beach_dl_mio0SegmentRomEnd, _koopa_troopa_beach_vertexSegmentRomStart, _koopa_troopa_beach_vertexSegmentRomEnd, _course_koopa_troopa_beach_offsetsSegmentRomStart, _course_koopa_troopa_beach_offsetsSegmentRomEnd, d_course_koopa_troopa_beach_vertex, d_course_koopa_troopa_beach_vertex_count, - d_course_koopa_troopa_beach_packed, d_course_koopa_troopa_beach_packed_end, + d_course_koopa_troopa_beach_packed, (Gfx*) d_course_koopa_troopa_beach_packed_end, koopa_troopa_beach_textures, 0, 0x0000, }, { _course_royal_raceway_dl_mio0SegmentRomStart, _course_royal_raceway_dl_mio0SegmentRomEnd, _royal_raceway_vertexSegmentRomStart, _royal_raceway_vertexSegmentRomEnd, _course_royal_raceway_offsetsSegmentRomStart, _course_royal_raceway_offsetsSegmentRomEnd, d_course_royal_raceway_vertex, d_course_royal_raceway_vertex_count, - d_course_royal_raceway_packed, d_course_royal_raceway_packed_end, + d_course_royal_raceway_packed, (Gfx*) d_course_royal_raceway_packed_end, royal_raceway_textures, 0, 0x0000, }, { _course_luigi_raceway_dl_mio0SegmentRomStart, _course_luigi_raceway_dl_mio0SegmentRomEnd, _luigi_raceway_vertexSegmentRomStart, _luigi_raceway_vertexSegmentRomEnd, _course_luigi_raceway_offsetsSegmentRomStart, _course_luigi_raceway_offsetsSegmentRomEnd, d_course_luigi_raceway_vertex, d_course_luigi_raceway_vertex_count, - d_course_luigi_raceway_packed, d_course_luigi_raceway_packed_end, + d_course_luigi_raceway_packed, (Gfx*) d_course_luigi_raceway_packed_end, luigi_raceway_textures, 0, 0x0000, }, { _course_moo_moo_farm_dl_mio0SegmentRomStart, _course_moo_moo_farm_dl_mio0SegmentRomEnd, _moo_moo_farm_vertexSegmentRomStart, _moo_moo_farm_vertexSegmentRomEnd, _course_moo_moo_farm_offsetsSegmentRomStart, _course_moo_moo_farm_offsetsSegmentRomEnd, d_course_moo_moo_farm_vertex, d_course_moo_moo_farm_vertex_count, - d_course_moo_moo_farm_packed, d_course_moo_moo_farm_packed_end, + d_course_moo_moo_farm_packed, (Gfx*) d_course_moo_moo_farm_packed_end, moo_moo_farm_textures, 0, 0x0000, }, { _course_toads_turnpike_dl_mio0SegmentRomStart, _course_toads_turnpike_dl_mio0SegmentRomEnd, _toads_turnpike_vertexSegmentRomStart, _toads_turnpike_vertexSegmentRomEnd, _course_toads_turnpike_offsetsSegmentRomStart, _course_toads_turnpike_offsetsSegmentRomEnd, d_course_toads_turnpike_vertex, d_course_toads_turnpike_vertex_count, - d_course_toads_turnpike_packed, d_course_toads_turnpike_packed_end, + d_course_toads_turnpike_packed, (Gfx*) d_course_toads_turnpike_packed_end, toads_turnpike_textures, 0, 0x0000, }, { _course_kalimari_desert_dl_mio0SegmentRomStart, _course_kalimari_desert_dl_mio0SegmentRomEnd, _kalimari_desert_vertexSegmentRomStart, _kalimari_desert_vertexSegmentRomEnd, _course_kalimari_desert_offsetsSegmentRomStart, _course_kalimari_desert_offsetsSegmentRomEnd, d_course_kalimari_desert_vertex, d_course_kalimari_desert_vertex_count, - d_course_kalimari_desert_packed, d_course_kalimari_desert_packed_end, + d_course_kalimari_desert_packed, (Gfx*) d_course_kalimari_desert_packed_end, kalimari_desert_textures, 0, 0x0000, }, { _course_sherbet_land_dl_mio0SegmentRomStart, _course_sherbet_land_dl_mio0SegmentRomEnd, _sherbet_land_vertexSegmentRomStart, _sherbet_land_vertexSegmentRomEnd, _course_sherbet_land_offsetsSegmentRomStart, _course_sherbet_land_offsetsSegmentRomEnd, d_course_sherbet_land_vertex, d_course_sherbet_land_vertex_count, - d_course_sherbet_land_packed, d_course_sherbet_land_packed_end, + d_course_sherbet_land_packed, (Gfx*) d_course_sherbet_land_packed_end, sherbet_land_textures, 0, 0x0000, }, { _course_rainbow_road_dl_mio0SegmentRomStart, _course_rainbow_road_dl_mio0SegmentRomEnd, _rainbow_road_vertexSegmentRomStart, _rainbow_road_vertexSegmentRomEnd, _course_rainbow_road_offsetsSegmentRomStart, _course_rainbow_road_offsetsSegmentRomEnd, d_course_rainbow_road_vertex, d_course_rainbow_road_vertex_count, - d_course_rainbow_road_packed, d_course_rainbow_road_packed_end, + d_course_rainbow_road_packed, (Gfx*) d_course_rainbow_road_packed_end, rainbow_road_textures, 0, 0x0000, }, { _course_wario_stadium_dl_mio0SegmentRomStart, _course_wario_stadium_dl_mio0SegmentRomEnd, _wario_stadium_vertexSegmentRomStart, _wario_stadium_vertexSegmentRomEnd, _course_wario_stadium_offsetsSegmentRomStart, _course_wario_stadium_offsetsSegmentRomEnd, d_course_wario_stadium_vertex, d_course_wario_stadium_vertex_count, - d_course_wario_stadium_packed, d_course_wario_stadium_packed_end, + d_course_wario_stadium_packed, (Gfx*) d_course_wario_stadium_packed_end, wario_stadium_textures, 0, 0x0000, }, { _course_block_fort_dl_mio0SegmentRomStart, _course_block_fort_dl_mio0SegmentRomEnd, _block_fort_vertexSegmentRomStart, _block_fort_vertexSegmentRomEnd, _course_block_fort_offsetsSegmentRomStart, _course_block_fort_offsetsSegmentRomEnd, d_course_block_fort_vertex, d_course_block_fort_vertex_count, - d_course_block_fort_packed, d_course_block_fort_packed_end, + d_course_block_fort_packed, (Gfx*) d_course_block_fort_packed_end, block_fort_textures, 0, 0x0000, }, { _course_skyscraper_dl_mio0SegmentRomStart, _course_skyscraper_dl_mio0SegmentRomEnd, _skyscraper_vertexSegmentRomStart, _skyscraper_vertexSegmentRomEnd, _course_skyscraper_offsetsSegmentRomStart, _course_skyscraper_offsetsSegmentRomEnd, d_course_skyscraper_vertex, d_course_skyscraper_vertex_count, - d_course_skyscraper_packed, d_course_skyscraper_packed_end, + d_course_skyscraper_packed, (Gfx*) d_course_skyscraper_packed_end, skyscraper_textures, 0, 0x0000, }, { _course_double_deck_dl_mio0SegmentRomStart, _course_double_deck_dl_mio0SegmentRomEnd, _double_deck_vertexSegmentRomStart, _double_deck_vertexSegmentRomEnd, _course_double_deck_offsetsSegmentRomStart, _course_double_deck_offsetsSegmentRomEnd, d_course_double_deck_vertex, d_course_double_deck_vertex_count, - d_course_double_deck_packed, d_course_double_deck_packed_end, + d_course_double_deck_packed, (Gfx*) d_course_double_deck_packed_end, double_deck_textures, 0, 0x0000, }, { _course_dks_jungle_parkway_dl_mio0SegmentRomStart, _course_dks_jungle_parkway_dl_mio0SegmentRomEnd, _dks_jungle_parkway_vertexSegmentRomStart, _dks_jungle_parkway_vertexSegmentRomEnd, _course_dks_jungle_parkway_offsetsSegmentRomStart, _course_dks_jungle_parkway_offsetsSegmentRomEnd, d_course_dks_jungle_parkway_vertex, d_course_dks_jungle_parkway_vertex_count, - d_course_dks_jungle_parkway_packed, d_course_dks_jungle_parkway_packed_end, + d_course_dks_jungle_parkway_packed, (Gfx*) d_course_dks_jungle_parkway_packed_end, dks_jungle_parkway_textures, 0, 0x0000, }, { _course_big_donut_dl_mio0SegmentRomStart, _course_big_donut_dl_mio0SegmentRomEnd, _big_donut_vertexSegmentRomStart, _big_donut_vertexSegmentRomEnd, _course_big_donut_offsetsSegmentRomStart, _course_big_donut_offsetsSegmentRomEnd, d_course_big_donut_vertex, d_course_big_donut_vertex_count, - d_course_big_donut_packed, d_course_big_donut_packed_end, + d_course_big_donut_packed, (Gfx*) d_course_big_donut_packed_end, big_donut_textures, 0, 0x0000, }}; diff --git a/courses/courseTable.h b/courses/courseTable.h index 7563e061eb..6fe2011a23 100644 --- a/courses/courseTable.h +++ b/courses/courseTable.h @@ -16,7 +16,7 @@ struct CourseTable { CourseVtx *vertexStart; // 0x18 segmented address of vertex data u32 vertexCount; // 0x1C number of vertices in vertex data u8 *packedStart; // 0x20 packed display list start address - uintptr_t finalDisplaylistOffset; // 0x24 + Gfx *finalDisplaylistOffset; // 0x24 u32 *textures; // 0x20 segmented address of textures table u16 unknown1; // 0x2C u16 padding; // 0x2E diff --git a/courses/kalimari_desert/course_offsets.c b/courses/kalimari_desert/course_offsets.c index 08bd004a15..feff3a8a04 100644 --- a/courses/kalimari_desert/course_offsets.c +++ b/courses/kalimari_desert/course_offsets.c @@ -57,7 +57,7 @@ const course_texture kalimari_desert_textures[] = { {0x00000000, 0x0000, 0x0000, 0x0}, }; -const u8 *kalimari_desert_dls[] = { +const Gfx *kalimari_desert_dls[] = { d_course_kalimari_desert_dl_0, d_course_kalimari_desert_dl_258, d_course_kalimari_desert_dl_100, diff --git a/courses/koopa_troopa_beach/course_data.c b/courses/koopa_troopa_beach/course_data.c index 18486f27b3..880364eef4 100644 --- a/courses/koopa_troopa_beach/course_data.c +++ b/courses/koopa_troopa_beach/course_data.c @@ -8557,7 +8557,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_koopa_troopa_beach_dl_16630, + (u32) d_course_koopa_troopa_beach_dl_16630, 0x00000000, 0x00000000, 0x00000000, @@ -8579,7 +8579,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_koopa_troopa_beach_dl_16850, + (u32) d_course_koopa_troopa_beach_dl_16850, 0x00000000, 0x00000000, 0x00000000, @@ -8590,7 +8590,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_koopa_troopa_beach_dl_168F0, + (u32) d_course_koopa_troopa_beach_dl_168F0, 0x00000024, 0x00000000, 0x00000000, @@ -8601,7 +8601,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_koopa_troopa_beach_dl_16990, + (u32) d_course_koopa_troopa_beach_dl_16990, 0x00000019, 0x00000000, 0x00000000, @@ -8629,7 +8629,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_koopa_troopa_beach_dl_16850, + (u32) d_course_koopa_troopa_beach_dl_16850, 0x00000000, 0x00000000, 0x00000000, @@ -8640,7 +8640,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_koopa_troopa_beach_dl_168F0, + (u32) d_course_koopa_troopa_beach_dl_168F0, 0x00000024, 0x00000000, 0x00000000, @@ -8651,7 +8651,7 @@ u32 d_course_koopa_troopa_beach_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_koopa_troopa_beach_dl_16990, + (u32) d_course_koopa_troopa_beach_dl_16990, 0x00000019, 0x00000000, 0x00000000, diff --git a/courses/luigi_raceway/course_offsets.c b/courses/luigi_raceway/course_offsets.c index ac95af599d..1cd496738b 100644 --- a/courses/luigi_raceway/course_offsets.c +++ b/courses/luigi_raceway/course_offsets.c @@ -87,7 +87,7 @@ const course_texture luigi_raceway_textures[] = { {0x00000000, 0x0000, 0x0000, 0x0}, }; -const u8 *luigi_raceway_dls[] = { +const Gfx *luigi_raceway_dls[] = { d_course_luigi_raceway_dl_0, d_course_luigi_raceway_dl_328, d_course_luigi_raceway_dl_1A8, diff --git a/courses/mario_raceway/course_offsets.c b/courses/mario_raceway/course_offsets.c index 87d3e0f3a1..6d299ed328 100644 --- a/courses/mario_raceway/course_offsets.c +++ b/courses/mario_raceway/course_offsets.c @@ -67,7 +67,7 @@ const course_texture mario_raceway_textures[] = { {0x00000000, 0x0000, 0x0000, 0x0}, }; -const u8 *mario_raceway_dls[] = { +const Gfx *mario_raceway_dls[] = { d_course_mario_raceway_dl_0, d_course_mario_raceway_dl_1D0, d_course_mario_raceway_dl_E8, diff --git a/courses/moo_moo_farm/course_offsets.c b/courses/moo_moo_farm/course_offsets.c index e31b570e4c..c3a1f80037 100644 --- a/courses/moo_moo_farm/course_offsets.c +++ b/courses/moo_moo_farm/course_offsets.c @@ -63,7 +63,7 @@ const course_texture moo_moo_farm_textures[] = { {0x00000000, 0x0000, 0x0000, 0x0}, }; -const u8 *moo_moo_farm_dls[] = { +const Gfx *moo_moo_farm_dls[] = { d_course_moo_moo_farm_dl_88, d_course_moo_moo_farm_dl_598, d_course_moo_moo_farm_dl_338, diff --git a/courses/rainbow_road/course_data.c b/courses/rainbow_road/course_data.c index baca547cf0..b19967c075 100644 --- a/courses/rainbow_road/course_data.c +++ b/courses/rainbow_road/course_data.c @@ -3547,7 +3547,7 @@ u32 d_rainbow_road_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_rainbow_road_dl_15550, + (u32) d_course_rainbow_road_dl_15550, 0x00000000, 0x00000000, 0x00000000, @@ -3555,7 +3555,7 @@ u32 d_rainbow_road_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_rainbow_road_dl_151A8, + (u32) d_course_rainbow_road_dl_151A8, 0x00000000, 0x00000000, 0x00000000, @@ -3577,7 +3577,7 @@ u32 d_rainbow_road_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_rainbow_road_dl_15C68, + (u32) d_course_rainbow_road_dl_15C68, 0x00000000, 0x00000000, 0x00000000, @@ -3585,7 +3585,7 @@ u32 d_rainbow_road_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_rainbow_road_dl_158C0, + (u32) d_course_rainbow_road_dl_158C0, 0x00000000, 0x00000000, 0x00000000, @@ -3593,7 +3593,7 @@ u32 d_rainbow_road_unk4[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_rainbow_road_dl_15F18, + (u32) d_course_rainbow_road_dl_15F18, 0x00000000, 0x00000000, 0x00000000, diff --git a/courses/yoshi_valley/course_data.c b/courses/yoshi_valley/course_data.c index bc80ad2f0e..2053ea389c 100644 --- a/courses/yoshi_valley/course_data.c +++ b/courses/yoshi_valley/course_data.c @@ -10886,7 +10886,7 @@ u32 d_course_yoshi_valley_unk5[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_yoshi_valley_dl_142C0, + (u32) d_course_yoshi_valley_dl_142C0, 0x00000000, 0x00000000, 0x00000000, @@ -10908,7 +10908,7 @@ u32 d_course_yoshi_valley_unk5[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_yoshi_valley_dl_143C8, + (u32) d_course_yoshi_valley_dl_143C8, 0x00000000, 0x00000000, 0x00000000, @@ -10919,7 +10919,7 @@ u32 d_course_yoshi_valley_unk5[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_yoshi_valley_dl_144A8, + (u32) d_course_yoshi_valley_dl_144A8, 0x000001cc, 0x00000000, 0x00000000, @@ -10930,7 +10930,7 @@ u32 d_course_yoshi_valley_unk5[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_yoshi_valley_dl_14500, + (u32) d_course_yoshi_valley_dl_14500, 0x000001cc, 0x00000000, 0x00000000, @@ -10941,7 +10941,7 @@ u32 d_course_yoshi_valley_unk5[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_yoshi_valley_dl_14558, + (u32) d_course_yoshi_valley_dl_14558, 0x00000158, 0x00000000, 0x00000000, @@ -10952,7 +10952,7 @@ u32 d_course_yoshi_valley_unk5[] = { 0x00000000, 0x00000007, 0x00000000, - d_course_yoshi_valley_dl_145D0, + (u32) d_course_yoshi_valley_dl_145D0, 0x00000120, 0x00000000, 0x00000000, @@ -11439,7 +11439,7 @@ Gfx *d_course_yoshi_valley_dl_list[] = { d_course_yoshi_valley_dl_40, d_course_yoshi_valley_dl_3F0, d_course_yoshi_valley_dl_290, d_course_yoshi_valley_dl_4E8, d_course_yoshi_valley_dl_7A0, d_course_yoshi_valley_dl_BC0, - d_course_yoshi_valley_dl_9C8, 0x06000CC0, // <- No idea what this is supposed to be a pointer to + d_course_yoshi_valley_dl_9C8, (Gfx *)0x06000CC0, // <- No idea what this is supposed to be a pointer to d_course_yoshi_valley_dl_FA0, d_course_yoshi_valley_dl_13F8, d_course_yoshi_valley_dl_1178, d_course_yoshi_valley_dl_14D0, d_course_yoshi_valley_dl_17A8, d_course_yoshi_valley_dl_1C38, diff --git a/include/PR/gu.h b/include/PR/gu.h index bd25b779e6..9b34e19f07 100644 --- a/include/PR/gu.h +++ b/include/PR/gu.h @@ -3,6 +3,7 @@ #include #include +#include "common_structs.h" #define GU_PI 3.1415926 /* Functions */ diff --git a/include/defines.h b/include/defines.h index 8851cdaa87..c575ffb852 100644 --- a/include/defines.h +++ b/include/defines.h @@ -296,7 +296,7 @@ /** * @brief Item IDs */ -typedef enum ITEMS { +enum ITEMS { /* 0x00 */ ITEM_NONE = 0, /* 0x01 */ ITEM_BANANA, /* 0x02 */ ITEM_BANANA_BUNCH, @@ -315,7 +315,7 @@ typedef enum ITEMS { /* 0x0F */ ITEM_SUPER_MUSHROOM }; -typedef enum KART_AI_BEHAVIOURS { +enum KART_AI_BEHAVIOURS { BEHAVIOUR_NONE = 0, BEHAVIOUR_1, BEHAVIOUR_HOP, diff --git a/include/save_data.h b/include/save_data.h index faa12376ae..78495bba51 100644 --- a/include/save_data.h +++ b/include/save_data.h @@ -65,4 +65,4 @@ typedef struct { extern SaveData gSaveData; -#endif \ No newline at end of file +#endif diff --git a/include/spline.h b/include/spline.h index a1dda049f5..525faa6faa 100644 --- a/include/spline.h +++ b/include/spline.h @@ -33,7 +33,7 @@ typedef struct { // The control point arrays have more control points in them than this number indicates. Not sure why though. s16 numControlPoints; // This has to be an array for this to work, so just make it size 1 - SplineControlPoint controlPoints[1]; + SplineControlPoint controlPoints[]; } SplineData; // All other SplineDataXX types are for use as data only. The size of the array in them matters a lot. @@ -42,60 +42,33 @@ typedef struct { // Ghosts in BansheeBoardwalk x 2 // Seagulls in KoopaTroopaBeach x 2 // Penguins in Sherbet Land x 1 -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[23]; -} SplineData23; +// length of 23 // Ghosts in BansheeBoardwalk x 2 // Seagulls in KoopaTroopaBeach x 1 -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[24]; -} SplineData24; +// length of 24 // Ghosts in BansheeBoardwalk x 1 // Seagulls in KoopaTroopaBeach x 1 // Penguins in Sherbet Land x 1 -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[25]; -} SplineData25; +// length of 25 // Data of this type is unreferenced or only referenced in an unused function -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[4]; -} SplineDataUnused4; +// lenght of 4 // Lakitu Countdown -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[15]; -} SplineData15; +// length of 15 // Lakitu Checkered Flag -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[21]; -} SplineData21; +// length of 21 -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[13]; -} SplineDataUnused13; +// length of 13 // Lakitu Second/Final Lap -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[12]; -} SplineData12; +// length of 12 // Lakitu Reverse -typedef struct { - s16 numControlPoints; - SplineControlPoint controlPoints[8]; -} SplineData8; +// length of 8 #endif diff --git a/src/actors/banana/update.inc.c b/src/actors/banana/update.inc.c index 4367d8ea48..bdede3011d 100644 --- a/src/actors/banana/update.inc.c +++ b/src/actors/banana/update.inc.c @@ -183,4 +183,4 @@ void update_actor_banana(struct BananaActor *banana) { default: break; } -} \ No newline at end of file +} diff --git a/src/actors/blue_and_red_shells/update.inc.c b/src/actors/blue_and_red_shells/update.inc.c index 4930191325..37a3ad226e 100644 --- a/src/actors/blue_and_red_shells/update.inc.c +++ b/src/actors/blue_and_red_shells/update.inc.c @@ -464,4 +464,4 @@ void update_actor_red_blue_shell(struct ShellActor *shell) { default: break; } -} \ No newline at end of file +} diff --git a/src/actors/fake_item_box/render.inc.c b/src/actors/fake_item_box/render.inc.c index 1845215757..30ef468d4b 100644 --- a/src/actors/fake_item_box/render.inc.c +++ b/src/actors/fake_item_box/render.inc.c @@ -145,4 +145,4 @@ void render_actor_fake_item_box(Camera *camera, struct FakeItemBox *fakeItemBox) gSPDisplayList(gDisplayListHead++, D_0D0030F8); gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK); } -} \ No newline at end of file +} diff --git a/src/actors/fake_item_box/update.inc.c b/src/actors/fake_item_box/update.inc.c index df6d1b5ea5..ad546120a5 100644 --- a/src/actors/fake_item_box/update.inc.c +++ b/src/actors/fake_item_box/update.inc.c @@ -89,4 +89,4 @@ void update_actor_fake_item_box(struct FakeItemBox *fake_item_box) { destroy_actor((struct Actor *) fake_item_box); break; } -} \ No newline at end of file +} diff --git a/src/actors/green_shell/update.inc.c b/src/actors/green_shell/update.inc.c index 9fc34ab6f2..891292953f 100644 --- a/src/actors/green_shell/update.inc.c +++ b/src/actors/green_shell/update.inc.c @@ -3,6 +3,7 @@ #include #include #include +#include "collision.h" /** * @brief Updates the green shell actor. @@ -190,4 +191,4 @@ void update_actor_green_shell(struct ShellActor *shell) { default: break; } -} \ No newline at end of file +} diff --git a/src/actors/item_box/render.inc.c b/src/actors/item_box/render.inc.c index 8ccc8bf43b..2ab170e891 100644 --- a/src/actors/item_box/render.inc.c +++ b/src/actors/item_box/render.inc.c @@ -155,4 +155,4 @@ void render_actor_item_box(Camera *camera, struct ItemBox *item_box) { } gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); } -} \ No newline at end of file +} diff --git a/src/actors/item_box/update.inc.c b/src/actors/item_box/update.inc.c index 02914498ad..e6a912c51f 100644 --- a/src/actors/item_box/update.inc.c +++ b/src/actors/item_box/update.inc.c @@ -65,4 +65,4 @@ void update_actor_item_box(struct ItemBox *itemBox) { } break; } -} \ No newline at end of file +} diff --git a/src/actors/palm_tree/render.inc.c b/src/actors/palm_tree/render.inc.c index eb08950732..5728f78db1 100644 --- a/src/actors/palm_tree/render.inc.c +++ b/src/actors/palm_tree/render.inc.c @@ -57,4 +57,4 @@ void render_actor_palm_tree(Camera *arg0, UNUSED Mat4 arg1, struct PalmTree *arg } } } -} \ No newline at end of file +} diff --git a/src/audio/external.c b/src/audio/external.c index 6b7408d643..97e9c085a2 100644 --- a/src/audio/external.c +++ b/src/audio/external.c @@ -952,7 +952,7 @@ void func_800C3448(u32 arg0) { } void func_800C3478(void) { - for(D_800EA1E8; D_800EA1E4 != D_800EA1E8;) { + for (D_800EA1E8; D_800EA1E4 != D_800EA1E8;) { func_800C2A2C(D_80192CD0[D_800EA1E8++]); } } @@ -1896,7 +1896,7 @@ GLOBAL_ASM("asm/non_matchings/audio/external/func_800C4FE4.s") // Seems somewhat similar to certain parts of `select_current_sounds` from SM64 void func_800C5278(u8 bankId) { - s32 stackPadding0; + UNUSED s32 stackPadding0; u8 soundId; struct SoundCharacteristics sp60; @@ -1962,7 +1962,7 @@ void func_800C550C(Vec3f *arg0) { } void func_800C5578(Vec3f *arg0, u32 soundBits) { - s32 stackPadding0; + UNUSED s32 stackPadding0; u8 bankId; u8 next; u8 curr; @@ -1993,7 +1993,7 @@ void func_800C5578(Vec3f *arg0, u32 soundBits) { } void func_800C56F0(u32 soundBits) { - s32 stackPadding0; + UNUSED s32 stackPadding0; u8 bankId; u8 next; u8 curr; @@ -2336,7 +2336,7 @@ void func_800C6758(u8 playerId) { void func_800C683C(u8 cameraId) { if ((D_800EA108 == 0) && (D_800EA0EC[cameraId] == 0)) { if (D_800E9E74[cameraId] != D_800E9E84[cameraId]) { - func_800C5578(D_800E9F7C[cameraId].pos, D_800E9E94[cameraId]); + func_800C5578(&D_800E9F7C[cameraId].pos, D_800E9E94[cameraId]); switch (D_800E9E74[cameraId]) { case 3: play_sound(SOUND_ACTION_TYRE_SQUEAL, &D_800E9F7C[cameraId].pos, cameraId, &D_800E9F14[cameraId], &D_800E9EF4[cameraId], (u8 *) &D_800E9F7C[cameraId].unk_14); @@ -2453,7 +2453,7 @@ void func_800C683C(u8 cameraId) { D_800E9E94[cameraId] = SOUND_ARG_LOAD(0x01, 0x00, 0xF0, 0x2B); break; default: - func_800C5578(D_800E9F7C[cameraId].pos, D_800E9E94[cameraId]); + func_800C5578(&D_800E9F7C[cameraId].pos, D_800E9E94[cameraId]); break; } } @@ -2672,7 +2672,7 @@ void func_800C76C0(u8 playerId) { func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x00, 0xFA, 0x28)); func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x00, 0xFF, 0x2C)); func_800C9018(playerId, SOUND_ARG_LOAD(0x01, 0x00, 0xFA, 0x4C)); - func_800C5578(D_800E9F7C[playerId].pos, D_800E9E94[playerId]); + func_800C5578(&D_800E9F7C[playerId].pos, D_800E9E94[playerId]); D_800E9E74[playerId] = 0; switch (gModeSelection) { /* irregular */ case GRAND_PRIX: @@ -3161,7 +3161,7 @@ void func_800C8F80(u8 arg0, u32 soundBits) { } void func_800C9018(u8 arg0, u32 soundBits) { - func_800C5578(D_800E9F7C[arg0].pos, soundBits); + func_800C5578(&D_800E9F7C[arg0].pos, soundBits); } void func_800C9060(u8 playerId, u32 soundBits) { @@ -3312,11 +3312,11 @@ void func_800C94A4(u8 playerId) { } void func_800C97C4(u8 arg0) { - func_800C5578(D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x00)); - func_800C5578(D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x14)); - func_800C5578(D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x2E)); - func_800C5578(D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x36)); - func_800C5578(D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x3E)); + func_800C5578(&D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x00)); + func_800C5578(&D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x14)); + func_800C5578(&D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x2E)); + func_800C5578(&D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x36)); + func_800C5578(&D_800E9F7C[arg0].pos, gPlayers[arg0].characterId + SOUND_ARG_LOAD(0x01, 0x04, 0xFF, 0x3E)); } void func_800C98B8(Vec3f position, Vec3f velocity, u32 soundBits) { @@ -3342,7 +3342,7 @@ void func_800C99E0(Vec3f arg0, s32 soundBits) { for(temp_t9 = 0; temp_t9 < D_800EA1C0 + 1; temp_t9++) { temp_v0 = func_800C21E8(arg0, soundBits); if (temp_v0 != NULL) { - func_800C5578(*temp_v0, soundBits); + func_800C5578(temp_v0, soundBits); } } } @@ -3431,7 +3431,7 @@ void func_800C9EF4(Vec3f arg0, u32 soundBits) { for (i = 0; i < D_800EA1C0 + 1; i++) { temp = func_800C21E8(arg0, soundBits); if (temp != NULL) { - func_800C5578(*temp, soundBits); + func_800C5578(temp, soundBits); } } } @@ -3659,7 +3659,7 @@ void func_800CA984(u8 arg0) { void func_800CAACC(u8 playerId) { if ((u8) D_800EA108 == 0) { - func_800C5578(*func_800C21E8(gPlayers[playerId].pos, SOUND_ITEM_STAR), SOUND_ITEM_STAR); + func_800C5578(func_800C21E8(gPlayers[playerId].pos, SOUND_ITEM_STAR), SOUND_ITEM_STAR); } } diff --git a/src/audio/load.c b/src/audio/load.c index f43d3d4a8a..a3fab544db 100644 --- a/src/audio/load.c +++ b/src/audio/load.c @@ -109,7 +109,7 @@ char loadAudioString38[] = "---------------------------------------\n"; void audio_dma_copy_immediate(u8 *devAddr, void *vAddr, size_t nbytes) { // eu_stubbed_printf_3("Romcopy %x -> %x ,size %x\n", devAddr, vAddr, nbytes); osInvalDCache(vAddr, nbytes); - osPiStartDma(&D_803B6740, OS_MESG_PRI_HIGH, OS_READ, devAddr, vAddr, nbytes, &D_803B6720); + osPiStartDma(&D_803B6740, OS_MESG_PRI_HIGH, OS_READ, (uintptr_t)devAddr, vAddr, nbytes, &D_803B6720); osRecvMesg(&D_803B6720, NULL, OS_MESG_BLOCK); // eu_stubbed_printf_0("Romcopyend\n"); } @@ -384,9 +384,9 @@ void patch_sound(struct AudioBankSound *sound, u8 *memBase, u8 *offsetBase) { #define PATCH(x, base) (patched = (void *)((uintptr_t) (x) + (uintptr_t) base)) if (sound->sample != NULL) { - sample = sound->sample = (struct AdpcmLoop *) PATCH(sound->sample, memBase); + sample = sound->sample = (struct AudioBankSample *) PATCH(sound->sample, memBase); if (sample->loaded == 0) { - sample->sampleAddr = (struct u8 *) PATCH(sample->sampleAddr, offsetBase); + sample->sampleAddr = (u8 *) PATCH(sample->sampleAddr, offsetBase); sample->loop = (struct AdpcmLoop *) PATCH(sample->loop, memBase); sample->book = (struct AdpcmBook *) PATCH(sample->book, memBase); sample->loaded = 1; diff --git a/src/code_80004740.c b/src/code_80004740.c index c94a681f5d..50ce5f1ed4 100644 --- a/src/code_80004740.c +++ b/src/code_80004740.c @@ -175,4 +175,4 @@ s16 func_80004EAC(void *addr, s16 offset) { struct stru_80004EAC *temp = (struct stru_80004EAC *) segmented_to_virtual((void *) item[offset]); return temp->unk8 - 1; -} \ No newline at end of file +} diff --git a/src/code_80005FD0.c b/src/code_80005FD0.c index d641ffddf7..c2c4c4fe4c 100644 --- a/src/code_80005FD0.c +++ b/src/code_80005FD0.c @@ -841,7 +841,7 @@ void func_800074D4(void) { Player *var_a0_2; f32 temp_a0; s32 sp68[8]; - s32 temp_s0; + UNUSED s32 temp_s0; s32 temp_t1; s32 var_a3; s32 var_a3_2; @@ -1058,7 +1058,7 @@ void func_80007FA4(s32 arg0, Player *player, f32 arg2) { void func_80008424(s32 playerId, f32 arg1, Player *player) { f32 var_f2; f32 var_f0; - s32 thing; + UNUSED s32 thing; s32 var_a1; var_f2 = player->unk_094; @@ -1459,9 +1459,9 @@ void func_8000929C(s32 playerId, Player *player) { s32 var_v0; s32 var_v1; f32 someTemp0; - s16 stackPadding0; + UNUSED s16 stackPadding0; s16 var_t0; - s32 stackPadding1; + UNUSED s32 stackPadding1; tempPos0 = player->pos[0]; tempPos1 = player->pos[1]; @@ -1609,7 +1609,7 @@ void func_800098FC(s32 arg0, Player *player) { } } -void func_800099EC(s32 playerId, Player *unused) { +void func_800099EC(s32 playerId, UNUSED Player *unused) { s32 var_s0; if (D_801633C8[playerId] >= 0x65) { @@ -1644,33 +1644,33 @@ void func_800099EC(s32 playerId, Player *unused) { // FAKEMATCH1 is the best improvement I've seen yet, MISMATCH2/3 become the only issues. void func_80009B60(s32 playerId) { - s32 stackPadding00; - s32 stackPadding01; - s32 stackPadding02; - s32 stackPadding03; - s32 stackPadding04; - s32 stackPadding05; - s32 stackPadding06; - s32 stackPadding07; - s32 stackPadding08; - s32 stackPadding09; - s32 stackPadding0A; - s32 stackPadding0B; - s32 stackPadding0C; - s32 stackPadding0D; + UNUSED s32 stackPadding00; + UNUSED s32 stackPadding01; + UNUSED s32 stackPadding02; + UNUSED s32 stackPadding03; + UNUSED s32 stackPadding04; + UNUSED s32 stackPadding05; + UNUSED s32 stackPadding06; + UNUSED s32 stackPadding07; + UNUSED s32 stackPadding08; + UNUSED s32 stackPadding09; + UNUSED s32 stackPadding0A; + UNUSED s32 stackPadding0B; + UNUSED s32 stackPadding0C; + UNUSED s32 stackPadding0D; s16 var_a0_2; s16 var_a1; - s32 stackPadding0E; - s32 stackPadding0F; - s32 stackPadding10; - s32 stackPadding11; - s32 stackPadding12; - s32 stackPadding13; - s32 stackPadding14; - s32 stackPadding15; - s32 stackPadding16; - s32 stackPadding17; - s32 stackPadding18; + UNUSED s32 stackPadding0E; + UNUSED s32 stackPadding0F; + UNUSED s32 stackPadding10; + UNUSED s32 stackPadding11; + UNUSED s32 stackPadding12; + UNUSED s32 stackPadding13; + UNUSED s32 stackPadding14; + UNUSED s32 stackPadding15; + UNUSED s32 stackPadding16; + UNUSED s32 stackPadding17; + UNUSED s32 stackPadding18; u16 stackPadding19; u16 stackPadding1A; f32 temp_f0; @@ -2029,14 +2029,14 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80009B60.s") #ifdef NON_MATCHING // Lots of work left to do, might be funtionally accurate? void func_8000B140(s32 playerId) { - f32 stackPadding0; - f32 stackPadding1; - f32 stackPadding2; - f32 stackPadding3; - f32 stackPadding4; - f32 stackPadding5; - f32 stackPadding6; - f32 stackPadding7; + UNUSED f32 stackPadding0; + UNUSED f32 stackPadding1; + UNUSED f32 stackPadding2; + UNUSED f32 stackPadding3; + UNUSED f32 stackPadding4; + UNUSED f32 stackPadding5; + UNUSED f32 stackPadding6; + UNUSED f32 stackPadding7; f32 temp_f0_2; f32 temp_f12; f32 temp_f14; @@ -2046,9 +2046,9 @@ void func_8000B140(s32 playerId) { f32 var_f18; f32 var_f20; s16 spB0[8]; - f32 stackPadding8; + UNUSED f32 stackPadding8; s16 sp9C[8]; - f32 stackPadding9; + UNUSED f32 stackPadding9; f32 sp74[8]; s32 temp_a1_2; s16 temp_v1_2; @@ -2211,9 +2211,9 @@ void func_8000BA14(u16 waypointIndex, f32 arg1, f32 arg2, s16 pathIndex) { f32 xdiff; f32 zdiff; f32 distance; - f32 temp_f12; - f32 temp_f2_2; - TrackWaypoint *path; + UNUSED f32 temp_f12; + UNUSED f32 temp_f2_2; + UNUSED TrackWaypoint *path; TrackWaypoint *waypointTwo; TrackWaypoint *waypointOne; @@ -2497,7 +2497,7 @@ s16 func_8000C9DC(f32 posX, f32 posY, f32 posZ, s16 waypointIndex, s32 pathIndex return nearestWaypointIndex; } -void func_8000CBA4(UNUSED f32 posX, f32 posY, UNUSED f32 posZ, s16 *waypointIndex, s32 arg4) { +void func_8000CBA4(UNUSED f32 posX, f32 posY, UNUSED f32 posZ, s16 *waypointIndex, UNUSED s32 arg4) { s16 var_v0; var_v0 = *waypointIndex; @@ -2536,9 +2536,9 @@ s16 func_8000CC88(f32 posX, f32 posY, f32 posZ, Player *player, s32 playerId, s3 s16 func_8000CD24(f32 posX, f32 posY, f32 posZ, s16 waypointIndex, Player *player, s32 playerId, s32 pathIndex) { s16 sp5E; - s16 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; + UNUSED s16 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; TrackWaypoint *temp_v1; if ((player->type & 0x4000) && !(player->type & 0x1000)) { @@ -2597,7 +2597,7 @@ s16 func_8000CD24(f32 posX, f32 posY, f32 posZ, s16 waypointIndex, Player *playe return sp5E; } -s16 func_8000D100(f32 xPos, f32 yPos, f32 zPos, s16 arg3) { +s16 func_8000D100(f32 xPos, UNUSED f32 yPos, f32 zPos, s16 arg3) { f32 xdiff; f32 zdiff; f32 minimumDistance; @@ -2683,12 +2683,12 @@ f32 func_8000D3B8(s32 playerId) { } void func_8000D438(s32 arg0, u16 arg1) { - s32 stackPadding0; + UNUSED s32 stackPadding0; f32 sp48; f32 sp44; - s32 stackPadding1; - s32 stackPadding2; - s32 stackPadding3; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; f32 stackPadding4; f32 stackPadding5; f32 sp2C; @@ -2751,7 +2751,7 @@ s16 func_8000D6D0(Vec3f arg0, s16 *waypointIndex, f32 arg2, f32 arg3, s16 pathIn f32 temp1; f32 temp2; f32 midX; - s16 stackPadding1; + UNUSED s16 stackPadding1; s16 waypoint1; s16 waypoint2; f32 pad3; @@ -2813,14 +2813,14 @@ s16 func_8000D6D0(Vec3f arg0, s16 *waypointIndex, f32 arg2, f32 arg3, s16 pathIn return func_80005FD0(sp50, arg0); } -s16 func_8000D940(f32 *arg0, s16 *waypointIndex, f32 arg2, f32 arg3, s16 pathIndex) { - f32 pad; +s16 func_8000D940(Vec3f arg0, s16 *waypointIndex, f32 arg2, f32 arg3, s16 pathIndex) { + UNUSED f32 pad; f32 thing1; f32 thing2; - s16 stackPadding1; + UNUSED s16 stackPadding1; s16 waypoint1; s16 waypoint2; - s16 stackPadding2; + UNUSED s16 stackPadding2; f32 pad2; f32 midX; f32 pad3; @@ -2883,15 +2883,15 @@ s16 func_8000DBAC(Vec3f pos, s16 *waypointIndex, f32 speed) { f32 origXPos; f32 origYPos; f32 origZPos; - s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; - s32 stackPadding3; - s32 stackPadding4; - s32 stackPadding5; - s32 stackPadding6; - s32 stackPadding7; - s32 stackPadding8; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; + UNUSED s32 stackPadding4; + UNUSED s32 stackPadding5; + UNUSED s32 stackPadding6; + UNUSED s32 stackPadding7; + UNUSED s32 stackPadding8; f32 midX; f32 midZ; f32 x_dist; @@ -2937,13 +2937,13 @@ s16 func_8000DBAC(Vec3f pos, s16 *waypointIndex, f32 speed) { } void set_bomb_kart_spawn_positions(void) { - Collision *var_s2; + UNUSED Collision *var_s2; f32 startingXPos; f32 startingZPos; f32 startingYPos; s32 var_s3; TrackWaypoint *temp_v0; - BombKart *var_s0; + UNUSED BombKart *var_s0; BombKartSpawn *temp_s1; for (var_s3 = 0; var_s3 < NUM_BOMB_KARTS_VERSUS; var_s3++) { @@ -2995,25 +2995,25 @@ void set_bomb_kart_spawn_positions(void) { } void func_8000DF8C(s32 bombKartId) { - s32 stackPadding0; + UNUSED s32 stackPadding0; f32 sp118; f32 var_f18; TrackWaypoint *temp_v0_2; f32 temp_f0_3; f32 sp108; - s32 stackPadding1; - s32 stackPadding2; - s32 stackPadding3; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; f32 temp_f14; - s32 stackPadding4; + UNUSED s32 stackPadding4; f32 temp_f16; - s32 stackPadding5; - s32 stackPadding6; - s32 stackPadding7; - s32 stackPadding8; - s32 stackPadding9; - s32 stackPaddingA; - s32 stackPaddingB; + UNUSED s32 stackPadding5; + UNUSED s32 stackPadding6; + UNUSED s32 stackPadding7; + UNUSED s32 stackPadding8; + UNUSED s32 stackPadding9; + UNUSED s32 stackPaddingA; + UNUSED s32 stackPaddingB; f32 temp_f0; f32 temp_f0_4; u16 spCA; @@ -3024,25 +3024,25 @@ void func_8000DF8C(s32 bombKartId) { f32 temp_f12_4; f32 temp_f14_2; f32 spAC; - s32 stackPaddingC; + UNUSED s32 stackPaddingC; f32 temp_f16_2; f32 spA0; f32 temp_f2; f32 temp_f2_4; f32 sp94; - s32 stackPaddingD; + UNUSED s32 stackPaddingD; f32 var_f20; f32 sp88; f32 var_f22; f32 var_f24; u16 sp7E; u16 sp7C; - u16 sp4C; + UNUSED u16 sp4C; u16 temp_t6; u16 temp_t7; u16 var_s1; s32 var_a0; - s32 stackPaddingE; + UNUSED s32 stackPaddingE; TrackWaypoint *temp_v0_4; BombKart *bombKart; BombKart *bombKart2; @@ -3505,11 +3505,11 @@ void func_8000F2DC(void) { void func_8000F628(void) { - Camera *camera; + UNUSED Camera *camera; s32 temp_v0_3; s32 i; Test *var_s5; - s32 temp_v1; + UNUSED s32 temp_v1; UNUSED s32 pad; for (i = 0; i < NUM_PLAYERS; i++) { @@ -3532,7 +3532,7 @@ void func_8000F628(void) { gCourseCompletionPercentByPlayerId[i] = 0.0f; gTimePlayerLastTouchedFinishLine[i] = 0.0f; if (gModeSelection == GRAND_PRIX) { - if(1); if(1); // Maybe some debug code? + if(1) {}; if(1) {}; // Maybe some debug code? gGPCurrentRaceRankByPlayerId[i] = (s32) D_80165270[i]; D_801643E0[i] = (s32) D_80165270[i]; } else { @@ -3616,7 +3616,7 @@ void func_8000F628(void) { } for (i = 0; i < NUM_PLAYERS; i++) { - if (1); + if (1) {}; gPathIndexByPlayerId[i] = 0; gNearestWaypointByPlayerId[i] = gWaypointCountByPathIndex[gPathIndexByPlayerId[i]] - gGPCurrentRaceRankByPlayerId[i] - 4; } @@ -3890,7 +3890,7 @@ void func_80010DBC(s32 pathIndex) { u16 *angle; if ((s32) gKartAICourseMaximumSeparation[gCurrentCourseId] >= 0) { - for (angle = &D_80164590[pathIndex][0], waypointIndex = 0; waypointIndex < gWaypointCountByPathIndex[pathIndex]; waypointIndex++, angle++) { + for (angle = (u16*) &D_80164590[pathIndex][0], waypointIndex = 0; waypointIndex < gWaypointCountByPathIndex[pathIndex]; waypointIndex++, angle++) { *angle = func_80010CB0(pathIndex, waypointIndex); } } @@ -3941,7 +3941,7 @@ f32 func_80010FA0(f32 arg0, f32 arg1, f32 arg2, UNUSED s32 arg3, UNUSED s32 arg4 /** * @return's the number of items processed. */ -s32 func_80011014(TrackWaypoint *pathDest, TrackWaypoint *path, s32 numPathPoints, s32 pathIndex) { +s32 func_80011014(TrackWaypoint *pathDest, TrackWaypoint *path, s32 numPathPoints, UNUSED s32 pathIndex) { f32 temp_f24_2; f32 temp_f2_3; f32 var_f20_2; @@ -3967,7 +3967,7 @@ s32 func_80011014(TrackWaypoint *pathDest, TrackWaypoint *path, s32 numPathPoint TrackWaypoint *point2; TrackWaypoint *point3; f32 temp; - TrackWaypoint *dest; + UNUSED TrackWaypoint *dest; var_f30 = 0.0f; var_s0 = 0; temp_f20 = (f32) path[0].posX; @@ -4095,7 +4095,7 @@ s32 process_path_data(TrackWaypoint *dest, TrackWaypoint *src) { s32 func_8001168C(PathNoY *pathDest, TrackWaypoint *pathSrc, s32 numWaypoints) { f32 temp_f14_3; f32 temp_f16_2; - s32 pad; + UNUSED s32 pad; f32 x1; f32 z1; @@ -4105,7 +4105,7 @@ s32 func_8001168C(PathNoY *pathDest, TrackWaypoint *pathSrc, s32 numWaypoints) { f32 z3; - s32 pad2; + UNUSED s32 pad2; f32 temp_f24; f32 spA8; @@ -4190,7 +4190,7 @@ void kart_ai_behaviour_start(s32 playerId, Player *player) { s16 waypointStart; s16 waypointEnd; s32 behaviourType; - s32 test; + UNUSED s32 test; sCurrentKartAIBehaviour = &gCoursesKartAIBehaviour[gCurrentCourseId][gCurrentKartAIBehaviourId[playerId]]; @@ -4205,7 +4205,7 @@ void kart_ai_behaviour_start(s32 playerId, Player *player) { reset_kart_ai_behaviour_none(playerId); return; } - if ((u32)playerWaypoint == waypointStart) { + if ((u32)playerWaypoint == (u32)waypointStart) { gKartAIBehaviourState[playerId] = KART_AI_BEHAVIOUR_STATE_RUNNING; gPreviousKartAIBehaviourId[playerId] = gCurrentKartAIBehaviourId[playerId]; gCurrentKartAIBehaviourId[playerId]++; @@ -4303,7 +4303,7 @@ void kart_ai_behaviour(s32 playerIndex) { } } -void func_80011EC0(s32 arg0, Player *player, s32 arg2, u16 arg3) { +void func_80011EC0(s32 arg0, Player *player, s32 arg2, UNUSED u16 arg3) { if ((((player->unk_094 / 18.0f) * 216.0f) >= 45.0f) && (D_801630E8[arg0] == 0)) { switch (D_801631D8[D_80162FCE]) { case 0: @@ -4377,12 +4377,12 @@ void func_80012220(VehicleStuff *vehicle) { origXPos = vehicle->position[0]; origZPos = vehicle->position[2]; if (D_8016347A == 0) { - func_8000D6D0(vehicle->position, &vehicle->waypointIndex, vehicle->someMultiplier, vehicle->someMultiplierTheSequel, 0, 3); + func_8000D6D0(vehicle->position, (s16*)&vehicle->waypointIndex, vehicle->someMultiplier, vehicle->someMultiplierTheSequel, 0, 3); vehicle->rotation[0] = 0; vehicle->rotation[1] = -0x8000; vehicle->rotation[2] = 0; } else { - func_8000D940(vehicle->position, &vehicle->waypointIndex, vehicle->someMultiplier, vehicle->someMultiplierTheSequel, 0); + func_8000D940(vehicle->position, (s16*)&vehicle->waypointIndex, vehicle->someMultiplier, vehicle->someMultiplierTheSequel, 0); vehicle->rotation[0] = 0; vehicle->rotation[1] = 0; vehicle->rotation[2] = 0; @@ -4415,7 +4415,7 @@ void init_course_vehicles(void) { tempLocomotive = &gTrainList[loopIndex].locomotive; origXPos = tempLocomotive->position[0]; origZPos = tempLocomotive->position[2]; - trainCarYRot = func_8000DBAC(tempLocomotive->position, &tempLocomotive->waypointIndex, gTrainList[loopIndex].someMultiplier); + trainCarYRot = func_8000DBAC(tempLocomotive->position, (s16*)&tempLocomotive->waypointIndex, gTrainList[loopIndex].someMultiplier); tempLocomotive->velocity[0] = tempLocomotive->position[0] - origXPos; tempLocomotive->velocity[2] = tempLocomotive->position[2] - origZPos; vec3s_set(trainCarRot, 0, trainCarYRot, 0); @@ -4425,7 +4425,7 @@ void init_course_vehicles(void) { if (tempTender->isActive == 1) { origXPos = tempTender->position[0]; origZPos = tempTender->position[2]; - trainCarYRot = func_8000DBAC(tempTender->position, &tempTender->waypointIndex, gTrainList[loopIndex].someMultiplier); + trainCarYRot = func_8000DBAC(tempTender->position, (s16*)&tempTender->waypointIndex, gTrainList[loopIndex].someMultiplier); tempTender->velocity[0] = tempTender->position[0] - origXPos; tempTender->velocity[2] = tempTender->position[2] - origZPos; vec3s_set(trainCarRot, 0, trainCarYRot, 0); @@ -4437,7 +4437,7 @@ void init_course_vehicles(void) { if (tempPassengerCar->isActive == 1) { origXPos = tempPassengerCar->position[0]; origZPos = tempPassengerCar->position[2]; - trainCarYRot = func_8000DBAC(tempPassengerCar->position, &tempPassengerCar->waypointIndex, gTrainList[loopIndex].someMultiplier); + trainCarYRot = func_8000DBAC(tempPassengerCar->position, (s16*)&tempPassengerCar->waypointIndex, gTrainList[loopIndex].someMultiplier); tempPassengerCar->velocity[0] = tempPassengerCar->position[0] - origXPos; tempPassengerCar->velocity[2] = tempPassengerCar->position[2] - origZPos; vec3s_set(trainCarRot, 0, trainCarYRot, 0); @@ -4452,7 +4452,7 @@ void init_course_vehicles(void) { if(tempPaddleWheelBoat->isActive == 1) { origXPos = tempPaddleWheelBoat->position[0]; origZPos = tempPaddleWheelBoat->position[2]; - tempPaddleWheelBoat->rotY = func_8000DBAC(tempPaddleWheelBoat->position, &tempPaddleWheelBoat->waypointIndex, tempPaddleWheelBoat->someMultiplier); + tempPaddleWheelBoat->rotY = func_8000DBAC(tempPaddleWheelBoat->position, (s16*)&tempPaddleWheelBoat->waypointIndex, tempPaddleWheelBoat->someMultiplier); tempPaddleWheelBoat->velocity[0] = tempPaddleWheelBoat->position[0] - origXPos; tempPaddleWheelBoat->velocity[2] = tempPaddleWheelBoat->position[2] - origZPos; vec3s_set(paddleWheelBoatRot, 0, tempPaddleWheelBoat->rotY, 0); @@ -4485,10 +4485,10 @@ void init_course_vehicles(void) { } } -void func_80012780(TrainCarStuff *trainCar, s16 *arg1, u16 arg2) { - trainCar->position[0] = (f32) arg1[0]; +void func_80012780(TrainCarStuff *trainCar, PathNoY *arg1, u16 arg2) { + trainCar->position[0] = (f32) arg1->x; trainCar->position[1] = (f32) D_80162EB0; - trainCar->position[2] = (f32) arg1[1]; + trainCar->position[2] = (f32) arg1->z; trainCar->actorIndex = -1; trainCar->waypointIndex = arg2; trainCar->isActive = 0; @@ -4601,7 +4601,7 @@ void update_vehicle_trains(void) { temp_f20 = gTrainList[i].locomotive.position[0]; temp_f22 = gTrainList[i].locomotive.position[2]; - temp_v0 = func_8000DBAC(gTrainList[i].locomotive.position, &gTrainList[i].locomotive.waypointIndex, gTrainList[i].someMultiplier); + temp_v0 = func_8000DBAC(gTrainList[i].locomotive.position, (s16*)&gTrainList[i].locomotive.waypointIndex, gTrainList[i].someMultiplier); gTrainList[i].locomotive.velocity[0] = gTrainList[i].locomotive.position[0] - temp_f20; gTrainList[i].locomotive.velocity[2] = gTrainList[i].locomotive.position[2] - temp_f22; @@ -4630,7 +4630,7 @@ void update_vehicle_trains(void) { if (car->isActive == 1) { temp_f20 = car->position[0]; temp_f22 = car->position[2]; - temp_v0 = func_8000DBAC(car->position, &car->waypointIndex, gTrainList[i].someMultiplier); + temp_v0 = func_8000DBAC(car->position, (s16*)&car->waypointIndex, gTrainList[i].someMultiplier); car->velocity[0] = car->position[0] - temp_f20; car->velocity[2] = car->position[2] - temp_f22; func_80012A48(car, temp_v0); @@ -4642,7 +4642,7 @@ void update_vehicle_trains(void) { temp_f20 = car->position[0]; temp_f22 = car->position[2]; - temp_v0 = func_8000DBAC(car->position, &car->waypointIndex, gTrainList[i].someMultiplier); + temp_v0 = func_8000DBAC(car->position, (s16*)&car->waypointIndex, gTrainList[i].someMultiplier); car->velocity[0] = car->position[0] - temp_f20; car->velocity[2] = car->position[2] - temp_f22; func_80012A48(car, temp_v0); @@ -4805,7 +4805,7 @@ void update_vehicle_paddle_boats(void) { Vec3f sp88; UNUSED s32 pad; Vec3f sp78; - s32 pad2; + UNUSED s32 pad2; D_801630FC += 1; for (i = 0; i < NUM_ACTIVE_PADDLE_BOATS; i++) { paddleBoat = &gPaddleBoats[i]; @@ -4813,7 +4813,7 @@ void update_vehicle_paddle_boats(void) { temp_f26 = paddleBoat->position[0]; temp_f28 = paddleBoat->position[1]; temp_f30 = paddleBoat->position[2]; - func_8000DBAC(paddleBoat->position, &paddleBoat->waypointIndex, paddleBoat->someMultiplier); + func_8000DBAC(paddleBoat->position, (s16*)&paddleBoat->waypointIndex, paddleBoat->someMultiplier); paddleBoat->someFlags = func_800061DC(paddleBoat->position, 2000.0f, paddleBoat->someFlags); if ((((s16) D_801630FC % 10) == 0) && (paddleBoat->someFlags != 0)) { sp78[0] = (f32) ((f64) paddleBoat->position[0] - 30.0); @@ -4957,9 +4957,9 @@ void func_800139E4(f32 arg0, f32 arg1, s32 arg2, s32 arg3, VehicleStuff *vehicle veh->rotation[0] = 0; veh->rotation[2] = 0; if (D_8016347A == 0) { - veh->rotation[1] = func_8000D6D0(veh->position, &veh->waypointIndex, veh->someMultiplier, veh->someMultiplierTheSequel, 0, 3); + veh->rotation[1] = func_8000D6D0(veh->position, (s16*)&veh->waypointIndex, veh->someMultiplier, veh->someMultiplierTheSequel, 0, 3); } else { - veh->rotation[1] = func_8000D940(veh->position, &veh->waypointIndex, veh->someMultiplier, veh->someMultiplierTheSequel, 0); + veh->rotation[1] = func_8000D940(veh->position, (s16*)&veh->waypointIndex, veh->someMultiplier, veh->someMultiplierTheSequel, 0); } } D_801631C8 = 10; @@ -5031,9 +5031,9 @@ void func_80013D20(VehicleStuff *vehicle) { } } if (D_8016347A == 0) { - var_a1 = func_8000D6D0(vehicle->position, &vehicle->waypointIndex, vehicle->someMultiplier, vehicle->someMultiplierTheSequel, 0, 3); + var_a1 = func_8000D6D0(vehicle->position, (s16*)&vehicle->waypointIndex, vehicle->someMultiplier, vehicle->someMultiplierTheSequel, 0, 3); } else { - var_a1 = func_8000D940(vehicle->position, &vehicle->waypointIndex, vehicle->someMultiplier, vehicle->someMultiplierTheSequel, 0); + var_a1 = func_8000D940(vehicle->position, (s16*)&vehicle->waypointIndex, vehicle->someMultiplier, vehicle->someMultiplierTheSequel, 0); } adjust_angle(&vehicle->rotation[1], var_a1, 100); temp_f0_3 = vehicle->position[0] - sp5C; @@ -5237,12 +5237,12 @@ f32 func_800145A8(s16 arg0, f32 arg1, s16 arg2) { } void func_800146B8(s32 playerId, s32 arg1, VehicleStuff *vehicle) { - s32 var_v1; + UNUSED s32 var_v1; s32 var_v0; s32 var_s2; s32 waypointCount; u16 temp_a1; - VehicleStuff *tempVehicle; + UNUSED VehicleStuff *tempVehicle; waypointCount = gWaypointCountByPathIndex[0]; if (!(gPlayers[playerId].unk_094 < 1.6666666666666667)) { @@ -5265,7 +5265,7 @@ void func_800147E0(void) { if (gModeSelection == TIME_TRIALS) { numTrucks = NUM_TIME_TRIAL_BOX_TRUCKS; } - func_800139E4(a, b, numTrucks, 0, &gBoxTruckList, &D_80164550[0][0]); + func_800139E4(a, b, numTrucks, 0, gBoxTruckList, &D_80164550[0][0]); } void func_8001487C(void) { @@ -5292,7 +5292,7 @@ void func_80014934(void) { if (gModeSelection == TIME_TRIALS) { numBusses = NUM_TIME_TRIAL_SCHOOL_BUSES; } - func_800139E4(a, b, numBusses, 0x4B, &gSchoolBusList, &D_80164550[0][0]); + func_800139E4(a, b, numBusses, 0x4B, gSchoolBusList, &D_80164550[0][0]); } void func_800149D0(void) { @@ -5319,7 +5319,7 @@ void func_80014A88(void) { if (gModeSelection == TIME_TRIALS) { numTrucks = NUM_TIME_TRIAL_TANKER_TRUCKS; } - func_800139E4(a, b, numTrucks, 50, &gTankerTruckList, &D_80164550[0][0]); + func_800139E4(a, b, numTrucks, 50, gTankerTruckList, &D_80164550[0][0]); } void func_80014B24(void) { @@ -5346,7 +5346,7 @@ void func_80014BDC(void) { if (gModeSelection == TIME_TRIALS) { numCars = NUM_TIME_TRIAL_CARS; } - func_800139E4(a, b, numCars, 25, &gCarList, &D_80164550[0][0]); + func_800139E4(a, b, numCars, 25, gCarList, &D_80164550[0][0]); } void func_80014C78(void) { @@ -5603,7 +5603,7 @@ void func_80015544(s32 playerId, f32 arg1, s32 cameraId, s32 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -void func_8001577C(Camera *camera, UNUSED Player *playerArg, s32 arg2, s32 cameraId) { +void func_8001577C(Camera *camera, UNUSED Player *playerArg, UNUSED s32 arg2, s32 cameraId) { s16 cameraWaypoint; s16 playerWaypoint; UNUSED s32 pad; @@ -5612,7 +5612,7 @@ void func_8001577C(Camera *camera, UNUSED Player *playerArg, s32 arg2, s32 camer f32 zdiff; UNUSED s32 pad2; s32 playerId; - s32 pad3[9]; + UNUSED s32 pad3[9]; Player *player; s32 waypointDiff; s32 pathIndex; @@ -5679,10 +5679,10 @@ void func_80015A9C(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -void func_80015C94(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { +void func_80015C94(Camera *camera, UNUSED Player *unusedPlayer, UNUSED s32 arg2, s32 cameraId) { s16 playerWaypoint; s16 cameraWaypoint; - s32 stackPadding0; + UNUSED s32 stackPadding0; f32 xdiff2; f32 ydiff2; f32 zdiff2; @@ -5695,11 +5695,11 @@ void func_80015C94(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { f32 ydiff; f32 zdiff; f32 distance; - s32 stackPadding1; + UNUSED s32 stackPadding1; s16 waypoint1; s16 waypoint2; - f32 var_f18; - f32 var_f20; + UNUSED f32 var_f18; + UNUSED f32 var_f20; f32 temp_f2_2; s32 pathIndex; @@ -5784,10 +5784,10 @@ void func_800162CC(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -void func_80016494(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { +void func_80016494(Camera *camera, UNUSED Player *unusedPlayer, UNUSED s32 arg2, s32 cameraId) { s16 cameraWaypoint; s16 playerWaypoint; - s32 stackPadding0; + UNUSED s32 stackPadding0; f32 xdiff2; f32 ydiff2; f32 zdiff2; @@ -5800,12 +5800,12 @@ void func_80016494(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { f32 ydiff; f32 zdiff; f32 distance; - f32 sp98; + UNUSED f32 sp98; s16 waypoint1; s16 waypoint2; - f32 sp94; - f32 sp90; - s32 stackPadding1; + UNUSED f32 sp94; + UNUSED f32 sp90; + UNUSED s32 stackPadding1; s32 pathIndex; f32 temp_f2_5; @@ -5889,11 +5889,11 @@ void func_80016494(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { camera->rot[2] = 0; } -void func_80016C3C(s32 playerId, f32 arg1, s32 cameraId) { - s32 stackPadding0; - s32 stackPadding1; +void func_80016C3C(UNUSED s32 playerId, UNUSED f32 arg1, s32 cameraId) { + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; f32 temp_f2; - s32 stackPadding2; + UNUSED s32 stackPadding2; f32 temp_f12; TrackWaypoint **path; f32 sp54; @@ -5946,14 +5946,14 @@ void func_80016C3C(s32 playerId, f32 arg1, s32 cameraId) { // https://decomp.me/scratch/Ck7hV // Really crazy diff, permuter only able to find fakematches for improvements (and they're big improvements) // There's something really, really wrong with the empty `if` statement -void func_80017054(Camera *camera, Player *player, s32 index, s32 cameraId) { - s32 stackPadding0; - s32 stackPadding1; +void func_80017054(Camera *camera, UNUSED Player *player, UNUSED s32 index, s32 cameraId) { + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; f32 spAC; f32 spA8; f32 spA4; - s32 stackPadding2; - s32 stackPadding3; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; f32 sp98; f32 sp94; f32 sp90; @@ -5963,15 +5963,15 @@ void func_80017054(Camera *camera, Player *player, s32 index, s32 cameraId) { f32 stackPadding4; f32 stackPadding5; f32 stackPadding6; - s32 stackPadding7; - s32 stackPadding8; + UNUSED s32 stackPadding7; + UNUSED s32 stackPadding8; s16 sp6E; s16 sp6C; - s32 stackPadding9; - s32 stackPaddingA; - s32 stackPaddingB; + UNUSED s32 stackPadding9; + UNUSED s32 stackPaddingA; + UNUSED s32 stackPaddingB; s32 pathIndex; - s32 stackPaddingC; + UNUSED s32 stackPaddingC; s32 sp58; s16 sp56; s32 playerId; @@ -6049,7 +6049,7 @@ void func_80017054(Camera *camera, Player *player, s32 index, s32 cameraId) { GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80017054.s") #endif -void func_80017720(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { +void func_80017720(s32 playerId, UNUSED f32 arg1, s32 cameraId, s16 pathIndex) { Camera* camera = cameras + cameraId; UNUSED s32 pad; @@ -6071,10 +6071,10 @@ void func_80017720(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -void func_800178F4(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { +void func_800178F4(Camera *camera, UNUSED Player *unusedPlayer, UNUSED s32 arg2, s32 cameraId) { s16 cameraWaypoint; s16 playerWaypoint; - f32 stackPadding0; + UNUSED f32 stackPadding0; f32 xdiff2; f32 ydiff2; f32 zdiff2; @@ -6086,12 +6086,12 @@ void func_800178F4(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { f32 xdiff; f32 ydiff; f32 zdiff; - f32 var_f2; - f32 var_f18; + UNUSED f32 var_f2; + UNUSED f32 var_f18; s16 waypoint1; s16 waypoint2; - f32 stackPadding1; - f32 var_f14; + UNUSED f32 stackPadding1; + UNUSED f32 var_f14; s32 playerId; s32 pathIndex; s32 waypointCount; @@ -6163,7 +6163,7 @@ void func_800178F4(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { camera->rot[2] = 0; } -void func_80017F10(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { +void func_80017F10(s32 playerId, UNUSED f32 arg1, s32 cameraId, s16 pathIndex) { Camera* camera = cameras + cameraId; s32 test = gWaypointCountByPathIndex[pathIndex]; @@ -6185,14 +6185,14 @@ void func_80017F10(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -void func_800180F0(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { +void func_800180F0(Camera *camera, UNUSED Player *unusedPlayer, UNUSED s32 arg2, s32 cameraId) { s16 cameraWaypoint; s16 playerWaypoint; - s32 stackPadding3; + UNUSED s32 stackPadding3; f32 sp94; f32 sp90; f32 sp8C; - s32 stackPadding4; + UNUSED s32 stackPadding4; f32 distance; f32 midX; f32 midY; @@ -6204,9 +6204,9 @@ void func_800180F0(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { s32 playerId; s16 waypoint1; s16 waypoint2; - f32 var_f2; - f32 var_f18; - f32 var_f14; + UNUSED f32 var_f2; + UNUSED f32 var_f18; + UNUSED f32 var_f14; s32 pathIndex; s32 waypointCount; @@ -6277,7 +6277,7 @@ void func_800180F0(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { camera->rot[2] = 0; } -void func_80018718(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { +void func_80018718(s32 playerId, UNUSED f32 arg1, s32 cameraId, s16 pathIndex) { Camera* camera = cameras + cameraId; s32 test = gWaypointCountByPathIndex[pathIndex]; @@ -6298,10 +6298,10 @@ void func_80018718(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -void func_800188F4(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { +void func_800188F4(Camera *camera, UNUSED Player *unusePlayer, UNUSED s32 arg2, s32 cameraId) { s16 cameraWaypoint; s16 playerWaypoint; - s32 stackPadding0; + UNUSED s32 stackPadding0; f32 spAC; f32 spA8; f32 spA4; @@ -6313,11 +6313,11 @@ void func_800188F4(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { f32 xdiff; f32 ydiff; f32 zdiff; - f32 sp64; - f32 sp60; + UNUSED f32 sp64; + UNUSED f32 sp60; s16 waypoint1; s16 waypoint2; - f32 sp5C; + UNUSED f32 sp5C; f32 temp_f2_4; s32 playerId; s32 pathIndex; @@ -6410,7 +6410,7 @@ void func_800188F4(Camera *camera, s32 arg1, s32 arg2, s32 cameraId) { camera->rot[2] = 0; } -void func_80019118(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { +void func_80019118(s32 playerId, f32 arg1, s32 cameraId, UNUSED s16 pathIndex) { Camera* camera = cameras + cameraId; s32 test = gWaypointCountByPathIndex[0]; f32 temp_f12; @@ -6439,7 +6439,7 @@ void func_80019118(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { camera->pos[2] = D_80164638[cameraId]; } -void func_8001933C(Camera *camera, UNUSED Player *playerArg, s32 arg2, s32 cameraId) { +void func_8001933C(Camera *camera, UNUSED Player *playerArg, UNUSED s32 arg2, s32 cameraId) { s16 cameraWaypoint; s16 playerWaypoint; UNUSED s32 pad; @@ -6491,7 +6491,7 @@ void func_8001968C(void) { D_80164678[0] = 3; } -void func_8001969C(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { +void func_8001969C(UNUSED s32 playerId, UNUSED f32 arg1, s32 cameraId, UNUSED s16 pathIndex) { TrackWaypoint *waypoint; gNearestWaypointByCameraId[cameraId] = gWaypointCountByPathIndex[0] - 18; @@ -6506,7 +6506,7 @@ void func_8001969C(s32 playerId, f32 arg1, s32 cameraId, s16 pathIndex) { D_80164678[cameraId] = 0; } -void func_80019760(Camera *camera, UNUSED Player *player, s32 arg2, s32 cameraId) { +void func_80019760(Camera *camera, UNUSED Player *player, UNUSED s32 arg2, s32 cameraId) { UNUSED s32 pad[2]; f32 xdiff; f32 ydiff; @@ -6767,7 +6767,7 @@ void func_8001A124(s32 arg0, s32 arg1) { } } -void func_8001A220(s32 arg0, s32 cameraId) { +void func_8001A220(UNUSED s32 arg0, s32 cameraId) { switch (random_int(6)) { case 0: D_80164680[cameraId] = 4; @@ -6853,7 +6853,7 @@ void func_8001A518(s32 arg0, s32 arg1, s32 arg2) { } } -void func_8001A588(u16 *localD_80152300, Camera *camera, Player *player, s8 index, s32 cameraIndex) { +void func_8001A588(UNUSED u16 *localD_80152300, Camera *camera, Player *player, s8 index, s32 cameraIndex) { s32 var_v1; UnkStruct_46D0 *temp_v0_4; s32 sp44; @@ -6999,7 +6999,7 @@ void func_8001AB00(void) { } } -void kart_ai_decisions_branch_item(s32 arg0, s16 *arg1, s32 arg2) { +void kart_ai_decisions_branch_item(UNUSED s32 arg0, s16 *arg1, s32 arg2) { s32 value = -1; switch (arg2) { case ITEM_FAKE_ITEM_BOX: diff --git a/src/code_80005FD0.h b/src/code_80005FD0.h index 0f45af7961..a3d57cbe30 100644 --- a/src/code_80005FD0.h +++ b/src/code_80005FD0.h @@ -156,7 +156,7 @@ void func_800120C8(void); void func_80012190(void); void func_80012220(VehicleStuff*); void init_course_vehicles(void); -void func_80012780(TrainCarStuff*, s16*, u16); +void func_80012780(TrainCarStuff*, PathNoY *, u16); void func_800127E0(void); void func_80012A48(TrainCarStuff*, s16); void update_vehicle_trains(void); @@ -201,19 +201,19 @@ void func_80015390(Camera*, Player*, s32); void func_80015544(s32, f32, s32, s32); void func_8001577C(Camera*, UNUSED Player*, s32, s32); void func_80015A9C(s32, f32, s32, s16); -void func_80015C94(Camera*, s32, s32, s32); +void func_80015C94(Camera*, Player *, s32, s32); void func_800162CC(s32, f32, s32, s16); -void func_80016494(Camera*, s32, s32, s32); +void func_80016494(Camera*, Player *, s32, s32); void func_80016C3C(s32, f32, s32); void func_80017720(s32, f32, s32, s16); -void func_800178F4(Camera*, s32, s32, s32); +void func_800178F4(Camera*, Player *, s32, s32); void func_80017F10(s32, f32, s32, s16); -void func_800180F0(Camera*, s32, s32, s32); +void func_800180F0(Camera*, Player *, s32, s32); void func_80018718(s32, f32, s32, s16); -void func_800188F4(Camera*, s32, s32, s32); +void func_800188F4(Camera*, Player *, s32, s32); void func_80019118(s32, f32, s32, s16); void func_8001933C(Camera*, UNUSED Player*, s32, s32); @@ -306,7 +306,7 @@ extern u16 gKartAIBehaviourState[]; enum { KART_AI_BEHAVIOUR_STATE_NONE, KART_AI_BEHAVIOUR_STATE_START, - KART_AI_BEHAVIOUR_STATE_RUNNING, + KART_AI_BEHAVIOUR_STATE_RUNNING }; extern s16 D_80163300[]; diff --git a/src/code_80057C60.c b/src/code_80057C60.c index 053573c472..6e4e06d60e 100644 --- a/src/code_80057C60.c +++ b/src/code_80057C60.c @@ -1082,7 +1082,7 @@ void render_hud_2p_horizontal_player_two_horizontal_player_one(void) { if (gHUDDisable == 0) { render_hud_timer(PLAYER_ONE); if (playerHUD[PLAYER_ONE].lapCount != 3) { - draw_hud_2d_texture_32x8(playerHUD[PLAYER_ONE].lapX, playerHUD[PLAYER_ONE].lapY, common_texture_hud_lap); // draw the lap word + draw_hud_2d_texture_32x8(playerHUD[PLAYER_ONE].lapX, playerHUD[PLAYER_ONE].lapY, (u8*) common_texture_hud_lap); // draw the lap word draw_lap_count(playerHUD[PLAYER_ONE].lapX + 0xC, playerHUD[PLAYER_ONE].lapY - 4, playerHUD[PLAYER_ONE].alsoLapCount); draw_item_window(PLAYER_ONE); } @@ -1097,7 +1097,7 @@ void render_hud_2p_horizontal_player_two(void) { if (gHUDDisable == 0) { render_hud_timer(PLAYER_TWO); if (playerHUD[PLAYER_TWO].lapCount != 3) { - draw_hud_2d_texture_32x8(playerHUD[PLAYER_TWO].lapX, playerHUD[PLAYER_TWO].lapY, common_texture_hud_lap); + draw_hud_2d_texture_32x8(playerHUD[PLAYER_TWO].lapX, playerHUD[PLAYER_TWO].lapY, (u8*) common_texture_hud_lap); draw_lap_count(playerHUD[PLAYER_TWO].lapX + 0xC, playerHUD[PLAYER_TWO].lapY - 4, playerHUD[PLAYER_TWO].alsoLapCount); draw_item_window(PLAYER_TWO); } @@ -3493,7 +3493,7 @@ void func_8005F90C(Player *player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 GLOBAL_ASM("asm/non_matchings/code_80057C60/func_8005F90C.s") #endif -void func_80060504(Player *player, s16 arg1, s32 arg2, s8 arg3, s8 arg4) { +void func_80060504(Player *player, s16 arg1, s32 arg2, UNUSED s8 arg3, UNUSED s8 arg4) { UNUSED s32 thing1; s16 thing2; UNUSED s32 thing3; diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index d9392cdcb0..fa38f64114 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -23,6 +23,7 @@ #include "render_objects.h" #include "code_80091750.h" #include "src/data/some_data.h" +#include "effects.h" void init_hud(void) { @@ -129,11 +130,11 @@ void func_8006EE44(void) { void init_item_window(s32 objectIndex) { ItemWindowObjects *temp_v0; - temp_v0 = &gObjectList[objectIndex]; + temp_v0 = (ItemWindowObjects *)&gObjectList[objectIndex]; temp_v0->currentItem = ITEM_NONE; temp_v0->itemDisplay = temp_v0->currentItem; - temp_v0->tlutList = (s32 *) common_tlut_item_window_none; - temp_v0->activeTLUT = (s32 *) common_tlut_item_window_none; + temp_v0->tlutList = (u8 *) common_tlut_item_window_none; + temp_v0->activeTLUT = (u8 *) common_tlut_item_window_none; temp_v0->textureList = common_texture_item_window_none; temp_v0->activeTexture = common_texture_item_window_none; temp_v0->unk_04C = -1; @@ -143,7 +144,7 @@ void init_item_window(s32 objectIndex) { } void func_8006EEE8(s32 courseId) { - D_8018D240 = dma_textures(gCourseOutlineTextures[courseId], D_800E5520[courseId], D_800E5520[courseId]); + D_8018D240 = (s32)dma_textures(gCourseOutlineTextures[courseId], D_800E5520[courseId], D_800E5520[courseId]); // This is incredibly dumb. D_800E5548 ought to be something more like // `u16 D_800E5548[][2]` but that doesn't match for some insane reason D_8018D2B0 = D_800E5548[courseId * 2]; @@ -178,7 +179,7 @@ void func_8006F008(void) { } switch (gCurrentCourseId) { case COURSE_MARIO_RACEWAY: - D_8018D220 = dma_textures(gTextureExhaust5, 0x443, 0x1000); + D_8018D220 = (void *)dma_textures(gTextureExhaust5, 0x443, 0x1000); D_8018D2A0 = 0.022f; D_8018D2E0 = 6; D_8018D2E8 = 28; @@ -201,14 +202,14 @@ void func_8006F008(void) { D_8018D2E8 = 48; break; case COURSE_BANSHEE_BOARDWALK: - D_80165880 = dma_textures(gTextureGhosts, 0x4CC2, 0xD980); + D_80165880 = (void *)dma_textures(gTextureGhosts, 0x4CC2, 0xD980); D_8018D2A0 = 0.016f; D_8018D2C0[0] = 0x0106; D_8018D2E0 = 55; D_8018D2E8 = 39; break; case COURSE_YOSHI_VALLEY: - D_8018D220 = dma_textures(gTextureExhaust0, 0x479, 0xC00); + D_8018D220 = (void *)dma_textures(gTextureExhaust0, 0x479, 0xC00); D_8018D2A0 = 0.018f; D_8018D2E0 = 61; D_8018D2E8 = 38; @@ -223,14 +224,14 @@ void func_8006F008(void) { D_8018D310 = 255; break; case COURSE_KOOPA_BEACH: - D_8018D220 = dma_textures(gTextureExhaust3, 0x3C8U, 0x1000); + D_8018D220 = (void *)dma_textures(gTextureExhaust3, 0x3C8U, 0x1000); D_8018D2A0 = 0.014f; D_8018D2C0[0] = 268; D_8018D2E0 = 40; D_8018D2E8 = 21; break; case COURSE_ROYAL_RACEWAY: - D_8018D220 = dma_textures(gTextureExhaust4, 0x3F8, 0x1000); + D_8018D220 = (void *)dma_textures(gTextureExhaust4, 0x3F8, 0x1000); D_8018D2C0[0] = 262; D_8018D2A0 = 0.014f; D_8018D2E0 = 37; @@ -240,7 +241,7 @@ void func_8006F008(void) { D_80165728 = -330; break; case COURSE_LUIGI_RACEWAY: - D_8018D220 = dma_textures(gTextureExhaust2, 0x4F4U, 0xC00); + D_8018D220 = (void *)dma_textures(gTextureExhaust2, 0x4F4U, 0xC00); D_8018D2A0 = 0.0155f; D_8018D2C0[0] = 271; D_8018D2E0 = 45; @@ -250,7 +251,7 @@ void func_8006F008(void) { D_80165728 = -215; break; case COURSE_MOO_MOO_FARM: - D_8018D220 = dma_textures(gTextureExhaust0, 0x479, 0xC00); + D_8018D220 = (void *)dma_textures(gTextureExhaust0, 0x479, 0xC00); D_8018D2A0 = 0.0155f; D_8018D2C0[0] = 271; D_8018D2E0 = 18; @@ -265,13 +266,13 @@ void func_8006F008(void) { case COURSE_KALAMARI_DESERT: D_8018D2C0[0] = 263; D_8018D2D8[0] = 165; - D_8018D220 = dma_textures(gTextureExhaust5, 0x443, 0x1000); + D_8018D220 = (void *)dma_textures(gTextureExhaust5, 0x443, 0x1000); D_8018D2A0 = 0.015f; D_8018D2E0 = 55; D_8018D2E8 = 27; break; case COURSE_SHERBET_LAND: - D_8018D220 = dma_textures(gTextureExhaust1, 0x485, 0xC00); + D_8018D220 = (void *)dma_textures(gTextureExhaust1, 0x485, 0xC00); D_8018D2A0 = 0.015f; D_8018D2C0[0] = 262; D_8018D2E0 = 52; @@ -609,14 +610,14 @@ void init_cloud_object(s32 objectIndex, s32 arg1, CloudData *arg2) { ItemWindowObjects *temp_v0; init_object(objectIndex, arg1); - temp_v0 = &gObjectList[objectIndex]; + temp_v0 = (ItemWindowObjects *)&gObjectList[objectIndex]; temp_v0->unk_0D5 = arg2->subType; temp_v0->currentItem = ITEM_NONE; temp_v0->direction_angle[1] = arg2->rotY; temp_v0->unk_09E = arg2->posY; temp_v0->sizeScaling = (f32) arg2->scalePercent / 100.0; - temp_v0->activeTexture = &D_8018D220[arg2->subType]; - func_80073404(objectIndex, 0x40U, 0x20U, &D_0D005FB0[0]); + temp_v0->activeTexture = (u8 *)&D_8018D220[arg2->subType]; + func_80073404(objectIndex, 0x40U, 0x20U, D_0D005FB0); temp_v0->primAlpha = 0x00FF; } @@ -652,7 +653,7 @@ void init_star_object(s32 objectIndex, s32 arg1, StarData *arg2) { ItemWindowObjects *temp_v0; init_object(objectIndex, arg1); - temp_v0 = &gObjectList[objectIndex]; + temp_v0 = (ItemWindowObjects *)&gObjectList[objectIndex]; temp_v0->unk_0D5 = arg2->subType; temp_v0->currentItem = ITEM_BANANA; temp_v0->direction_angle[1] = arg2->rotY; diff --git a/src/code_80086E70.c b/src/code_80086E70.c index af7e2339d9..fa3169a0ce 100644 --- a/src/code_80086E70.c +++ b/src/code_80086E70.c @@ -1684,7 +1684,7 @@ void func_8008B284(s32 objectIndex) { void func_8008B3E4(s32 objectIndex) { Objects *temp_v0; - SplineData *spline; + UNUSED SplineData *spline; if (is_obj_index_flag_status_inactive(objectIndex, 8) != 0) { temp_v0 = &gObjectList[objectIndex]; diff --git a/src/code_80091750.c b/src/code_80091750.c index 1e08b0fa9a..fd27a1c0b9 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -32,6 +32,7 @@ #include "ending/code_80281C40.h" #include "spawn_players.h" #include "render_player.h" +#include "decode.h" //! @todo Move gGfxPool out of main.h // Unfortunately that's not a small effort due to weird import structure in this project #include "main.h" @@ -1415,9 +1416,9 @@ void func_80091B78(void) { gNextFreeMemoryAddress = gFreeMemoryResetAnchor; // Hypothetically, this should be a ptr... But only hypothetically. D_8018D9B0 = get_next_available_memory_addr(0x000900B0); - D_8018D9B4 = (uintptr_t *) get_next_available_memory_addr(0x0000CE00); - D_8018D9B8 = (uintptr_t *) get_next_available_memory_addr(0x00012C00); - D_8018D9C0 = (struct_8018EE10_entry *) get_next_available_memory_addr(0x00001000); + D_8018D9B4 = (u8 *) get_next_available_memory_addr(0x0000CE00); + D_8018D9B8 = (u8 *) get_next_available_memory_addr(0x00012C00); + D_8018D9C0 = (struct_8018EE10_entry_cont *) get_next_available_memory_addr(0x00001000); func_800AF9B0(); D_8018EE0C = 0; @@ -1512,9 +1513,9 @@ void func_80091FA4(void) { s32 i; //! @todo These sizes need to be sizeof() for shiftability if possible - D_8018D9B4 = (uintptr_t *) get_next_available_memory_addr(0x00002800); + D_8018D9B4 = (u8 *) get_next_available_memory_addr(0x00002800); D_8018D9B0 = get_next_available_memory_addr(0x000124F8); - D_8018D9B8 = (uintptr_t *) get_next_available_memory_addr(0x00001000); + D_8018D9B8 = (u8 *) get_next_available_memory_addr(0x00001000); D_8018D9BC = get_next_available_memory_addr(4); for (i = 0; i < 5; i++) { @@ -1908,13 +1909,13 @@ s32 char_to_glyph_index(char *character) { return var_v1; } -s32 func_80092DF8(s8 *arg) { +s32 func_80092DF8(char *arg) { return func_80092E1C(arg) + 0x50; } s32 func_80092E1C(char *character) { s32 ret; - s32 test; + UNUSED s32 test; u8 temp_t6; u8 temp; @@ -2496,7 +2497,7 @@ void func_80094A64(struct GfxPool *pool) { gSPMatrix(gDisplayListHead++, &pool->mtxScreen, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION); gSPDisplayList(gDisplayListHead++, D_02007650); func_80094C60(); - func_80092290(4, &D_8018E850, &D_8018E858); + func_80092290(4, D_8018E850, D_8018E858); func_80092290(5, &D_8018E850[1], &D_8018E858[1]); func_80099A70(); func_8009C918(); @@ -2893,7 +2894,7 @@ Gfx *func_80095BD0(Gfx *displayListHead, u8 *arg1, f32 arg2, f32 arg3, u32 arg4, #ifdef MIPS_TO_C //generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_80095E10(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, u32 argB, u32 argC) { +Gfx *func_80095E10(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, u8 *argA, u32 argB, u32 argC) { s32 sp7C; u32 sp70; s32 sp6C; @@ -3137,7 +3138,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80095E10.s") #ifdef MIPS_TO_C //generated by m2c commit eefca95b040d7ee0c617bc58f9ac6cd1cf7bce87 on Sep-01-2023 -Gfx *func_800963F0(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, f32 arg4, f32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, s32 argB, s32 argC, u32 argD, u32 argE) { +Gfx *func_800963F0(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, f32 arg4, f32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, s32 argB, u8 *argC, u32 argD, u32 argE) { s32 sp8C; u32 sp78; s32 sp74; @@ -3421,15 +3422,15 @@ Gfx *func_80096CD8(Gfx *displayListHead, s32 arg1, s32 arg2, u32 width, u32 arg4 s32 spCC; s32 masks; s32 maskt; - s32 temp_v1_2; + UNUSED s32 temp_v1_2; s32 var_fp; s32 var_s1_2; s32 var_s1_3; s32 var_t5; - s32 var_v0; + UNUSED s32 var_v0; u32 temp_t2; u32 temp_t6; - s32 var_a1; + UNUSED s32 var_a1; s32 var_ra; s32 var_s1; u32 var_s4_2; @@ -3441,13 +3442,13 @@ Gfx *func_80096CD8(Gfx *displayListHead, s32 arg1, s32 arg2, u32 width, u32 arg4 if (width >= 2U) { do { var_ra *= 2; - } while (var_ra < width); + } while ((u32) var_ra < width); } spCC = 0x400 / var_ra; - if (arg4 < (spCC / 2)) { + if (arg4 < (u32) (spCC / 2)) { do { spCC /= 2; - } while (arg4 < spCC); + } while (arg4 < (u32) spCC); } var_s1 = var_ra; while (var_s1 >= 2) { @@ -3481,14 +3482,14 @@ Gfx *func_80096CD8(Gfx *displayListHead, s32 arg1, s32 arg2, u32 width, u32 arg4 gDPSetRenderMode(displayListHead++, G_RM_XLU_SURF, G_RM_XLU_SURF2); gDPSetPrimColor(displayListHead++, 0, 0, temp_v0, temp_v0, temp_v0, temp_v0); gDPSetCombineMode(displayListHead++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - for (var_fp = arg2; var_fp < (arg2 + arg4); var_fp += spCC) { + for (var_fp = arg2; (u32)var_fp < (arg2 + arg4); var_fp += spCC) { var_t5 = spCC; temp_t6 = var_fp + spCC; if ((arg2 + arg4) < temp_t6) { var_t5 = (arg2 + arg4) - var_fp; if (var_t5 == 0) return displayListHead; } - for (var_s1_3 = arg1; var_s1_3 < (arg1 + width); var_s1_3 += var_ra) { + for (var_s1_3 = arg1; (u32)var_s1_3 < (arg1 + width); var_s1_3 += var_ra) { var_s4_2 = var_ra; temp_t2 = var_s1_3 + var_ra; if ((arg1 + width) < temp_t2) { @@ -3515,7 +3516,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80096CD8.s") extern ? D_000FFF00; extern ? D_0B002A00; -Gfx *func_80097274(Gfx *arg0, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 argA, u32 argB, u32 argC) { +Gfx *func_80097274(Gfx *arg0, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, u8 * arg9, s32 argA, u32 argB, u32 argC) { u32 sp108; s32 sp104; s32 sp100; @@ -3827,7 +3828,7 @@ Gfx *func_80097274(Gfx *arg0, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097274.s") #endif -Gfx *func_80097A14(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, u32 arg9, u32 argA) { +Gfx *func_80097A14(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, u8* arg8, u32 arg9, u32 argA) { gDPPipeSync(displayListHead++); gDPSetCycleType(displayListHead++, G_CYC_COPY); displayListHead = func_80095E10(displayListHead, arg1, 0x00001000, 0x00000400, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, argA); @@ -3842,7 +3843,7 @@ Gfx *func_80097A14(Gfx *displayListHead, s8 arg1, s32 arg2, s32 arg3, s32 arg4, // While there may be register allocation issues, I suspect the instruction ordering issues are the actual problems Gfx *func_80097AE4(Gfx *displayListHead, s8 fmt, s32 arg2, s32 arg3, u8 *arg4, s32 arg5) { s32 var_a2; - s32 stackPadding0; + UNUSED s32 stackPadding0; s32 arg2Copy; s32 dsdx; @@ -3869,7 +3870,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097AE4.s") // https://decomp.me/scratch/U4QaQ // I'm fairly certain I have the GBI macros correct, so the massive diff is probably // the result of somemath ordering issues. -Gfx *func_80097E58(Gfx *displayListHead, s8 fmt, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, u8 *someTexture, u32 width, s32 argA, u32 argB) { +Gfx *func_80097E58(Gfx *displayListHead, s8 fmt, UNUSED s32 arg2, s32 arg3, UNUSED s32 arg4, s32 arg5, s32 arg6, s32 arg7, u8 *someTexture, u32 width, UNUSED s32 argA, u32 argB) { u32 ult; s32 spDC; s32 sp80; @@ -3885,8 +3886,8 @@ Gfx *func_80097E58(Gfx *displayListHead, s8 fmt, s32 arg2, s32 arg3, s32 arg4, s lrs = width >> 1; spDC = sp80 = width - lrs; arg6Copy = arg6; - for (ult = arg3; ult < arg5; ult += 0x20) { - if (arg5 < (ult + 0x20)) { // Less than 0x20 left to reach target + for (ult = arg3; ult < (u32) arg5; ult += 0x20) { + if ((u32) arg5 < (ult + 0x20)) { // Less than 0x20 left to reach target var_s2 = arg5 - ult; // Leftover amount to reach target if (var_s2 == 0) break; // Actually at target } else { @@ -3911,7 +3912,7 @@ Gfx *func_80097E58(Gfx *displayListHead, s8 fmt, s32 arg2, s32 arg3, s32 arg4, s GLOBAL_ASM("asm/non_matchings/code_80091750/func_80097E58.s") #endif -Gfx *func_80098558(Gfx *displayListHead, u32 arg1, u32 arg2, u32 arg3, u32 arg4, u32 arg5, u32 arg6, s32 arg7, s32 arg8) { +Gfx *func_80098558(Gfx *displayListHead, u32 arg1, u32 arg2, u32 arg3, u32 arg4, u32 arg5, u32 arg6, UNUSED s32 arg7, s32 arg8) { u32 var_a3; u32 var_v0; s32 arg5Copy; @@ -3929,12 +3930,12 @@ Gfx *func_80098558(Gfx *displayListHead, u32 arg1, u32 arg2, u32 arg3, u32 arg4, return displayListHead; } -Gfx *func_800987D0(Gfx *displayListHead, u32 arg1, u32 arg2, u32 width, u32 height, s32 column, s32 row, s32 arg7, u32 textureWidth, s32 textureHeight) { +Gfx *func_800987D0(Gfx *displayListHead, u32 arg1, u32 arg2, u32 width, u32 height, s32 column, s32 row, UNUSED u8* arg7, u32 textureWidth, UNUSED s32 textureHeight) { s32 var_a2; s32 var_v0_2; s32 columnCopy; s32 temp_f4_2; - s32 stackPadding0; + UNUSED s32 stackPadding0; s32 temp_f6; f32 temp_f0; f32 temp_f18; @@ -3947,14 +3948,14 @@ Gfx *func_800987D0(Gfx *displayListHead, u32 arg1, u32 arg2, u32 width, u32 heig temp_f0 = coss(((D_8018E7D0[0] * 0x4E20) / D_8018E7B8[0]) % 20000U); temp_f18 = (((f32)D_8018E7D0[0] * 0.5) / D_8018E7B8[0]) + 1.0; columnCopy = column; - for (var_v0_2 = arg2; var_v0_2 < height; var_v0_2 += 0x20) { - for (var_a2 = arg1; var_a2 < width; var_a2 += 0x20) { + for (var_v0_2 = arg2; (u32) var_v0_2 < height; var_v0_2 += 0x20) { + for (var_a2 = arg1; (u32) var_a2 < width; var_a2 += 0x20) { gDPLoadTextureTile(displayListHead++, D_8018D9B0, G_IM_FMT_RGBA, G_IM_SIZ_16b, textureWidth, 0, var_a2, var_v0_2, var_a2 + 0x20, var_v0_2 + 0x20, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD); temp_f6 = (temp_f18 * ((temp_f0 * (column - 0xA0)) + (temp_f24 * (row - 0x78)))) + 160.0f; temp_f4_2 = (temp_f18 * ((-temp_f24 * (column - 0xA0)) + (temp_f0 * (row - 0x78)))) + 120.0f; - gSPTextureRectangle(displayListHead++, temp_f6 * 4, temp_f4_2 * 4, (temp_f6 + 0x20^0) * 4, (temp_f4_2 + 0x20^0) * 4, 0, 0, 0, 1024, 1024); + gSPTextureRectangle(displayListHead++, temp_f6 * 4, temp_f4_2 * 4, ((temp_f6 + 0x20)^0) * 4, ((temp_f4_2 + 0x20)^0) * 4, 0, 0, 0, 1024, 1024); column += 0x20; } column = columnCopy; @@ -4090,9 +4091,9 @@ void func_80099184(MkTexture *arg0) { u16 var_a1_2; s32 var_v0; s32 var_a1; - s32 temp_s3; + UNUSED s32 temp_s3; MkTexture *var_s1; - struct_8018E118_entry *thing; + UNUSED struct_8018E118_entry *thing; var_s1 = segmented_to_virtual_dupe(arg0); while (var_s1->textureData != NULL) { @@ -4115,7 +4116,7 @@ void func_80099184(MkTexture *arg0) { var_a1_2 = ((var_a1_2 / 8) * 8) + 8; } dma_copy_base_729a30(var_s1->textureData, var_a1_2, D_8018D9B4); - mio0decode(D_8018D9B4, &D_8018D9B0[gD_8018E118TotalSize]); + mio0decode(D_8018D9B4, (u8*)&D_8018D9B0[gD_8018E118TotalSize]); } else { dma_copy_base_729a30(var_s1->textureData, var_s1->height * var_s1->width * 2, &D_8018D9B0[gD_8018E118TotalSize]); } @@ -4137,10 +4138,10 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099184.s") #ifdef NON_MATCHING // Register allocation nonsense void func_80099394(MkTexture *arg0) { - u16 var_a1_2; + UNUSED u16 var_a1_2; s32 var_v0; s32 var_a1; - s32 temp_s3; + UNUSED s32 temp_s3; MkTexture *var_s1; struct_8018E118_entry *thing; @@ -4178,10 +4179,10 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_80099394.s") #ifdef NON_MATCHING // Register allocation nonsense void func_8009952C(MkTexture *arg0) { - u16 var_a1_2; + UNUSED u16 var_a1_2; s32 var_v0; s32 var_a1; - s32 temp_s3; + UNUSED s32 temp_s3; MkTexture *var_s1; struct_8018E118_entry *thing; @@ -4197,7 +4198,7 @@ void func_8009952C(MkTexture *arg0) { } if (var_a1 == 0) { dma_copy_base_729a30(var_s1->textureData, 0x00008000U, D_8018D9B4); - mio0decode(D_8018D9B4, &D_8018D9B0[gD_8018E118TotalSize]); + mio0decode(D_8018D9B4, (u8*)&D_8018D9B0[gD_8018E118TotalSize]); thing = &D_8018E118[gNumD_8018E118Entries]; thing->textureData = var_s1->textureData; @@ -4261,7 +4262,7 @@ void func_800996BC(MkTexture *arg0, s32 arg1) { switch (arg1) { /* switch 1; irregular */ case -1: /* switch 1 */ case 1: /* switch 1 */ - mio0decode(D_8018D9B4, &D_8018D9B0[gD_8018E118TotalSize]); + mio0decode(D_8018D9B4, (u8*)&D_8018D9B0[gD_8018E118TotalSize]); break; case 0: /* switch 1 */ case 2: /* switch 1 */ @@ -4271,7 +4272,7 @@ void func_800996BC(MkTexture *arg0, s32 arg1) { var_v0_2 = 1; } if (1) {} - tkmk00decode(D_8018D9B4, D_8018D9B8, &D_8018D9B0[gD_8018E118TotalSize], var_v0_2); + tkmk00decode(D_8018D9B4, D_8018D9B8, (u8*)&D_8018D9B0[gD_8018E118TotalSize], var_v0_2); break; } thing = &D_8018E118[gNumD_8018E118Entries]; @@ -4291,7 +4292,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800996BC.s") void func_80099958(MkTexture *arg0, s32 arg1, s32 arg2) { u16 var_a1; - u8 *thing; + UNUSED u8 *thing; MkTexture *temp_v0; temp_v0 = segmented_to_virtual_dupe(arg0); @@ -4335,12 +4336,12 @@ void func_80099A94(MkTexture *arg0, s32 arg1) { void func_80099AEC(void) { s8 var_s4; s32 var_s0; - s32 stackPadding0; - s32 stackPadding1; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; s32 huh; OSIoMesg sp68; OSMesg sp64; - u8 *test; + UNUSED u8 *test; s32 sp60; MkTexture *temp_s2; struct_8018E060_entry *var_s1; @@ -4367,7 +4368,7 @@ void func_80099AEC(void) { var_s0 = ((var_s0 / 8) * 8) + 8; } osInvalDCache(D_8018D9B4, var_s0); - osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); + osPiStartDma(&sp68, 0, 0, (uintptr_t)&_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); osRecvMesg(&gDmaMesgQueue, &sp64, 1); while (1) { if ((var_s1 + 1)->texture == NULL) { @@ -4384,9 +4385,9 @@ void func_80099AEC(void) { var_s0 = ((var_s0 / 8) * 8) + 8; } osInvalDCache(D_8018D9B4 + sp60*4, var_s0); - osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4 + sp60*4, var_s0, &gDmaMesgQueue); + osPiStartDma(&sp68, 0, 0, (uintptr_t)&_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4 + sp60*4, var_s0, &gDmaMesgQueue); } - mio0decode(D_8018D9B4, &D_8018D9B0[D_8018E118[var_s1->unk_4].offset]); + mio0decode(D_8018D9B4, (u8*)&D_8018D9B0[D_8018E118[var_s1->unk_4].offset]); var_s1->texture = NULL; var_s1++; if (var_s4 != 0) break; @@ -4405,9 +4406,9 @@ void func_80099AEC(void) { var_s0 = ((var_s0 / 8) * 8) + 8; } osInvalDCache(D_8018D9B4, var_s0); - osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); + osPiStartDma(&sp68, 0, 0, (uintptr_t)&_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); } - mio0decode(D_8018D9B4 + sp60*4, &D_8018D9B0[D_8018E118[var_s1->unk_4].offset]); + mio0decode(D_8018D9B4 + sp60*4, (u8*)&D_8018D9B0[D_8018E118[var_s1->unk_4].offset]); var_s1->texture = NULL; var_s1++; if (var_s4 != 0) break; @@ -4441,8 +4442,8 @@ void func_80099E60(MkTexture *arg0, s32 arg1, s32 arg2) { void func_80099EC4(void) { s8 var_s4; s32 var_s0; - s32 stackPadding0; - s32 stackPadding1; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; OSIoMesg sp68; OSMesg sp64; s32 huh; @@ -4467,7 +4468,7 @@ void func_80099EC4(void) { } osInvalDCache(D_8018D9B4, var_s0); test = &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)]; - osPiStartDma(&sp68, 0, 0, test, D_8018D9B4, var_s0, &gDmaMesgQueue); + osPiStartDma(&sp68, 0, 0, (uintptr_t)test, D_8018D9B4, var_s0, &gDmaMesgQueue); if ((var_s0 && var_s0) && var_s0) {} // osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); osRecvMesg(&gDmaMesgQueue, &sp64, 1); @@ -4486,7 +4487,7 @@ void func_80099EC4(void) { var_s0 = ((var_s0 / 8) * 8) + 8; } osInvalDCache(D_8018D9B4 + 0x1400, var_s0); - osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4 + 0x1400, var_s0, &gDmaMesgQueue); + osPiStartDma(&sp68, 0, 0, (uintptr_t)&_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4 + 0x1400, var_s0, &gDmaMesgQueue); } mio0decode(D_8018D9B4, D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array); var_s1->mk64Texture = NULL; @@ -4507,7 +4508,7 @@ void func_80099EC4(void) { var_s0 = ((var_s0 / 8) * 8) + 8; } osInvalDCache(D_8018D9B4, var_s0); - osPiStartDma(&sp68, 0, 0, &_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); + osPiStartDma(&sp68, 0, 0, (uintptr_t)&_textures_0aSegmentRomStart[SEGMENT_OFFSET(temp_s2->textureData)], D_8018D9B4, var_s0, &gDmaMesgQueue); } mio0decode(D_8018D9B4 + 0x1400, D_802BFB80.arraySize4[var_s1->unk6][var_s1->unk4 / 2][(var_s1->unk4 % 2) + 2].pixel_index_array); var_s1->mk64Texture = NULL; @@ -4524,7 +4525,7 @@ void func_8009A238(MkTexture *arg0, s32 arg1) { s32 var_a3; s32 temp_v1; u64 *sp24; - struct_8018E118_entry *temp_v0; + UNUSED struct_8018E118_entry *temp_v0; temp_v1 = D_8018E118[arg1].offset; sp24 = arg0->textureData; @@ -4533,7 +4534,7 @@ void func_8009A238(MkTexture *arg0, s32 arg1) { var_a3 = ((var_a3 / 8) * 8) + 8; } dma_copy_base_7fa3c0(sp24, var_a3, D_8018D9B4); - tkmk00decode(D_8018D9B4, D_8018D9B8, &D_8018D9B0[temp_v1], 1); + tkmk00decode(D_8018D9B4, D_8018D9B8, (u8*) &D_8018D9B0[temp_v1], 1); D_8018E118[arg1].textureData = sp24; } @@ -4761,7 +4762,7 @@ void func_8009A9FC(s32 arg0, s32 arg1, u32 arg2, s32 arg3) { color0 = &D_8018D9B0[D_8018E118[arg0].offset]; color1 = &D_8018D9B0[D_8018E118[arg1].offset]; - for (var_t1 = 0; var_t1 < arg2; var_t1++) { + for (var_t1 = 0; (u32) var_t1 < arg2; var_t1++) { temp_a0 = *color0++; red = (temp_a0 & 0xF800) >> 0xB; green = (temp_a0 & 0x7C0) >> 6; @@ -4808,13 +4809,13 @@ void func_8009AD78(s32 arg0, s32 arg1) { s32 green; s32 blue; s32 alpha; - s32 newred; - s32 newgreen; - s32 newblue; + UNUSED s32 newred; + UNUSED s32 newgreen; + UNUSED s32 newblue; u32 temp_t9; s32 var_v1; s32 size; - u16 temp_a0; + UNUSED u16 temp_a0; u16 *color; color = &D_8018D9B0[D_8018E118[arg0].offset]; @@ -4847,7 +4848,7 @@ void func_8009B0A4(s32 arg0, u32 arg1) { } color = &D_8018D9B0[D_8018E118[arg0].offset]; size = D_8018E118[arg0 + 1].offset - D_8018E118[arg0].offset; - for (var_s0 = 0; var_s0 < size; var_s0++) { + for (var_s0 = 0; var_s0 < (u32) size; var_s0++) { red = ((*color & 0xF800) >> 0xB) * 0x55; green = ((*color & 0x7C0) >> 6) * 0x4B; blue = ((*color & 0x3E) >> 1) * 0x5F; @@ -4955,7 +4956,7 @@ Gfx *func_8009B9D0(Gfx *displayListHead, MkTexture *textures) { Gfx *func_8009BA74(Gfx *arg0, MkTexture *arg1, s32 column, s32 row) { MkTexture *temp_v0; - s32 temp_v0_3; + u8* temp_v0_3; s8 var_s4; temp_v0 = segmented_to_virtual_dupe(arg1); @@ -4982,7 +4983,7 @@ Gfx *func_8009BA74(Gfx *arg0, MkTexture *arg1, s32 column, s32 row) { gSPDisplayList(arg0++, D_02007728); break; } - temp_v0_3 = func_8009B8C4(temp_v0->textureData); + temp_v0_3 = (u8*)func_8009B8C4(temp_v0->textureData); if (temp_v0_3 != 0) { if (D_8018E7B0 != 4) { arg0 = func_80095E10(arg0, var_s4, 0x00000400, 0x00000400, 0, 0, temp_v0->width, temp_v0->height, temp_v0->dX + column, temp_v0->dY + row, temp_v0_3, temp_v0->width, temp_v0->height); @@ -4997,7 +4998,7 @@ Gfx *func_8009BA74(Gfx *arg0, MkTexture *arg1, s32 column, s32 row) { Gfx *func_8009BC9C(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { MkTexture *var_s0; - s32 temp_v0_3; + u8* temp_v0_3; var_s0 = segmented_to_virtual_dupe(arg1); while (var_s0->textureData != NULL) { @@ -5009,7 +5010,7 @@ Gfx *func_8009BC9C(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4, s32 gSPDisplayList(arg0++, D_02007728); break; } - temp_v0_3 = func_8009B8C4(var_s0->textureData); + temp_v0_3 = (u8*) func_8009B8C4(var_s0->textureData); if (temp_v0_3 != 0) { switch (arg4) { /* switch 1; irregular */ case 1: /* switch 1 */ @@ -5033,7 +5034,7 @@ Gfx *func_8009BC9C(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4, s32 Gfx *print_letter(Gfx *arg0, MkTexture *glyphTexture, f32 arg2, f32 arg3, s32 mode, f32 scaleX, f32 scaleY) { s32 var_v0; - s32 temp_v0_2; + u8 *temp_v0_2; f32 thing0; f32 thing1; MkTexture *var_s0; @@ -5062,16 +5063,16 @@ Gfx *print_letter(Gfx *arg0, MkTexture *glyphTexture, f32 arg2, f32 arg3, s32 mo if (var_v0 != 0) { var_s0++; } else { - temp_v0_2 = func_8009B8C4(var_s0->textureData); + temp_v0_2 = (u8 *) func_8009B8C4(var_s0->textureData); if (temp_v0_2 != 0) { switch (mode) { /* irregular */ case 1: gSPDisplayList(arg0++, D_020077F8); - arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, scaleX, scaleY); + arg0 = func_80095BD0(arg0, temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, scaleX, scaleY); break; case 2: gSPDisplayList(arg0++, D_02007818); - arg0 = func_80095BD0(arg0, (u8 *) temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, scaleX, scaleY); + arg0 = func_80095BD0(arg0, temp_v0_2, var_s0->dX + arg2, var_s0->dY + arg3, var_s0->width, var_s0->height, scaleX, scaleY); break; } } @@ -5083,7 +5084,7 @@ Gfx *print_letter(Gfx *arg0, MkTexture *glyphTexture, f32 arg2, f32 arg3, s32 mo Gfx *func_8009C204(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4) { s32 var_s2; - s32 temp_t0; + u8 *temp_t0; MkTexture *var_s1; var_s1 = segmented_to_virtual_dupe(arg1); @@ -5104,7 +5105,7 @@ Gfx *func_8009C204(Gfx *arg0, MkTexture *arg1, s32 arg2, s32 arg3, s32 arg4) { gSPDisplayList(arg0++, D_02007728); break; } - temp_t0 = func_8009B8C4(var_s1->textureData); + temp_t0 = (u8 *)func_8009B8C4(var_s1->textureData); switch (arg4) { /* switch 1; irregular */ case 2: /* switch 1 */ arg0 = func_800963F0(arg0, var_s2, 0x00000400, 0x00000400, 0.5f, 0.5f, 0, 0, var_s1->width, var_s1->height, var_s1->dX + arg2, var_s1->dY + arg3, temp_t0, var_s1->width, var_s1->height); @@ -5150,14 +5151,14 @@ Gfx *func_8009C434(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s if (1) { } if (1) { } if (1) { } } if (arg4 >= 0) { - arg0 = func_80097E58(arg0, var_t1, 0, 0U, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, &D_8018D9B0[var_t0], var_s0->width, var_s0->height, (u32) arg4); + arg0 = func_80097E58(arg0, var_t1, 0, 0U, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, (u8*)&D_8018D9B0[var_t0], var_s0->width, var_s0->height, (u32) arg4); } else { switch(arg4) { case -1: - arg0 = func_80095E10(arg0, var_t1, 0x00000400, 0x00000400, 0, 0, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, &D_8018D9B0[var_t0], var_s0->width, var_s0->height); + arg0 = func_80095E10(arg0, var_t1, 0x00000400, 0x00000400, 0, 0, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, (u8*)&D_8018D9B0[var_t0], var_s0->width, var_s0->height); break; case -2: - arg0 = func_800963F0(arg0, var_t1, 0x00000400, 0x00000400, 0.5f, 0.5f, 0, 0, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, &D_8018D9B0[var_t0], var_s0->width, var_s0->height); + arg0 = func_800963F0(arg0, var_t1, 0x00000400, 0x00000400, 0.5f, 0.5f, 0, 0, var_s0->width, var_s0->height, var_s0->dX + arg2, var_s0->dY + arg3, (u8*)&D_8018D9B0[var_t0], var_s0->width, var_s0->height); break; } } @@ -5168,7 +5169,7 @@ Gfx *func_8009C434(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s Gfx *func_8009C708(Gfx *arg0, struct_8018DEE0_entry *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5) { s32 var_t0; - s32 thing; + UNUSED s32 thing; Gfx *temp; MkTexture *var_s1; @@ -5273,7 +5274,7 @@ void func_8009CA6C(s32 arg0) { void func_8009CBE4(s32 arg0, s32 arg1, s32 arg2) { RGBA16* color; s16 x, y, w, h; - s32 pad[3]; + UNUSED s32 pad[3]; struct UnkStruct_800DC5EC* unk; struct UnkStruct_8018E7E8 *size, *start; @@ -5336,7 +5337,7 @@ void func_8009CE1C(void) { void func_8009CE64(s32 arg0) { s32 thing; s32 var_a1; - s32 stackPadding0; + UNUSED s32 stackPadding0; struct_8018D9E0_entry *temp_v0; var_a1 = 0; @@ -5670,7 +5671,7 @@ void func_8009D77C(s32 arg0, s32 arg1, s32 arg2) { s32 someMath1; RGBA16 *temp_v0_2; s32 sp44; - s32 stackPadding0; + UNUSED s32 stackPadding0; if ((gModeSelection == 0) || (gModeSelection == 1)) { var_t3 = D_8018E7E8[arg0].x; @@ -5778,8 +5779,8 @@ void func_8009DB8C(void) { D_8018E7D0[4]++; // why? var_v1 = D_8018E7D0[4]; - if (var_v1 >= D_8018E7C8) { - if (var_v1 == D_8018E7C8) { + if ((u32) var_v1 >= D_8018E7C8) { + if ((u32) var_v1 == D_8018E7C8) { for (var_s0 = 0; var_s0 < 0x4B0; var_s0++) { D_8018D9B8[var_s0] = 1; } @@ -5970,8 +5971,8 @@ void func_8009E2A8(s32 arg0) { } void func_8009E2F0(s32 arg0) { - s32 stackPadding0; - s32 stackPadding1; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; s32 someIndex; s32 temp_t7; f32 temp_t7_2; @@ -5984,7 +5985,7 @@ void func_8009E2F0(s32 arg0) { temp_t1 = &D_8018E7E8[arg0]; temp_t0 = &D_8018E810[arg0]; temp_v0 = &D_800E7AC8[temp_t7]; - if (D_8018E840[arg0] < 0x1BU) { + if ((u32) D_8018E840[arg0] < 0x1BU) { gDisplayListHead = draw_box(gDisplayListHead, temp_t1->x - (temp_t0->x / 2), temp_t1->y - (temp_t0->y / 2), temp_t1->x + (temp_t0->x / 2), temp_t1->y + (temp_t0->y / 2), temp_v0->red, temp_v0->green, temp_v0->blue, temp_v0->alpha); } else { temp_t7_2 = ((u32)(38 - D_8018E840[arg0])) / 11.0; @@ -5992,7 +5993,7 @@ void func_8009E2F0(s32 arg0) { } } D_8018E840[arg0]++; - if (D_8018E840[arg0] >= 0x26U) { + if ((u32) D_8018E840[arg0] >= 0x26U) { for (someIndex = 0; someIndex < 4; someIndex++) { D_8018E838[someIndex] = 0; } @@ -6024,13 +6025,13 @@ void func_8009E620(void) { void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) { struct_8018D9E0_entry *var_ra; s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; s32 temp_v0_6; s32 var_v0; s32 var_v1_3; s32 temp_a1; - MkTexture *mk64Texture; + UNUSED MkTexture *mk64Texture; MkAnimation *var_a0; s32 one = 1; @@ -6453,10 +6454,10 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/add_8018D9E0_entry.s") void func_8009F5E0(struct_8018D9E0_entry *arg0) { s32 var_a1; s32 var_v1; - s32 stackPadding0; - s32 stackPadding1; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; MkTexture *sp9C; - s32 stackPadding2; + UNUSED s32 stackPadding2; s32 temp_a0; s32 temp_t2; s32 temp_t5; @@ -6464,12 +6465,12 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { s32 temp_v1; char sp80[3]; s32 var_t0; - s32 var_a2; + UNUSED s32 var_a2; f32 why = 0.75f; s32 one = 1; f32 floatone = 1; - s32 stackPadding3; - s32 stackPadding4; + UNUSED s32 stackPadding3; + UNUSED s32 stackPadding4; f32 var_f0; if ((s8) arg0->visible != 0) { @@ -6497,11 +6498,11 @@ void func_8009F5E0(struct_8018D9E0_entry *arg0) { // Also sets the color of the shading at the top and bottom of the menu // Does not set color of the text in the table itself gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, 0xFF); - gDisplayListHead = func_8009B9D0(gDisplayListHead, &D_020015A4); + gDisplayListHead = func_8009B9D0(gDisplayListHead, D_020015A4); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x32, 0x00, 0x00, 0xFF); - gDisplayListHead = func_8009B9D0(gDisplayListHead, &D_020015CC); + gDisplayListHead = func_8009B9D0(gDisplayListHead, D_020015CC); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x32, 0x00, 0xFF); - gDisplayListHead = func_8009B9D0(gDisplayListHead, &D_02001630); + gDisplayListHead = func_8009B9D0(gDisplayListHead, D_02001630); gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x32, 0x32, 0x00, 0xFF); gDisplayListHead = func_8009B9D0(gDisplayListHead, D_02001658); break; @@ -7021,7 +7022,7 @@ void func_800A0AD0(UNUSED struct_8018D9E0_entry *arg0) { } void func_800A0B80(struct_8018D9E0_entry *arg0) { - s32 temp_a2; + UNUSED s32 temp_a2; s32 temp_s1; s32 temp_s2; s32 var_s1; @@ -7078,7 +7079,7 @@ void func_800A0DFC(void) { } while (var_s0 != 0); } -void func_800A0EB8(struct_8018D9E0_entry *arg0, s32 arg1) { +void func_800A0EB8(UNUSED struct_8018D9E0_entry *arg0, s32 arg1) { s32 var_t1; s32 thing; Unk_D_800E70A0 *temp_v0; @@ -7297,15 +7298,15 @@ void func_800A1A20(struct_8018D9E0_entry *arg0) { } void func_800A1BE0(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; - u8 *wut; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED char *wut; Unk_D_800E70A0 sp78; s32 var_s0; s32 var_s1; s32 var_s2; - s32 thing; + UNUSED s32 thing; CourseTimeTrialRecords *temp_s6; temp_s6 = &gSaveData.allCourseTimeTrialRecords.cupRecords[gTimeTrialDataCourseIndex / 4].courseRecords[gTimeTrialDataCourseIndex % 4]; @@ -7344,15 +7345,15 @@ void func_800A1BE0(struct_8018D9E0_entry *arg0) { } void func_800A1DE0(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; - s32 stackPadding3; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; Unk_D_800E70A0 sp58; s32 var_a0; - s32 var_s0; + UNUSED s32 var_s0; s32 var_s1; - char *wut; + UNUSED char *wut; set_text_color(1); for (var_s1 = 0; var_s1 < 3; var_s1++) { @@ -7379,7 +7380,7 @@ void func_800A1DE0(struct_8018D9E0_entry *arg0) { func_800A66A8(arg0, &sp58); } -void func_800A1F30(struct_8018D9E0_entry *unused) { +void func_800A1F30(UNUSED struct_8018D9E0_entry *unused) { s32 row; s32 text; @@ -7394,24 +7395,24 @@ void func_800A1F30(struct_8018D9E0_entry *unused) { // No idea what the source of it is, permuter isn't having any luck either void func_800A1FB0(struct_8018D9E0_entry *arg0) { Unk_D_800E70A0 spE0; - s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; - s32 stackPadding3; - s32 stackPadding4; - s32 stackPadding5; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; + UNUSED s32 stackPadding4; + UNUSED s32 stackPadding5; s32 var_s5; s32 var_s4; - s32 stackPadding6; - s8 spB8[3]; - s32 stackPadding7; - s32 stackPadding8; + UNUSED s32 stackPadding6; + char spB8[3]; + UNUSED s32 stackPadding7; + UNUSED s32 stackPadding8; s32 var_s1; - s8 spA8[3]; + char spA8[3]; s32 var_s2; s32 temp_v0; - s32 stackPadding9; - s8 sp98[3]; + UNUSED s32 stackPadding9; + char sp98[3]; struct_8018EE10_entry *var_v1; gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x00000140, 0x000000F0, 0, 0, 0, 0x00000064); @@ -7528,7 +7529,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { if (var_s1 == 0) { var_v1 = &D_8018EE10[var_s2]; } else { - var_v1 = &D_8018D9C0[var_s2]; + var_v1 = (struct_8018EE10_entry *) &D_8018D9C0[var_s2]; } if (var_v1->ghostDataSaved == 0) { func_80093324(0x2A + (var_s1 * 0x89), 0x96 + (0x1E * var_s2), D_800E7A44, 0, 0.5f, 0.5f); @@ -7564,7 +7565,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { if (var_s1 == 0) { var_v1 = &D_8018EE10[var_s2]; } else { - var_v1 = &D_8018D9C0[var_s2]; + var_v1 = (struct_8018EE10_entry *) &D_8018D9C0[var_s2]; } if (var_v1->ghostDataSaved == 0) { func_80093324(0x2A + (var_s1 * 0x89), 0x96 + (0x1E * var_s2), D_800E7A44, 0, 0.5f, 0.5f); @@ -7612,7 +7613,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) { if (var_s1 == 0) { var_v1 = &D_8018EE10[var_s2]; } else { - var_v1 = &D_8018D9C0[var_s2]; + var_v1 = (struct_8018EE10_entry *) &D_8018D9C0[var_s2]; } if (var_v1->ghostDataSaved == 0) { func_80093324(0x2A + (var_s1 * 0x89), 0x96 + (0x1E * var_s2), D_800E7A44, 0, 0.5f, 0.5f); @@ -7678,8 +7679,8 @@ void func_800A2D1C(struct_8018D9E0_entry *arg0) { void func_800A2EB8(struct_8018D9E0_entry *arg0) { s8 sp70[8]; - s32 stackPadding0; - s8 sp68[3]; + UNUSED s32 stackPadding0; + char sp68[3]; s32 temp_s0; s32 var_a0; s32 var_s2; @@ -7718,13 +7719,13 @@ void func_800A2EB8(struct_8018D9E0_entry *arg0) { } void func_800A32B4(s32 arg0, s32 arg1, s32 characterId, s32 rank) { - s32 stackPadding0; + UNUSED s32 stackPadding0; f32 sp50; - s32 stackPadding1; - s32 stackPadding2; - s32 stackPadding3; - s32 stackPadding4; - s8 sp3C[4]; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; + UNUSED s32 stackPadding4; + char sp3C[4]; sp50 = gTimePlayerLastTouchedFinishLine[gGPCurrentRacePlayerIdByRank[rank]]; convert_number_to_ascii(rank + 1, sp3C); @@ -7744,13 +7745,13 @@ void func_800A32B4(s32 arg0, s32 arg1, s32 characterId, s32 rank) { void func_800A34A8(struct_8018D9E0_entry *arg0) { s8 sp80[8]; - s32 stackPadding0; - s8 sp78[3]; - s32 stackPadding1; + UNUSED s32 stackPadding0; + char sp78[3]; + UNUSED s32 stackPadding1; s32 var_a0; s32 var_v0; s32 var_v1; - s32 stackPadding2; + UNUSED s32 stackPadding2; s32 temp_s0_3; s32 rank; s32 test; @@ -7836,8 +7837,8 @@ void func_800A3A10(s8 *arg0) { s32 temp_t1; s32 var_a1; s32 var_v0; - s32 thing1; - s8 *new_var; + UNUSED s32 thing1; + UNUSED s8 *new_var; for (var_v0 = 0; var_v0 < 8; var_v0++) { arg0[var_v0] = var_v0; @@ -7864,7 +7865,7 @@ void func_800A3A10(s8 *arg0) { } void func_800A3ADC(struct_8018D9E0_entry *arg0, s32 arg1, s32 arg2, s32 characterId, s32 arg4, s8 *arg5) { - s32 stackPadding0; + UNUSED s32 stackPadding0; s32 wut; char sp34[4]; s32 phi_v1; @@ -7914,12 +7915,12 @@ void func_800A3C84(struct_8018D9E0_entry *arg0) { } void func_800A3E60(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; + UNUSED s32 stackPadding0; Unk_D_800E70A0 sp84; - s32 stackPadding1; - s32 stackPadding2; - s32 stackPadding3; - s32 stackPadding4; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; + UNUSED s32 stackPadding4; s32 var_v0; s32 var_v1; s32 var_s1; @@ -8059,9 +8060,9 @@ void func_800A3E60(struct_8018D9E0_entry *arg0) { } void func_800A4550(s32 lapNumber, s32 column, s32 row) { - s32 stackPadding0; + UNUSED s32 stackPadding0; s32 sp40; - s32 stackPadding1; + UNUSED s32 stackPadding1; s32 textColor; char sp34[3]; struct_8018D9E0_entry *temp_v0_2; @@ -8106,7 +8107,7 @@ void func_800A4550(s32 lapNumber, s32 column, s32 row) { // seems wrong for several reasons void func_800A474C(s32 recordType, s32 column, s32 row) { - s32 stackPadding0; + UNUSED s32 stackPadding0; u32 timeRecord; s32 textColor; s32 temp_t0; @@ -8161,7 +8162,7 @@ void func_800A474C(s32 recordType, s32 column, s32 row) { func_80093324(column + 0x46, row, "\"", 0, 0.65f, 0.65f); get_time_record_centiseconds(temp_t0, sp38); func_800939C8(column + 0x50, row, sp38, 0, 0.65f, 0.65f); - if (temp_t0 < 0x927C0U) { + if (temp_t0 < 0x927C0) { characterId = timeRecord >> 0x14; } else { characterId = 8; @@ -8173,7 +8174,7 @@ GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A474C.s") #endif void func_800A4A24(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; + UNUSED s32 stackPadding0; s32 temp_t0; s32 temp_t1; s32 temp_t2; @@ -8208,9 +8209,9 @@ void render_pause_menu(struct_8018D9E0_entry *arg0) { } void render_pause_menu_time_trials(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; char sp68[3]; s32 temp_a0; s32 var_s0; @@ -8343,7 +8344,7 @@ void func_800A54EC(void) { struct_8018D9E0_entry *sp48; s32 whyTheSequel; s32 why; - Unk_D_800E70A0 *huh; + UNUSED Unk_D_800E70A0 *huh; if (gIsGamePaused == 0) return; @@ -8377,15 +8378,15 @@ void func_800A54EC(void) { void func_800A5738(struct_8018D9E0_entry *arg0) { Unk_D_800E70A0 sp98; - s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; f32 why; char sp84[3]; - s32 stackPadding3; - s32 stackPadding4; + UNUSED s32 stackPadding3; + UNUSED s32 stackPadding4; s32 temp_a0; - s32 var_v1; + UNUSED s32 var_v1; s32 var_s1; s32 var_s2; s32 temp_v0; @@ -8549,11 +8550,11 @@ void func_800A6034(struct_8018D9E0_entry *arg0) { } void func_800A6154(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; Unk_D_800E70A0 sp6C; - s32 stackPadding3; + UNUSED s32 stackPadding3; s32 var_s0; s32 var_s1; @@ -8583,11 +8584,11 @@ void func_800A6154(struct_8018D9E0_entry *arg0) { } void func_800A638C(struct_8018D9E0_entry *arg0) { - s32 temp_a0; + UNUSED s32 temp_a0; s32 var_a1; - s32 var_s0; + UNUSED s32 var_s0; s32 var_s1; - s8 **var_s2; + UNUSED s8 **var_s2; if (arg0->cursor == 0) { gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, arg0->unk1C); @@ -8635,6 +8636,7 @@ void func_800A638C(struct_8018D9E0_entry *arg0) { } #ifdef NON_MATCHING +void guMtxCatL(Mtx *, Mtx *, Mtx *); // https://decomp.me/scratch/GUqCE // All the math stuff at the top is messed up void func_800A66A8(struct_8018D9E0_entry *arg0, Unk_D_800E70A0 *arg1) { @@ -8680,13 +8682,13 @@ void func_800A66A8(struct_8018D9E0_entry *arg0, Unk_D_800E70A0 *arg1) { GLOBAL_ASM("asm/non_matchings/code_80091750/func_800A66A8.s") #endif -void func_800A69C8(struct_8018D9E0_entry *arg0) { +void func_800A69C8(UNUSED struct_8018D9E0_entry *arg0) { Unk_D_800E70A0 *thing; - s32 stackPadding1; + UNUSED s32 stackPadding1; s32 var_s0; - s8 sp74[5]; + char sp74[5]; s32 var_v1; - s8 *temp_s3; + char *temp_s3; u8 *var_s4; for (var_s0 = 0; var_s0 < gPlayerCount; var_s0++) { @@ -8721,7 +8723,7 @@ void func_800A69C8(struct_8018D9E0_entry *arg0) { text_draw(0x0000009E, D_800E7300[0].row + 0x6D, "ー", 0, 1.0f, 1.0f); } -void func_800A6BEC(struct_8018D9E0_entry *arg0) { +void func_800A6BEC(UNUSED struct_8018D9E0_entry *arg0) { s32 var_s0; for (var_s0 = 0; var_s0 < gPlayerCount; var_s0++) { @@ -8736,7 +8738,7 @@ void func_800A6BEC(struct_8018D9E0_entry *arg0) { } } -void func_800A6CC0(struct_8018D9E0_entry *arg0) { +void func_800A6CC0(UNUSED struct_8018D9E0_entry *arg0) { s32 var_s0; for (var_s0 = 0; var_s0 < gPlayerCount; var_s0++) { @@ -8752,9 +8754,9 @@ void func_800A6CC0(struct_8018D9E0_entry *arg0) { } void func_800A6D94(s32 arg0, s32 arg1, u8 *arg2) { - s32 stackPadding0; + UNUSED s32 stackPadding0; Unk_D_800E70A0 *stackPadding1; - s8 sp30[5]; + char sp30[5]; s32 var_v0; f32 otherThing; s32 thing; @@ -8777,7 +8779,7 @@ void func_800A6D94(s32 arg0, s32 arg1, u8 *arg2) { // The s/n/r/ー are not ASCII characters, they're EUC-JP characters void func_800A6E94(s32 arg0, s32 arg1, u8 *arg2) { - s32 stackPadding0; + UNUSED s32 stackPadding0; u8 *temp_v0; Unk_D_800E70A0 *temp_s0; char sp40[3]; @@ -8896,11 +8898,11 @@ void func_800A75A0(struct_8018D9E0_entry *arg0) { } void func_800A761C(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; + UNUSED s32 stackPadding0; s32 sp48; s32 sp44; - s32 stackPadding1; - s8 sp3C[3]; + UNUSED s32 stackPadding1; + char sp3C[3]; s32 temp_a0; temp_a0 = D_802874D8.unk1D + 1; @@ -9505,12 +9507,12 @@ void func_800A86E8(struct_8018D9E0_entry *arg0) { // Credit for the use of ternary operators goes to LLONSIT void func_800A874C(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; + UNUSED s32 stackPadding0; char sp58[3]; - s32 stackPadding1; - s32 stackPadding2; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; s32 temp_s1; - u32 var_v0; + UNUSED u32 var_v0; u32 var_s2; set_text_color(1); var_s2 = arg0->type == 0x00000065 ? func_800B4E24(0) : func_800B4F2C(); @@ -9523,7 +9525,7 @@ void func_800A874C(struct_8018D9E0_entry *arg0) { func_80093324(arg0->column + 0x20, arg0->row + 0x21, "\"", 0, 0.6f, 0.65f); get_time_record_centiseconds(temp_s1, sp58); text_draw(arg0->column + 0x29, arg0->row + 0x21, sp58, 0, 0.6f, 0.65f); - var_s2 = temp_s1 < 0x927C0U ? var_s2 >> 0x14 : 8; + var_s2 = (u32)temp_s1 < 0x927C0U ? var_s2 >> 0x14 : 8; func_800936B8(arg0->column + 0x60, arg0->row + 0x21, D_800E76A8[var_s2], 0, 0.6f, 0.65f); } @@ -9614,8 +9616,8 @@ void func_800A8EC0(struct_8018D9E0_entry *arg0) { } } -void func_800A8F48(struct_8018D9E0_entry *arg0) { - Gfx *temp_v0_2; +void func_800A8F48(UNUSED struct_8018D9E0_entry *arg0) { + UNUSED Gfx *temp_v0_2; Unk_D_800E70A0 *temp_v0; s16 temp_s0; s16 temp_v1; @@ -10334,7 +10336,7 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) { if (gControllerPak1State != 0) { var_t1 = 0; - switch (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote)) { /* switch 1; irregular */ + switch (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*)gGameName, (u8*)gExtCode, &gControllerPak1FileNote)) { /* switch 1; irregular */ case 5: /* switch 1 */ break; case 0: /* switch 1 */ @@ -10374,7 +10376,7 @@ void func_800AA2EC(struct_8018D9E0_entry *arg0) { } else { gControllerPak1State = 1; } - if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) { + if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*)gGameName, (u8*)gExtCode, &gControllerPak1FileNote) == 0) { arg0->cursor = 1; break; } @@ -10429,7 +10431,7 @@ void func_800AA69C(struct_8018D9E0_entry *arg0) { s32 var_a0; s32 var_v0; s32 temp_a0; - s32 stackPadding0; + UNUSED s32 stackPadding0; temp_a0 = arg0->type - 0x2B; temp_v0 = func_800AAFCC(arg0->type - 0x2B); @@ -10566,11 +10568,11 @@ void func_800AAB90(struct_8018D9E0_entry *arg0) { } void func_800AAC18(struct_8018D9E0_entry *arg0) { - s32 stackPadding0; - s32 stackPadding1; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; s32 temp_a1; s32 temp_v0; - s32 stackPadding2; + UNUSED s32 stackPadding2; Unk_D_800E70A0 *var_t0; temp_a1 = arg0->type - 0x2B; @@ -11587,7 +11589,7 @@ void func_800ACF40(struct_8018D9E0_entry *arg0) { s32 temp_a2; s32 temp_a1; s32 var_v1; - s32 stackPadding0; + UNUSED s32 stackPadding0; temp_a2 = arg0->type - 0xB1; temp_a1 = D_800EFD64[gCharacterSelections[arg0->type - 0xB1]]; @@ -11772,7 +11774,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { } if (gControllerPak1State != 0) { var_v1 = 0; - switch (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote)) { /* switch 4; irregular */ + switch (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*)gGameName, (u8*)gExtCode, &gControllerPak1FileNote)) { /* switch 4; irregular */ case 5: /* switch 4 */ break; case 0: /* switch 4 */ @@ -11821,7 +11823,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; } - if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) { + if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*)gGameName, (u8*)gExtCode, &gControllerPak1FileNote) == 0) { func_800B6708(); arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11; play_sound2(SOUND_MENU_SELECT); @@ -11969,7 +11971,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { break; case 25: /* switch 1 */ if (arg0->unk1C == 1) { - if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) != 0) { + if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*)gGameName, (u8*)gExtCode, &gControllerPak1FileNote) != 0) { arg0->cursor = 0x0000001A; play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; @@ -12033,7 +12035,7 @@ void func_800AD2E8(struct_8018D9E0_entry *arg0) { #define FUNC_800ADF48DEF 60 #endif void func_800ADF48(struct_8018D9E0_entry *arg0) { - s32 stackPadding; + UNUSED s32 stackPadding; struct Controller *controller; if (gIsGamePaused != 0) { @@ -12173,7 +12175,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { } if (gControllerPak1State != 0) { var_v1 = 0; - switch (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote)) { /* switch 3; irregular */ + switch (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*)gGameName, (u8*)gExtCode, &gControllerPak1FileNote)) { /* switch 3; irregular */ case PFS_ERR_INVALID: /* switch 3 */ break; case PFS_NO_ERROR: /* switch 3 */ @@ -12224,7 +12226,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; } - if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) == 0) { + if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*)gGameName, (u8*)gExtCode, &gControllerPak1FileNote) == 0) { func_800B6708(); arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E; play_sound2(SOUND_MENU_SELECT); @@ -12362,7 +12364,7 @@ void func_800AE218(struct_8018D9E0_entry *arg0) { break; case 40: /* switch 1 */ if (arg0->unk1C == 1) { - if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, gGameName, gExtCode, &gControllerPak1FileNote) != 0) { + if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*)gGameName, (u8*)gExtCode, &gControllerPak1FileNote) != 0) { arg0->cursor = 0x00000029; play_sound2(SOUND_MENU_FILE_NOT_FOUND); return; @@ -12493,7 +12495,7 @@ void func_800AEF74(struct_8018D9E0_entry *arg0) { } void func_800AF004(struct_8018D9E0_entry *arg0) { - s32 temp_t1; + UNUSED s32 temp_t1; switch (arg0->cursor) { case 0: @@ -12627,7 +12629,7 @@ void func_800AF480(struct_8018D9E0_entry *arg0) { } void func_800AF4DC(struct_8018D9E0_entry *arg0) { - s32 pad; + UNUSED s32 pad; s32 temp_v0; struct_802850C0_entry *temp_v1; @@ -12679,7 +12681,7 @@ void func_800AF4DC(struct_8018D9E0_entry *arg0) { } void func_800AF740(struct_8018D9E0_entry *arg0) { - s32 pad; + UNUSED s32 pad; s32 temp_v0; struct_802850C0_entry *temp_v1; diff --git a/src/code_80091750.h b/src/code_80091750.h index 7d56df0714..a64773280a 100644 --- a/src/code_80091750.h +++ b/src/code_80091750.h @@ -116,7 +116,7 @@ void func_8009265C(void); void func_80092688(void); void func_80092C80(void); s32 char_to_glyph_index(char*); -s32 func_80092DF8(s8*); +s32 func_80092DF8(char*); s32 func_80092E1C(char*); s32 func_80092EE4(char*); s32 get_string_width(char*); @@ -157,15 +157,15 @@ Gfx *draw_flash_select_case_fast(Gfx*, s32, s32, s32, s32); Gfx *func_800959F8(Gfx*, Vtx*); void func_80095AE0(Mtx*, f32, f32, f32, f32); Gfx *func_80095BD0(Gfx*, u8*, f32, f32, u32, u32, f32, f32); -Gfx *func_80095E10(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, s32, s32, u32, u32); -Gfx *func_800963F0(Gfx*, s8, s32, s32, f32, f32, s32, s32, s32, s32, s32, s32, s32, u32, u32); +Gfx *func_80095E10(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, s32, u8 *, u32, u32); +Gfx *func_800963F0(Gfx*, s8, s32, s32, f32, f32, s32, s32, s32, s32, s32, s32, u8 *, u32, u32); Gfx *func_80096CD8(Gfx*, s32, s32, u32, u32); -Gfx *func_80097274(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, s32, s32, u32, u32, u32); -Gfx *func_80097A14(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, u32, u32); +Gfx *func_80097274(Gfx*, s8, s32, s32, s32, s32, s32, s32, s32, s32, u8 *, u32, u32, u32); +Gfx *func_80097A14(Gfx*, s8, s32, s32, s32, s32, s32, s32, u8*, u32, u32); Gfx *func_80097AE4(Gfx*, s8, s32, s32, u8*, s32); Gfx *func_80097E58(Gfx*, s8, s32, s32, s32, s32, s32, s32, u8*, u32, s32, u32); Gfx *func_80098558(Gfx*, u32, u32, u32, u32, u32, u32, s32, s32); -Gfx *func_800987D0(Gfx*, u32, u32, u32, u32, s32, s32, s32, u32, s32); +Gfx *func_800987D0(Gfx*, u32, u32, u32, u32, s32, s32, u8*, u32, s32); Gfx *draw_box_fill(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32); Gfx *draw_box(Gfx*, s32, s32, s32, s32, s32, s32, s32, s32); Gfx *func_80098FC8(Gfx*, s32, s32, s32, s32); diff --git a/src/data/some_data.c b/src/data/some_data.c index f927fa3df9..8579739702 100644 --- a/src/data/some_data.c +++ b/src/data/some_data.c @@ -354,7 +354,7 @@ f32 D_800E594C[][2] = { s16 D_800E597C[] = { 0x0000, 0x0000, 0x4000, 0x8000, 0x8000, 0xc000 }; // Seems to be related to the Boos in Banshee Boardwalk -SplineData23 D_800E5988 = { +SplineData D_800E5988 = { 0x0016, { {{ 0x0005, 0x0011, 0x0032 }, 0x0028 }, @@ -384,7 +384,7 @@ SplineData23 D_800E5988 = { }; // Seems to be related to the Boos in Banshee Boardwalk -SplineData24 D_800E5A44 = { +SplineData D_800E5A44 = { 0x0017, { {{ 0x0000, 0x0011, 0xffce }, 0x0028 }, @@ -415,7 +415,7 @@ SplineData24 D_800E5A44 = { }; // Seems to be related to the Boos in Banshee Boardwalk -SplineData25 D_800E5B08 = { +SplineData D_800E5B08 = { 0x0018, { {{ 0xfff1, 0x000a, 0x0000 }, 0x0014 }, @@ -447,7 +447,7 @@ SplineData25 D_800E5B08 = { }; // Seems to be related to the Boos in Banshee Boardwalk -SplineData23 D_800E5BD4 = { +SplineData D_800E5BD4 = { 0x0016, { {{ 0x0005, 0x0011, 0x0032 }, 0x001e }, @@ -477,7 +477,7 @@ SplineData23 D_800E5BD4 = { }; // Seems to be related to the Boos in Banshee Boardwalk -SplineData24 D_800E5C90 = { +SplineData D_800E5C90 = { 0x0017, { {{ 0x0000, 0x0011, 0xffce }, 0x0019 }, @@ -508,7 +508,7 @@ SplineData24 D_800E5C90 = { }; // Only referenced in func_8007D070, which itself is unused -SplineDataUnused4 D_800E5D54 = { +SplineData D_800E5D54 = { 0x0004, { {{ 0x0000, 0x0010, 0x0000 }, 0x0032 }, @@ -519,7 +519,7 @@ SplineDataUnused4 D_800E5D54 = { }; // Unused? -SplineDataUnused4 D_800E5D78 = { +SplineData D_800E5D78 = { 0x0004, { {{ 0x0000, 0x0000, 0x0000 }, 0x000a }, @@ -531,7 +531,11 @@ SplineDataUnused4 D_800E5D78 = { // Note the use of the plain SplineData type here. Since these are pointers, we don't care // about their internal array size -SplineData *D_800E5D9C[] = { &D_800E5988, &D_800E5A44, &D_800E5B08, &D_800E5BD4, &D_800E5C90 }; +SplineData *D_800E5D9C[] = { + &D_800E5988, &D_800E5A44, + &D_800E5B08, &D_800E5BD4, + &D_800E5C90 +}; // Unused SplineData *D_800E5DB0 = &D_800E5988; @@ -633,7 +637,7 @@ s16 D_800E5FD0[] = { }; // Something related to seagulls in Koopa Troopa Beach, not sure of its exact nature -SplineData23 D_800E6034 = { +SplineData D_800E6034 = { 0x0016, { {{ 0x0032, 0x00aa, 0x01f4 }, 0x0028 }, @@ -663,7 +667,7 @@ SplineData23 D_800E6034 = { }; // Something related to seagulls in Koopa Troopa Beach, not sure of its exact nature -SplineData24 D_800E60F0 = { +SplineData D_800E60F0 = { 0x0017, { {{ 0x0000, 0x00aa, 0xfe0c }, 0x0028 }, @@ -694,7 +698,7 @@ SplineData24 D_800E60F0 = { }; // Something related to seagulls in Koopa Troopa Beach, not sure of its exact nature -SplineData25 D_800E61B4 = { +SplineData D_800E61B4 = { 0x0018, { {{ 0xff6a, 0x0064, 0x0000 }, 0x0014 }, @@ -726,7 +730,7 @@ SplineData25 D_800E61B4 = { }; // Something related to seagulls in Koopa Troopa Beach, not sure of its exact nature -SplineData23 D_800E6280 = { +SplineData D_800E6280 = { 0x0016, { {{ 0xffce, 0x00aa, 0xfe0c }, 0x0028 }, @@ -757,7 +761,10 @@ SplineData23 D_800E6280 = { // Note the use of the plain SplineData type here. Since these are pointers, we don't care // about their internal array size -SplineData *D_800E633C[] = { &D_800E6034, &D_800E60F0, &D_800E61B4, &D_800E6280 }; +SplineData *D_800E633C[] = { + &D_800E6034, &D_800E60F0, + &D_800E61B4, &D_800E6280 +}; // Might be Cheep Cheep related? Vec3s D_800E634C[] = { @@ -803,7 +810,7 @@ MoleSpawnUnion gMoleSpawns = { }; // Referenced by D_800E6724, which is unused -SplineData23 D_800E641C = { +SplineData D_800E641C = { 0x0016, { {{ 0x0014, 0x0000, 0x00c8 }, 0x0050 }, @@ -833,7 +840,7 @@ SplineData23 D_800E641C = { }; // Referenced by D_800E6724, which is unused -SplineData24 D_800E64D8 = { +SplineData D_800E64D8 = { 0x0017, { {{ 0x0000, 0x0000, 0xffce }, 0x0050 }, @@ -864,7 +871,7 @@ SplineData24 D_800E64D8 = { }; // Something related to the penguins in Sherbet Land, not sure of its exact nature -SplineData25 D_800E659C = { +SplineData D_800E659C = { 0x0018, { {{ 0xffec, 0x0000, 0x0000 }, 0x0050 }, @@ -896,7 +903,7 @@ SplineData25 D_800E659C = { }; // Something related to the penguins in Sherbet Land, not sure of its exact nature -SplineData23 D_800E6668 = { +SplineData D_800E6668 = { 0x0016, { {{ 0x0005, 0x0000, 0x0032 }, 0x0050 }, @@ -955,7 +962,7 @@ s16 gTorchSpawns[] = { 0xffca, 0xfff8, 0x0270, }; -SplineData15 D_800E67B8 = { +SplineData D_800E67B8 = { 0x000d, { {{ 0x0096, 0x00cc, 0xfe0c }, 0x0014 }, @@ -977,7 +984,7 @@ SplineData15 D_800E67B8 = { }; // Appears to be related to Lakitu waving the checkered flag -SplineData21 D_800E6834 = { +SplineData D_800E6834 = { 0x0014, { {{ 0x0014, 0x0012, 0x001e }, 0x0028 }, @@ -1005,7 +1012,7 @@ SplineData21 D_800E6834 = { }; // Unused struct? -SplineDataUnused13 D_800E68E0 = { +SplineData D_800E68E0 = { 0x000c, { {{ 0x001e, 0x0018, 0x0078 }, 0x000a }, @@ -1025,7 +1032,7 @@ SplineDataUnused13 D_800E68E0 = { }; // Appears to be related to Lakitu Second Lap animation -SplineData12 D_800E694C = { +SplineData D_800E694C = { 0x000b, { {{ 0x0032, 0x0014, 0x0050 }, 0x000a }, @@ -1044,7 +1051,7 @@ SplineData12 D_800E694C = { }; // Appears to be related to Lakitu Reverse animation -SplineData8 D_800E69B0 = { +SplineData D_800E69B0 = { 0x0007, { {{ 0x001e, 0x000e, 0x0032 }, 0x0028 }, @@ -1059,7 +1066,7 @@ SplineData8 D_800E69B0 = { }; // Might be related to Lakitu doing the countdown? -SplineData8 D_800E69F4 = { +SplineData D_800E69F4 = { 0x0007, { {{ 0x0000, 0x0012, 0xfffb }, 0x0014 }, diff --git a/src/data/some_data.h b/src/data/some_data.h index dd961fbe12..3d70b3158f 100644 --- a/src/data/some_data.h +++ b/src/data/some_data.h @@ -38,13 +38,13 @@ extern ThwompSpawn gThomwpSpawns150CC[]; extern f32 D_800E594C[][2]; extern u64 D_800E5974; extern s16 D_800E597C[]; -extern SplineData23 D_800E5988; -extern SplineData24 D_800E5A44; -extern SplineData25 D_800E5B08; -extern SplineData23 D_800E5BD4; -extern SplineData24 D_800E5C90; -extern SplineDataUnused4 D_800E5D54; -extern SplineDataUnused4 D_800E5D78; +extern SplineData D_800E5988; +extern SplineData D_800E5A44; +extern SplineData D_800E5B08; +extern SplineData D_800E5BD4; +extern SplineData D_800E5C90; +extern SplineData D_800E5D54; +extern SplineData D_800E5D78; extern SplineData *D_800E5D9C[]; extern SplineData *D_800E5DB0; extern s8 D_800E5DB4[]; @@ -54,28 +54,28 @@ extern Vec3s gHedgehogPatrolPoints[]; extern SnowmanSpawn gSnowmanSpawns[]; extern CrabSpawn gCrabSpawns[]; extern s16 D_800E5FD0[]; -extern SplineData23 D_800E6034; -extern SplineData24 D_800E60F0; -extern SplineData25 D_800E61B4; -extern SplineData23 D_800E6280; +extern SplineData D_800E6034; +extern SplineData D_800E60F0; +extern SplineData D_800E61B4; +extern SplineData D_800E6280; extern SplineData *D_800E633C[]; extern Vec3s D_800E634C[]; extern MoleSpawnUnion gMoleSpawns; -extern SplineData23 D_800E641C; -extern SplineData24 D_800E64D8; -extern SplineData25 D_800E659C; -extern SplineData23 D_800E6668; +extern SplineData D_800E641C; +extern SplineData D_800E64D8; +extern SplineData D_800E659C; +extern SplineData D_800E6668; extern SplineData *D_800E6724[]; extern SplineData *D_800E672C[]; extern Vec3f D_800E6734[]; // This should really be `extern Vec3s gTorchSpawns[];` extern s16 gTorchSpawns[]; -extern SplineData15 D_800E67B8; -extern SplineData21 D_800E6834; -extern SplineDataUnused13 D_800E68E0; -extern SplineData12 D_800E694C; -extern SplineData8 D_800E69B0; -extern SplineData8 D_800E69F4; +extern SplineData D_800E67B8; +extern SplineData D_800E6834; +extern SplineData D_800E68E0; +extern SplineData D_800E694C; +extern SplineData D_800E69B0; +extern SplineData D_800E69F4; extern CloudData gLuigiRacewayClouds[]; extern CloudData gYoshiValleyMooMooFarmClouds[]; extern CloudData gKoopaTroopaBeachClouds[]; diff --git a/src/effects.c b/src/effects.c index af29bab8d8..779c003c5b 100644 --- a/src/effects.c +++ b/src/effects.c @@ -16,6 +16,7 @@ #include "effects.h" #include "audio/external.h" #include "spawn_players.h" +#include "code_80091750.h" s32 D_8018D900[8]; s16 D_8018D920[8]; @@ -1839,13 +1840,13 @@ void func_80090868(Player* player) { } void func_80090970(Player *player, s8 playerId, s8 arg2) { - s32 stackPadding0; - s32 stackPadding1; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; Vec3f sp44; Vec3f sp38; TrackWaypoint *waypoint; - s32 stackPadding2; - s32 stackPadding3; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; player->unk_0C2 = 0x000C; player->unk_078 = 0; @@ -2077,7 +2078,7 @@ void func_800911B4(Player* player, s8 arg1) { void func_80091298(Player *player, s8 arg1) { s16 var_v1; - s32 stackPadding1; + UNUSED s32 stackPadding1; Vec3f spC = { 27.167f, 25.167f, 23.167f }; player->unk_044 |= 0x2000; diff --git a/src/ending/ceremony_and_credits.c b/src/ending/ceremony_and_credits.c index 05a4479d57..879b22262a 100644 --- a/src/ending/ceremony_and_credits.c +++ b/src/ending/ceremony_and_credits.c @@ -96,7 +96,7 @@ UNUSED void func_80282050(Vec3f dest, Vec3f src, s16 angle) { dest[2] = (sp2C[2] * coss(angle)) - (sp2C[0] * sins(angle)); } -UNUSED void func_802820F8(f32 *dest, f32 *src, s16 angle) { +UNUSED void func_802820F8(Vec3f dest, Vec3f src, s16 angle) { Vec3f sp2C; vec3f_copy_return_dupe(sp2C, src); diff --git a/src/ending/ceremony_and_credits.h b/src/ending/ceremony_and_credits.h index 64fb1fb4a8..3121c98f18 100644 --- a/src/ending/ceremony_and_credits.h +++ b/src/ending/ceremony_and_credits.h @@ -121,7 +121,7 @@ void func_80282048(void); void func_80282050(Vec3f, Vec3f, s16); void func_802820F8(Vec3f, Vec3f, s16); s32 f32_lerp(f32*, f32, f32); -s32 func_80282200(s16*, s16, s16); +s32 func_80282200(Vec3s, s16, s16); s32 set_transition_colour_fade_alpha_ending(f32*, f32, f32); s32 func_80282364(s16*, s16, s16); void reset_spline(void); diff --git a/src/ending/code_80281780.c b/src/ending/code_80281780.c index 683c72f00f..003d3e5527 100644 --- a/src/ending/code_80281780.c +++ b/src/ending/code_80281780.c @@ -134,25 +134,25 @@ void load_ceremony_cutscene(void) { gSurfaceMap = (mk64_surface_map_ram *) gNextFreeMemoryAddress; //! @bug these segmented addresses need to be symbols for mobility // d_course_royal_raceway_packed_dl_67E8 - set_vertex_data_with_default_section_id(0x070067E8, -1); + set_vertex_data_with_default_section_id((Gfx *)0x070067E8, -1); // d_course_royal_raceway_packed_dl_AEF8 - set_vertex_data_with_default_section_id(0x0700AEF8, -1); + set_vertex_data_with_default_section_id((Gfx *)0x0700AEF8, -1); // d_course_royal_raceway_packed_dl_A970 - set_vertex_data_with_default_section_id(0x0700A970, 8); + set_vertex_data_with_default_section_id((Gfx *)0x0700A970, 8); // d_course_royal_raceway_packed_dl_AC30 - set_vertex_data_with_default_section_id(0x0700AC30, 8); + set_vertex_data_with_default_section_id((Gfx *)0x0700AC30, 8); // d_course_royal_raceway_packed_dl_CE0 - set_vertex_data_with_default_section_id(0x07000CE0, 0x10); + set_vertex_data_with_default_section_id((Gfx *)0x07000CE0, 0x10); // d_course_royal_raceway_packed_dl_E88 - set_vertex_data_with_default_section_id(0x07000E88, 0x10); + set_vertex_data_with_default_section_id((Gfx *)0x07000E88, 0x10); // d_course_royal_raceway_packed_dl_A618 - set_vertex_data_with_default_section_id(0x0700A618, -1); + set_vertex_data_with_default_section_id((Gfx *)0x0700A618, -1); // d_course_royal_raceway_packed_dl_A618 - set_vertex_data_with_default_section_id(0x0700A618, -1); + set_vertex_data_with_default_section_id((Gfx *)0x0700A618, -1); // d_course_royal_raceway_packed_dl_23F8 - set_vertex_data_with_default_section_id(0x070023F8, 1); + set_vertex_data_with_default_section_id((Gfx *)0x070023F8, 1); // d_course_royal_raceway_packed_dl_2478 - set_vertex_data_with_default_section_id(0x07002478, 1); + set_vertex_data_with_default_section_id((Gfx *)0x07002478, 1); func_80295C6C(); debug_switch_character_ceremony_cutscene(); func_802818BC(); diff --git a/src/ending/code_80281C40.c b/src/ending/code_80281C40.c index aa36464f1c..afc01f1de9 100644 --- a/src/ending/code_80281C40.c +++ b/src/ending/code_80281C40.c @@ -32,7 +32,7 @@ void func_80281C40(void) { s32 i; for (i = 0; i < D_802874FC; i++) { - func_800579F8(D_80287560[i].unk0, D_80287560[i].unk2, (s8 *) D_80287560[i].unk8, D_80287560[i].unk4); + func_800579F8(D_80287560[i].unk0, D_80287560[i].unk2, (char *) D_80287560[i].unk8, D_80287560[i].unk4); } } diff --git a/src/kart_dma.c b/src/kart_dma.c index 3ed4c730cc..faba825d33 100644 --- a/src/kart_dma.c +++ b/src/kart_dma.c @@ -1834,7 +1834,7 @@ void load_kart_palette(Player *player, s8 playerId, s8 arg2, s8 arg3) { #ifdef AVOID_UB struct_D_802F1F80 *temp_s0 = &D_802F1F80[arg3][arg2][playerId]; #else - struct_D_802F1F80 *temp_s0 = &D_802F1F80[arg3][arg2][playerId * 0x100]; + struct_D_802F1F80 *temp_s0 = (struct_D_802F1F80 *) &D_802F1F80[arg3][arg2][playerId * 0x100]; #endif switch(gActiveScreenMode) { case SCREEN_MODE_1P: diff --git a/src/math_util_2.c b/src/math_util_2.c index 1122b209cb..04d978a792 100644 --- a/src/math_util_2.c +++ b/src/math_util_2.c @@ -469,7 +469,7 @@ void func_800419F8(void) { pos[0] = 0.0f; pos[1] = 0.0f; pos[2] = 120.0f; - vec3f_rotate_x_y(vec, pos, D_80165834); + vec3f_rotate_x_y(vec, pos, (s16*) D_80165834); D_80165840[0] = vec[0]; D_80165840[1] = vec[1]; D_80165840[2] = vec[2]; diff --git a/src/menus.c b/src/menus.c index 586dcbd9ea..154667b6dc 100644 --- a/src/menus.c +++ b/src/menus.c @@ -232,7 +232,7 @@ void options_menu_act(struct Controller *controller, u16 arg1) { if (!func_800B4520()) { sp38 = find_8018D9E0_entry_dupe(0xF0); - sp30 = D_8018D9C0; + sp30 = (struct_8018EE10_entry *) D_8018D9C0; switch (D_8018EDEC) { case 0x15: case 0x16: @@ -1996,7 +1996,7 @@ bool func_800B4520(void) { UNUSED void func_800B4560(s32 arg0, s32 arg1) { struct_8018EE10_entry *pak1 = D_8018EE10; - struct_8018EE10_entry *pak2 = D_8018D9C0; + struct_8018EE10_entry *pak2 = (struct_8018EE10_entry *) D_8018D9C0; rmonPrintf("ghost_kart=%d,", D_80162DE0); rmonPrintf("pak1_ghost_kart=%d,", (pak1 + arg0)->characterId); diff --git a/src/racing/collision.c b/src/racing/collision.c index 92bb12ac1d..f42acaf5a6 100644 --- a/src/racing/collision.c +++ b/src/racing/collision.c @@ -635,18 +635,18 @@ void func_802AC114(Vec3f pos1, f32 boundingBoxSize, Vec3f pos2, UNUSED f32 unk) s32 func_802AC22C(KartBoundingBoxCorner *arg0) { Collision spD0; - s32 stackPadding0; - s32 stackPadding1; - s32 stackPadding2; - s32 stackPadding3; - s32 stackPadding4; - s32 stackPadding5; - s32 stackPadding6; - s32 stackPadding7; - s32 stackPadding8; - s32 stackPadding9; - s32 stackPaddingA; - s32 stackPaddingB; + UNUSED s32 stackPadding0; + UNUSED s32 stackPadding1; + UNUSED s32 stackPadding2; + UNUSED s32 stackPadding3; + UNUSED s32 stackPadding4; + UNUSED s32 stackPadding5; + UNUSED s32 stackPadding6; + UNUSED s32 stackPadding7; + UNUSED s32 stackPadding8; + UNUSED s32 stackPadding9; + UNUSED s32 stackPaddingA; + UNUSED s32 stackPaddingB; s32 temp1; s32 temp2; f32 temp_f22; diff --git a/src/racing/collision.h b/src/racing/collision.h index 9dd6859f5d..4391e9660b 100644 --- a/src/racing/collision.h +++ b/src/racing/collision.h @@ -19,6 +19,7 @@ s16 func_802ABDB8(u16); s16 func_802ABDF4(u16); f32 func_802ABE30(f32, f32, f32, u16); f32 func_802ABEAC(Collision*, Vec3f); +void shell_collision(Collision *, Vec3f); void process_shell_collision(Vec3f, f32, Vec3f, f32); u16 process_collision(Player*, KartBoundingBoxCorner*, f32, f32, f32); void func_802AC114(Vec3f, f32, Vec3f, f32); diff --git a/src/racing/math_util.c b/src/racing/math_util.c index a49ff6a4eb..9626e2a697 100644 --- a/src/racing/math_util.c +++ b/src/racing/math_util.c @@ -25,10 +25,10 @@ UNUSED s32 func_802B4F60(UNUSED s32 arg0, Vec3f arg1, UNUSED s32 arg2, UNUSED f3 sp28 = sp1C[0]; sp2C = sp1C[1]; // wut? - if (sp2C && sp2C); + if (sp2C && sp2C) {}; sp2C = ((sp30[0][3] * sp28) + (sp30[1][3] * sp2C) + (sp30[2][3] * sp1C[2])) + sp30[3][3]; // double wut? - if (sp28 && sp28); + if (sp28 && sp28) {}; mtxf_translate_vec3f_mat4(sp1C, sp30); if (0.0f >= sp2C) { diff --git a/src/racing/math_util.h b/src/racing/math_util.h index 3addd2a9e1..2ed50d6b35 100644 --- a/src/racing/math_util.h +++ b/src/racing/math_util.h @@ -35,6 +35,7 @@ void add_translate_mat4_vec3f(Mat4, Mat4, Vec3f); void add_translate_mat4_vec3f_lite(Mat4, Mat4, Vec3f); void mtxf_translate(Mat4, Vec3f); void func_802B5564(Mat4, u16*, f32, f32, f32, f32, f32); +void func_802B5794(Mat4, Vec3f, Vec3f); void mtxf_rotate_x(Mat4, s16); void mtxf_rotate_y(Mat4, s16); void mtxf_s16_rotate_z(Mat4, s16); diff --git a/src/racing/memory.c b/src/racing/memory.c index 41f7ef5350..78cdd75899 100644 --- a/src/racing/memory.c +++ b/src/racing/memory.c @@ -1335,7 +1335,7 @@ u8 *load_course(s32 courseId) { CourseVtx *vertexStart; // mio0 compressed u8 *packedStart; u32 vertexCount; - uintptr_t finalDisplaylistOffset; + u8* finalDisplaylistOffset; u32 unknown1; s32 prevLoadedAddress_saved; u8 *offsetRomStart; @@ -1371,7 +1371,7 @@ u8 *load_course(s32 courseId) { set_segment_base_addr(0xF, (void *) vtxCompressed); decompress_vtx(vertexStart, vertexCount); - displaylist_unpack((uintptr_t *) packedStart, finalDisplaylistOffset, unknown1); + displaylist_unpack((uintptr_t *) packedStart, (uintptr_t) finalDisplaylistOffset, unknown1); decompress_textures(textures); gNextFreeMemoryAddress = prevLoadedAddress_saved; return vtxCompressed; diff --git a/src/racing/render_courses.c b/src/racing/render_courses.c index 22c4bdd247..b2b2a22de3 100644 --- a/src/racing/render_courses.c +++ b/src/racing/render_courses.c @@ -1424,13 +1424,13 @@ void func_80295D88(void) { switch (gCurrentCourseId) { case COURSE_MARIO_RACEWAY: // d_course_mario_raceway_packed_dl_1140 - set_vertex_data_with_defaults((uintptr_t)0x07001140); + set_vertex_data_with_defaults((Gfx *)0x07001140); if (gScreenModeSelection == SCREEN_MODE_1P) { // d_course_mario_raceway_packed_dl_8E8 - set_vertex_data_with_defaults((uintptr_t)0x070008E8); + set_vertex_data_with_defaults((Gfx *)0x070008E8); } else { // d_course_mario_raceway_packed_dl_2D68 - set_vertex_data_with_defaults((uintptr_t)0x07002D68); + set_vertex_data_with_defaults((Gfx *)0x07002D68); } parse_course_displaylists((uintptr_t) d_course_mario_raceway_addr); func_80295C6C(); @@ -1485,7 +1485,7 @@ void func_80295D88(void) { D_8015F8E4 = -80.0f; break; case COURSE_YOSHI_VALLEY: - func_802B5D64(&d_course_yoshi_valley_lights4, -0x38F0, 0x1C70, 1); + func_802B5D64((uintptr_t) &d_course_yoshi_valley_lights4, -0x38F0, 0x1C70, 1); parse_course_displaylists((uintptr_t) d_course_yoshi_valley_addr); func_80295C6C(); D_8015F8E4 = gCourseMinY - 10.0f; @@ -1585,22 +1585,22 @@ void func_80295D88(void) { break; case COURSE_BLOCK_FORT: // d_course_block_fort_packed_dl_15C0 - set_vertex_data_with_default_section_id((uintptr_t)0x070015C0, 1); + set_vertex_data_with_default_section_id((Gfx *)0x070015C0, 1); func_80295C6C(); D_8015F8E4 = gCourseMinY - 10.0f; break; case COURSE_SKYSCRAPER: // d_course_skyscraper_packed_dl_1110 - set_vertex_data_with_default_section_id((uintptr_t)0x07001110, 1); + set_vertex_data_with_default_section_id((Gfx *)0x07001110, 1); // d_course_skyscraper_packed_dl_258 - set_vertex_data_with_default_section_id((uintptr_t)0x07000258, 1); + set_vertex_data_with_default_section_id((Gfx *)0x07000258, 1); func_80295C6C(); D_8015F8E4 = -480.0f; break; case COURSE_DOUBLE_DECK: // d_course_double_deck_packed_dl_738 - set_vertex_data_with_default_section_id((uintptr_t)0x07000738, 1); + set_vertex_data_with_default_section_id((Gfx *)0x07000738, 1); func_80295C6C(); D_8015F8E4 = gCourseMinY - 10.0f; break; @@ -1613,15 +1613,15 @@ void func_80295D88(void) { break; case COURSE_BIG_DONUT: // d_course_big_donut_packed_dl_1018 - set_vertex_data_with_default_section_id((uintptr_t)0x07001018, 6); + set_vertex_data_with_default_section_id((Gfx *)0x07001018, 6); // d_course_big_donut_packed_dl_450 - set_vertex_data_with_default_section_id((uintptr_t)0x07000450, 6); + set_vertex_data_with_default_section_id((Gfx *)0x07000450, 6); // d_course_big_donut_packed_dl_AC0 - set_vertex_data_with_default_section_id((uintptr_t)0x07000AC0, 6); + set_vertex_data_with_default_section_id((Gfx *)0x07000AC0, 6); // d_course_big_donut_packed_dl_B58 - set_vertex_data_with_default_section_id((uintptr_t)0x07000B58, 6); + set_vertex_data_with_default_section_id((Gfx *)0x07000B58, 6); // d_course_big_donut_packed_dl_230 - set_vertex_data_with_default_section_id((uintptr_t)0x07000230, 6); + set_vertex_data_with_default_section_id((Gfx *)0x07000230, 6); func_80295C6C(); D_8015F8E4 = 100.0f; break; diff --git a/src/render_objects.c b/src/render_objects.c index 6519871b34..1e0c8cdc4a 100644 --- a/src/render_objects.c +++ b/src/render_objects.c @@ -1888,7 +1888,7 @@ void func_8004D4E8(s32 arg0, s32 arg1, u8 *texture, s32 arg3, s32 arg4, s32 arg5 } } -void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 width, s32 arg9, s32 argA, s32 height) { +void func_8004D654(s32 arg0, s32 arg1, u8 *texture, f32 arg3, s32 arg4, s32 arg5, s32 arg6, UNUSED s32 arg7, s32 width, s32 arg9, UNUSED s32 argA, s32 height) { s32 i; s32 var_s3; u8 *textureCopy; @@ -2217,8 +2217,8 @@ void func_8004E6C4(s32 playerId) { } void draw_simplified_lap_count(s32 playerId) { - draw_hud_2d_texture_32x8((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, common_texture_hud_lap); - draw_hud_2d_texture_32x16(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, gHudLapTextures[playerHUD[playerId].alsoLapCount]); + draw_hud_2d_texture_32x8((s32) playerHUD[playerId].lapX, playerHUD[playerId].lapY + 3, (u8*) common_texture_hud_lap); + draw_hud_2d_texture_32x16(playerHUD[playerId].lapX + 0x1C, (s32) playerHUD[playerId].lapY, (u8*) gHudLapTextures[playerHUD[playerId].alsoLapCount]); } void func_8004E800(s32 playerId) { @@ -2258,26 +2258,26 @@ void func_8004EB38(s32 playerId) { temp_s0 = &playerHUD[playerId]; if ((u8) temp_s0->unk_7B != 0) { - func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8(temp_s0->lap1CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000080, (u8*) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); func_8004F950((s32) temp_s0->lap1CompletionTimeX, (s32) temp_s0->timerY, 0x00000080, (s32) temp_s0->someTimer); } if ((u8) temp_s0->unk_7C != 0) { - func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000050, common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8(temp_s0->lap2CompletionTimeX - 0x13, temp_s0->timerY + 8, 0x00000050, (u8*) common_texture_hud_time, 0x00000020, 0x00000010, 0x00000020, 0x00000010); func_8004F950((s32) temp_s0->lap2CompletionTimeX, (s32) temp_s0->timerY, 0x00000050, (s32) temp_s0->someTimer); } if ((u8) temp_s0->unk_7E != 0) { - func_8004C9D8((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); - func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080, gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8((s32) temp_s0->lapAfterImage1X, temp_s0->lapY + 3, 0x00000080, (u8*) common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); + func_8004C9D8(temp_s0->lapAfterImage1X + 0x1C, (s32) temp_s0->lapY, 0x00000080, (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); } if ((u8) temp_s0->unk_7F != 0) { - func_8004C9D8((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); - func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050, gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); + func_8004C9D8((s32) temp_s0->lapAfterImage2X, temp_s0->lapY + 3, 0x00000050, (u8*) common_texture_hud_lap, 0x00000020, 8, 0x00000020, 8); + func_8004C9D8(temp_s0->lapAfterImage2X + 0x1C, (s32) temp_s0->lapY, 0x00000050, (u8*) gHudLapTextures[temp_s0->alsoLapCount], 0x00000020, 0x00000010, 0x00000020, 0x00000010); } } void func_8004ED40(s32 arg0) { func_8004A2F4(playerHUD[arg0].speedometerX, playerHUD[arg0].speedometerY, 0U, 1.0f, D_8018D300, D_8018D308, D_8018D310, 0xFF, common_texture_speedometer, D_0D0064B0, 0x40, 0x60, 0x40, 0x30); - func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, common_texture_speedometer_needle, &D_0D005FF0, 0x40, 0x20, 0x40, 0x20); + func_8004A258(D_8018CFEC, D_8018CFF4, D_8016579E, 1.0f, common_texture_speedometer_needle, D_0D005FF0, 0x40, 0x20, 0x40, 0x20); } void func_8004EE54(s32 arg0) { @@ -2314,7 +2314,7 @@ void func_8004F020(s32 arg0) { var_f0 = var_f0 + 4.0; break; } - draw_hud_2d_texture_8x8(var_f2, var_f0, common_texture_minimap_finish_line); + draw_hud_2d_texture_8x8(var_f2, var_f0, (u8*) common_texture_minimap_finish_line); } #ifdef NON_MATCHING @@ -2338,22 +2338,22 @@ void func_8004F168(s32 arg0, s32 playerId, s32 characterId) { if (characterId != 8) { if ((gGPCurrentRaceRankByPlayerId[playerId] == 0) && (gModeSelection != 3) && (gModeSelection != 1)) { #if EXPLICIT_AND == 1 - func_80046424(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + func_80046424(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); #else - func_80046424(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + func_80046424(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); #endif } else { #if EXPLICIT_AND == 1 - func_800463B0(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + func_800463B0(temp_a0, temp_a1, (player->rotation[1] + 0x8000) & 0xFFFF, 1.0f, (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); #else - func_800463B0(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); + func_800463B0(temp_a0, temp_a1, player->rotation[1] + 0x8000, 1.0f, (u8*) common_texture_minimap_kart_character[characterId], common_vtx_player_minimap_icon, 8, 8, 8, 8); #endif } } else { if (gGPCurrentRaceRankByPlayerId[playerId] == 0) { func_8004C450(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); } else { - func_8004C364(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); + draw_hud_2d_texture(temp_a0, temp_a1, 8, 8, (u8 *) common_texture_minimap_progress_dot); } } } @@ -2456,7 +2456,7 @@ void print_timer(s32 arg0, s32 arg1, s32 arg2) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); - load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16); + load_texture_block_rgba16_mirror((u8*) common_texture_hud_normal_digit, 104, 16); func_8004F6D0(arg2); func_8004F774(arg0, arg1); gSPDisplayList(gDisplayListHead++, D_0D007EB8); @@ -2475,7 +2475,7 @@ void func_8004F8CC(s32 arg0, s32 arg1) { void func_8004F950(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { gSPDisplayList(gDisplayListHead++, D_0D007F38); set_transparency(arg2); - load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16); + load_texture_block_rgba16_mirror((u8*) common_texture_hud_normal_digit, 104, 16); func_8004F6D0(arg3); func_8004F8CC(arg0, arg1); } @@ -2483,7 +2483,7 @@ void func_8004F950(s32 arg0, s32 arg1, s32 arg2, s32 arg3) { void print_timer_rainbow(s32 arg0, s32 arg1, s32 arg2) { gSPDisplayList(gDisplayListHead++, D_0D007F38); func_8004B614(D_801656C0, D_801656D0, D_801656E0, 128, 128, 128, 255); - load_texture_block_rgba16_mirror(common_texture_hud_normal_digit, 104, 16); + load_texture_block_rgba16_mirror((u8*) common_texture_hud_normal_digit, 104, 16); func_8004F6D0(arg2); func_8004F8CC(arg0, arg1); } @@ -2501,7 +2501,7 @@ void render_hud_timer(s32 playerId) { print_timer_rainbow(playerHUD[playerId].lapCompletionTimeXs[var_s0], playerHUD[playerId].timerY + (var_s0*0x10), playerHUD[playerId].lapDurations[var_s0]); } } - draw_hud_2d_texture_32x16(playerHUD[playerId].totalTimeX - 0x13, playerHUD[playerId].timerY + 0x38, common_texture_hud_total_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].totalTimeX - 0x13, playerHUD[playerId].timerY + 0x38, (u8*) common_texture_hud_total_time); if (D_801657E5 != 0) { print_timer_rainbow(playerHUD[playerId].totalTimeX, playerHUD[playerId].timerY + 0x30, playerHUD[playerId].someTimer); } else { @@ -2510,10 +2510,10 @@ void render_hud_timer(s32 playerId) { } } else { if (playerHUD[playerId].blinkTimer == 0) { - draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, (u8*) common_texture_hud_time); print_timer(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer); } else { - draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, common_texture_hud_lap_time); + draw_hud_2d_texture_32x16(playerHUD[playerId].timerX - 0x13, playerHUD[playerId].timerY + 8, (u8*) common_texture_hud_lap_time); if (D_801657E3 != 0) { print_timer_rainbow(playerHUD[playerId].timerX, playerHUD[playerId].timerY, playerHUD[playerId].someTimer1); } else if (playerHUD[playerId].blinkState == 0) { @@ -2528,7 +2528,7 @@ void draw_lap_count(s16 lapX, s16 lapY, s8 lap) { gSPDisplayList(gDisplayListHead++, D_0D008108); gSPDisplayList(gDisplayListHead++, D_0D007EF8); gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD); - load_texture_block_rgba16_mirror(common_texture_hud_123, 32, 8); + load_texture_block_rgba16_mirror((u8*) common_texture_hud_123, 32, 8); // Display current lap. Ex. 1/3 func_8004BA98(lapX , lapY, 8, 8, lap * 8, 0, 0); // display the digit func_8004BA98(lapX + 8 , lapY, 8, 8, 24, 0, 0); // display the / @@ -2914,7 +2914,7 @@ void render_object_leaf_particle(UNUSED s32 cameraId) { gSPDisplayList(gDisplayListHead++, D_0D0079C8); gSPClearGeometryMode(gDisplayListHead++, G_CULL_BOTH); - load_texture_block_rgba16_mirror(common_texture_particle_leaf, 0x00000020, 0x00000010); + load_texture_block_rgba16_mirror((u8*) common_texture_particle_leaf, 0x00000020, 0x00000010); for(someIndex = 0; someIndex < gLeafParticle_SIZE; someIndex++) { leafIndex = gLeafParticle[someIndex]; if (leafIndex != -1) { @@ -4197,7 +4197,7 @@ void func_800563DC(s32 objectIndex, s32 cameraId, s32 arg2) { rsp_set_matrix_transformation(D_80183E40, D_80183E80, 0.2f); gSPDisplayList(gDisplayListHead++, D_0D007E98); func_8004B310(arg2); - draw_rectangle_texture_overlap(common_tlut_bomb, common_texture_bomb[residue], D_0D005AE0, 0x00000020, 0x00000020, 0x00000020, 0x00000020); + draw_rectangle_texture_overlap((u8*) common_tlut_bomb, common_texture_bomb[residue], D_0D005AE0, 0x00000020, 0x00000020, 0x00000020, 0x00000020); temp_s0 = D_8018D400; gSPDisplayList(gDisplayListHead++, D_0D007B00); func_8004B414(0, 0, 0, arg2); @@ -4216,7 +4216,7 @@ void func_800563DC(s32 objectIndex, s32 cameraId, s32 arg2) { void func_8005669C(s32 objectIndex, UNUSED s32 arg1, s32 arg2) { gSPDisplayList(gDisplayListHead++, D_0D0079E8); func_8004B310(arg2); - load_texture_block_rgba16_mirror(D_0D02AA58, 0x00000010, 0x00000010); + load_texture_block_rgba16_mirror((u8*) D_0D02AA58, 0x00000010, 0x00000010); D_80183E40[1] = gObjectList[objectIndex].pos[1] - 2.0; D_80183E40[0] = gObjectList[objectIndex].pos[0] + 2.0; D_80183E40[2] = gObjectList[objectIndex].pos[2] + 2.0; @@ -4305,7 +4305,7 @@ void func_80056BF0(s32 bombIndex) { D_80183E40[0] = sp40.bombPos[0]; D_80183E40[1] = sp40.bombPos[1] + 1.0; D_80183E40[2] = sp40.bombPos[2]; - draw_2d_texture_at(D_80183E40, D_80183E80, 0.25f, common_tlut_bomb, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, 0x20); + draw_2d_texture_at(D_80183E40, D_80183E80, 0.25f, (u8*) common_tlut_bomb, bombFrame, D_0D005AE0, 0x20, 0x20, 0x20, 0x20); temp_s0 = D_8018D400; gSPDisplayList(gDisplayListHead++, D_0D007B00); func_8004B414(0, 0, 0, 0xFF); @@ -4327,7 +4327,7 @@ void func_80056E24(s32 bombIndex, Vec3f arg1) { D_80183E80[0] = 0; D_80183E80[2] = 0x8000; gSPDisplayList(gDisplayListHead++, D_0D0079C8); - load_texture_block_rgba16_mirror(D_0D02AA58, 0x00000010, 0x00000010); + load_texture_block_rgba16_mirror((u8*) D_0D02AA58, 0x00000010, 0x00000010); D_80183E80[1] = func_800418AC(sp2C.wheel1Pos[0], sp2C.wheel1Pos[2], arg1); func_800431B0(sp2C.wheel1Pos, D_80183E80, 0.15f, common_vtx_rectangle); D_80183E80[1] = func_800418AC(sp2C.wheel2Pos[0], sp2C.wheel2Pos[2], arg1); diff --git a/src/render_objects.h b/src/render_objects.h index 8eb66a754a..b2eeb3ffb7 100644 --- a/src/render_objects.h +++ b/src/render_objects.h @@ -447,8 +447,6 @@ extern s16 D_8018D2E8; extern u8* D_8018D4BC; extern u8* D_8018D4C0; -// Probably aren't really part of this file, but don't have a better place to put them -extern u8 *gPortraitTLUTs[]; extern u8 *gPortraitTextures[]; extern Lights1 D_800E4638; diff --git a/src/render_player.c b/src/render_player.c index f56af8e0cc..ae21e2fc51 100644 --- a/src/render_player.c +++ b/src/render_player.c @@ -170,10 +170,10 @@ u16 func_8001FD78(Player *player, f32 posX, UNUSED f32 arg2, f32 posZ) { } void init_render_player(Player *player, Camera *camera, s8 playerId, s8 playerRenderId) { - s32 pad[4]; + UNUSED s32 pad[4]; s32 sp4C; s32 sp48; - s32 pad2; + UNUSED s32 pad2; s32 temp_v0; s32 temp_v0_2; @@ -264,12 +264,12 @@ void func_80020524(void) { func_80027560(D_80164AD0[i], D_80164AB0[i], D_80164AC0[i], D_80164AC0[i], D_801651D0[D_80164AC0[i]][D_80164AB0[i]]); - mio0decode(D_802DFB80[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].unk_00, + mio0decode((u8*) D_802DFB80[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].unk_00, D_802BFB80.arraySize8[D_801651D0[D_80164AC0[i - 1]][D_80164AB0[i - 1]]][D_80164AC0[i - 1]][D_80164AB0[i - 1]].pixel_index_array); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } - mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].unk_00, + mio0decode((u8*) D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].unk_00, D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array); } @@ -290,11 +290,11 @@ void func_8002088C(void) { osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) { func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0], D_80164AC0[var_s0], D_80164AC0[var_s0], D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]); - mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].unk_00, + mio0decode((u8*) D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].unk_00, D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]].pixel_index_array); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } - mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].unk_00, + mio0decode((u8*) D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].unk_00, D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]].pixel_index_array); } @@ -309,11 +309,11 @@ void func_80020BF4(void) { osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) { func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0] + 4, D_80164AC0[var_s0], D_80164AC0[var_s0] - 2, D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]); - mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].unk_00, + mio0decode((u8*) D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].unk_00, D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } - mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].unk_00, + mio0decode((u8*) D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].unk_00, D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array); } @@ -328,11 +328,11 @@ void func_80020F1C(void) { osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); for (var_s0 = 1; var_s0 < gPlayersToRenderCount; var_s0++) { func_80027560(D_80164AD0[var_s0], D_80164AB0[var_s0] + 4, D_80164AC0[var_s0], D_80164AC0[var_s0] - 2, D_801651D0[D_80164AC0[var_s0]][D_80164AB0[var_s0]]); - mio0decode(D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].unk_00, + mio0decode((u8*) D_802DFB80[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].unk_00, D_802BFB80.arraySize8[D_801651D0[D_80164AC0[var_s0 - 1]][D_80164AB0[var_s0 - 1]]][D_80164AC0[var_s0 - 1] - 2][D_80164AB0[var_s0 - 1] + 4].pixel_index_array); osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK); } - mio0decode(D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].unk_00, + mio0decode((u8*) D_802DFB80[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].unk_00, D_802BFB80.arraySize8[D_801651D0[D_80164AC0[gPlayersToRenderCount-1]][D_80164AB0[gPlayersToRenderCount-1]]][D_80164AC0[gPlayersToRenderCount-1] - 2][D_80164AB0[gPlayersToRenderCount-1] + 4].pixel_index_array); } @@ -508,13 +508,13 @@ u8 **gKartWarioWheels1[] = { }; u16 **D_800DDE34[] = { - gKartMarioWheels0, gKartLuigiWheels0, gKartYoshiWheels0, gKartToadWheels0, - gKartDKWheels0, gKartWarioWheels0, gKartPeachWheels0, gKartBowserWheels0 + (u16 **)gKartMarioWheels0, (u16 **)gKartLuigiWheels0, (u16 **)gKartYoshiWheels0, (u16 **)gKartToadWheels0, + (u16 **)gKartDKWheels0, (u16 **)gKartWarioWheels0, (u16 **)gKartPeachWheels0, (u16 **)gKartBowserWheels0 }; u16 **D_800DDE54[] = { - gKartMarioWheels1, gKartLuigiWheels1, gKartYoshiWheels1, gKartToadWheels1, - gKartDKWheels1, gKartWarioWheels1, gKartPeachWheels1, gKartBowserWheels1 + (u16 **)gKartMarioWheels1, (u16 **)gKartLuigiWheels1, (u16 **)gKartYoshiWheels1, (u16 **)gKartToadWheels1, + (u16 **)gKartDKWheels1, (u16 **)gKartWarioWheels1, (u16 **)gKartPeachWheels1, (u16 **)gKartBowserWheels1 }; s32 D_800DDE74[] = { @@ -1368,9 +1368,9 @@ void render_player_shadow_credits(Player *player, s8 playerId, s8 arg2) { } void kart_render(Player *player, s8 playerId, s8 arg2, s8 arg3) { - s32 pad; + UNUSED s32 pad; Mat4 sp1A4; - s32 pad2[17]; + UNUSED s32 pad2[17]; Vec3f sp154; Vec3s sp14C; f32 sp148; @@ -1412,7 +1412,7 @@ void kart_render(Player *player, s8 playerId, s8 arg2, s8 arg3) { #ifdef AVOID_UB gPlayerPalette = &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId]; #else - gPlayerPalette = &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId * 0x100]; + gPlayerPalette = (struct_D_802F1F80 *) &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId * 0x100]; #endif if ((arg2 == 0) || (arg2 == 1)) { D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0]; @@ -1501,15 +1501,15 @@ void kart_render(Player *player, s8 playerId, s8 arg2, s8 arg3) { } void ghost_render(Player *player, s8 playerId, s8 arg2, s8 arg3) { - s32 pad; + UNUSED s32 pad; Mat4 sp12C; - s32 pad2[17]; + UNUSED s32 pad2[17]; Vec3f spDC; Vec3s spD4; f32 spD0; f32 spCC; f32 spC8; - s32 pad3; + UNUSED s32 pad3; s16 spC2; s16 thing; @@ -1530,7 +1530,7 @@ void ghost_render(Player *player, s8 playerId, s8 arg2, s8 arg3) { #ifdef AVOID_UB gPlayerPalette = &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId]; #else - gPlayerPalette = &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId * 0x100]; + gPlayerPalette = (struct_D_802F1F80 *) &D_802F1F80[D_801651D0[arg2][playerId]][arg2][playerId * 0x100]; #endif if ((arg2 == 0) || (arg2 == 1)) { D_80164B08 = &D_802BFB80.arraySize8[D_801651D0[arg2][playerId]][arg2][playerId].pixel_index_array[0]; @@ -1656,7 +1656,7 @@ void player_ice_reflection_render(Player *player, s8 playerId, s8 arg2, s8 arg3) } void player_render(Player *player, s8 playerId, s8 arg2) { - s32 pad[2]; + UNUSED s32 pad[2]; s32 temp_t1; s32 var_v1; OSMesg *sp34; @@ -1683,7 +1683,7 @@ void player_render(Player *player, s8 playerId, s8 arg2) { } else { ghost_render(player, playerId, arg2, var_v1); } - osRecvMesg(&gDmaMesgQueue, &sp34, OS_MESG_BLOCK); + osRecvMesg(&gDmaMesgQueue, (OSMesg *) &sp34, OS_MESG_BLOCK); if ((temp_t1 == (player->unk_002 & temp_t1)) && (player->surfaceType == ICE) && ((player->unk_0CA & 1) != 1) && (player->unk_110.unk3C[2] <= 30.0f)) { player_ice_reflection_render(player, playerId, arg2, var_v1); } @@ -1733,15 +1733,15 @@ void func_80026B4C(Player *player, s8 playerId, s8 arg2, s8 arg3) { && ((player->effects & 0x800000) != 0x800000) && ((player->unk_044 & 0x800) == 0)) { if (temp_t0 <= 20) { - func_80027C74(player, D_800DDE34[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); + func_80027C74(player, (s32) (D_800DDE34[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40)), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); } else { - func_80027C74(player, D_800DDE54[player->characterId][temp_t1] + (temp_t0 - 21) * (temp_num * 4) + ((temp_t2 >> 8) * 0x40) + 0x600, D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); + func_80027C74(player, (s32) (D_800DDE54[player->characterId][temp_t1] + (temp_t0 - 21) * (temp_num * 4) + ((temp_t2 >> 8) * 0x40) + 0x600), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); } } else { if (temp_t0 == 0) { - func_80027C74(player, D_800DDE34[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); + func_80027C74(player, (s32) (D_800DDE34[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40)), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); } else { - func_80027C74(player, D_800DDE54[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); + func_80027C74(player, (s32) (D_800DDE54[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40)), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); } } } else { @@ -1750,15 +1750,15 @@ void func_80026B4C(Player *player, s8 playerId, s8 arg2, s8 arg3) { && ((player->effects & 0x20000) != 0x20000) && ((player->unk_044 & 0x800) == 0)) { if (temp_t0 <= 20) { - func_80027C74(player, D_800DDE34[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); + func_80027C74(player, (s32) (D_800DDE34[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40)), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); } else { - func_80027C74(player, D_800DDE54[player->characterId][temp_t1] + (temp_t0 - 21) * (temp_num * 4) + ((temp_t2 >> 8) * 0x40) + 0x600, D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); + func_80027C74(player, (s32) (D_800DDE54[player->characterId][temp_t1] + (temp_t0 - 21) * (temp_num * 4) + ((temp_t2 >> 8) * 0x40) + 0x600), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); } } else { if (temp_t0 == 0) { - func_80027C74(player, D_800DDE34[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); + func_80027C74(player, (s32) (D_800DDE34[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40)), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); } else { - func_80027C74(player, D_800DDE54[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); + func_80027C74(player, (s32) (D_800DDE54[player->characterId][temp_t1] + (temp_t0 * temp_num * 4) + ((temp_t2 >> 8) * 0x40)), D_802F1F80_WHEEL(arg3, arg2, playerId), 0x80); } } } diff --git a/src/spawn_players.c b/src/spawn_players.c index 2c3719357f..e4298d0c67 100644 --- a/src/spawn_players.c +++ b/src/spawn_players.c @@ -22,6 +22,7 @@ #include "render_player.h" #include "code_80091750.h" #include "effects.h" +#include "decode.h" f32 D_80165210[8]; f32 D_80165230[8]; @@ -913,7 +914,7 @@ void func_8003C0F0(void) { case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: temp = 5; - if (1); + if (1) {}; D_80165210[0] = 0; D_80165210[1] = 0; D_80165230[1] = -200.0f; @@ -945,7 +946,7 @@ void func_8003C0F0(void) { case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: temp = 0x1E0; - if (1); + if (1) {}; D_80165210[0] = 0.0f; D_80165210[1] = 0.0f; D_80165230[1] = -400.0f; @@ -977,7 +978,7 @@ void func_8003C0F0(void) { case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: temp = 0x37; - if (1); + if (1) {}; D_80165210[0] = 0.0f; D_80165210[1] = 0.0f; D_80165230[1] = -160.0f; @@ -1009,7 +1010,7 @@ void func_8003C0F0(void) { case SCREEN_MODE_2P_SPLITSCREEN_HORIZONTAL: case SCREEN_MODE_2P_SPLITSCREEN_VERTICAL: temp = 0xC8; - if (1); + if (1) {}; D_80165210[0] = 0.0f; D_80165210[1] = 0.0f; D_80165230[1] = -575.0f; diff --git a/src/update_objects.c b/src/update_objects.c index 298ca5e026..331698eeb5 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -33,6 +33,7 @@ #include "menus.h" #include "data/other_textures.h" #include "data/some_data.h" +#include "memory.h" //! @todo unused? f32 D_800E43B0[] = { @@ -67,7 +68,7 @@ Vtx D_800E44B0[] = { {{{ -24, 20, 0}, 0, { 3008, 2496}, { 0xFF, 0xFF, 0xFF, 0xFF}}}, }; -u8 *gItemWindowTLUTs[] = { +u16 *gItemWindowTLUTs[] = { common_tlut_item_window_none, common_tlut_item_window_banana, common_tlut_item_window_banana_bunch, common_tlut_item_window_green_shell, common_tlut_item_window_triple_green_shell, common_tlut_item_window_red_shell, common_tlut_item_window_triple_red_shell, common_tlut_item_window_blue_shell, common_tlut_item_window_thunder_bolt, common_tlut_item_window_fake_item_box, common_tlut_item_window_star, common_tlut_item_window_boo, @@ -81,11 +82,11 @@ u8 *gItemWindowTextures[] = { common_texture_item_window_mushroom, common_texture_item_window_double_mushroom, common_texture_item_window_triple_mushroom, common_texture_item_window_super_mushroom }; -u8 *gHudLapTextures[] = { +u16 *gHudLapTextures[] = { common_texture_hud_lap_1_on_3, common_texture_hud_lap_2_on_3, common_texture_hud_lap_3_on_3 }; -u8 *gPortraitTLUTs[] = { +u16 *gPortraitTLUTs[] = { common_tlut_portrait_mario, common_tlut_portrait_luigi, common_tlut_portrait_yoshi, common_tlut_portrait_toad, common_tlut_portrait_donkey_kong, common_tlut_portrait_wario, common_tlut_portrait_peach, common_tlut_portrait_bowser }; @@ -753,7 +754,7 @@ UNUSED void func_800734D4() { void update_neon_texture(s32 objectIndex) { // I have no idea why this typecast works - gObjectList[objectIndex].activeTLUT = (u32*)gObjectList[objectIndex].tlutList + (gObjectList[objectIndex].itemDisplay * 128); + gObjectList[objectIndex].activeTLUT = (u8*)((u32*)gObjectList[objectIndex].tlutList + (gObjectList[objectIndex].itemDisplay * 128)); gObjectList[objectIndex].activeTexture = gObjectList[objectIndex].textureList; } @@ -1233,7 +1234,7 @@ void func_8007466C(s32 objectIndex, s32 arg1) { if ((gObjectList[objectIndex].status & 1) != 0) { // I have no idea why this typecase works - gObjectList[objectIndex].activeTLUT = (u32*)gObjectList[objectIndex].tlutList + (gObjectList[objectIndex].unk_0D3 << 7) ; + gObjectList[objectIndex].activeTLUT = (u8*) ((u32*)gObjectList[objectIndex].tlutList + (gObjectList[objectIndex].unk_0D3 << 7)) ; gObjectList[objectIndex].status ^= 2; phi_a1 = 0; if ((gObjectList[objectIndex].status & 2) != 0) { @@ -1584,7 +1585,7 @@ void func_80075714(s32 objectIndex) { } void update_train_smoke(void) { - s32 pad[2]; + UNUSED s32 pad[2]; s32 count; s32 i; s32 temp_a0; @@ -1705,7 +1706,7 @@ void func_80075B84(s32 objectIndex) { } void update_ferries_smoke_particle(void) { - s32 pad[2]; + UNUSED s32 pad[2]; s32 count; s32 i; s32 temp_a0; @@ -1882,8 +1883,8 @@ void func_8007634C(s32 objectIndex) { Objects *temp_v0; temp_v0 = &gObjectList[objectIndex]; - temp_v0->activeTexture = common_texture_particle_smoke; - temp_v0->textureList = common_texture_particle_smoke; + temp_v0->activeTexture = common_texture_particle_smoke[0]; + temp_v0->textureList = common_texture_particle_smoke[0]; temp_v0->primAlpha = 0x00FF; set_obj_orientation(objectIndex, 0U, 0U, 0U); set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); @@ -2018,7 +2019,7 @@ s32 func_80076828(Vec3s arg0, s32 arg1) { } void func_80076884(s32 arg0) { - s32 stackPadding0; + UNUSED s32 stackPadding0; s32 i; s32 temp_v0; s16 *var_s2; @@ -2052,8 +2053,8 @@ void func_80076958(s32 objectIndex) { Objects *temp_v0; temp_v0 = &gObjectList[objectIndex]; - temp_v0->activeTexture = common_texture_particle_smoke; - temp_v0->textureList = common_texture_particle_smoke; + temp_v0->activeTexture = common_texture_particle_smoke[0]; + temp_v0->textureList = common_texture_particle_smoke[0]; temp_v0->primAlpha = 0x00FF; set_obj_orientation(objectIndex, 0U, 0U, 0U); set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f); @@ -2145,8 +2146,8 @@ void init_object_smoke_paticle(s32 objectIndex, Vec3f arg1, s16 arg2) { init_object(objectIndex, (s32) arg2); temp_v0 = &gObjectList[objectIndex]; temp_v0->unk_0D5 = 0x0A; - temp_v0->activeTexture = common_texture_particle_smoke; - temp_v0->textureList = common_texture_particle_smoke; + temp_v0->activeTexture = common_texture_particle_smoke[0]; + temp_v0->textureList = common_texture_particle_smoke[0]; temp_v0->sizeScaling = 0.3f; set_obj_origin_pos(objectIndex, arg1[0], arg1[1], arg1[2]); temp_v0->type = 0x00FF; @@ -2221,8 +2222,8 @@ void init_object_smoke_particle(s32 objectIndex, s32 flameIndex) { init_object(objectIndex, 3); gObjectList[objectIndex].unk_0D5 = 0xB; - gObjectList[objectIndex].activeTexture = common_texture_particle_smoke; - gObjectList[objectIndex].textureList = common_texture_particle_smoke; + gObjectList[objectIndex].activeTexture = common_texture_particle_smoke[0]; + gObjectList[objectIndex].textureList = common_texture_particle_smoke[0]; gObjectList[objectIndex].sizeScaling = 0.8f; gObjectList[objectIndex].origin_pos[0] = (f32)*(gTorchSpawns + (flameIndex * 3) + 0) * xOrientation; @@ -2381,8 +2382,8 @@ void init_object_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) { init_object(objectIndex, 0); gObjectList[objectIndex].unk_0D5 = 7; - gObjectList[objectIndex].activeTLUT = (u32 *) common_texture_particle_leaf; - gObjectList[objectIndex].tlutList = (u32 *) common_texture_particle_leaf; + gObjectList[objectIndex].activeTLUT = (u8*) common_texture_particle_leaf; + gObjectList[objectIndex].tlutList = (u8*) common_texture_particle_leaf; gObjectList[objectIndex].sizeScaling = 0.1f; gObjectList[objectIndex].unk_044 = arg1[1]; switch (gCurrentCourseId) { @@ -3045,7 +3046,7 @@ void init_obj_lakitu_red_flag(s32 objectIndex, s32 playerIndex) { Objects *temp_v0; func_800791F0(objectIndex, playerIndex); - init_texture_object(objectIndex, common_tlut_lakitu_checkered_flag, gTextureLakituCheckeredFlag01, 0x48U, (u16) 0x00000038); + init_texture_object(objectIndex, (u8*) common_tlut_lakitu_checkered_flag, gTextureLakituCheckeredFlag01, 0x48U, (u16) 0x00000038); temp_v0 = &gObjectList[objectIndex]; temp_v0->activeTexture = D_8018C028; temp_v0->vertex = common_vtx_also_lakitu; @@ -3122,7 +3123,7 @@ void func_8007993C(s32 objectIndex, Player *player) { void init_obj_lakitu_red_flag_fishing(s32 objectIndex, s32 arg1) { func_800791F0(objectIndex, arg1); - init_texture_object(objectIndex, common_tlut_lakitu_fishing, gTextureLakituFishing1, 0x38U, (u16) 0x00000048); + init_texture_object(objectIndex, (u8*) common_tlut_lakitu_fishing, gTextureLakituFishing1, 0x38U, (u16) 0x00000048); gObjectList[objectIndex].vertex = D_0D005F30; gObjectList[objectIndex].sizeScaling = 0.15f; func_80086E70(objectIndex); @@ -3295,7 +3296,7 @@ void func_8007A060(s32 objectIndex, s32 playerIndex) { Objects *temp_v0; func_800791F0(objectIndex, playerIndex); - init_texture_object(objectIndex, common_tlut_lakitu_second_lap, gTextureLakituSecondLap01, 0x48U, (u16) 0x00000038); + init_texture_object(objectIndex, (u8*) common_tlut_lakitu_second_lap, gTextureLakituSecondLap01, 0x48U, (u16) 0x00000038); temp_v0 = &gObjectList[objectIndex]; temp_v0->activeTexture = D_8018C028; temp_v0->vertex = common_vtx_also_lakitu; @@ -3343,7 +3344,7 @@ void func_8007A228(s32 objectIndex, s32 playerIndex) { Objects *temp_v0; func_800791F0(objectIndex, playerIndex); - init_texture_object(objectIndex, common_tlut_lakitu_final_lap, gTextureLakituFinalLap01, 0x48U, (u16) 0x00000038); + init_texture_object(objectIndex, (u8*) common_tlut_lakitu_final_lap, gTextureLakituFinalLap01, 0x48U, (u16) 0x00000038); temp_v0 = &gObjectList[objectIndex]; temp_v0->activeTexture = D_8018C028; temp_v0->vertex = common_vtx_also_lakitu; @@ -3390,7 +3391,7 @@ void update_object_lakitu_final_lap(s32 objectIndex, s32 playerIndex) { void func_8007A3F0(s32 objectIndex, s32 arg1) { f32 var = 5000.0f; func_800791F0(objectIndex, arg1); - init_texture_object(objectIndex, common_tlut_lakitu_reverse, gTextureLakituReverse01, 0x48U, (u16) 0x00000038); + init_texture_object(objectIndex, (u8*) common_tlut_lakitu_reverse, gTextureLakituReverse01, 0x48U, (u16) 0x00000038); gObjectList[objectIndex].activeTexture = D_8018C028; gObjectList[objectIndex].vertex = common_vtx_also_lakitu; gObjectList[objectIndex].pos[2] = var; @@ -3585,7 +3586,7 @@ void consume_item(s32 playerId) { player = &gPlayerOne[playerId]; objectIndex = gItemWindowObjectByPlayerId[playerId]; - itemWindow = &gObjectList[objectIndex]; + itemWindow = (ItemWindowObjects *) &gObjectList[objectIndex]; if (itemWindow->currentItem == ITEM_SUPER_MUSHROOM) { if (func_80072354(objectIndex, 2) != 0) { func_800722A4(objectIndex, 2); @@ -3670,7 +3671,7 @@ s16 func_8007AFB0(s32 objectIndex, s32 arg1) { } s32 func_8007B040(s32 objectIndex, s32 playerId) { - s16 stackPadding; + UNUSED s16 stackPadding; s32 temp_v1; s32 var_a3; s32 var_t3; @@ -3942,7 +3943,7 @@ void func_8007B34C(s32 playerId) { } } } - temp_t0->activeTLUT = gItemWindowTLUTs[temp_t0->itemDisplay]; + temp_t0->activeTLUT = (u8*) gItemWindowTLUTs[temp_t0->itemDisplay]; temp_t0->activeTexture = gItemWindowTextures[temp_t0->itemDisplay]; sp38->currentItemCopy = temp_t0->type; } @@ -6487,7 +6488,7 @@ void func_8008275C(s32 objectIndex) { case 2: func_8008B78C(objectIndex); vec3f_copy(gObjectList[objectIndex].unk_01C, gObjectList[objectIndex].pos); - func_8000D940(gObjectList[objectIndex].origin_pos, &gObjectList[objectIndex].unk_0C6, gObjectList[objectIndex].unk_034, 0.0f, 0); + func_8000D940(gObjectList[objectIndex].origin_pos, (s16 *) &gObjectList[objectIndex].unk_0C6, gObjectList[objectIndex].unk_034, 0.0f, 0); gObjectList[objectIndex].offset[0] *= 2.0; gObjectList[objectIndex].offset[1] *= 2.5; gObjectList[objectIndex].offset[2] *= 2.0; diff --git a/src/update_objects.h b/src/update_objects.h index 11d3179173..a0fac60b58 100644 --- a/src/update_objects.h +++ b/src/update_objects.h @@ -124,11 +124,13 @@ void func_80075574(s32, Vec3f, f32); s32 func_800755FC(s32, Vec3f, f32); void func_80075698(s32); void func_80075714(s32); +void update_train_smoke(void); void func_80075838(void); void func_800759EC(s32, Vec3f, f32); s32 func_80075A6C(s32, Vec3f, f32); void func_80075B08(s32); void func_80075B84(s32); +void update_ferries_smoke_particle(void); void func_80075E5C(s32, Vec3f, u16, f32, s32); s32 func_80075F28(Vec3f, u16, f32, s32); void func_80075F98(Vec3f, u16, f32); @@ -340,6 +342,7 @@ void func_80085024(void); void func_8008502C(s32, s32); void func_80085080(s32); void func_800850B0(s32, s32); +void update_penguins(void); void init_hot_air_balloon(s32); void func_80085534(s32); void func_80085768(s32); @@ -375,10 +378,10 @@ extern f32 D_800E43B0[]; extern Vtx D_800E43F0[]; extern Vtx D_800E4470[]; extern Vtx D_800E44B0[]; -extern u8 *gItemWindowTLUTs[]; +extern u16 *gItemWindowTLUTs[]; extern u8 *gItemWindowTextures[]; -extern u8 *gHudLapTextures[]; -extern u8 *gPortraitTLUTs[]; +extern u16 *gHudLapTextures[]; +extern u16 *gPortraitTLUTs[]; extern u8 *gPortraitTextures[]; extern s32 D_80162DF8; diff --git a/yamls/us/data_segment2.yml b/yamls/us/data_segment2.yml index 57afa7b32d..1aedcd5af9 100644 --- a/yamls/us/data_segment2.yml +++ b/yamls/us/data_segment2.yml @@ -12,160 +12,160 @@ - '#include ' header: - '#include ' -D_02007650: - symbol: D_02007650 - type: gfx - offset: 0x7650 -D_020076B0: - symbol: D_020076B0 - type: Gfx - offset: 0x76B0 -D_020076E0: - symbol: D_020076E0 - type: Gfx - offset: 0x76E0 -D_02007708: - symbol: D_02007708 - type: Gfx - offset: 0x7708 -D_02007728: - symbol: D_02007728 - type: Gfx - offset: 0x7728 -D_02007748: - symbol: D_02007748 - type: Gfx - offset: 0x7748 -D_02007768: - symbol: D_02007768 - type: Gfx - offset: 0x7768 -D_02007788: - symbol: D_02007788 - type: Gfx - offset: 0x7788 -D_020077A8: - symbol: D_020077A8 - type: Gfx - offset: 0x77A8 -D_020077D8: - symbol: D_020077D8 - type: Gfx - offset: 0x77D8 -D_020077F8: - symbol: D_020077F8 - type: Gfx - offset: 0x77F8 -D_02007818: - symbol: D_02007818 - type: Gfx - offset: 0x7818 -D_02007838: - symbol: D_02007838 - type: Gfx - offset: 0x7838 -D_02007858: - symbol: D_02007858 - type: Gfx - offset: 0x7858 -D_02007878: - symbol: D_02007878 - type: Gfx - offset: 0x7878 -D_02007898: - symbol: D_02007898 - type: Gfx - offset: 0x7898 -D_020078B8: - symbol: D_020078B8 - type: Gfx - offset: 0x78B8 -D_020078D8: - symbol: D_020078D8 - type: Gfx - offset: 0x78D8 -D_020078F8: - symbol: D_020078F8 - type: Gfx - offset: 0x78F8 -D_02007918: - symbol: D_02007918 - type: Gfx - offset: 0x7918 -D_02007938: - symbol: D_02007938 - type: Gfx - offset: 0x7938 -D_02007958: - symbol: D_02007958 - type: Gfx - offset: 0x7958 -D_02007978: - symbol: D_02007978 - type: Gfx - offset: 0x7978 -D_02007998: - symbol: D_02007998 - type: Gfx - offset: 0x7998 -D_020079B8: - symbol: D_020079B8 - type: Gfx - offset: 0x79B8 -D_020079D8: - symbol: D_020079D8 - type: Gfx - offset: 0x79D8 -D_020079F8: - symbol: D_020079F8 - type: Gfx - offset: 0x79F8 -D_02007A18: - symbol: D_02007A18 - type: Gfx - offset: 0x7A18 -D_02007A38: - symbol: D_02007A38 - type: Gfx - offset: 0x7A38 -D_02007A58: - symbol: D_02007A58 - type: Gfx - offset: 0x7A58 -D_02007A78: - symbol: D_02007A78 - type: Gfx - offset: 0x7A78 -D_02007A98: - symbol: D_02007A98 - type: Gfx - offset: 0x7A98 -D_02007AB8: - symbol: D_02007AB8 - type: Gfx - offset: 0x7AB8 -D_02007AD8: - symbol: D_02007AD8 - type: Gfx - offset: 0x7AD8 -D_02007AF8: - symbol: D_02007AF8 - type: Gfx - offset: 0x7AF8 -D_02007B18: - symbol: D_02007B18 - type: Gfx - offset: 0x7B18 -D_02007B38: # unused - symbol: D_02007B38 - type: vtx - offset: 0x7B38 - count: 8 -D_02007BB8: - symbol: D_02007BB8 - type: vtx - offset: 0x7BB8 - count: 54 +# D_02007650: +# symbol: D_02007650 +# type: gfx +# offset: 0x7650 +# D_020076B0: +# symbol: D_020076B0 +# type: Gfx +# offset: 0x76B0 +# D_020076E0: +# symbol: D_020076E0 +# type: Gfx +# offset: 0x76E0 +# D_02007708: +# symbol: D_02007708 +# type: Gfx +# offset: 0x7708 +# D_02007728: +# symbol: D_02007728 +# type: Gfx +# offset: 0x7728 +# D_02007748: +# symbol: D_02007748 +# type: Gfx +# offset: 0x7748 +# D_02007768: +# symbol: D_02007768 +# type: Gfx +# offset: 0x7768 +# D_02007788: +# symbol: D_02007788 +# type: Gfx +# offset: 0x7788 +# D_020077A8: +# symbol: D_020077A8 +# type: Gfx +# offset: 0x77A8 +# D_020077D8: +# symbol: D_020077D8 +# type: Gfx +# offset: 0x77D8 +# D_020077F8: +# symbol: D_020077F8 +# type: Gfx +# offset: 0x77F8 +# D_02007818: +# symbol: D_02007818 +# type: Gfx +# offset: 0x7818 +# D_02007838: +# symbol: D_02007838 +# type: Gfx +# offset: 0x7838 +# D_02007858: +# symbol: D_02007858 +# type: Gfx +# offset: 0x7858 +# D_02007878: +# symbol: D_02007878 +# type: Gfx +# offset: 0x7878 +# D_02007898: +# symbol: D_02007898 +# type: Gfx +# offset: 0x7898 +# D_020078B8: +# symbol: D_020078B8 +# type: Gfx +# offset: 0x78B8 +# D_020078D8: +# symbol: D_020078D8 +# type: Gfx +# offset: 0x78D8 +# D_020078F8: +# symbol: D_020078F8 +# type: Gfx +# offset: 0x78F8 +# D_02007918: +# symbol: D_02007918 +# type: Gfx +# offset: 0x7918 +# D_02007938: +# symbol: D_02007938 +# type: Gfx +# offset: 0x7938 +# D_02007958: +# symbol: D_02007958 +# type: Gfx +# offset: 0x7958 +# D_02007978: +# symbol: D_02007978 +# type: Gfx +# offset: 0x7978 +# D_02007998: +# symbol: D_02007998 +# type: Gfx +# offset: 0x7998 +# D_020079B8: +# symbol: D_020079B8 +# type: Gfx +# offset: 0x79B8 +# D_020079D8: +# symbol: D_020079D8 +# type: Gfx +# offset: 0x79D8 +# D_020079F8: +# symbol: D_020079F8 +# type: Gfx +# offset: 0x79F8 +# D_02007A18: +# symbol: D_02007A18 +# type: Gfx +# offset: 0x7A18 +# D_02007A38: +# symbol: D_02007A38 +# type: Gfx +# offset: 0x7A38 +# D_02007A58: +# symbol: D_02007A58 +# type: Gfx +# offset: 0x7A58 +# D_02007A78: +# symbol: D_02007A78 +# type: Gfx +# offset: 0x7A78 +# D_02007A98: +# symbol: D_02007A98 +# type: Gfx +# offset: 0x7A98 +# D_02007AB8: +# symbol: D_02007AB8 +# type: Gfx +# offset: 0x7AB8 +# D_02007AD8: +# symbol: D_02007AD8 +# type: Gfx +# offset: 0x7AD8 +# D_02007AF8: +# symbol: D_02007AF8 +# type: Gfx +# offset: 0x7AF8 +# D_02007B18: +# symbol: D_02007B18 +# type: Gfx +# offset: 0x7B18 +# D_02007B38: # unused +# symbol: D_02007B38 +# type: vtx +# offset: 0x7B38 +# count: 8 +# D_02007BB8: +# symbol: D_02007BB8 +# type: vtx +# offset: 0x7BB8 +# count: 54 # D_02007BD8: # symbol: D_02007BD8 # type: vtx @@ -296,31 +296,31 @@ D_02007BB8: # type: vtx # offset: 0x7EF8 # count: 2 -D_02007F18: - symbol: D_02007F18 - type: gfx - offset: 0x7F18 -D_02007F48: - symbol: D_02007F48 - type: gfx - offset: 0x7F48 -D_02007F60: - symbol: D_02007F60 - type: gfx - offset: 0x7F60 -D_02007FC8: - symbol: D_02007FC8 - type: gfx - offset: 0x7FC8 -D_02008008: - symbol: D_02008008 - type: gfx - offset: 0x8008 -D_02008030: - symbol: D_02008030 - type: gfx - offset: 0x8030 -D_02008058: - symbol: D_02008058 - type: gfx - offset: 0x8058 +# D_02007F18: +# symbol: D_02007F18 +# type: gfx +# offset: 0x7F18 +# D_02007F48: +# symbol: D_02007F48 +# type: gfx +# offset: 0x7F48 +# D_02007F60: +# symbol: D_02007F60 +# type: gfx +# offset: 0x7F60 +# D_02007FC8: +# symbol: D_02007FC8 +# type: gfx +# offset: 0x7FC8 +# D_02008008: +# symbol: D_02008008 +# type: gfx +# offset: 0x8008 +# D_02008030: +# symbol: D_02008030 +# type: gfx +# offset: 0x8030 +# D_02008058: +# symbol: D_02008058 +# type: gfx +# offset: 0x8058