summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
Diffstat (limited to 'macros.asm')
-rw-r--r--macros.asm32
1 files changed, 32 insertions, 0 deletions
diff --git a/macros.asm b/macros.asm
index 0aa76291..27d7c374 100644
--- a/macros.asm
+++ b/macros.asm
@@ -11,6 +11,20 @@ page EQUS "db $49," ; Start a new Pokedex page.
dex EQUS "db $5f, $50" ; End a Pokedex entry.
+percent EQUS "* $ff / 100"
+
+
+; Constant enumeration is useful for monsters, items, moves, etc.
+const_def: MACRO
+const_value = 0
+ENDM
+
+const: MACRO
+\1 EQU const_value
+const_value = const_value + 1
+ENDM
+
+
homecall: MACRO
ld a, [H_LOADEDROMBANK]
push af
@@ -189,6 +203,24 @@ predef_jump: MACRO
ENDM
+add_tx_pre: MACRO
+\1_id:: dw \1
+ENDM
+
+tx_pre_id: MACRO
+ ld a, (\1_id - TextPredefs) / 2
+ENDM
+
+tx_pre: MACRO
+ tx_pre_id \1
+ call PrintPredefTextID
+ENDM
+
+tx_pre_jump: MACRO
+ tx_pre_id \1
+ jp PrintPredefTextID
+ENDM
+
;1_channel EQU $00
;2_channels EQU $40