soft reset

This commit is contained in:
PikalaxALT
2015-10-04 14:14:51 -04:00
parent 726c4bc1d6
commit 2770cfc354
19 changed files with 716 additions and 663 deletions

View File

@@ -8786,7 +8786,7 @@ Function3f77c: ; 3f77c
callba Function106187
ld c, $c8
call DelayFrames
ld a, $1
ld a, BANK(sLinkBattleStats)
call GetSRAMBank
call Function3fa42
call Function3f85f
@@ -8861,7 +8861,7 @@ Function3f85f: ; 3f85f
call .asm_3f8e0
hlcoord 0, 8
ld b, $5
ld de, $b268
ld de, sLinkBattleStats + $8
.asm_3f870
push bc
push hl

View File

@@ -830,3 +830,10 @@ NUM_SPAWNS EQU const_value
const SPRITEMOVEFN_1F
const SPRITEMOVEFN_20
const SPRITEMOVEFN_21
const_def
const PALETTE_AUTO
const PALETTE_DAY
const PALETTE_NITE
const PALETTE_MORN
const PALETTE_DARK

View File

@@ -186,8 +186,8 @@ SpecialsPointers:: ; c029
add_special Function4ae12
add_special LoadMapPalettes
add_special Function4a927
add_special Function90a54
add_special Function90a88
add_special Special_InitialSetDSTFlag
add_special Special_InitialClearDSTFlag
add_special SpecialNone
; c224
@@ -314,9 +314,9 @@ Special_KrissHousePC: ; c2e7
; c2f6
Special_CheckMysteryGift: ; c2f6
ld a, BANK(s0_abe2)
ld a, BANK(sMysteryGiftItem)
call GetSRAMBank
ld a, [s0_abe2]
ld a, [sMysteryGiftItem]
and a
jr z, .no
inc a
@@ -328,9 +328,9 @@ Special_CheckMysteryGift: ; c2f6
; c309
Special_GetMysteryGiftItem: ; c309
ld a, BANK(s0_abe2)
ld a, BANK(sMysteryGiftItem)
call GetSRAMBank
ld a, [s0_abe2]
ld a, [sMysteryGiftItem]
ld [CurItem], a
ld a, $1
ld [wd10c], a
@@ -338,12 +338,12 @@ Special_GetMysteryGiftItem: ; c309
call ReceiveItem
jr nc, .asm_c33d
xor a
ld [s0_abe2], a
ld [sMysteryGiftItem], a
call CloseSRAM
ld a, [CurItem]
ld [wd265], a
call GetItemName
ld hl, UnknownText_0xc345
ld hl, .ReceiveItemText
call PrintText
ld a, $1
ld [ScriptVar], a
@@ -356,7 +356,7 @@ Special_GetMysteryGiftItem: ; c309
ret
; c345
UnknownText_0xc345: ; 0xc345
.ReceiveItemText: ; 0xc345
; received item
text_jump UnknownText_0x1bd3be
db "@"
@@ -639,8 +639,8 @@ Functionc4ac: ; c4ac
; c4b9
SpecialTrainerHouse: ; 0xc4b9
ld a, BANK(s0_abfd)
ld a, BANK(sMysteryGiftTrainerHouseFlag)
call GetSRAMBank
ld a, [s0_abfd]
ld a, [sMysteryGiftTrainerHouseFlag]
ld [ScriptVar], a
jp CloseSRAM

View File

@@ -297,21 +297,21 @@ Function11548: ; 11548
; 11586
Function11586: ; 11586
cp $ff
jr z, .asm_11595
cp -1
jr z, .skip
ld c, a
ld a, [hl]
sub c
jr nc, .asm_11590
jr nc, .ok
xor a
.asm_11590
.ok
ld [hl], a
jr z, .asm_11595
jr z, .skip
xor a
ret
.asm_11595
.skip
xor a
ld [hl], a
scf

View File

