diff options
-rw-r--r-- | asm/post_battle_event_funcs.s | 17 | ||||
-rw-r--r-- | ld_script.txt | 1 | ||||
-rw-r--r-- | src/post_battle_event_funcs.c | 12 |
3 files changed, 9 insertions, 21 deletions
diff --git a/asm/post_battle_event_funcs.s b/asm/post_battle_event_funcs.s deleted file mode 100644 index 7617152fd..000000000 --- a/asm/post_battle_event_funcs.s +++ /dev/null @@ -1,17 +0,0 @@ - .include "asm/macros.inc" - .include "constants/constants.inc" - - .syntax unified - - .text - - thumb_func_start sp0C8_whiteout_maybe -sp0C8_whiteout_maybe: @ 813787C - push {lr} - ldr r0, =CB2_WhiteOut - bl SetMainCallback2 - movs r0, 0 - pop {r1} - bx r1 - .pool - thumb_func_end sp0C8_whiteout_maybe diff --git a/ld_script.txt b/ld_script.txt index d5a37c611..15d26cdb8 100644 --- a/ld_script.txt +++ b/ld_script.txt @@ -179,7 +179,6 @@ SECTIONS { src/pokeblock.o(.text); src/fldeff_flash.o(.text); src/post_battle_event_funcs.o(.text); - asm/post_battle_event_funcs.o(.text); src/time_events.o(.text); src/birch_pc.o(.text); src/hof_pc.o(.text); diff --git a/src/post_battle_event_funcs.c b/src/post_battle_event_funcs.c index 8df702570..f15396102 100644 --- a/src/post_battle_event_funcs.c +++ b/src/post_battle_event_funcs.c @@ -55,8 +55,8 @@ int GameClear(void) && !GetMonData(mon, MON_DATA_SANITY_BIT3) && !GetMonData(mon, MON_DATA_CHAMPION_RIBBON)) { - val = TRUE; - SetMonData(mon, MON_DATA_CHAMPION_RIBBON, &val); + u8 val[1] = {TRUE}; + SetMonData(mon, MON_DATA_CHAMPION_RIBBON, val); ribbonCounts[i].count = GetRibbonCount(mon); ribbonGet = TRUE; } @@ -69,7 +69,7 @@ int GameClear(void) for (i = 1; i < 6; i++) { - if (ribbonCounts[0].count > ribbonCounts[i].count) + if (ribbonCounts[i].count > ribbonCounts[0].count) { struct RibbonCounter prevBest = ribbonCounts[0]; ribbonCounts[0] = ribbonCounts[i]; @@ -86,3 +86,9 @@ int GameClear(void) SetMainCallback2(CB2_DoHallOfFameScreen); return 0; } + +bool8 sp0C8_whiteout_maybe(void) +{ + SetMainCallback2(CB2_WhiteOut); + return FALSE; +} |