Skip to content

Commit

Permalink
func_80099110 --> clear_menu_textures
Browse files Browse the repository at this point in the history
  • Loading branch information
coco875 committed Jan 3, 2025
1 parent 3b07895 commit 927ed1e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
54 changes: 26 additions & 28 deletions src/menu_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,50 +890,48 @@ MenuTexture* D_800E822C[] = {

// In a perfect world this would be `MenuTexture *D_800E8234[][2]`
MenuTexture* D_800E8234[] = {
seg2_menu_1p_column, D_020047DC, seg2_menu_2p_column, D_02004804,
seg2_menu_1p_column, D_020047DC, seg2_menu_2p_column, D_02004804,
seg2_menu_3p_column, D_0200482C, seg2_menu_4p_column, D_02004854,
};

MenuTexture* D_800E8254[] = {
seg2_game_select_texture,
seg2_menu_1p_column,
seg2_menu_2p_column,
seg2_menu_3p_column,
seg2_menu_4p_column,
D_0200487C,
D_020048A4,
D_020048CC,
seg2_game_select_texture, seg2_menu_1p_column, seg2_menu_2p_column, seg2_menu_3p_column,
seg2_menu_4p_column, D_0200487C, D_020048A4, D_020048CC,
};

// CC textures
MenuTexture* D_800E8274[] = {
seg2_50_CC_texture, seg2_100_CC_texture, seg2_150_CC_texture, seg2_extra_CC_texture,
seg2_50_CC_texture,
seg2_100_CC_texture,
seg2_150_CC_texture,
seg2_extra_CC_texture,
};

// Versus and battle textures
MenuTexture* D_800E8284[] = {
D_020049BC, seg2_menu_no_item_texture
};
MenuTexture* D_800E8284[] = { D_020049BC, seg2_menu_no_item_texture };

// Time trials begin and data textures
MenuTexture* D_800E828C[] = {
D_020049E4, seg2_data_texture,
D_020049E4,
seg2_data_texture,
};

// Duplicates of the above 3 arrays
// CC textures
MenuTexture* D_800E8294[] = {
seg2_50_CC_texture, seg2_100_CC_texture, seg2_150_CC_texture, seg2_extra_CC_texture,
seg2_50_CC_texture,
seg2_100_CC_texture,
seg2_150_CC_texture,
seg2_extra_CC_texture,
};

// Versus and battle textures
MenuTexture* D_800E82A4[] = {
D_020049BC, seg2_menu_no_item_texture
};
MenuTexture* D_800E82A4[] = { D_020049BC, seg2_menu_no_item_texture };

// Time trials begin and data textures
MenuTexture* D_800E82AC[] = {
D_020049E4, seg2_data_texture,
D_020049E4,
seg2_data_texture,
};

MenuTexture* gMenuTexturesBorderPlayer[] = {
Expand All @@ -944,10 +942,10 @@ MenuTexture* gMenuTexturesBorderPlayer[] = {
};

MenuTexture* gMenuTexturesTrackSelection[] = {
seg2_menu_select_texture, seg2_mushroom_cup_texture, seg2_flower_cup_texture,
seg2_star_cup_texture, seg2_special_cup_texture, seg2_mario_raceway_preview_small_texture,
seg2_mushroom_cup_title_texture, seg2_flower_cup_title_texture, seg2_star_cup_title_texture,
seg2_special_cup_title_texture, seg2_battle_title_texture, D_02004E80,
seg2_menu_select_texture, seg2_mushroom_cup_texture, seg2_flower_cup_texture,
seg2_star_cup_texture, seg2_special_cup_texture, seg2_mario_raceway_preview_small_texture,
seg2_mushroom_cup_title_texture, seg2_flower_cup_title_texture, seg2_star_cup_title_texture,
seg2_special_cup_title_texture, seg2_battle_title_texture, D_02004E80,
};

MenuTexture* D_800E82F4[] = {
Expand Down Expand Up @@ -1363,7 +1361,7 @@ void func_80091FA4(void) {
D_8018E838[i] = 0;
}

func_80099110();
clear_menu_textures();
func_8009A344();
clear_menus();
func_80092258();
Expand Down Expand Up @@ -2173,7 +2171,7 @@ void func_80093E60(void) {
D_8018E838[i] = 0;
}

func_80099110();
clear_menu_textures();
func_8009A344();
clear_menus();
func_80092258();
Expand Down Expand Up @@ -2332,7 +2330,7 @@ void func_80094A64(struct GfxPool* pool) {

void setup_menus(void) {
if (gFadeModeSelection != FADE_MODE_NONE) {
func_80099110();
clear_menu_textures();
func_8009A344();
clear_menus();
func_8009B938();
Expand Down Expand Up @@ -3390,7 +3388,7 @@ void dma_tkmk00_textures(u64* data, size_t nbytes, void* vaddr) {
osRecvMesg(&gDmaMesgQueue, &msg, OS_MESG_BLOCK);
}

void func_80099110(void) {
void clear_menu_textures(void) {
sMenuTextureBufferIndex = 0;
sMenuTextureEntries = 0;
}
Expand Down Expand Up @@ -5977,7 +5975,7 @@ void render_menus(MenuItem* arg0) {
case MAIN_MENU_100CC: /* switch 5 */
case MAIN_MENU_150CC: /* switch 5 */
case MAIN_MENU_EXTRA_CC: /* switch 5 */
switch(var_a1) {
switch (var_a1) {
case 0:
case 2:
break;
Expand Down
2 changes: 1 addition & 1 deletion src/menu_items.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ Gfx* draw_box(Gfx*, s32, s32, s32, s32, u32, u32, u32, u32);
Gfx* func_80098FC8(Gfx*, s32, s32, s32, s32);
void dma_copy_base_729a30(u64*, size_t, void*);
void dma_copy_base_7fa3c0(u64*, size_t, void*);
void func_80099110(void);
void clear_menu_textures(void);
void load_menu_img(MenuTexture*);
void* segmented_to_virtual_dupe(const void*);
void* segmented_to_virtual_dupe_2(const void*);
Expand Down

0 comments on commit 927ed1e

Please sign in to comment.