diff --git a/sram.asm b/sram.asm index a7c377e3..d987652e 100644 --- a/sram.asm +++ b/sram.asm @@ -8,20 +8,28 @@ S_SPRITEBUFFER2:: ds SPRITEBUFFERSIZE ; a310 sHallOfFame:: ds HOF_TEAM * NUM_HOF_TEAMS ; a598 -S_SAVEDBOX1 EQU $A000 -S_SAVEDBOX2 EQU S_SAVEDBOX1 + (wBoxMonNicksEnd - W_NUMINBOX) ; $A462 -S_SAVEDBOX3 EQU S_SAVEDBOX2 + (wBoxMonNicksEnd - W_NUMINBOX) ; $A8C4 -S_SAVEDBOX4 EQU S_SAVEDBOX3 + (wBoxMonNicksEnd - W_NUMINBOX) ; $AD26 -S_SAVEDBOX5 EQU S_SAVEDBOX4 + (wBoxMonNicksEnd - W_NUMINBOX) ; $B188 -S_SAVEDBOX6 EQU S_SAVEDBOX5 + (wBoxMonNicksEnd - W_NUMINBOX) ; $B5EA -S_SAVEDBOXESCHECKSUM EQU S_SAVEDBOX6 + (wBoxMonNicksEnd - W_NUMINBOX) ; $BA4C -S_SAVEDBOXESCHECKSUM2 EQU S_SAVEDBOXESCHECKSUM + 1 ; $BA4D +SECTION "Save Data", SRAM, BANK[1] -S_SAVEDPLAYERNAME EQU $A598 -S_SAVEDMAINDATA EQU S_SAVEDPLAYERNAME + (wPartyCount - wPlayerName) ; $A5A3 -S_SAVEDPLAYERID EQU S_SAVEDMAINDATA + (wPlayerID - wPokedexOwned) ; $A605 -S_SAVEDSPRITEDATA EQU S_SAVEDMAINDATA + (W_NUMINBOX - wPokedexOwned) ; $AD2C -S_SAVEDPARTYDATA EQU S_SAVEDSPRITEDATA + (wOAMBuffer - wSpriteStateData1) ; $AF2C -S_SAVEDCURBOXDATA EQU S_SAVEDPARTYDATA + (wPokedexOwned - wPartyCount) ; $B0C0 -S_SAVEDhTilesetType EQU S_SAVEDCURBOXDATA + (wBoxMonNicksEnd - W_NUMINBOX) ; $B522 -S_SAVEDMAINDATACHECKSUM EQU S_SAVEDhTilesetType + 1 ; $B523 +SECTION "Sprite State Data", SRAM1[$a598] +S_SAVEDPLAYERNAME:: ds 11 ; a598 +S_SAVEDMAINDATA:: ds wPartyCount - wPlayerName ; a5a3 +S_SAVEDSPRITEDATA:: ds W_NUMINBOX - wPokedexOwned ; ad2c +S_SAVEDPARTYDATA:: ds wOAMBuffer - wSpriteStateData1 ; af2c +S_SAVEDCURBOXDATA:: ds wPokedexOwned - wPartyCount ; b0c0 +S_SAVEDhTilesetType:: ds wBoxMonNicksEnd - W_NUMINBOX ; b522 +S_SAVEDMAINDATACHECKSUM:: ds 1 ; b523 + +S_SAVEDPLAYERID EQU S_SAVEDMAINDATA + (wPlayerID - wPokedexOwned) ; a605 + +SECTION "Saved Boxes", SRAM, BANK[2] ; pointers used for bank 3 too + +S_BOXLENGTH EQU wBoxMonNicksEnd - W_NUMINBOX ; $462 + +S_SAVEDBOX1:: ds S_BOXLENGTH ; a000 +S_SAVEDBOX2:: ds S_BOXLENGTH ; a462 +S_SAVEDBOX3:: ds S_BOXLENGTH ; a8c4 +S_SAVEDBOX4:: ds S_BOXLENGTH ; ad26 +S_SAVEDBOX5:: ds S_BOXLENGTH ; b188 +S_SAVEDBOX6:: ds S_BOXLENGTH ; b5ea +S_SAVEDBOXESCHECKSUM:: ds 1 ; ba4c +S_SAVEDBOXESCHECKSUM2:: ds 6 ; ba4d