@@ -221,49 +221,65 @@ else
endc
jp z, \2
endm
dict $15, Char15
dict $4f, Line
dict $4e, NextLine
dict $16, Char16
dict2: macro
if \1 == 0
and a
else
cp \1
endc
jr nz, \@
ld a, \2
\@:
endm
dict3: macro
if \1 == 0
and a
else
cp \1
endc
jr z, \2
endm
dict "<DAY>", Char15
dict "<LINE>", LineChar
dict "<NEXT>", NextLineChar
dict TX_FAR, TextFar
dict $00, NullChar
dict $4c, Function1337
dict $4c, Char4C
dict $4b, Char4B
dict $51, Paragraph
dict $49, PrintMomsName
dict $52, PrintPlayerName
dict $53, PrintRivalName
dict "<PARA>", Paragraph
dict "<MOM>", PrintMomsName
dict "<PLAYER>", PrintPlayerName
dict "<RIVAL>", PrintRivalName
dict $35, Char35
dict $36, Char36
dict $37, Char37
dict $38, PrintRedsName
dict $39, PrintGreensName
dict $54, Char54
dict $5b, Char5B
dict $5e, Char5E
dict $5c, Char5C
dict $5d, Char5D
dict "<RED>", PrintRedsName
dict "<GREEN>", PrintGreensName
dict "#", PlacePOKe
dict "<PC>", PCChar
dict "<ROCKET>", RocketChar
dict "<TM>", TMChar
dict "<TRNER>", TrainerChar
dict $23, Char23
dict $22, Char22
dict $55, ContText
dict $56, Char56
dict $57, DoneText
dict $58, PromptText
dict $4a, Char4A
dict $24, Char24
dict "<CONT>", ContText
dict "<......>", SixDotsChar
dict "<DONE>", DoneText
dict "<PROMPT>", PromptText
dict "<PKMN>", PlacePKMN
dict $24, PlacePOKE
dict $25, NextChar
cp $1f
jr nz, .ok
ld a, $7f
.ok
dict2 $1f, " "
dict $5f, Char5F
dict $59, Char59
dict $5a, Char5A
dict $3f, Char3F
dict $14, Char14
cp $e4 ; handakuten
jr z, .place
cp $e5 ; dakuten
jr z, .place
dict "<TARGET>", PlaceMoveTargetsName
dict "<USER>", PlaceMoveUsersName
dict "<ENEMY>", PlaceEnemysName
dict "<PLAY_G>", PlaceGenderedPlayerName
dict3 $e4, .place
dict3 $e5, .place
jr .nope
ld b, a
@@ -319,7 +335,7 @@ Char15:: ; 117b
print_name: macro
push de
ld de, \1
jp Function126a
jp PlaceCommandCharacter
endm
PrintMomsName: print_name MomsName ; 1186
@@ -328,46 +344,46 @@ PrintRivalName: print_name RivalName ; 1194
PrintRedsName: print_name RedsName ; 119b
PrintGreensName: print_name GreensName ; 11a2
Char5D: print_name Char5DText ; 11a9
Char5C: print_name Char5CText ; 11b0
Char5B: print_name Char5BText ; 11b7
Char5E: print_name Char5EText ; 11be
Char54: print_name Char54Text ; 11c5
TrainerChar: print_name TrainerCharText ; 11a9
TMChar: print_name TMCharText ; 11b0
PCChar: print_name PCCharText ; 11b7
RocketChar: print_name RocketCharText ; 11be
PlacePOKe: print_name PlacePOKeText ; 11c5
Char23: print_name Char23Text ; 11cc
Char56: print_name Char56Text ; 11d3
Char4A: print_name Char4AText ; 11da
Char24: print_name Char24Text ; 11e1
SixDotsChar: print_name SixDotsCharText ; 11d3
PlacePKMN: print_name PlacePKMNText ; 11da
PlacePOKE: print_name PlacePOKEText ; 11e1
Char35: print_name Char35Text ; 11e8
Char36: print_name Char36Text ; 11ef
Char37: print_name Char37Text ; 11f6
Char59:: ; 11fd
PlaceMoveTargetsName:: ; 11fd
ld a, [hBattleTurn]
xor 1
jr Char59_5A
jr PlaceMoveTargetsName_5A
Char5A:: ; 1203
PlaceMoveUsersName:: ; 1203
ld a, [hBattleTurn]
Char59_5A: ; 1205
PlaceMoveTargetsName_5A: ; 1205
push de
and a
jr nz, .enemy
ld de, BattleMonNick
jr Function126a
jr PlaceCommandCharacter
.enemy
ld de, Char5AText ; Enemy
ld de, EnemyText ; Enemy
call PlaceString
ld h, b
ld l, c
ld de, EnemyMonNick
jr Function126a
jr PlaceCommandCharacter
Char3F:: ; 121b
PlaceEnemysName:: ; 121b
push de
ld a, [InLinkBattle]
@@ -390,18 +406,18 @@ Char3F:: ; 121b
callab Battle_GetTrainerName
pop hl
ld de, StringBuffer1
jr Function126a
jr PlaceCommandCharacter
.rival
ld de, RivalName
jr Function126a
jr PlaceCommandCharacter
.linkbattle
ld de, OTName
jr Function126a
jr PlaceCommandCharacter
Char14:: ; 1252
PlaceGenderedPlayerName:: ; 1252
push de
ld de, PlayerName
call PlaceString
@@ -410,12 +426,12 @@ Char14:: ; 1252
ld a, [PlayerGender]
bit 0, a
ld de, String12a5
jr z, Function126a
jr z, PlaceCommandCharacter
ld de, String12a6
jr Function126a
jr PlaceCommandCharacter
Function126a:: ; 126a
PlaceCommandCharacter:: ; 126a
call PlaceString
ld h, b
ld l, c
@@ -423,16 +439,16 @@ Function126a:: ; 126a
jp NextChar
; 0x1273
Char5CText:: db "TM@" ; 1273
Char5DText:: db "TRAINER@" ; 1276
Char5BText:: db "PC@" ; 127e
Char5EText:: db "ROCKET@" ; 1281
Char54Text:: db "POKé@" ; 1288
TMCharText:: db "TM@" ; 1273
TrainerCharText:: db "TRAINER@" ; 1276
PCCharText:: db "PC@" ; 127e
RocketCharText:: db "ROCKET@" ; 1281
PlacePOKeText:: db "POKé@" ; 1288
Char23Text:: db "こうげき@" ; 128d
Char56Text:: db "……@" ; 1292
Char5AText:: db "Enemy @" ; 1295
Char4AText:: db $e1, $e2, "@" ; PK MN ; 129c
Char24Text:: db $70, $71, "@" ; PO KE ; 129f
SixDotsCharText:: db "……@" ; 1292
EnemyText:: db "Enemy @" ; 1295
PlacePKMNText:: db "<PK><MN>@" ; PK MN ; 129c
PlacePOKEText:: db "<PO><KE>@" ; PO KE ; 129f
String12a2:: db " @" ; 12a2
Char35Text::
Char36Text::
@@ -441,7 +457,7 @@ String12a5:: db "@" ; 12a5
String12a6:: db "@" ; 12a6
; 12a7
NextLine:: ; 12a7
NextLineChar:: ; 12a7
pop hl
ld bc, SCREEN_WIDTH * 2
add hl, bc
@@ -457,7 +473,7 @@ Char22:: ; 12b0
jp NextChar
; 12b9
Char16:: ; 12b9
TextFar:: ; 12b9
pop hl
push de
ld bc, -TileMap + $10000
@@ -500,7 +516,7 @@ Char16:: ; 12b9
; 12ea
Line:: ; 12ea
LineChar:: ; 12ea
pop hl
hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2
push hl
@@ -549,7 +565,7 @@ Char4B:: ; 131f
or a
call z, Function13cd
Function1337:: ; 1337
Char4C:: ; 1337
push de
call Function138c
call Function138c

