summaryrefslogtreecommitdiff
path: root/src/code/z_elf_message.c
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2022-11-05 15:48:36 -0300
committerGitHub <noreply@github.com>2022-11-05 15:48:36 -0300
commitba4368d0e8ebaeabf57cd5ae0105afb4f4eee6f8 (patch)
treea19b3428181ab3a744aec94c74925b810867b833 /src/code/z_elf_message.c
parentbaaa79b979e446afa8ff16dca83b07a58b9dce6a (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_elf_message.c')
-rw-r--r--src/code/z_elf_message.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/code/z_elf_message.c b/src/code/z_elf_message.c
index a5a4890a7..830824024 100644
--- a/src/code/z_elf_message.c
+++ b/src/code/z_elf_message.c
@@ -21,20 +21,20 @@ u16 QuestHint_GetTatlTextId(PlayState* play) {
return 0;
}
- if (gSaveContext.save.weekEventReg[88] & 0x20) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_88_20)) {
return 0;
}
- if (gSaveContext.save.weekEventReg[79] & 0x10) {
- if (gSaveContext.save.weekEventReg[8] & 0x40) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_79_10)) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_08_40)) {
return 0;
}
return 0x224;
}
- if (!(gSaveContext.save.weekEventReg[8] & 0x80)) {
- if (gSaveContext.save.weekEventReg[9] & 1) {
+ if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_08_80)) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_09_01)) {
return 0x21E;
}
@@ -58,34 +58,34 @@ u16 QuestHint_GetTatlTextId(PlayState* play) {
}
if (INV_CONTENT(ITEM_MOON_TEAR) == ITEM_MOON_TEAR) {
- if (gSaveContext.save.weekEventReg[86] & 4) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_86_04)) {
return 0x242;
}
return 0x243;
}
- if (gSaveContext.save.weekEventReg[74] & 0x20) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_74_20)) {
return 0x223;
}
- if (gSaveContext.save.weekEventReg[73] & 0x80) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_73_80)) {
return 0x222;
}
- if (gSaveContext.save.weekEventReg[73] & 0x20) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_73_20)) {
return 0x221;
}
- if (gSaveContext.save.weekEventReg[77] & 2) {
- if (gSaveContext.save.weekEventReg[73] & 0x10) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_77_02)) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_73_10)) {
return 0x240;
}
return 0x241;
}
- if ((gSaveContext.save.weekEventReg[86] & 2) || (gSaveContext.save.weekEventReg[73] & 0x40)) {
+ if (CHECK_WEEKEVENTREG(WEEKEVENTREG_86_02) || CHECK_WEEKEVENTREG(WEEKEVENTREG_73_40)) {
return 0x23F;
}