Elf_Message OK (#457)

* Matched

* Rename function
This commit is contained in:
Derek Hensley
2021-12-06 11:42:17 -08:00
committed by GitHub
parent 56d76d6458
commit e177e99933
3 changed files with 62 additions and 3 deletions
+60 -1
View File
@@ -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;
}