make nintendo logo fly off like a rocket
This commit is contained in:
26
Code/utils.inc
Normal file
26
Code/utils.inc
Normal file
@@ -0,0 +1,26 @@
|
||||
INCLUDE "hardware.inc"
|
||||
|
||||
; destroys A
|
||||
ClearAndEnableInterrupts: MACRO
|
||||
xor a
|
||||
ei ; will take effect AFTER next instruction
|
||||
ldh a, [rIF]
|
||||
ENDM
|
||||
|
||||
; \1: sprite ID
|
||||
; \2: X position
|
||||
; \3: Y position
|
||||
; \4: tile number
|
||||
; \5: flags
|
||||
; destroys A and HL
|
||||
SetSprite: MACRO
|
||||
ld hl, _OAMRAM + \1 * 4
|
||||
ld a, \3
|
||||
ld [hl+], a
|
||||
ld a, \2
|
||||
ld [hl+], a
|
||||
ld a, \4
|
||||
ld [hl+], a
|
||||
ld a, \5
|
||||
ld [hl+], a
|
||||
ENDM
|
||||
Reference in New Issue
Block a user