summaryrefslogtreecommitdiff
path: root/home/pic.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/pic.asm')
-rw-r--r--home/pic.asm19
1 files changed, 8 insertions, 11 deletions
diff --git a/home/pic.asm b/home/pic.asm
index 15ee53ad..d0645a8c 100644
--- a/home/pic.asm
+++ b/home/pic.asm
@@ -5,16 +5,13 @@ UncompressSpriteData::
ld a, [H_LOADEDROMBANK]
push af
ld a, b
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
- ld a, $a
- ld [$0], a
- xor a
- ld [$4000], a
+ call BankswitchCommon
+ ld a,$0
+ call SwitchSRAMBankAndLatchClockData
call _UncompressSpriteData
+ call PrepareRTCDataAndDisableSRAM
pop af
- ld [H_LOADEDROMBANK], a
- ld [MBC1RomBank], a
+ call BankswitchCommon
ret
; initializes necessary data to load a sprite and runs UncompressSpriteDataLoop
@@ -531,15 +528,15 @@ ReverseNybble::
ld de, NybbleReverseTable
add e
ld e, a
- jr nc, .asm_283f
+ jr nc, .asm_2735
inc d
-.asm_283f
+.asm_2735
ld a, [de]
ret
; resets sprite buffer pointers to buffer 1 and 2, depending on wSpriteLoadFlags
ResetSpriteBufferPointers::
- ld a, [wSpriteLoadFlags]
+ ld a, [wSpriteLoadFlags] ; wd0a8
bit 0, a
jr nz, .buffer2Selected
ld de, sSpriteBuffer1