summaryrefslogtreecommitdiff
path: root/asm/macros/contest_ai_script.s
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-08-19 01:56:12 -0700
committerYamaArashi <shadow962@live.com>2016-08-19 01:56:12 -0700
commit0b36c3d3f2f4c295146b47b64487b7cf60d30619 (patch)
tree36afa9ef4d29e56faaf71457fede198ffb7c4460 /asm/macros/contest_ai_script.s
parent9662ef87325dcd6e7fa56796f422b98c33efa5b1 (diff)
jump and condition macros
Diffstat (limited to 'asm/macros/contest_ai_script.s')
-rwxr-xr-xasm/macros/contest_ai_script.s39
1 files changed, 31 insertions, 8 deletions
diff --git a/asm/macros/contest_ai_script.s b/asm/macros/contest_ai_script.s
index a35c3e7ba..cd3983be0 100755
--- a/asm/macros/contest_ai_script.s
+++ b/asm/macros/contest_ai_script.s
@@ -323,18 +323,41 @@
.4byte \addr
.endm
-@ 49
-@ 4A
-@ 4B
+@ condition of mon (indexed by order)
- .macro contest_4C param1 param2 addr
+ .macro get_condition mon
+ .byte 0x49
+ .byte \mon
+ .endm
+
+ .macro if_condition_less_than mon, value, addr
+ .byte 0x4A
+ .byte \mon
+ .byte \value
+ .4byte \addr
+ .endm
+
+ .macro if_condition_more_than mon, value, addr
+ .byte 0x4B
+ .byte \mon
+ .byte \value
+ .4byte \addr
+ .endm
+
+ .macro if_condition_eq mon, value, addr
.byte 0x4C
- .byte \param1
- .byte \param2
+ .byte \mon
+ .byte \value
+ .4byte \addr
+ .endm
+
+ .macro if_condition_not_eq mon, value, addr
+ .byte 0x4D
+ .byte \mon
+ .byte \value
.4byte \addr
.endm
-@ 4D
@ 4E
@ 4F
@ 50
@@ -415,7 +438,7 @@
@ 7E
- .macro contest_7F addr
+ .macro jump addr
.byte 0x7F
.4byte \addr
.endm