mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-09-13 19:37:17 -05:00
Addresses of sections will now be added to the linkerscript via `org`, and the section name will be the path/to/file. If there is more than one section in the file, then add a @SectionName after the path/to/file to describe the section.
29 lines
474 B
NASM
29 lines
474 B
NASM
INCLUDE "constants.asm"
|
|
|
|
; if DEBUG
|
|
SECTION "home/clear_sprites.asm", ROM0
|
|
; else
|
|
; SECTION "Sprite clearing", ROM0[$32A0]
|
|
; endc
|
|
|
|
ClearSprites:: ; 32dc
|
|
ld hl, wVirtualOAM
|
|
ld b, wVirtualOAMEnd - wVirtualOAM
|
|
xor a
|
|
.loop
|
|
ld [hli], a
|
|
dec b
|
|
jr nz, .loop
|
|
ret
|
|
|
|
HideSprites:: ; 32e7
|
|
ld hl, wVirtualOAM
|
|
ld de, SPRITEOAMSTRUCT_LENGTH
|
|
ld b, NUM_SPRITE_OAM_STRUCTS
|
|
ld a, SPRITEOAMSTRUCT_LENGTH * NUM_SPRITE_OAM_STRUCTS
|
|
.loop
|
|
ld [hl], a
|
|
add hl, de
|
|
dec b
|
|
jr nz, .loop
|
|
ret |