2018-06-24 14:09:41 +00:00
|
|
|
ClearSprites::
|
2018-04-05 04:35:14 +00:00
|
|
|
; Erase OAM data
|
|
|
|
ld hl, wVirtualOAM
|
|
|
|
ld b, wVirtualOAMEnd - wVirtualOAM
|
|
|
|
xor a
|
|
|
|
.loop
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
HideSprites::
|
2018-04-05 04:35:14 +00:00
|
|
|
; Set all OAM y-positions to 160 to hide them offscreen
|
|
|
|
ld hl, wVirtualOAMSprite00YCoord
|
|
|
|
ld de, SPRITEOAMSTRUCT_LENGTH
|
|
|
|
ld b, NUM_SPRITE_OAM_STRUCTS
|
|
|
|
ld a, SCREEN_WIDTH_PX
|
|
|
|
.loop
|
|
|
|
ld [hl], a ; y
|
|
|
|
add hl, de
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|