Match GameClear (thanks Egg)

This commit is contained in:
Diegoisawesome 2018-10-21 16:24:43 -05:00
parent 97bbb326b8
commit 32d2640dc7
3 changed files with 9 additions and 21 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;
}