diff options
Diffstat (limited to 'macros')
| -rw-r--r-- | macros/data.asm | 2 | ||||
| -rw-r--r-- | macros/scripts/events.asm | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/macros/data.asm b/macros/data.asm index eeb3a2fd..808e920b 100644 --- a/macros/data.asm +++ b/macros/data.asm @@ -15,7 +15,7 @@ ENDM ; used in data/pokemon/base_stats/*.asm MACRO tmhm -; initialize bytes to 0 + ; initialize bytes to 0 FOR n, (NUM_TM_HM + 7) / 8 DEF _tm{d:n} = 0 ENDR diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm index ea67cd0a..c5b494dd 100644 --- a/macros/scripts/events.asm +++ b/macros/scripts/events.asm @@ -442,9 +442,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. |
