aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
authorRangi42 <sylvie.oukaour+rangi42@gmail.com>2024-12-25 16:46:37 -0500
committerRangi42 <sylvie.oukaour+rangi42@gmail.com>2024-12-25 16:53:04 -0500
commit47b784a4fbc7513ea6106877fbb7a54158e1b13b (patch)
tree301a856e76abb5dcb7bcc3986ddb4bbe4f70e88e /macros
parentFix comments around battle evolution code (#120) (diff)
parentUse `SERIAL_RNS_LENGTH` in `BattleRandom` (diff)
downloadpokeyellow-47b784a4fbc7513ea6106877fbb7a54158e1b13b.tar.gz
pokeyellow-47b784a4fbc7513ea6106877fbb7a54158e1b13b.tar.xz
pokeyellow-47b784a4fbc7513ea6106877fbb7a54158e1b13b.zip
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'macros')
-rw-r--r--macros/data.asm2
-rw-r--r--macros/scripts/events.asm6
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.