You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Add address labels used by Decompress.
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
FarDecompress:: ; b40
|
FarDecompress:: ; b40
|
||||||
; Decompress graphics data from a:hl to de.
|
; Decompress graphics data from a:hl to de.
|
||||||
|
|
||||||
ld [$c2c4], a
|
ld [wLZBank], a
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ld a, [$c2c4]
|
ld a, [wLZBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call Decompress
|
call Decompress
|
||||||
@@ -75,9 +75,9 @@ LZ_LONG_HI EQU %00000011
|
|||||||
; Save the output address
|
; Save the output address
|
||||||
; for rewrite commands.
|
; for rewrite commands.
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [$c2c2], a
|
ld [wLZAddress], a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [$c2c2 + 1], a
|
ld [wLZAddress + 1], a
|
||||||
|
|
||||||
.Main
|
.Main
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@@ -164,16 +164,16 @@ LZ_LONG_HI EQU %00000011
|
|||||||
; Write the same byte for bc bytes.
|
; Write the same byte for bc bytes.
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
|
||||||
.iterloop
|
.iloop
|
||||||
dec c
|
dec c
|
||||||
jr nz, .iternext
|
jr nz, .inext
|
||||||
dec b
|
dec b
|
||||||
jp z, .Main
|
jp z, .Main
|
||||||
|
|
||||||
.iternext
|
.inext
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
jr .iterloop
|
jr .iloop
|
||||||
|
|
||||||
|
|
||||||
.Alt
|
.Alt
|
||||||
@@ -249,10 +249,10 @@ LZ_LONG_HI EQU %00000011
|
|||||||
ld l, [hl]
|
ld l, [hl]
|
||||||
ld h, a
|
ld h, a
|
||||||
; add to starting output address
|
; add to starting output address
|
||||||
ld a, [$c2c2]
|
ld a, [wLZAddress]
|
||||||
add l
|
add l
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [$c2c3]
|
ld a, [wLZAddress + 1]
|
||||||
adc h
|
adc h
|
||||||
ld h, a
|
ld h, a
|
||||||
|
|
||||||
@@ -272,6 +272,7 @@ LZ_LONG_HI EQU %00000011
|
|||||||
; However, lengths longer than 768
|
; However, lengths longer than 768
|
||||||
; would be interpreted as LZ_END.
|
; would be interpreted as LZ_END.
|
||||||
|
|
||||||
|
; More practically, LZ_LONG is not recursive.
|
||||||
; For now, it defaults to LZ_REPEAT.
|
; For now, it defaults to LZ_REPEAT.
|
||||||
|
|
||||||
|
|
||||||
@@ -306,8 +307,10 @@ LZ_LONG_HI EQU %00000011
|
|||||||
rl b
|
rl b
|
||||||
dec c
|
dec c
|
||||||
jr nz, .floop
|
jr nz, .floop
|
||||||
|
|
||||||
ld a, b
|
ld a, b
|
||||||
pop bc
|
pop bc
|
||||||
|
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
jr .Flip
|
jr .Flip
|
||||||
|
12
wram.asm
12
wram.asm
@@ -250,7 +250,13 @@ CurSFX:: ; c2bf
|
|||||||
wMapMusic:: ; c2c0
|
wMapMusic:: ; c2c0
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
SECTION "auto",WRAM0[$c2c7]
|
ds 1
|
||||||
|
|
||||||
|
wLZAddress:: dw ; c2c2
|
||||||
|
wLZBank:: db ; c2c4
|
||||||
|
|
||||||
|
ds 2
|
||||||
|
|
||||||
InputType:: ; c2c7
|
InputType:: ; c2c7
|
||||||
ds 1
|
ds 1
|
||||||
AutoInputAddress:: ; c2c8
|
AutoInputAddress:: ; c2c8
|
||||||
@@ -260,14 +266,14 @@ AutoInputBank:: ; c2ca
|
|||||||
AutoInputLength:: ; c2cb
|
AutoInputLength:: ; c2cb
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
SECTION "linkbattle",WRAM0[$c2dc]
|
ds 16
|
||||||
|
|
||||||
InLinkBattle:: ; c2dc
|
InLinkBattle:: ; c2dc
|
||||||
; 0 not in link battle
|
; 0 not in link battle
|
||||||
; 1 link battle
|
; 1 link battle
|
||||||
; 4 mobile battle
|
; 4 mobile battle
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
SECTION "scriptengine",WRAM0[$c2dd]
|
|
||||||
ScriptVar:: ; c2dd
|
ScriptVar:: ; c2dd
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user