diff options
author | yenatch <yenatch@gmail.com> | 2015-09-06 22:44:55 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2015-09-06 22:44:55 -0400 |
commit | cbc85b4d220b31c28266a227ff8789818631c4e9 (patch) | |
tree | 488abcf46354b628ff8545da113638e7dc01c831 | |
parent | 5facf8377aeda68cb3fca389cb1784cf9c2d406b (diff) | |
parent | dd9b1676898862f70c3352ed46a0f9097a50450c (diff) |
Merge pull request #117 from PikalaxALT/master
Rewrite SetEvents and ResetEvents for unlimited number of events
-rwxr-xr-x | constants/event_macros.asm | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/constants/event_macros.asm b/constants/event_macros.asm index cc7c03f5..90a6a59b 100755 --- a/constants/event_macros.asm +++ b/constants/event_macros.asm @@ -163,14 +163,13 @@ event_byte = ((\1) / 8) ;\1 = event index
;\2 = event index
-;\3 = event index (optional)
+;\3, \4, ... = additional (optional) event indices
SetEvents: MACRO
SetEvent \1
+ rept (_NARG + -1)
SetEventReuseHL \2
-
- IF _NARG > 2
- SetEventReuseHL \3
- ENDC
+ shift
+ endr
ENDM
;\1 = event index
@@ -214,11 +213,10 @@ event_byte = ((\1) / 8) ;\3 = event index (optional)
ResetEvents: MACRO
ResetEvent \1
+ rept (_NARG + -1)
ResetEventReuseHL \2
-
- IF _NARG > 2
- ResetEventReuseHL \3
- ENDC
+ shift
+ endr
ENDM
;\1 = event index
|