diff options
| author | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-28 17:43:51 -0400 |
|---|---|---|
| committer | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-28 17:43:51 -0400 |
| commit | c93574436f30106fd2211abea452fe3a96948211 (patch) | |
| tree | 3147c82a48ccd933576cdc485e54d7e13677df85 /constants/event_macros.asm | |
| parent | Viridian pokecenter (diff) | |
| download | pokeyellow-c93574436f30106fd2211abea452fe3a96948211.tar.gz pokeyellow-c93574436f30106fd2211abea452fe3a96948211.tar.xz pokeyellow-c93574436f30106fd2211abea452fe3a96948211.zip | |
Viridian Mart
Diffstat (limited to 'constants/event_macros.asm')
| -rw-r--r-- | constants/event_macros.asm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/constants/event_macros.asm b/constants/event_macros.asm index 9f24ace7..5eb73147 100644 --- a/constants/event_macros.asm +++ b/constants/event_macros.asm @@ -125,6 +125,27 @@ CheckAndResetEventA: MACRO ld [wEventFlags + ((\1) / 8)], a ENDM +CheckAndSetEventReuseHL: MACRO + IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + bit (\1) % 8, [hl] + set (\1) % 8, [hl] + ENDM + +CheckAndResetEventReuseHL: MACRO + IF event_byte != ((\1) / 8) +event_byte = ((\1) / 8) + ld hl, wEventFlags + event_byte + ENDC + + bit (\1) % 8, [hl] + res (\1) % 8, [hl] + ENDM + + ;\1 = event index SetEvent: MACRO event_byte = ((\1) / 8) |
