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

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
PrepMysteryGiftDataToSend:
StageDataForMysteryGift:
ld de, wMysteryGiftStaging
ld a, $1 + GS_VERSION
ld a, GS_VERSION + 1
ld [de], a
inc de ; wMysteryGiftStaging+1
ld a, BANK(sGameData)
@@ -46,10 +46,10 @@ PrepMysteryGiftDataToSend:
ld a, [sBackupMysteryGiftItem]
ld [de], a
inc de
ld a, [sBackupMysteryGiftItem + 1]
ld a, [sNumDailyMysteryGiftPartnerIDs]
ld [de], a
ld a, $14
ld [wca00], a
ld a, wMysteryGiftPlayerDataEnd - wMysteryGiftPlayerData
ld [wUnusedMysteryGiftStagedDataLength], a
call CloseSRAM
ld hl, wMysteryGiftStaging
ld de, wMysteryGiftPlayerData
@@ -121,7 +121,7 @@ PrepMysteryGiftDataToSend:
pop de
ret
MysteryGiftGetItemHeldEffect:
MysteryGiftGetItem:
ld a, c
cp MysteryGiftItems.End - MysteryGiftItems
jr nc, MysteryGiftFallbackItem