View File

@@ -658,27 +658,27 @@ endr
ld b, $0
callba Function116c1
ld a, $1
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
ld hl, wd050
ld de, $b082
ld bc, $000b
ld de, sBoxMonNicknames
ld bc, PKMN_NAME_LENGTH
call CopyBytes
ld hl, $b082
ld hl, sBoxMonNicknames
ld de, StringBuffer1
call InitName
call CloseSRAM
.asm_ebaf
ld a, $1
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
ld hl, $b082
ld hl, sBoxMonNicknames
ld de, wd050
ld bc, $000b
ld bc, PKMN_NAME_LENGTH
call CopyBytes
call CloseSRAM

View File

@@ -104,6 +104,13 @@ dwcoord: MACRO
endr
ENDM
ldcoord: MACRO
if _NARG < 3
ld [TileMap + SCREEN_WIDTH * (\2) + (\1)], a
else
ld [\3 + SCREEN_WIDTH * (\2) + (\1)], a
endc
ENDM
; pic animations
frame: MACRO

View File

@@ -282,5 +282,22 @@
charmap "<USER>", $5a
charmap "<ENEMY>", $3f
charmap "<PKMN>", $4a
charmap "<PK>", $e1
charmap "<MN>", $e2
charmap "<PO>", $70
charmap "<KE>", $71
charmap "<MOM>", $49
charmap "<POKE>", $24
charmap "<PLAY_G>", $14 ; <PLAYER> + gender
charmap "<PARA>", $51
charmap "<LINE>", $4f
charmap "<NEXT>", $4e
charmap "<CONT>", $55
charmap "<DONE>", $57
charmap "<PROMPT>", $58
charmap "<DAY>", $15
charmap "<PC>", $5b
charmap "<TM>", $5c
charmap "<TRNER>", $5d
charmap "<ROCKET>", $5e
charmap "<......>", $56

