improve goto_if macros

This commit is contained in:
Melody
2018-12-21 20:28:24 -05:00
parent 87fd6b8dc2
commit ac2e4adf2d
273 changed files with 2555 additions and 3036 deletions

View File

@@ -1557,17 +1557,47 @@
@ Supplementary
.macro goto_eq dest:req
.macro goto_if_unset flag, dest
checkflag \flag
goto_if 0, \dest
.endm
.macro goto_if_set flag, dest
checkflag \flag
goto_if 1, \dest
.endm
.macro goto_if_lt dest @ LESS THAN
goto_if 0, \dest
.endm
.macro goto_if_eq dest @ EQUAL
goto_if 1, \dest
.endm
.macro goto_if_gt dest @ GREATER THAN
goto_if 2, \dest
.endm
.macro goto_if_le dest @ LESS THAN OR EQUAL
goto_if 3, \dest
.endm
.macro goto_if_ge dest @ GREATER THAN OR EQUAL
goto_if 4, \dest
.endm
.macro goto_if_ne dest @ NOT EQUAL
goto_if 5, \dest
.endm
.macro switch var:req
copyvar 0x8000, \var
.endm
.macro case condition:req, dest:req
compare 0x8000, \condition
goto_eq \dest
goto_if_eq \dest
.endm
@ Message box types