About time I got to these functions

This commit is contained in:
PikalaxALT
2015-10-24 10:34:19 -04:00
parent 97cc513f54
commit 119d6b4119
409 changed files with 5218 additions and 4233 deletions

View File

@@ -14,6 +14,7 @@ INCLUDE "macros/predef.asm"
INCLUDE "macros/rst.asm"
INCLUDE "macros/mobile.asm"
INCLUDE "macros/trainer.asm"
INCLUDE "macros/map_setup.asm"
@@ -90,12 +91,16 @@ lb: MACRO ; r, hi, lo
ld \1, (\2) << 8 + (\3)
ENDM
ln: MACRO ; r, hi, lo
ld \1, (\2) << 4 + (\3)
ENDM
bccoord equs "coord bc,"
decoord equs "coord de,"
hlcoord equs "coord hl,"
coord: MACRO
; register, x, y[, origin]
if _NARG < 4
ld \1, TileMap + SCREEN_WIDTH * (\3) + (\2)
else
@@ -165,16 +170,4 @@ bcd: MACRO
endr
ENDM
ln: MACRO
if _NARG == 5
lb \1, \2 << 4 + \3, \4 << 4 + \5
else
if _NARG == 3
ld \1, \2 << 4 + \3
else
fail "incorrect number of arguments for ln"
endc
endc
ENDM
tile EQUS "+ $10 *"