diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2022-11-05 15:48:36 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-05 15:48:36 -0300 |
| commit | ba4368d0e8ebaeabf57cd5ae0105afb4f4eee6f8 (patch) | |
| tree | a19b3428181ab3a744aec94c74925b810867b833 /src/code/z_message.c | |
| parent | baaa79b979e446afa8ff16dca83b07a58b9dce6a (diff) | |
Macros for `weekEventReg` and `eventInf` (#984)
* make macros
* script
* Use the script on the whole codebase
* fix script
* Rename GET to CHECk
* More replacements
* Update weekeventflags on schedule scripts
* eventinf defines
* eventinfconvert
* run the scripts on the codebase
* format
* RACE_FLAGS
* format
* remove redundant parenthesis
* format
* add macros to permuter_settings
* comments on WEEKEVENTREG_
* format
* CHECK_WEEKEVENTREG_ALT
* don't automatically generate the macros on the script to allow naming them
* format D_801C66D0 a bit
* add TODOs
* Update src/overlays/actors/ovl_Boss_03/z_boss_03.c
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* Update src/overlays/actors/ovl_En_Baisen/z_en_baisen.c
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* Update src/overlays/actors/ovl_Boss_06/z_boss_06.c
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* Update src/overlays/actors/ovl_Elf_Msg6/z_elf_msg6.c
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* Update src/overlays/actors/ovl_En_Raf/z_en_raf.c
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* review
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* new files
* format
* weekeventreg
* review
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
* review
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
* update
* format
* review
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
* flags
* a
* eventinf stuff
* format
* EnGakufu
* flags
* run the script
* format
* whoops
* cleanup
* fix
* update weekeventregs
* format
* format
* review
* format
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
Diffstat (limited to 'src/code/z_message.c')
| -rw-r--r-- | src/code/z_message.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/code/z_message.c b/src/code/z_message.c index 5b3598617..44fff9f9f 100644 --- a/src/code/z_message.c +++ b/src/code/z_message.c @@ -370,12 +370,12 @@ void func_80151BB4(PlayState* play, u8 arg1) { u8 temp = arg1; if (CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) { - if ((gSaveContext.save.weekEventReg[D_801C6B28[arg1] >> 8] & (u8)D_801C6B28[arg1]) == 0) { + if (!CHECK_WEEKEVENTREG(D_801C6B28[arg1])) { msgCtx->unk120B2[msgCtx->unk120B1] = temp; msgCtx->unk120B1++; } } else if (arg1 >= 20) { - if ((gSaveContext.save.weekEventReg[D_801C6B28[arg1] >> 8] & (u8)D_801C6B28[arg1]) == 0) { + if (!CHECK_WEEKEVENTREG(D_801C6B28[arg1])) { msgCtx->unk120B2[msgCtx->unk120B1] = temp; msgCtx->unk120B1++; } @@ -391,11 +391,8 @@ u32 func_80151C9C(PlayState* play) { } msgCtx->unk120B1--; - if ((gSaveContext.save.weekEventReg[D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]] >> 8] & - (u8)D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]]) == 0) { - gSaveContext.save.weekEventReg[D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]] >> 8] = - ((void)0, gSaveContext.save.weekEventReg[D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]] >> 8]) | - (u8)D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]]; + if (!CHECK_WEEKEVENTREG(D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]])) { + SET_WEEKEVENTREG(D_801C6B28[msgCtx->unk120B2[msgCtx->unk120B1]]); if ((D_801C6AB8[msgCtx->unk120B2[msgCtx->unk120B1]] != 0) && CHECK_QUEST_ITEM(QUEST_BOMBERS_NOTEBOOK)) { func_80151938(play, D_801C6AB8[msgCtx->unk120B2[msgCtx->unk120B1]]); |
