diff --git a/scripts/HallOfFame.asm b/scripts/HallOfFame.asm index 283a2672..308ccb40 100644 --- a/scripts/HallOfFame.asm +++ b/scripts/HallOfFame.asm @@ -210,6 +210,36 @@ ResetLegendaryPokemon: ld a, HS_MEWTWO call ShowThis .skipGalarianBirdsAndMewtwo + + ; trade flags are in groups based on the + ; ordering in data/events/trades.asm + ; the numbering follows LSB -> MSB + ; (ie, trades 8 and 9 are the rightmost two bits) + + ; trades 0-7 + ; ld b, %11111111 + ; ld a, [wCompletedInGameTradeFlags] + ; and b + ; ld [wCompletedInGameTradeFlags], a + + ; trades 8-15 + ld b, %00000011 + ld a, [wCompletedInGameTradeFlags+1] + and b + ld [wCompletedInGameTradeFlags+1], a + + ; trades 16-23 + ld b, %00000000 + ld a, [wCompletedInGameTradeFlags+2] + and b + ld [wCompletedInGameTradeFlags+2], a + + ; trades 24-31 + ld b, %00000000 + ld a, [wCompletedInGameTradeFlags+3] + and b + ld [wCompletedInGameTradeFlags+3], a + ; We set this last to save on processing earlier in the script. SetEvent EVENT_POST_GAME_ATTAINED ret