ref: a0aadb33e7341dd69ba0c5c9da5d733f2e84a24a
parent: 70f9c27aac2ba368201a653050dfdd3976a14ac2
author: yenatch <yenatch@gmail.com>
date: Thu Aug 20 19:00:59 EDT 2015
More sScratch.
--- a/battle/anim_commands.asm
+++ b/battle/anim_commands.asm
@@ -1075,7 +1075,7 @@
and a
jr z, .player
- ld de, $a1a0
+ ld de, sScratch + $1a0
call CopyMinimizePic
ld hl, $9000
ld de, sScratch
@@ -1083,7 +1083,7 @@
ret
.player
- ld de, $a160
+ ld de, sScratch + $160
call CopyMinimizePic
ld hl, $9310
ld de, sScratch
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -2543,17 +2543,17 @@
; 41a2c
Function41a2c: ; 41a2c
- ld a, $0
+ ld a, BANK(sScratch)
call GetSRAMBank
ld hl, UnownFont
- ld de, $a188
+ ld de, sScratch + $188
ld bc, $270
ld a, BANK(UnownFont)
call FarCopyBytes
- ld hl, $a188
+ ld hl, sScratch + $188
ld bc, $1b0
call Function41504
- ld de, $a188
+ ld de, sScratch + $188
ld hl, $9400
lb bc, BANK(Function41a2c), $1b
call Request2bpp
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -314,9 +314,9 @@
; c2f6
Special_CheckMysteryGift: ; c2f6
- ld a, $0
+ ld a, BANK(s0_abe2)
call GetSRAMBank
- ld a, [$abe2]
+ ld a, [s0_abe2]
and a
jr z, .no
inc a
@@ -328,9 +328,9 @@
; c309
Special_GetMysteryGiftItem: ; c309
- ld a, $0
+ ld a, BANK(s0_abe2)
call GetSRAMBank
- ld a, [$abe2]
+ ld a, [s0_abe2]
ld [CurItem], a
ld a, $1
ld [wd10c], a
@@ -338,7 +338,7 @@
call ReceiveItem
jr nc, .asm_c33d
xor a
- ld [$abe2], a
+ ld [s0_abe2], a
call CloseSRAM
ld a, [CurItem]
ld [wd265], a
@@ -639,8 +639,8 @@
; c4b9
SpecialTrainerHouse: ; 0xc4b9
- ld a, 0
+ ld a, BANK(s0_abfd)
call GetSRAMBank
- ld a, [$abfd] ; XXX what is this memory location?
+ ld a, [s0_abfd]
ld [ScriptVar], a
jp CloseSRAM