View File

@@ -300,12 +300,20 @@ givepoke: macro
db givepoke_command
db \1 ; pokemon
db \2 ; level
if _NARG >= 3
db \3 ; item
if _NARG >= 4
db \4 ; trainer
if \4
dw \5 ; trainer_name_pointer
dw \6 ; pkmn_nickname
endc
else
db 0
endc
else
db 0, 0
endc
endm
enum giveegg_command

View File

@@ -239,9 +239,9 @@ _ResetWRAM: ; 5bae
ld [wRoamMon2MapNumber], a
ld [wRoamMon3MapNumber], a
ld a, BANK(s0_abe2)
ld a, BANK(sMysteryGiftItem)
call GetSRAMBank
ld hl, s0_abe2
ld hl, sMysteryGiftItem
xor a
ld [hli], a
dec a
@@ -29292,7 +29292,7 @@ Function28926: ; 28926
.asm_28946
ld a, $7f
ld [TileMap + 11 + 16 * SCREEN_WIDTH], a
ldcoord 11, 16
ld a, $13
ld [wcfa8], a
ld a, $1
@@ -29324,7 +29324,7 @@ Function28926: ; 28926
.asm_2898d
ld a, $7f
ld [TileMap + 1 + 16 * SCREEN_WIDTH], a
ldcoord 1, 16
ld a, $23
ld [wcfa8], a
ld a, $1
@@ -29470,7 +29470,7 @@ Function28ac9: ; 28ac9
Function28ade: ; 28ade
.asm_28ade
ld a, $ed
ld [TileMap + 9 + 17 * SCREEN_WIDTH], a
ldcoord 9, 17
.asm_28ae3
call Functiona57
ld a, [$ffa9]
@@ -29480,7 +29480,7 @@ Function28ade: ; 28ade
jr nz, .asm_28b0b
push af
ld a, $7f
ld [TileMap + 9 + 17 * SCREEN_WIDTH], a
ldcoord 9, 17
pop af
bit 6, a
jr z, .asm_28b03
@@ -29495,7 +29495,7 @@ Function28ade: ; 28ade
.asm_28b0b
ld a, $ec
ld [TileMap + 9 + 17 * SCREEN_WIDTH], a
ldcoord 9, 17
ld a, $f
ld [wcf56], a
callba Function16d6ce
@@ -35456,9 +35456,9 @@ GetTrainerName:: ; 3994c
cp CAL
jr nz, .not_cal2
ld a, BANK(s0_abfd)
ld a, BANK(sMysteryGiftTrainerHouseFlag)
call GetSRAMBank
ld a, [s0_abfd]
ld a, [sMysteryGiftTrainerHouseFlag]
and a
call CloseSRAM
jr z, .not_cal2
@@ -39988,8 +39988,8 @@ Function49797: ; 49797
ld a, $4
call Function49336
ld a, $3
ld [AttrMap + 0 + 1 * SCREEN_WIDTH], a ; (0, 1)
ld [AttrMap + 0 + 14 * SCREEN_WIDTH], a ; (0, 14)
ldcoord 0, 1, AttrMap
ldcoord 0, 14, AttrMap
hlcoord 2, 0, AttrMap
ld bc, $0812
ld a, $5
@@ -62694,7 +62694,7 @@ Unknown_8c490: ; 8c490
macro_8c490: MACRO
db \1
dw \2
dw TileMap + SCREEN_WIDTH * \4 + \3
dwcoord \3, \4
ENDM
macro_8c490 0, Unknown_8c538, 1, 6
@@ -63241,10 +63241,10 @@ Function8c913: ; 8c913
; 8c938
Unknown_8c938: ; 8c938
dw TileMap + 8 + 10 * SCREEN_WIDTH
dw TileMap + 8 + 6 * SCREEN_WIDTH
dw TileMap + 6 + 8 * SCREEN_WIDTH
dw TileMap + 10 + 8 * SCREEN_WIDTH
dwcoord 8, 10
dwcoord 8, 6
dwcoord 6, 8
dwcoord 10, 8
; 8c940
Function8c940: ; 8c940
@@ -68913,7 +68913,7 @@ UnknownText_0x90a4f: ; 0x90a4f
db "@"
; 0x90a54
Function90a54: ; 90a54
Special_InitialSetDSTFlag: ; 90a54
ld a, [wDST]
set 7, a
ld [wDST], a
@@ -68944,7 +68944,7 @@ UnknownText_0x90a83: ; 0x90a83
db "@"
; 0x90a88
Function90a88: ; 90a88
Special_InitialClearDSTFlag: ; 90a88
ld a, [wDST]
res 7, a
ld [wDST], a
@@ -74100,13 +74100,13 @@ UnknownText_0x931b9: ; 0x931b9
Function931ba: ; 931ba
ld a, [EffectFailed]
add $25
ld [TileMap + 2 + 13 * SCREEN_WIDTH], a
ldcoord 2, 13
inc a
ld [TileMap + 2 + 14 * SCREEN_WIDTH], a
ldcoord 2, 14
inc a
ld [TileMap + 3 + 13 * SCREEN_WIDTH], a
ldcoord 3, 13
inc a
ld [TileMap + 3 + 14 * SCREEN_WIDTH], a
ldcoord 3, 14
hlcoord 18, 17
ld [hl], $ee
ld hl, UnknownText_0x931db
@@ -89233,7 +89233,7 @@ endr
Function104a71: ; 104a71 (41:4a71)
call Function105106
ld a, $1
ld [s0_abfd], a
ld [sMysteryGiftTrainerHouseFlag], a
ld hl, wc903
ld de, s0_abfe
ld bc, $b
@@ -90168,7 +90168,7 @@ Function1050c8: ; 1050c8
Function1050d9: ; 1050d9
call Function105106
ld hl, s0_abe2
ld hl, sMysteryGiftItem
ld de, s0_abe4
ld a, [hli]
ld [de], a
@@ -90182,7 +90182,7 @@ Function1050d9: ; 1050d9
Function1050ea: ; 1050ea (41:50ea)
call Function105106
ld hl, s0_abe4
ld de, s0_abe2
ld de, sMysteryGiftItem
ld a, [hli]
ld [de], a
inc de

