Use `VRAM_End` in place of `sScratch`

This commit is contained in:
Rangi 2022-01-20 20:16:22 -05:00
parent 597701f168
commit 20dc31115e
2 changed files with 9 additions and 9 deletions

View File

@ -127,17 +127,17 @@ endr
ret ret
DebugColor_InitVRAM: DebugColor_InitVRAM:
ld a, BANK(vTiles3) ld a, $1
ldh [rVBK], a ldh [rVBK], a
ld hl, vTiles3 ld hl, VRAM_Begin
ld bc, sScratch - vTiles3 ld bc, VRAM_End - VRAM_Begin
xor a xor a
call ByteFill call ByteFill
ld a, BANK(vTiles0) ld a, $0
ldh [rVBK], a ldh [rVBK], a
ld hl, vTiles0 ld hl, VRAM_Begin
ld bc, sScratch - vTiles0 ld bc, VRAM_End - VRAM_Begin
xor a xor a
call ByteFill call ByteFill

View File

@ -168,7 +168,7 @@ RunTradeAnimScript:
ld a, $1 ld a, $1
ldh [rVBK], a ldh [rVBK], a
ld hl, vTiles0 ld hl, vTiles0
ld bc, sScratch - vTiles0 ld bc, VRAM_End - VRAM_Begin
xor a xor a
call ByteFill call ByteFill
ld a, $0 ld a, $0
@ -176,7 +176,7 @@ RunTradeAnimScript:
.NotCGB: .NotCGB:
hlbgcoord 0, 0 hlbgcoord 0, 0
ld bc, sScratch - vBGMap0 ld bc, VRAM_End - vBGMap0
ld a, " " ld a, " "
call ByteFill call ByteFill
ld hl, TradeGameBoyLZ ld hl, TradeGameBoyLZ
@ -470,7 +470,7 @@ TradeAnim_TubeToPlayer8:
call DisableLCD call DisableLCD
callfar ClearSpriteAnims callfar ClearSpriteAnims
hlbgcoord 0, 0 hlbgcoord 0, 0
ld bc, sScratch - vBGMap0 ld bc, VRAM_End - vBGMap0
ld a, " " ld a, " "
call ByteFill call ByteFill
xor a xor a