File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -411,9 +411,13 @@ ENDM
411411; returns the complement of whether either event is set in Z flag
412412;\1 = event index 1
413413;\2 = event index 2
414+ ;\3 = try to reuse a (optional)
414415MACRO CheckEitherEventSet
415416 IF ((\ 1 ) / 8 ) == ((\ 2 ) / 8 )
416- ld a , [ wEventFlags + ((\ 1 ) / 8 ) ]
417+ IF (_NARG < 3 ) || (((\ 1 ) / 8 ) != event_byte)
418+ DEF event_byte = ((\ 1 ) / 8 )
419+ ld a , [ wEventFlags + ((\ 1 ) / 8 ) ]
420+ ENDC
417421 and ( 1 << ((\ 1 ) % 8 )) | ( 1 << ((\ 2 ) % 8 ))
418422 ELSE
419423 ; This case doesn't happen in the original ROM.
Original file line number Diff line number Diff line change @@ -184,8 +184,7 @@ MtMoonB2FSuperNerdText:
184184 text_asm
185185 CheckEvent EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
186186 jr z , .beat_super_nerd
187- ; CheckEitherEventSetReuseA EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL
188- and ( 1 << (EVENT_GOT_DOME_FOSSIL % 8 )) | ( 1 << (EVENT_GOT_HELIX_FOSSIL % 8 ))
187+ CheckEitherEventSet EVENT_GOT_DOME_FOSSIL , EVENT_GOT_HELIX_FOSSIL , 1
189188 jr nz , .got_a_fossil
190189 ld hl , MtMoonB2fSuperNerdEachTakeOneText
191190 call PrintText
You can’t perform that action at this time.
0 commit comments