summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
authorU-Daniel-PC\Daniel <corrnondacqb@yahoo.com>2014-09-19 23:19:05 -0400
committerU-Daniel-PC\Daniel <corrnondacqb@yahoo.com>2014-09-19 23:19:05 -0400
commitdac95cb42bb8bc953c7a1e1d345a549846d51abf (patch)
treeb996727e4f739da761fc1fa2418c65415ebf93d8 /macros.asm
parent57113a7651ba8a7f88e119ca3de7acb45a77db69 (diff)
parent1185d69819af3493fe8ace9f576fee4b420db55e (diff)
Merge branch 'master' of https://github.com/iimarckus/pokered
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 8244c8c9..f219d25c 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