From 97f28334329d50a9cf2fb7ff1ee57ae0c18de92c Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sat, 1 Aug 2026 23:19:52 -0600 Subject: Remove As Much Code As Possible and Still Pass Tests (#732) * Update render_objects.c * Remove unused HUD texture function declarations Removed several unused function declarations related to HUD textures. * Update skybox_and_splitscreen.c * Remove unused set_viewport2 function declaration Removed unused function declaration for set_viewport2. * Update code_80005FD0.c * Remove set_bomb_kart_spawn_positions function declaration * Update skybox_and_splitscreen.c * Update skybox_and_splitscreen.h * Modify Draw function to adjust crab visibility Commented out code to prevent premature disappearance of the crab when the camera rotates. * Update Crab.cpp * Update Crab.h * Update Crab.cpp * Delete unused texture rendering functions Removed unused functions related to texture rendering. * Update render_objects.h --- src/render_objects.c | 205 --------------------------------------------------- 1 file changed, 205 deletions(-) (limited to 'src/render_objects.c') diff --git a/src/render_objects.c b/src/render_objects.c index f6fa6b1aa..1c22699e0 100644 --- a/src/render_objects.c +++ b/src/render_objects.c @@ -2133,14 +2133,6 @@ void draw_hud_2d_texture_8x8(s32 x, s32 y, u8* texture) { } } -UNUSED void draw_hud_2d_texture_8x16(s32 x, s32 y, u8* texture) { - draw_hud_2d_texture_wide(x, y, 8, 16, texture); -} - -UNUSED void draw_hud_2d_texture_16x16(s32 x, s32 y, u8* texture) { - draw_hud_2d_texture_wide(x, y, 16, 16, texture); -} - void draw_hud_2d_texture_32x8(s32 x, s32 y, u8* texture) { draw_hud_2d_texture_wide(x, y, 32, 8, texture); } @@ -2149,107 +2141,6 @@ void draw_hud_2d_texture_32x16(s32 x, s32 y, u8* texture) { draw_hud_2d_texture_wide(x, y, 32, 16, texture); } -UNUSED void func_8004CBC0(s32 arg0, s32 arg1, f32 arg2, u8* texture) { - func_8004CA58(arg0, arg1, arg2, texture, 32, 16); -} - -UNUSED void draw_hud_2d_texture_32x32(s32 x, s32 y, u8* texture) { - draw_hud_2d_texture_wide(x, y, 32, 32, texture); -} - -UNUSED void func_8004CC24(s32 arg0, s32 arg1, u8* texture) { - func_8004C628(arg0, arg1, 32, 32, texture); -} - -UNUSED void draw_hud_2d_texture_40x32(s32 x, s32 y, u8* texture) { - draw_hud_2d_texture_wide(x, y, 40, 32, texture); -} - -UNUSED void func_8004CC84(s32 x, s32 y, u8* texture) { - func_8004C91C(x, y, texture, 48, 48, 24); -} - -UNUSED void func_8004CCB4(s32 x, s32 y, u8* texture) { - draw_hud_2d_texture_wide(x, y, 64, 32, texture); -} - -UNUSED void func_8004CCE4(s32 arg0, s32 arg1, f32 arg2, u8* texture) { - func_8004CA58(arg0, arg1, arg2, texture, 64, 32); -} - -UNUSED void func_8004CD18(s32 arg0, s32 arg1, u8* texture) { - func_8004C91C(arg0, arg1, texture, 64, 64, 32); -} - -UNUSED void func_8004CD48(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4, s32 height) { - UNUSED s32 pad; - s32 var_s0; - s32 i; - // img was never initialized; the (formerly UNUSED) texture param is - // clearly what the loop was meant to walk. - u8* img = texture; - - var_s0 = arg1 - (arg4 / 2); - gSPDisplayList(gDisplayListHead++, D_0D007FE0); - - for (i = 0; i < arg4 / height; i++) { - load_texture_block_ia16_nomirror(img, width, height); - func_8004B97C_wide(arg0 - (width / 2), var_s0, width, height, 1); - img += width * height * 2; - var_s0 += height; - } -} - -UNUSED void func_8004CE8C(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4, s32 height) { - s32 var_s0 = arg1 - (arg4 / 2); - s32 i; - u8* img = texture; - - for (i = 0; i < arg4 / height; i++) { - load_texture_block_ia8_nomirror(img, width, height); - func_8004B97C_wide(arg0 - (width / 2), var_s0, width, height, 1); - img += width * height; - var_s0 += height; - } -} - -UNUSED void func_8004CF9C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, UNUSED s32 arg5, s32 arg6) { - gSPDisplayList(gDisplayListHead++, D_0D007FE0); - func_8004CE8C(arg0, arg1, texture, arg3, arg4, arg6); -} - -UNUSED void func_8004CFF0(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, UNUSED s32 arg5, s32 arg6) { - gSPDisplayList(gDisplayListHead++, D_0D008000); - func_8004CE8C(arg0, arg1, texture, arg3, arg4, arg6); -} - -UNUSED void func_8004D044(s32 arg0, s32 arg1, u8* texture, s32 red, s32 green, s32 blue, s32 alpha, s32 arg7, s32 arg8, - UNUSED s32 arg9, s32 argA) { - gSPDisplayList(gDisplayListHead++, D_0D007FE0); - func_8004B35C(red, green, blue, alpha); - func_8004CE8C(arg0, arg1, texture, arg7, arg8, argA); -} - -UNUSED void func_8004D0CC(void) { -} - -UNUSED void func_8004D0D4(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4, s32 height) { - s32 var_s0; - u8* img; - s32 i; - - var_s0 = arg1 - (arg4 / 2); - img = texture; - gSPDisplayList(gDisplayListHead++, D_0D007FE0); - - for (i = 0; i < arg4 / height; i++) { - func_80044924(img, width, height); - func_8004B97C_wide(arg0 - (width / 2), var_s0, width, height, 1); - img += width * height; - var_s0 += height; - } -} - void func_8004D210(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 width, s32 arg8, UNUSED s32 arg9, s32 height) { s32 var_s3; @@ -2384,102 +2275,6 @@ void func_8004D93C(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) { } } -UNUSED void func_8004DAB8(s32 arg0, s32 arg1, u8* texture, s32 arg3, s32 arg4) { - f32 temp_f20; - s16 temp_s7; - s16 var_s1; - u16 temp_s0; - s32 temp_s6; - u8* img; - s32 var_s4; - s32 var; - s32 i; - - D_801656B0 += D_80165710; - temp_f20 = D_8018D00C; - temp_s7 = D_80165708; - var_s1 = (s16) D_801656B0; - img = texture; - var = arg3 / 2; - var_s4 = arg1 - (arg4 / 2); - - gSPDisplayList(gDisplayListHead++, D_0D007FE0); - for (i = 0; i < arg4; i++) { - temp_s0 = var_s1; - temp_s6 = (s32) ((sins(temp_s0) * temp_f20) + (f32) (arg0 - (var))); - sins(temp_s0); - func_80044924(img, arg3, 1); - func_8004B97C_wide(temp_s6, var_s4, arg3, 1, 1); - var_s1 += temp_s7; - img += arg3; - var_s4 += 1; - } -} - -UNUSED void func_8004DC34(s32 arg0, s32 arg1, u8* texture) { - func_8004CF9C(arg0, arg1, texture, 8, 160, 8, 160); -} - -UNUSED void func_8004DC6C(s32 arg0, s32 arg1, u8* texture) { - func_8004CF9C(arg0, arg1, texture, 12, 160, 12, 160); -} - -UNUSED void func_8004DCA4(s32 arg0, s32 arg1, u8* texture) { - func_8004CF9C(arg0, arg1, texture, 12, 192, 12, 192); -} - -UNUSED void func_8004DCDC(s32 arg0, s32 arg1, u8* texture) { - func_8004CD48(arg0, arg1, texture, 16, 16, 16); -} - -UNUSED void func_8004DD0C(s32 arg0, s32 arg1, u8* texture) { - func_8004CF9C(arg0, arg1, texture, 16, 160, 16, 160); -} - -UNUSED void func_8004DD44(s32 arg0, s32 arg1, u8* texture) { - func_8004CD48(arg0, arg1, texture, 32, 32, 32); -} - -UNUSED void func_8004DD74(s32 arg0, s32 arg1, u8* texture) { - func_8004CF9C(arg0, arg1, texture, 32, 32, 32, 32); -} - -UNUSED void func_8004DDAC(s32 arg0, s32 arg1, u8* texture) { - func_8004D0D4(arg0, arg1, texture, 32, 32, 32); -} - -UNUSED void func_8004DDDC(s32 arg0, s32 arg1, u8* texture) { - func_8004D7B4(arg0, arg1, texture, 32, 32); -} - -UNUSED void func_8004DE04(s32 arg0, s32 arg1, u8* texture) { - func_8004D93C(arg0, arg1, texture, 32, 32); -} - -UNUSED void func_8004DE2C(s32 arg0, s32 arg1, u8* arg2) { - func_8004DAB8(arg0, arg1, arg2, 32, 32); -} - -UNUSED void func_8004DE54(s32 arg0, s32 arg1, u8* arg2) { - func_8004CD48(arg0, arg1, arg2, 64, 32, 32); -} - -UNUSED void func_8004DE84(s32 arg0, s32 arg1, u8* arg2) { - func_8004CD48(arg0, arg1, arg2, 64, 64, 32); -} - -UNUSED void func_8004DEB4(s32 arg0, s32 arg1, u8* texture) { - func_8004CF9C(arg0, arg1, texture, 64, 96, 64, 48); -} - -UNUSED void func_8004DEEC(s32 arg0, s32 arg1, u8* arg2) { - func_8004CF9C(arg0, arg1, arg2, 112, 32, 112, 32); -} - -UNUSED void func_8004DF24(s32 arg0, s32 arg1, u8* arg2) { - func_8004CF9C(arg0, arg1, arg2, 128, 32, 128, 32); -} - // Positions the item box on screen void func_8004DF5C(s32 arg0, s32 arg1, u8* texture, s32 width, s32 arg4, s32 height) { s32 var_s0 = var_s0 = arg1 - (arg4 / 2); -- cgit v1.2.3