summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2015-07-18 22:22:51 -0500
committerdannye <corrnondacqb@yahoo.com>2015-07-18 22:22:51 -0500
commit0e48333fb864b0c8b6914fe1b5e57929d5258080 (patch)
tree02a69d268fd1234b0a3da2745065130f7193118c /macros.asm
parent148d3f3cf28f9c270e3d5043af0692d95bc731c5 (diff)
Map object macro
closes https://github.com/iimarckus/pokered/issues/89
Diffstat (limited to 'macros.asm')
-rw-r--r--macros.asm38
1 files changed, 38 insertions, 0 deletions
diff --git a/macros.asm b/macros.asm
index 10317246..5fc6c348 100644
--- a/macros.asm
+++ b/macros.asm
@@ -232,6 +232,44 @@ tx_pre_jump: MACRO
jp PrintPredefTextID
ENDM
+WALK EQU $FE
+FACE EQU $FF
+
+DOWN EQU $D0
+UP EQU $D1
+RIGHT EQU $D2
+LEFT EQU $D3
+STAY EQU $FF
+
+;\1 sprite id
+;\2 x position
+;\3 y position
+;\4 movement (WALK/FACE)
+;\5 range or direction
+;\6 text id
+;\7 items only: item id
+;\7 trainers only: trainer class/pokemon id
+;\8 trainers only: trainer number/pokemon level
+object: MACRO
+ db \1
+ db \3 + 4
+ db \2 + 4
+ db \4
+ db \5
+ IF (_NARG > 7)
+ db TRAINER | \6
+ db \7
+ db \8
+ ELSE
+ IF (_NARG > 6)
+ db ITEM | \6
+ db \7
+ ELSE
+ db \6
+ ENDC
+ ENDC
+ENDM
+
;1_channel EQU $00
;2_channels EQU $40