diff options
| author | Rangi42 <sylvie.oukaour+rangi42@gmail.com> | 2024-12-16 10:44:44 -0500 |
|---|---|---|
| committer | Rangi42 <sylvie.oukaour+rangi42@gmail.com> | 2024-12-16 10:44:44 -0500 |
| commit | f92ebdcfbd1e6e96618e13a21c9c0d3db01bc5d1 (patch) | |
| tree | ad8d8e28d916a7cd667802a13d9d619a5083cd5a /macros | |
| parent | Remove redundant parentheses (diff) | |
| download | pokeyellow-f92ebdcfbd1e6e96618e13a21c9c0d3db01bc5d1.tar.gz pokeyellow-f92ebdcfbd1e6e96618e13a21c9c0d3db01bc5d1.tar.xz pokeyellow-f92ebdcfbd1e6e96618e13a21c9c0d3db01bc5d1.zip | |
Let CheckEitherEventSet reuse A like CheckBothEventsSet
Diffstat (limited to 'macros')
| -rw-r--r-- | macros/scripts/events.asm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index fdbedb6f..b07a38f3 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -411,9 +411,13 @@ ENDM ; returns the complement of whether either event is set in Z flag ;\1 = event index 1 ;\2 = event index 2 +;\3 = try to reuse a (optional) MACRO CheckEitherEventSet IF ((\1) / 8) == ((\2) / 8) - ld a, [wEventFlags + ((\1) / 8)] + IF (_NARG < 3) || (((\1) / 8) != event_byte) + DEF event_byte = ((\1) / 8) + ld a, [wEventFlags + ((\1) / 8)] + ENDC and (1 << ((\1) % 8)) | (1 << ((\2) % 8)) ELSE ; This case doesn't happen in the original ROM. |
