summaryrefslogtreecommitdiff
path: root/home/pics.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/pics.asm')
-rw-r--r--home/pics.asm16
1 files changed, 7 insertions, 9 deletions
diff --git a/home/pics.asm b/home/pics.asm
index ef668620..8fd9a26a 100644
--- a/home/pics.asm
+++ b/home/pics.asm
@@ -18,10 +18,6 @@ UncompressMonSprite::
; $99 ≤ index, bank $D
ld a, [wcf91] ; XXX name for this ram location
ld b, a
- cp MEW
- ld a, BANK(MewPicFront)
- jr z, .GotBank
- ld a, b
cp FOSSIL_KABUTOPS
ld a, BANK(FossilKabutopsPic)
jr z, .GotBank
@@ -92,8 +88,8 @@ LoadUncompressedSpriteData::
add a
add a ; 8*(7*((8-w)/2) + 7-h) ; combined overall offset (in bytes)
ldh [hSpriteOffset], a
- xor a
- ld [MBC1SRamBank], a
+ ld a, $0
+ call SwitchSRAMBankAndLatchClockData
ld hl, sSpriteBuffer0
call ZeroSpriteBuffer ; zero buffer 0
ld de, sSpriteBuffer1
@@ -104,6 +100,7 @@ LoadUncompressedSpriteData::
ld de, sSpriteBuffer2
ld hl, sSpriteBuffer1
call AlignSpriteDataCentered ; copy and align buffer 2 to 1 (containing the LSB of the 2bpp sprite)
+ call PrepareRTCDataAndDisableSRAM
pop de
jp InterlaceMergeSpriteBuffers
@@ -150,8 +147,8 @@ ZeroSpriteBuffer::
; in the resulting sprite, the rows of the two source sprites are interlaced
; de: output address
InterlaceMergeSpriteBuffers::
- xor a
- ld [MBC1SRamBank], a
+ ld a, $0
+ call SwitchSRAMBankAndLatchClockData
push de
ld hl, sSpriteBuffer2 + (SPRITEBUFFERSIZE - 1) ; destination: end of buffer 2
ld de, sSpriteBuffer1 + (SPRITEBUFFERSIZE - 1) ; source 2: end of buffer 1
@@ -193,4 +190,5 @@ InterlaceMergeSpriteBuffers::
ld c, (2*SPRITEBUFFERSIZE)/16 ; $31, number of 16 byte chunks to be copied
ldh a, [hLoadedROMBank]
ld b, a
- jp CopyVideoData
+ call CopyVideoData
+ jp PrepareRTCDataAndDisableSRAM