View File

@@ -147,7 +147,7 @@ UnknownScript_0x727ed:
closetext
writebyte PIKACHU
special Special_GameCornerPrizeMonCheckDex
givepoke PIKACHU, 25, 0, 0
givepoke PIKACHU, 25
takecoins 2222
jump UnknownScript_0x727d3
@@ -165,7 +165,7 @@ UnknownScript_0x7281b:
closetext
writebyte PORYGON
special Special_GameCornerPrizeMonCheckDex
givepoke PORYGON, 15, 0, 0
givepoke PORYGON, 15
takecoins 5555
jump UnknownScript_0x727d3
@@ -183,7 +183,7 @@ UnknownScript_0x72849:
closetext
writebyte LARVITAR
special Special_GameCornerPrizeMonCheckDex
givepoke LARVITAR, 40, 0, 0
givepoke LARVITAR, 40
takecoins 8888
jump UnknownScript_0x727d3

View File

@@ -211,7 +211,7 @@ ElderScript_0x18d1a5:
writetext UnknownText_0x18d697
playsound SFX_CAUGHT_MON
waitbutton
givepoke DRATINI, 15, 0, 0
givepoke DRATINI, 15
checkevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG
special SpecialDratini
setevent EVENT_GOT_DRATINI

View File

@@ -177,7 +177,7 @@ CyndaquilPokeBallScript:
playsound SFX_CAUGHT_MON
waitbutton
keeptextopen
givepoke CYNDAQUIL, 5, BERRY, 0
givepoke CYNDAQUIL, 5, BERRY
loadmovesprites
checkcode VAR_FACING
if_equal $3, ElmDirectionsScript
@@ -207,7 +207,7 @@ TotodilePokeBallScript:
playsound SFX_CAUGHT_MON
waitbutton
keeptextopen
givepoke TOTODILE, 5, BERRY, 0
givepoke TOTODILE, 5, BERRY
loadmovesprites
applymovement PLAYER, AfterTotodileMovement
jump ElmDirectionsScript
@@ -235,7 +235,7 @@ ChikoritaPokeBallScript:
playsound SFX_CAUGHT_MON
waitbutton
keeptextopen
givepoke CHIKORITA, 5, BERRY, 0
givepoke CHIKORITA, 5, BERRY
loadmovesprites
applymovement PLAYER, AfterChikoritaMovement
jump ElmDirectionsScript

