Identify remaining Mystery Gift labels and constants

Source: https://projectpokemon.org/home/forums/topic/43930-mystery-gift-reverse-engineering-of-ir-protocol/
This commit is contained in:
Rangi
2020-10-27 13:22:27 -04:00
parent 2738858985
commit 446f1846b1
11 changed files with 667 additions and 519 deletions

View File

@@ -173,12 +173,13 @@ _ResetWRAM:
ld [wRoamMon2MapNumber], a
ld [wRoamMon3MapNumber], a
ld a, BANK(sMysteryGiftItem)
ld a, BANK(sMysteryGiftItem) ; aka BANK(sMysteryGiftUnlocked)
call OpenSRAM
ld hl, sMysteryGiftItem
xor a
ld [hli], a
dec a
assert sMysteryGiftItem + 1 == sMysteryGiftUnlocked
dec a ; -1
ld [hl], a
call CloseSRAM
@@ -370,7 +371,7 @@ Continue:
ld c, 20
call DelayFrames
farcall JumpRoamMons
farcall MysteryGift_CopyReceivedDecosToPC
farcall CopyMysteryGiftReceivedDecorationsToPC
farcall ClockContinue
ld a, [wSpawnAfterChampion]
cp SPAWN_LANCE

View File

@@ -206,7 +206,7 @@ MainMenu_GetWhichMenu:
ld a, BANK(sNumDailyMysteryGiftPartnerIDs)
call OpenSRAM
ld a, [sNumDailyMysteryGiftPartnerIDs]
cp -1
cp -1 ; locked?
call CloseSRAM
jr nz, .mystery_gift
; This check makes no difference.