diff options
Diffstat (limited to 'home/clear_sprites.asm')
-rw-r--r-- | home/clear_sprites.asm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/home/clear_sprites.asm b/home/clear_sprites.asm new file mode 100644 index 000000000..8d64c6b10 --- /dev/null +++ b/home/clear_sprites.asm @@ -0,0 +1,25 @@ +ClearSprites:: ; 300b +; Erase OAM data + ld hl, wVirtualOAM + ld b, wVirtualOAMEnd - wVirtualOAM + xor a +.loop + ld [hli], a + dec b + jr nz, .loop + ret +; 3016 + +HideSprites:: ; 3016 +; 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 +; 3026 |