2017-06-17 16:14:55 -07:00
|
|
|
SECTION "Scratch", SRAM
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2020-10-26 12:45:57 -07:00
|
|
|
sScratch:: ds $60 tiles
|
2015-10-04 11:14:51 -07:00
|
|
|
|
|
|
|
|
2017-06-17 16:14:55 -07:00
|
|
|
SECTION "SRAM Bank 0", SRAM
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2015-11-17 14:56:49 -08:00
|
|
|
sPartyMail::
|
2021-04-27 09:11:39 -07:00
|
|
|
; sPartyMon1Mail - sPartyMon6Mail
|
|
|
|
for n, 1, PARTY_LENGTH + 1
|
|
|
|
sPartyMon{d:n}Mail:: mailmsg sPartyMon{d:n}Mail
|
|
|
|
endr
|
2015-11-17 20:29:14 -08:00
|
|
|
|
2015-11-17 14:56:49 -08:00
|
|
|
sPartyMailBackup::
|
2021-04-27 09:11:39 -07:00
|
|
|
; sPartyMon1MailBackup - sPartyMon6MailBackup
|
|
|
|
for n, 1, PARTY_LENGTH + 1
|
|
|
|
sPartyMon{d:n}MailBackup:: mailmsg sPartyMon{d:n}MailBackup
|
|
|
|
endr
|
2015-11-17 14:56:49 -08:00
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
sMailboxCount:: db
|
2020-10-26 12:45:57 -07:00
|
|
|
sMailboxes::
|
2021-04-27 09:11:39 -07:00
|
|
|
; sMailbox1 - sMailbox10
|
|
|
|
for n, 1, MAILBOX_CAPACITY + 1
|
|
|
|
sMailbox{d:n}:: mailmsg sMailbox{d:n}
|
|
|
|
endr
|
2015-11-17 20:29:14 -08:00
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
sMailboxCountBackup:: db
|
2020-10-26 12:45:57 -07:00
|
|
|
sMailboxesBackup::
|
2021-04-27 09:11:39 -07:00
|
|
|
; sMailbox1Backup - sMailbox10Backup
|
|
|
|
for n, 1, MAILBOX_CAPACITY + 1
|
|
|
|
sMailbox{d:n}Backup:: mailmsg sMailbox{d:n}Backup
|
|
|
|
endr
|
2015-11-17 20:29:14 -08:00
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
sLuckyNumberDay:: db
|
|
|
|
sLuckyIDNumber:: dw
|
2023-07-27 15:07:07 -07:00
|
|
|
if DEF(_DEBUG)
|
|
|
|
sRTCStatusFlags:: db
|
|
|
|
endc
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2017-06-17 16:14:55 -07:00
|
|
|
SECTION "Backup Save", SRAM
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
sBackupOptions:: ds wOptionsEnd - wOptions
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
sBackupCheckValue1:: db ; loaded with SAVE_CHECK_VALUE_1, used to check save corruption
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2020-06-20 20:03:40 -07:00
|
|
|
sBackupGameData::
|
2015-10-04 11:14:51 -07:00
|
|
|
sBackupPlayerData:: ds wPlayerDataEnd - wPlayerData
|
2018-09-09 12:09:51 -07:00
|
|
|
sBackupCurMapData:: ds wCurMapDataEnd - wCurMapData
|
2015-10-04 11:14:51 -07:00
|
|
|
sBackupPokemonData:: ds wPokemonDataEnd - wPokemonData
|
|
|
|
sBackupGameDataEnd::
|
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
sBackupChecksum:: dw
|
|
|
|
|
|
|
|
sBackupCheckValue2:: db ; loaded with SAVE_CHECK_VALUE_2, used to check save corruption
|
|
|
|
|
|
|
|
sStackTop:: dw
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2020-07-13 10:05:05 -07:00
|
|
|
if DEF(_DEBUG)
|
|
|
|
sRTCHaltCheckValue:: dw
|
|
|
|
sSkipBattle:: db
|
|
|
|
sDebugTimeCyclesSinceLastCall:: db
|
|
|
|
sOpenedInvalidSRAM:: db
|
|
|
|
sIsBugMon:: db
|
|
|
|
endc
|
|
|
|
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2017-06-17 16:14:55 -07:00
|
|
|
SECTION "Save", SRAM
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
sOptions:: ds wOptionsEnd - wOptions
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
sCheckValue1:: db ; loaded with SAVE_CHECK_VALUE_1, used to check save corruption
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2020-06-20 20:03:40 -07:00
|
|
|
sGameData::
|
2015-10-04 11:14:51 -07:00
|
|
|
sPlayerData:: ds wPlayerDataEnd - wPlayerData
|
2018-09-09 12:09:51 -07:00
|
|
|
sCurMapData:: ds wCurMapDataEnd - wCurMapData
|
2015-10-04 11:14:51 -07:00
|
|
|
sPokemonData:: ds wPokemonDataEnd - wPokemonData
|
|
|
|
sGameDataEnd::
|
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
sChecksum:: dw
|
|
|
|
|
|
|
|
sCheckValue2:: db ; loaded with SAVE_CHECK_VALUE_2, used to check save corruption
|
|
|
|
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2017-06-17 16:14:55 -07:00
|
|
|
SECTION "Active Box", SRAM
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2018-01-23 08:40:32 -08:00
|
|
|
sBox:: box sBox
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2017-06-17 16:14:55 -07:00
|
|
|
SECTION "Link Battle Data", SRAM
|
2017-12-15 18:22:26 -08:00
|
|
|
|
|
|
|
sLinkBattleStats::
|
2020-06-20 20:03:40 -07:00
|
|
|
sLinkBattleWins:: dw
|
|
|
|
sLinkBattleLosses:: dw
|
|
|
|
sLinkBattleDraws:: dw
|
2017-12-13 21:36:24 -08:00
|
|
|
|
2016-01-12 21:39:41 -08:00
|
|
|
sLinkBattleRecord::
|
2021-04-27 09:11:39 -07:00
|
|
|
; sLinkBattleRecord1 - sLinkBattleRecord5
|
|
|
|
for n, 1, NUM_LINK_BATTLE_RECORDS + 1
|
|
|
|
sLinkBattleRecord{d:n}:: link_battle_record sLinkBattleRecord{d:n}
|
|
|
|
endr
|
2015-10-04 11:14:51 -07:00
|
|
|
sLinkBattleStatsEnd::
|
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2017-06-17 16:14:55 -07:00
|
|
|
SECTION "SRAM Hall of Fame", SRAM
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2020-06-20 20:03:40 -07:00
|
|
|
sHallOfFame::
|
2021-04-27 09:11:39 -07:00
|
|
|
; sHallOfFame1 - sHallOfFame30
|
|
|
|
for n, 1, NUM_HOF_TEAMS + 1
|
|
|
|
sHallOfFame{d:n}:: hall_of_fame sHallOfFame{d:n}
|
|
|
|
endr
|
2015-10-04 11:14:51 -07:00
|
|
|
sHallOfFameEnd::
|
|
|
|
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2021-04-27 09:11:39 -07:00
|
|
|
; The PC boxes will not fit into one SRAM bank,
|
|
|
|
; so they use multiple SECTIONs
|
2022-06-06 14:25:42 -07:00
|
|
|
DEF box_n = 0
|
|
|
|
MACRO boxes
|
|
|
|
rept \1
|
|
|
|
DEF box_n += 1
|
|
|
|
sBox{d:box_n}:: box sBox{d:box_n}
|
|
|
|
endr
|
2021-04-27 09:11:39 -07:00
|
|
|
ENDM
|
2015-10-04 11:14:51 -07:00
|
|
|
|
2019-11-17 10:47:42 -08:00
|
|
|
SECTION "Boxes 1-7", SRAM
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2021-04-27 09:11:39 -07:00
|
|
|
; sBox1 - sBox7
|
|
|
|
boxes 7
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2017-06-17 16:14:55 -07:00
|
|
|
SECTION "Boxes 8-14", SRAM
|
2017-12-15 18:22:26 -08:00
|
|
|
|
2021-04-27 09:11:39 -07:00
|
|
|
; sBox8 - sBox14
|
|
|
|
boxes 7
|
|
|
|
|
|
|
|
; All 14 boxes fit exactly within 2 SRAM banks
|
|
|
|
assert box_n == NUM_BOXES, \
|
|
|
|
"boxes: Expected {d:NUM_BOXES} total boxes, got {d:box_n}"
|