Update 'src/sprites.asm'

This commit is contained in:
villadelfia 2023-10-18 02:03:05 +00:00
parent 9b8f8c08c8
commit 6bddc381ec
1 changed files with 10 additions and 1 deletions

View File

@ -39,12 +39,21 @@ SECTION "OAM DMA Code", ROM0
OAMDMA:: OAMDMA::
LOAD "OAM DMA", HRAM LOAD "OAM DMA", HRAM
hOAMDMA:: hOAMDMA::
; Start OAM DMA transfer.
ld a, HIGH(wShadowOAM) ld a, HIGH(wShadowOAM)
ldh [rDMA], a ldh [rDMA], a
; Wait for it to complete...
ld a, 40 ld a, 40
: dec a : dec a
jr nz, :- jr nz, :-
ret
; Jump to the current state's vblank handler.
ld a, [wStateVBlankHandler]
ld l, a
ld a, [wStateVBlankHandler + 1]
ld h, a
jp hl
ENDL ENDL
OAMDMAEnd:: OAMDMAEnd::