summaryrefslogtreecommitdiff
path: root/src/macros/code.asm
diff options
context:
space:
mode:
authorElectroDeoxys <ElectroDeoxys@gmail.com>2021-02-16 15:57:28 +0000
committerElectroDeoxys <ElectroDeoxys@gmail.com>2021-02-16 16:07:19 +0000
commitd7c76675f7424803928526449bf51f0cc8d62cee (patch)
tree1da9468d6a751a3666b1c7f9bff256edbc2c0a16 /src/macros/code.asm
parent220422a25c5b7463ccf50e5ae44228dd3418de57 (diff)
parent95f2f3f87df689671384c251f3527b06d6a78f8a (diff)
Merge https://github.com/pret/poketcg
Diffstat (limited to 'src/macros/code.asm')
-rw-r--r--src/macros/code.asm34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/macros/code.asm b/src/macros/code.asm
index 8921a04..c71e9e6 100644
--- a/src/macros/code.asm
+++ b/src/macros/code.asm
@@ -26,39 +26,41 @@ else
endc
ENDM
-; runs SetEventFlagValue with the next value as the flag, c as the new value
-set_flag_value: MACRO
- call SetStackFlagValue
+; runs SetEventValue with the next byte as the event, c as the new value
+set_event_value: MACRO
+ call SetStackEventValue
db \1
ENDM
-; runs ZeroOutEventFlag with the next value as the flag
-zero_flag_value: MACRO
- call ZeroStackFlagValue
+; runs ZeroOutEventValue with the next byte as the event
+; functionally identical to set_event_zero but intended for single-bit events
+set_event_false: MACRO
+ call SetStackEventFalse
db \1
ENDM
-; a second version of the above with no real differences
-zero_flag_value2: MACRO
- call ZeroStackFlagValue2
+; runs ZeroOutEventValue with the next byte as the event
+; functionally identical to set_event_false but intended for multi-bit events
+set_event_zero: MACRO
+ call SetStackEventZero
db \1
ENDM
-; runs MaxOutEventFlag with the next value as the flag
-max_flag_value: MACRO
- call MaxStackFlagValue
+; runs MaxOutEventValue with the next byte as the event
+max_event_value: MACRO
+ call MaxStackEventValue
db \1
ENDM
-; runs GetEventFlagValue with the next value as the flag. returns value in a
-get_flag_value: MACRO
- call GetStackFlagValue
+; runs GetEventValue with the next byte as the event. returns value in a
+get_event_value: MACRO
+ call GetStackEventValue
db \1
ENDM
; the rst $38 handler is a single ret instruction
; probably used for testing purposes during development
-debug_ret EQUS "rst $38"
+debug_nop EQUS "rst $38"
; Returns to the pointer in bc instead of where the stack was.
retbc: MACRO