View File

@@ -176,7 +176,7 @@ UnknownScript_0x56d26:
closetext
writebyte ABRA
special Special_GameCornerPrizeMonCheckDex
givepoke ABRA, 5, 0, 0
givepoke ABRA, 5
takecoins 100
jump UnknownScript_0x56d0c
@@ -194,7 +194,7 @@ UnknownScript_0x56d54:
closetext
writebyte CUBONE
special Special_GameCornerPrizeMonCheckDex
givepoke CUBONE, 15, 0, 0
givepoke CUBONE, 15
takecoins 800
jump UnknownScript_0x56d0c
@@ -212,7 +212,7 @@ UnknownScript_0x56d82:
closetext
writebyte WOBBUFFET
special Special_GameCornerPrizeMonCheckDex
givepoke WOBBUFFET, 15, 0, 0
givepoke WOBBUFFET, 15
takecoins 1500
jump UnknownScript_0x56d0c

View File

@@ -48,13 +48,13 @@ UnknownScript_0x7a519:
writetext UnknownText_0x7a742
yesorno
iffalse UnknownScript_0x7a52a
special Function90a54
special Special_InitialSetDSTFlag
yesorno
iffalse UnknownScript_0x7a519
jump UnknownScript_0x7a531
UnknownScript_0x7a52a:
special Function90a88
special Special_InitialClearDSTFlag
yesorno
iffalse UnknownScript_0x7a519
UnknownScript_0x7a531:

View File

