2018-06-24 07:09:41 -07:00
|
|
|
ClearSprites::
|
2018-04-04 21:35:14 -07:00
|
|
|
; Erase OAM data
|
2022-07-09 14:18:22 -07:00
|
|
|
ld hl, wShadowOAM
|
|
|
|
ld b, wShadowOAMEnd - wShadowOAM
|
2018-04-04 21:35:14 -07:00
|
|
|
xor a
|
|
|
|
.loop
|
|
|
|
ld [hli], a
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
HideSprites::
|
2018-04-04 21:35:14 -07:00
|
|
|
; Set all OAM y-positions to 160 to hide them offscreen
|
2022-07-09 14:18:22 -07:00
|
|
|
ld hl, wShadowOAMSprite00YCoord
|
2018-04-04 21:35:14 -07:00
|
|
|
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
|