Avoid using EQUS
when EQU
or MACRO
will do (#1166)
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
; Coordinate macros
|
||||
|
||||
DEF hlcoord EQUS "coord hl,"
|
||||
DEF bccoord EQUS "coord bc,"
|
||||
DEF decoord EQUS "coord de,"
|
||||
MACRO hlcoord
|
||||
coord hl, \#
|
||||
ENDM
|
||||
|
||||
MACRO bccoord
|
||||
coord bc, \#
|
||||
ENDM
|
||||
|
||||
MACRO decoord
|
||||
coord de, \#
|
||||
ENDM
|
||||
|
||||
MACRO coord
|
||||
; register, x, y[, origin]
|
||||
@@ -13,9 +21,17 @@ MACRO coord
|
||||
endc
|
||||
ENDM
|
||||
|
||||
DEF hlbgcoord EQUS "bgcoord hl,"
|
||||
DEF bcbgcoord EQUS "bgcoord bc,"
|
||||
DEF debgcoord EQUS "bgcoord de,"
|
||||
MACRO hlbgcoord
|
||||
bgcoord hl, \#
|
||||
ENDM
|
||||
|
||||
MACRO bcbgcoord
|
||||
bgcoord bc, \#
|
||||
ENDM
|
||||
|
||||
MACRO debgcoord
|
||||
bgcoord de, \#
|
||||
ENDM
|
||||
|
||||
MACRO bgcoord
|
||||
; register, x, y[, origin]
|
||||
|
@@ -42,6 +42,18 @@ MACRO dbpixel
|
||||
endc
|
||||
ENDM
|
||||
|
||||
MACRO hlpixel
|
||||
ldpixel hl, \#
|
||||
ENDM
|
||||
|
||||
MACRO bcpixel
|
||||
ldpixel bc, \#
|
||||
ENDM
|
||||
|
||||
MACRO depixel
|
||||
ldpixel de, \#
|
||||
ENDM
|
||||
|
||||
MACRO ldpixel
|
||||
if _NARG >= 5
|
||||
; register, x tile, y tile, x pixel, y pixel
|
||||
@@ -52,9 +64,6 @@ MACRO ldpixel
|
||||
endc
|
||||
ENDM
|
||||
|
||||
DEF depixel EQUS "ldpixel de,"
|
||||
DEF bcpixel EQUS "ldpixel bc,"
|
||||
|
||||
MACRO dbsprite
|
||||
; x tile, y tile, x pixel, y pixel, vtile offset, attributes
|
||||
db (\2 * TILE_WIDTH) % $100 + \4, (\1 * TILE_WIDTH) % $100 + \3, \5, \6
|
||||
|
@@ -5,7 +5,9 @@ MACRO map_id
|
||||
db GROUP_\1, MAP_\1
|
||||
ENDM
|
||||
|
||||
DEF object_const_def EQUS "const_def 2"
|
||||
MACRO object_const_def
|
||||
const_def 2
|
||||
ENDM
|
||||
|
||||
MACRO def_scene_scripts
|
||||
REDEF _NUM_SCENE_SCRIPTS EQUS "_NUM_SCENE_SCRIPTS_\@"
|
||||
|
@@ -1,11 +1,34 @@
|
||||
DEF text EQUS "db TX_START," ; Start writing text.
|
||||
DEF next EQUS "db \"<NEXT>\"," ; Move a line down.
|
||||
DEF line EQUS "db \"<LINE>\"," ; Start writing at the bottom line.
|
||||
DEF page EQUS "db \"@\"," ; Start a new Pokédex page.
|
||||
DEF para EQUS "db \"<PARA>\"," ; Start a new paragraph.
|
||||
DEF cont EQUS "db \"<CONT>\"," ; Scroll to the next line.
|
||||
DEF done EQUS "db \"<DONE>\"" ; End a text box.
|
||||
DEF prompt EQUS "db \"<PROMPT>\"" ; Prompt the player to end a text box (initiating some other event).
|
||||
MACRO text
|
||||
db TX_START, \# ; Start writing text
|
||||
ENDM
|
||||
|
||||
MACRO next
|
||||
db "<NEXT>", \# ; Move a line down
|
||||
ENDM
|
||||
|
||||
MACRO line
|
||||
db "<LINE>", \# ; Start writing at the bottom line
|
||||
ENDM
|
||||
|
||||
MACRO page
|
||||
db "@", \# ; Start a new Pokédex page
|
||||
ENDM
|
||||
|
||||
MACRO para
|
||||
db "<PARA>", \# ; Start a new paragraph
|
||||
ENDM
|
||||
|
||||
MACRO cont
|
||||
db "<CONT>", \# ; Scroll to the next line
|
||||
ENDM
|
||||
|
||||
MACRO done
|
||||
db "<DONE>" ; End a text box
|
||||
ENDM
|
||||
|
||||
MACRO prompt
|
||||
db "<PROMPT>" ; Prompt the player to end a text box (initiating some other event)
|
||||
ENDM
|
||||
|
||||
; TextCommands indexes (see home/text.asm)
|
||||
const_def
|
||||
|
Reference in New Issue
Block a user