@@ -30,7 +30,7 @@ UnknownScript_0x7e217:
writetext UnknownText_0x7e355
playsound SFX_CAUGHT_MON
waitbutton
givepoke TYROGUE, 10, 0, 0
givepoke TYROGUE, 10
setevent EVENT_GOT_TYROGUE_FROM_KIYO
UnknownScript_0x7e231:
writetext UnknownText_0x7e36a

File diff suppressed because it is too large Load Diff

136
sram.asm Normal file
View File

@@ -0,0 +1,136 @@
SECTION "Scratch", SRAM, BANK [0]
sScratch::
SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]
s0_a600:: ds $11a
s0_a71a:: ds $11a
s0_a834:: ds $1d7
s0_aa0b:: ds $1d7
sMysteryGiftItem:: ds 1
s0_abe3:: ds 1
s0_abe4:: ds 1
s0_abe5:: ds 1
s0_abe6:: ds 10
s0_abf0:: ds 10
s0_abfa:: ds 2
ds 1
sMysteryGiftTrainerHouseFlag:: ds 1
s0_abfe:: ds 12
sMysteryGiftTrainer:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 1
ds 1
s0_abe4End::
ds $30
s0_ac60:: ds 8
s0_ac68:: ds 1
s0_ac69:: ds 1
s0_ac6a:: ds 1
ds $b200 - $ac6b
sBackupOptions:: ds OptionsEnd - Options
s0_b208:: ds 1
sBackupGameData::
sBackupPlayerData:: ds wPlayerDataEnd - wPlayerData
sBackupMapData:: ds wMapDataEnd - wMapData
sBackupPokemonData:: ds wPokemonDataEnd - wPokemonData
sBackupGameDataEnd::
; bd83
ds $18a
; bf0d
sBackupChecksum:: ds 2
s0_bf0f:: ds 1
sStackTop:: ds 2
SECTION "SRAM Bank 1", SRAM, BANK [1]
sOptions:: ds OptionsEnd - Options
s1_a008:: ds 1
sGameData::
sPlayerData:: ds wPlayerDataEnd - wPlayerData
sMapData:: ds wMapDataEnd - wMapData
sPokemonData:: ds wPokemonDataEnd - wPokemonData
sGameDataEnd::
; ab83
ds $18a
; ad0d
sChecksum:: ds 2
s1_ad0f:: ds 1
; ad10
box sBox
; b160
ds $100
sLinkBattleStats:: ; b260
sLinkBattleWins:: ds 2
sLinkBattleLosses:: ds 2
sLinkBattleDraws:: ds 2
ds $5a
sLinkBattleStatsEnd::
sHallOfFame:: ; b2c0
ds HOF_LENGTH * NUM_HOF_TEAMS
sHallOfFameEnd::
s1_be3c:: ds 1
sCrystalData::
ds wCrystalDataEnd - wCrystalData
s1_be44:: ds 1
s1_be45:: ds 1
; data of the BattleTower must be in SRAM because you can save and leave between battles
sBattleTower:: ; be46
sNrOfBeatenBattleTowerTrainers::
sbe46:: ds 1
sbe47:: ds 1
; The 7 trainers of the BattleTower are saved here, so nobody appears more than once
sBTTrainers:: ; sbe48
ds 7
sbe4f:: ds 1
sbe50:: ds 1
; Pkmn of previous trainer
sBTPkmnOfTrainers:: ; 0xbe51
sBTPkmnPrevTrainer1::
ds 1
sBTPkmnPrevTrainer2:: ds 1
sBTPkmnPrevTrainer3:: ds 1
; Pkmn of preprevious trainer
sBTPkmnPrevPrevTrainer1:: ds 1
sBTPkmnPrevPrevTrainer2:: ds 1
sBTPkmnPrevPrevTrainer3:: ds 1
SECTION "Boxes 1-7", SRAM, BANK [2]
box sBox1
box sBox2
box sBox3
box sBox4
box sBox5
box sBox6
box sBox7
SECTION "Boxes 8-14", SRAM, BANK [3]
box sBox8
box sBox9
box sBox10
box sBox11
box sBox12
box sBox13
box sBox14

140
wram.asm
View File

