diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2021-12-06 11:42:17 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-06 14:42:17 -0500 |
| commit | e177e9993365ee0ed1a73186754f35d54c6e46a6 (patch) | |
| tree | 24cbf2e989835cd42d53a660b64c7bdd56f0d4a0 /src/code | |
| parent | 56d76d6458da240bc96ed6c4b0a82e6cf8b2ee25 (diff) | |
Elf_Message OK (#457)
* Matched
* Rename function
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_elf_message.c | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/src/code/z_elf_message.c b/src/code/z_elf_message.c index a674f4564..7308b33f4 100644 --- a/src/code/z_elf_message.c +++ b/src/code/z_elf_message.c @@ -1,3 +1,62 @@ #include "global.h" -#pragma GLOBAL_ASM("asm/non_matchings/code/z_elf_message/func_800F05C0.s") +u16 ElfMessage_GetFirstCycleHint(GlobalContext* globalCtx) { + if (INV_CONTENT(ITEM_OCARINA) == ITEM_OCARINA) { + return 0; + } + if (CURRENT_DAY <= 0) { + return 0; + } + if (gSaveContext.weekEventReg[88] & 0x20) { + return 0; + } + if (gSaveContext.weekEventReg[79] & 0x10) { + if (gSaveContext.weekEventReg[8] & 0x40) { + return 0; + } + return 0x224; + } + if (!(gSaveContext.weekEventReg[8] & 0x80)) { + if (gSaveContext.weekEventReg[9] & 1) { + return 0x21E; + } + if (globalCtx->sceneNum == SCENE_YOUSEI_IZUMI) { + return 0; + } + return 0x21D; + } + if (gSaveContext.magicAcquired != true) { + return 0x21F; + } + if (INV_CONTENT(ITEM_DEED_LAND) == ITEM_DEED_LAND) { + if (globalCtx->sceneNum != SCENE_OKUJOU) { + return 0x244; + } + return 0; + } + if (INV_CONTENT(ITEM_MOON_TEAR) == ITEM_MOON_TEAR) { + if (gSaveContext.weekEventReg[86] & 4) { + return 0x242; + } + return 0x243; + } + if (gSaveContext.weekEventReg[74] & 0x20) { + return 0x223; + } + if (gSaveContext.weekEventReg[73] & 0x80) { + return 0x222; + } + if (gSaveContext.weekEventReg[73] & 0x20) { + return 0x221; + } + if (gSaveContext.weekEventReg[77] & 2) { + if (gSaveContext.weekEventReg[73] & 0x10) { + return 0x240; + } + return 0x241; + } + if ((gSaveContext.weekEventReg[86] & 2) || (gSaveContext.weekEventReg[73] & 0x40)) { + return 0x23F; + } + return 0x220; +} |
