make nintendo logo fly off like a rocket

This commit is contained in:
2019-01-04 16:50:29 +01:00
parent b2cdcc65fe
commit 99922c35f7
5 changed files with 125 additions and 30 deletions

26
Code/utils.inc Normal file
View 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