@@ -129,8 +129,6 @@ channel_struct: MACRO
ds 1 ; c132
ENDM
SECTION "CHR0", VRAM [$8000], BANK [0]
VTiles0::
SECTION "CHR1", VRAM [$8800], BANK [0]
@@ -2726,140 +2724,4 @@ SECTION "WRAM 6", WRAMX, BANK [6]
w6_d000:: ds $600
w6_d600:: ds $600
SECTION "Scratch", SRAM, BANK [0]
sScratch::
SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]
s0_a600:: ds $11a
s0_a71a:: ds $11a
s0_a834:: ds $1d7
s0_aa0b:: ds $1d7
s0_abe2:: ds 1
s0_abe3:: ds 1
s0_abe4:: ds 1
s0_abe5:: ds 1
s0_abe6:: ds 10
s0_abf0:: ds 10
s0_abfa:: ds 2
ds 1
s0_abfd:: ds 1
s0_abfe:: ds 12
sMysteryGiftTrainer:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 1
ds 1
s0_abe4End::
ds $30
s0_ac60:: ds 8
s0_ac68:: ds 1
s0_ac69:: ds 1
s0_ac6a:: ds 1
ds $b200 - $ac6b
sBackupOptions:: ds OptionsEnd - Options
s0_b208:: ds 1
sBackupGameData::
sBackupPlayerData:: ds wPlayerDataEnd - wPlayerData
sBackupMapData:: ds wMapDataEnd - wMapData
sBackupPokemonData:: ds wPokemonDataEnd - wPokemonData
sBackupGameDataEnd::
; bd83
ds $18a
; bf0d
sBackupChecksum:: ds 2
s0_bf0f:: ds 1
sStackTop:: ds 2
SECTION "SRAM Bank 1", SRAM, BANK [1]
sOptions:: ds OptionsEnd - Options
s1_a008:: ds 1
sGameData::
sPlayerData:: ds wPlayerDataEnd - wPlayerData
sMapData:: ds wMapDataEnd - wMapData
sPokemonData:: ds wPokemonDataEnd - wPokemonData
sGameDataEnd::
; ab83
ds $18a
; ad0d
sChecksum:: ds 2
s1_ad0f:: ds 1
; ad10
box sBox
; b160
ds $100
sLinkBattleStats:: ; b260
sLinkBattleWins:: ds 2
sLinkBattleLosses:: ds 2
sLinkBattleDraws:: ds 2
ds $5a
sLinkBattleStatsEnd::
sHallOfFame:: ; b2c0
ds HOF_LENGTH * NUM_HOF_TEAMS
sHallOfFameEnd::
s1_be3c:: ds 1
sCrystalData::
ds wCrystalDataEnd - wCrystalData
s1_be44:: ds 1
s1_be45:: ds 1
; data of the BattleTower must be in SRAM because you can save and leave between battles
sBattleTower:: ; be46
sNrOfBeatenBattleTowerTrainers::
sbe46:: ds 1
sbe47:: ds 1
; The 7 trainers of the BattleTower are saved here, so nobody appears more than once
sBTTrainers:: ; sbe48
ds 7
sbe4f:: ds 1
sbe50:: ds 1
; Pkmn of previous trainer
sBTPkmnOfTrainers:: ; 0xbe51
sBTPkmnPrevTrainer1::
ds 1
sBTPkmnPrevTrainer2:: ds 1
sBTPkmnPrevTrainer3:: ds 1
; Pkmn of preprevious trainer
sBTPkmnPrevPrevTrainer1:: ds 1
sBTPkmnPrevPrevTrainer2:: ds 1
sBTPkmnPrevPrevTrainer3:: ds 1
SECTION "Boxes 1-7", SRAM, BANK [2]
box sBox1
box sBox2
box sBox3
box sBox4
box sBox5
box sBox6
box sBox7
SECTION "Boxes 8-14", SRAM, BANK [3]
box sBox8
box sBox9
box sBox10
box sBox11
box sBox12
box sBox13
box sBox14
INCLUDE "sram.asm"