Skip to content

Commit

Permalink
some rename for torch (#588)
Browse files Browse the repository at this point in the history
* rename gBombKartSpawns, and fix cup ID

* Update doxygen_syms.md

* rename for gCourseIndexInCup and his constant

* rename to gCupSelectedCourseIndex

* forget a change in constant

* fix compilation issue
  • Loading branch information
coco875 committed Aug 31, 2024
1 parent 3534198 commit b3aa6ec
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 85 deletions.
4 changes: 2 additions & 2 deletions asm/non_matchings/code_80091750/add_8018D9E0_entry.s
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,8 @@ glabel L8009F388
/* 0A000C 8009F40C 8FBF001C */ lw $ra, 0x1c($sp)
/* 0A0010 8009F410 804F0000 */ lb $t7, ($v0)
.L8009F414:
/* 0A0014 8009F414 3C198019 */ lui $t9, %hi(gCupCourseSelection) # $t9, 0x8019
/* 0A0018 8009F418 8339EE0B */ lb $t9, %lo(gCupCourseSelection)($t9)
/* 0A0014 8009F414 3C198019 */ lui $t9, %hi(gCourseIndexInCup) # $t9, 0x8019
/* 0A0018 8009F418 8339EE0B */ lb $t9, %lo(gCourseIndexInCup)($t9)
/* 0A001C 8009F41C 000F7080 */ sll $t6, $t7, 2
/* 0A0020 8009F420 0C02D567 */ jal func_800B559C
/* 0A0024 8009F424 01D92021 */ addu $a0, $t6, $t9
Expand Down
4 changes: 2 additions & 2 deletions asm/non_matchings/code_80091750/func_800AB314.s
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ glabel func_800AB314
/* 0ABF74 800AB374 24040001 */ li $a0, 1
/* 0ABF78 800AB378 24030003 */ li $v1, 3
/* 0ABF7C 800AB37C 108F003A */ beq $a0, $t7, .L800AB468
/* 0ABF80 800AB380 3C028019 */ lui $v0, %hi(gCupCourseSelection) # $v0, 0x8019
/* 0ABF80 800AB380 3C028019 */ lui $v0, %hi(gCourseIndexInCup) # $v0, 0x8019
/* 0ABF84 800AB384 ACC00004 */ sw $zero, 4($a2)
/* 0ABF88 800AB388 ACC00020 */ sw $zero, 0x20($a2)
/* 0ABF8C 800AB38C 2442EE0B */ addiu $v0, %lo(gCupCourseSelection) # addiu $v0, $v0, -0x11f5
/* 0ABF8C 800AB38C 2442EE0B */ addiu $v0, %lo(gCourseIndexInCup) # addiu $v0, $v0, -0x11f5
/* 0ABF90 800AB390 80580000 */ lb $t8, ($v0)
/* 0ABF94 800AB394 8FB90024 */ lw $t9, 0x24($sp)
/* 0ABF98 800AB398 8FAB0024 */ lw $t3, 0x24($sp)
Expand Down
4 changes: 2 additions & 2 deletions asm/non_matchings/code_80091750/func_800AC458.s
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ glabel L800AC7CC
/* 0AD3DC 800AC7DC ACEF001C */ sw $t7, 0x1c($a3)
/* 0AD3E0 800AC7E0 8318D9D8 */ lb $t8, %lo(D_8018D9D8)($t8)
/* 0AD3E4 800AC7E4 25EAFFFB */ addiu $t2, $t7, -5
/* 0AD3E8 800AC7E8 3C0D8019 */ lui $t5, %hi(gCupCourseSelection) # $t5, 0x8019
/* 0AD3E8 800AC7E8 3C0D8019 */ lui $t5, %hi(gCourseIndexInCup) # $t5, 0x8019
/* 0AD3EC 800AC7EC 53000003 */ beql $t8, $zero, .L800AC7FC
/* 0AD3F0 800AC7F0 8CEB001C */ lw $t3, 0x1c($a3)
/* 0AD3F4 800AC7F4 ACEA001C */ sw $t2, 0x1c($a3)
Expand All @@ -265,7 +265,7 @@ glabel L800AC7CC
/* 0AD400 800AC800 8FBF0014 */ lw $ra, 0x14($sp)
/* 0AD404 800AC804 ACEC0004 */ sw $t4, 4($a3)
/* 0AD408 800AC808 ACE0001C */ sw $zero, 0x1c($a3)
/* 0AD40C 800AC80C 81ADEE0B */ lb $t5, %lo(gCupCourseSelection)($t5)
/* 0AD40C 800AC80C 81ADEE0B */ lb $t5, %lo(gCourseIndexInCup)($t5)
/* 0AD410 800AC810 24010003 */ li $at, 3
/* 0AD414 800AC814 00002825 */ move $a1, $zero
/* 0AD418 800AC818 15A10053 */ bne $t5, $at, .L800AC968
Expand Down
4 changes: 2 additions & 2 deletions asm/non_matchings/save/func_800B5218.s
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
glabel func_800B5218
/* 0B5E18 800B5218 3C0E8019 */ lui $t6, %hi(gCupSelection) # $t6, 0x8019
/* 0B5E1C 800B521C 81CEEE09 */ lb $t6, %lo(gCupSelection)($t6)
/* 0B5E20 800B5220 3C188019 */ lui $t8, %hi(gCupCourseSelection) # $t8, 0x8019
/* 0B5E24 800B5224 8318EE0B */ lb $t8, %lo(gCupCourseSelection)($t8)
/* 0B5E20 800B5220 3C188019 */ lui $t8, %hi(gCourseIndexInCup) # $t8, 0x8019
/* 0B5E24 800B5224 8318EE0B */ lb $t8, %lo(gCourseIndexInCup)($t8)
/* 0B5E28 800B5228 3C09800F */ lui $t1, %hi(gCharacterSelections) # $t1, 0x800f
/* 0B5E2C 800B522C 812986A8 */ lb $t1, %lo(gCharacterSelections)($t1)
/* 0B5E30 800B5230 27BDFFB8 */ addiu $sp, $sp, -0x48
Expand Down
20 changes: 8 additions & 12 deletions include/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ enum PlayerId {
* the battle courses could be displayed in the same
* way race courses are.
*/
#define MUSHROOM_CUP 0
#define FLOWER_CUP 1
#define STAR_CUP 2
#define SPECIAL_CUP 3
#define BATTLE_CUP 4
#define NUM_CUPS 5
enum { MUSHROOM_CUP, FLOWER_CUP, STAR_CUP, SPECIAL_CUP, BATTLE_CUP, NUM_CUPS };

#define NUM_COURSES_PER_CUP 4

/**
* @brief Options for gCourseIndexInCup
*/
enum { COURSE_ONE, COURSE_TWO, COURSE_THREE, COURSE_FOUR };

/**
* @brief Character IDs
Expand Down Expand Up @@ -297,12 +299,6 @@ enum PlayerId {
#define DEMO_SIX 5 // Mario Luigi Peach Toad, Sherbert Land, Versus
#define NUM_DEMOS 6

#define CUP_COURSE_ONE 0
#define CUP_COURSE_TWO 1
#define CUP_COURSE_THREE 2
#define CUP_COURSE_FOUR 3
#define NUM_COURSES_PER_CUP 4

/**
* @brief Item IDs
*/
Expand Down
2 changes: 1 addition & 1 deletion src/code_800029B0.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void setup_race(void) {
gCourseDirection = 1.0f;
}
if (gModeSelection == GRAND_PRIX) {
gCurrentCourseId = gCupCourseOrder[gCupSelection][gCupCourseSelection];
gCurrentCourseId = gCupCourseOrder[gCupSelection][gCourseIndexInCup];
}
gActiveScreenMode = gScreenModeSelection;
if (gCurrentCourseId != gCurrentlyLoadedCourseId) {
Expand Down
20 changes: 10 additions & 10 deletions src/code_80005FD0.c
Original file line number Diff line number Diff line change
Expand Up @@ -2928,24 +2928,24 @@ void set_bomb_kart_spawn_positions(void) {
s32 var_s3;
TrackWaypoint* temp_v0;
UNUSED BombKart* var_s0;
BombKartSpawn* temp_s1;
BombKartSpawn* bombKartSpawn;

for (var_s3 = 0; var_s3 < NUM_BOMB_KARTS_VERSUS; var_s3++) {
temp_s1 = &gBombKartSpawns[gCurrentCourseId][var_s3];
bombKartSpawn = &gBombKartSpawns[gCurrentCourseId][var_s3];
switch (gCurrentCourseId) {
case COURSE_YOSHI_VALLEY:
startingXPos = temp_s1->startingXPos;
startingZPos = temp_s1->startingZPos;
startingXPos = bombKartSpawn->startingXPos;
startingZPos = bombKartSpawn->startingZPos;
startingYPos = spawn_actor_on_surface(startingXPos, 2000.0f, startingZPos);
break;
case COURSE_AWARD_CEREMONY:
temp_v0 = &D_80164550[3][temp_s1->waypointIndex];
temp_v0 = &D_80164550[3][bombKartSpawn->waypointIndex];
startingXPos = temp_v0->posX;
startingYPos = temp_v0->posY;
startingZPos = temp_v0->posZ;
break;
default:
temp_v0 = &D_80164550[0][temp_s1->waypointIndex];
temp_v0 = &D_80164550[0][bombKartSpawn->waypointIndex];
startingXPos = temp_v0->posX;
startingYPos = temp_v0->posY;
startingZPos = temp_v0->posZ;
Expand All @@ -2966,11 +2966,11 @@ void set_bomb_kart_spawn_positions(void) {
gBombKarts[var_s3].wheel4Pos[0] = startingXPos;
gBombKarts[var_s3].wheel4Pos[1] = startingYPos;
gBombKarts[var_s3].wheel4Pos[2] = startingZPos;
gBombKarts[var_s3].waypointIndex = temp_s1->waypointIndex;
gBombKarts[var_s3].unk_3C = temp_s1->unk_04;
gBombKarts[var_s3].waypointIndex = bombKartSpawn->waypointIndex;
gBombKarts[var_s3].unk_3C = bombKartSpawn->unk_04;
gBombKarts[var_s3].bounceTimer = 0;
gBombKarts[var_s3].circleTimer = 0;
gBombKarts[var_s3].state = temp_s1->startingState;
gBombKarts[var_s3].state = bombKartSpawn->startingState;
gBombKarts[var_s3].unk_4A = 0;
gBombKarts[var_s3].unk_4C = 1;
gBombKarts[var_s3].yPos = startingYPos;
Expand Down Expand Up @@ -5431,7 +5431,7 @@ void func_80014DE4(s32 arg0) {

D_801646CC = 0;
D_80164678[arg0] = D_80164670[arg0];
if ((gModeSelection != 1) && ((gCupCourseSelection == 0) || (gDemoMode == (u16) 1))) {
if ((gModeSelection != 1) && ((gCourseIndexInCup == COURSE_ONE) || (gDemoMode == (u16) 1))) {
D_80164678[arg0] = 0;
} else if ((D_80164678[arg0] != 0) && (D_80164678[arg0] != (s16) 1) && (D_80164678[arg0] != 2) &&
(D_80164678[arg0] != 3)) {
Expand Down
48 changes: 24 additions & 24 deletions src/code_80091750.c
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ void func_80091EE4(void) {
tmp = func_800B5F30();

if ((D_8018EDFB != 0) && (tmp == 0)) {
temp_s2 = (gCupSelection * 4) + gCupCourseSelection;
temp_s2 = (gCupSelection * 4) + gCourseIndexInCup;
func_800B6708();

for (temp_s0 = 0; temp_s0 < 2; ++temp_s0) {
Expand Down Expand Up @@ -4832,7 +4832,7 @@ void func_8009CE64(s32 arg0) {
}
gCupSelection = gCupSelectionByCourseId[gCurrentCourseId];
D_800DC540 = (s32) gCupSelection;
gCupCourseSelection = (s8) gPerCupIndexByCourseId[gCurrentCourseId];
gCourseIndexInCup = (s8) gPerCupIndexByCourseId[gCurrentCourseId];
break;
case 3: /* switch 3 */
switch (gMenuSelection) {
Expand Down Expand Up @@ -4914,7 +4914,7 @@ void func_8009CE64(s32 arg0) {
}
gCupSelection = gCupSelectionByCourseId[gCurrentCourseId];
D_800DC540 = gCupSelection;
gCupCourseSelection = gPerCupIndexByCourseId[gCurrentCourseId];
gCourseIndexInCup = gPerCupIndexByCourseId[gCurrentCourseId];
switch (gDebugGotoScene) { /* switch 6; irregular */
case 1: /* switch 6 */
break;
Expand Down Expand Up @@ -5625,7 +5625,7 @@ void add_8018D9E0_entry(s32 type, s32 column, s32 row, s8 priority) {
}
}
if ((var_ra->unk1C == 0) || (var_ra->unk20 != 0)) {
func_800B559C((gCupSelection * 4) + gCupCourseSelection);
func_800B559C((gCupSelection * 4) + gCourseIndexInCup);
}
break;
case 0xE6:
Expand Down Expand Up @@ -7046,7 +7046,7 @@ void func_800A2EB8(struct_8018D9E0_entry* arg0) {
func_80093324(arg0->column + 0x1E, arg0->row + 0x19, "results", 0, 1.0f, 1.0f);
set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_2);
func_80093324(arg0->column + 0x2C, arg0->row + 0x28, "round", 0, 0.7f, 0.7f);
convert_number_to_ascii(gCupCourseSelection + 1, sp68);
convert_number_to_ascii(gCourseIndexInCup + 1, sp68);
func_80093324(arg0->column + 0x57, arg0->row + 0x28, &sp68[1], 0, 0.7f, 0.7f);
for (var_s2 = 0; var_s2 < 4; var_s2++) {
if (gGPCurrentRacePlayerIdByRank[var_s2] < gPlayerCount) {
Expand Down Expand Up @@ -7125,7 +7125,7 @@ void func_800A34A8(struct_8018D9E0_entry* arg0) {
func_80093324(arg0->column + 0x19, 0x19 - arg0->row, "driver's points", 0, 0.8f, 0.8f);
set_text_color(5);
func_80093324(arg0->column + 0x36, 0x28 - arg0->row, "round", 0, 0.7f, 0.7f);
convert_number_to_ascii(gCupCourseSelection + 1, sp78);
convert_number_to_ascii(gCourseIndexInCup + 1, sp78);
func_80093324(arg0->column + 0x61, (0x28 & 0xFFFFFFFF) - arg0->row, &sp78[1], 0, 0.7f, 0.7f);
for (rank = 0; rank < 4; rank++) {
test = arg0->cursor;
Expand Down Expand Up @@ -7258,8 +7258,8 @@ void func_800A3C84(struct_8018D9E0_entry* arg0) {
s32 rowOffset;

set_text_color(TEXT_BLUE_GREEN_RED_CYCLE_1);
draw_text(arg0->column + 0x43, arg0->row + 0x19,
gCourseNamesDup[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 0.6f, 0.6f);
draw_text(arg0->column + 0x43, arg0->row + 0x19, gCourseNamesDup[gCupCourseOrder[gCupSelection][gCourseIndexInCup]],
0, 0.6f, 0.6f);
set_text_color(TEXT_YELLOW);
draw_text(arg0->column + 0x46, arg0->row + 0x28, D_800E7730, 0, 0.75f, 0.75f);
for (recordType = 0, rowOffset = 0; recordType < TIME_TRIAL_3LAP_RECORD_5; recordType += 1, rowOffset += 0xF) {
Expand Down Expand Up @@ -7298,8 +7298,8 @@ void func_800A3E60(struct_8018D9E0_entry* arg0) {
}

set_text_color(4);
draw_text(arg0->column + 0x55, 0x19 - arg0->row,
gCourseNamesDup[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 0.6f, 0.6f);
draw_text(arg0->column + 0x55, 0x19 - arg0->row, gCourseNamesDup[gCupCourseOrder[gCupSelection][gCourseIndexInCup]],
0, 0.6f, 0.6f);
set_text_color(3);
draw_text(arg0->column + 0x55, 0x28 - arg0->row, D_800E7730, 0, 0.75f, 0.75f);
for (var_s1 = 0; var_s1 < 4; var_s1++) {
Expand Down Expand Up @@ -7596,7 +7596,7 @@ void render_pause_menu_time_trials(struct_8018D9E0_entry* arg0) {

gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, 0x0000008C);
set_text_color(TEXT_YELLOW);
draw_text(0x000000A0, 0x00000050, gCourseNamesDup[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 1.0f,
draw_text(0x000000A0, 0x00000050, gCourseNamesDup[gCupCourseOrder[gCupSelection][gCourseIndexInCup]], 0, 1.0f,
1.0f);
set_text_color(TEXT_RED);
draw_text(0x0000009D, 0x00000060, D_800E7728[0], 0, 0.8f, 0.8f);
Expand Down Expand Up @@ -7684,7 +7684,7 @@ void render_pause_grand_prix(struct_8018D9E0_entry* arg0) {
set_text_color(TEXT_YELLOW);
draw_text(160 + temp_s0, temp_s3->row - 50, D_800E76CC[gCCSelection], 0, 1.0f, 1.0f);
set_text_color(TEXT_YELLOW);
draw_text(160, temp_s3->row - 30, gCourseNamesDup[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0, 1.0f,
draw_text(160, temp_s3->row - 30, gCourseNamesDup[gCupCourseOrder[gCupSelection][gCourseIndexInCup]], 0, 1.0f,
1.0f);
for (var_s0 = 0; var_s0 < 2; var_s0++) {
text_rainbow_effect(arg0->cursor - 31, var_s0, TEXT_YELLOW);
Expand Down Expand Up @@ -7799,7 +7799,7 @@ void func_800A5738(struct_8018D9E0_entry* arg0) {
gDisplayListHead = draw_box(gDisplayListHead, 0, 0, 0x0000013F, 0x000000EF, 0, 0, 0, var_s1);
gDPSetPrimColor(gDisplayListHead++, 0, 0, 0x00, 0x00, 0x00, var_s2);
set_text_color(3);
func_80093754(0x000000A0, 0x00000050, gCourseNamesDup[gCupCourseOrder[gCupSelection][gCupCourseSelection]], 0,
func_80093754(0x000000A0, 0x00000050, gCourseNamesDup[gCupCourseOrder[gCupSelection][gCourseIndexInCup]], 0,
1.0f, 1.0f);
switch (arg0->cursor) { /* switch 1 */
case 1: /* switch 1 */
Expand Down Expand Up @@ -8973,8 +8973,8 @@ void func_800A8A98(struct_8018D9E0_entry* arg0) {
gDPPipeSync(gDisplayListHead++);
gDPSetRenderMode(gDisplayListHead++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
gDPSetCombineMode(gDisplayListHead++, G_CC_DECALRGBA, G_CC_DECALRGBA);
for (someIndex = 0; someIndex < 4; someIndex++) {
if ((someIndex == gCupCourseSelection) && (D_8018EDEC >= 2) && (gModeSelection != GRAND_PRIX)) {
for (someIndex = 0; someIndex < NUM_COURSES_PER_CUP; someIndex++) {
if ((someIndex == gCourseIndexInCup) && (D_8018EDEC >= 2) && (gModeSelection != GRAND_PRIX)) {
if ((D_8018EDEC == 2) || (D_8018EDEC == 4)) {
gDisplayListHead = draw_flash_select_case_slow(
gDisplayListHead, D_800E7208[someIndex][0].column + temp_s2, D_800E7208[someIndex][0].row + temp_s3,
Expand Down Expand Up @@ -9060,7 +9060,7 @@ void func_800A8F48(UNUSED struct_8018D9E0_entry* arg0) {
break;
case 2:
default:
if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) >= 0) {
if (func_800B639C((gCupSelection * 4) + gCourseIndexInCup) >= 0) {
gDisplayListHead = func_80098FC8(gDisplayListHead, 0x00000057, 0x00000070, 0x00000096, 0x00000081);
gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004A0C, 0x00000057, 0x00000070);
}
Expand Down Expand Up @@ -10221,7 +10221,7 @@ void func_800AB314(struct_8018D9E0_entry* arg0) {
arg0->cursor = 0;
arg0->unk20 = 0;
for (var_a1 = 0; var_a1 < 4; var_a1++) {
if (gCupCourseSelection == var_a1) {
if (gCourseIndexInCup == var_a1) {
sp24[var_a1]->visible = one;
if (arg0->unk1C != var_a1) {
arg0->unk1C = var_a1;
Expand Down Expand Up @@ -10724,7 +10724,7 @@ void func_800AC458(struct_8018D9E0_entry* arg0) {
if (arg0->unk1C <= 0) {
arg0->cursor = 0x0000000A;
arg0->unk1C = 0;
if (gCupCourseSelection == 3) {
if (gCourseIndexInCup == 3) {
for (var_a1 = 0; var_a1 < 8; var_a1++) {
if (D_80164478[gCharacterIdByGPOverallRank[var_a1]] < gPlayerCount) {
func_800B536C(var_a1);
Expand Down Expand Up @@ -11123,7 +11123,7 @@ void func_800AD2E8(struct_8018D9E0_entry* arg0) {
break;
case 0: /* switch 4 */
func_800B6708();
arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11;
arg0->cursor = func_800B6348((gCupSelection * 4) + gCourseIndexInCup) + 0x11;
var_v1 = 1;
play_sound2(SOUND_MENU_SELECT);
break;
Expand Down Expand Up @@ -11170,7 +11170,7 @@ void func_800AD2E8(struct_8018D9E0_entry* arg0) {
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*) gGameName,
(u8*) gExtCode, &gControllerPak1FileNote) == 0) {
func_800B6708();
arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x11;
arg0->cursor = func_800B6348((gCupSelection * 4) + gCourseIndexInCup) + 0x11;
play_sound2(SOUND_MENU_SELECT);
return;
}
Expand Down Expand Up @@ -11220,7 +11220,7 @@ void func_800AD2E8(struct_8018D9E0_entry* arg0) {
case 17: /* switch 1 */
case 18: /* switch 1 */
arg0->unk20 = arg0->cursor - 0x11;
if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) != arg0->unk20) {
if (func_800B639C((gCupSelection * 4) + gCourseIndexInCup) != arg0->unk20) {
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) {
if (arg0->cursor >= 0x12) {
arg0->cursor--;
Expand Down Expand Up @@ -11527,7 +11527,7 @@ void func_800AE218(struct_8018D9E0_entry* arg0) {
break;
case PFS_NO_ERROR: /* switch 3 */
func_800B6708();
arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E;
arg0->cursor = func_800B6348((gCupSelection * 4) + gCourseIndexInCup) + 0x1E;
var_v1 = 1;
break;
case PFS_ERR_NEW_PACK: /* switch 3 */
Expand Down Expand Up @@ -11576,7 +11576,7 @@ void func_800AE218(struct_8018D9E0_entry* arg0) {
if (osPfsFindFile(&gControllerPak1FileHandle, gCompanyCode, gGameCode, (u8*) gGameName,
(u8*) gExtCode, &gControllerPak1FileNote) == 0) {
func_800B6708();
arg0->cursor = func_800B6348((gCupSelection * 4) + gCupCourseSelection) + 0x1E;
arg0->cursor = func_800B6348((gCupSelection * 4) + gCourseIndexInCup) + 0x1E;
play_sound2(SOUND_MENU_SELECT);
return;
}
Expand Down Expand Up @@ -11622,7 +11622,7 @@ void func_800AE218(struct_8018D9E0_entry* arg0) {
case 30: /* switch 1 */
case 31: /* switch 1 */
arg0->unk20 = (u32) arg0->cursor - 0x1E;
if (func_800B639C((gCupSelection * 4) + gCupCourseSelection) != arg0->unk20) {
if (func_800B639C((gCupSelection * 4) + gCourseIndexInCup) != arg0->unk20) {
if ((gControllerOne->buttonPressed | gControllerOne->stickPressed) & 0x800) {
if (arg0->cursor >= 0x1F) {
arg0->cursor--;
Expand Down
Loading

0 comments on commit b3aa6ec

Please sign in to comment.