pokecrystal-board/home/sprite_updates.asm
Rangi eb1e3636bb Use labels instead of constants for HRAM
Use explicit ldh instruction to access HRAM locations, don't rely on optimizing ld
2018-08-25 14:28:22 -04:00

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