mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
eb1e3636bb
Use explicit ldh instruction to access HRAM locations, don't rely on optimizing ld
20 lines
295 B
NASM
20 lines
295 B
NASM
DisableSpriteUpdates::
|
|
xor a
|
|
ldh [hMapAnims], a
|
|
ld a, [wVramState]
|
|
res 0, a
|
|
ld [wVramState], a
|
|
ld a, $0
|
|
ld [wSpriteUpdatesEnabled], a
|
|
ret
|
|
|
|
EnableSpriteUpdates::
|
|
ld a, $1
|
|
ld [wSpriteUpdatesEnabled], a
|
|
ld a, [wVramState]
|
|
set 0, a
|
|
ld [wVramState], a
|
|
ld a, $1
|
|
ldh [hMapAnims], a
|
|
ret
|