1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-06 07:56:32 +00:00

Match and improve some non matchings (#254)

This commit is contained in:
Roman971 2020-07-15 17:23:57 +02:00 committed by GitHub
parent 4e1fc875c3
commit 106f7a3f6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 51 additions and 451 deletions

View file

@ -2018,10 +2018,10 @@ void Cutscene_HandleEntranceTriggers(GlobalContext* globalCtx) {
}
}
#ifdef NON_MATCHING
// regalloc differences
void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) {
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", gSaveContext.respawnFlag);
s32 temp; // inline temp needed to match regalloc
osSyncPrintf("\ngame_info.mode=[%d] restart_flag", temp = gSaveContext.respawnFlag);
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(0xAC)) {
@ -2040,21 +2040,18 @@ void Cutscene_HandleConditionalTriggers(GlobalContext* globalCtx) {
gSaveContext.cutsceneIndex = 0xFFF0;
} else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
LINK_IS_ADULT && !Flags_GetEventChkInf(0xC4) &&
(gEntranceTable[gSaveContext.entranceIndex].scene == SCENE_TOKINOMA)) {
(gEntranceTable[temp = gSaveContext.entranceIndex].scene == SCENE_TOKINOMA)) {
Flags_SetEventChkInf(0xC4);
gSaveContext.entranceIndex = 0x0053;
gSaveContext.cutsceneIndex = 0xFFF8;
} else if (!Flags_GetEventChkInf(0xC7) &&
(gEntranceTable[gSaveContext.entranceIndex].scene == SCENE_GANON_DEMO)) {
(gEntranceTable[temp = gSaveContext.entranceIndex].scene == SCENE_GANON_DEMO)) {
Flags_SetEventChkInf(0xC7);
gSaveContext.entranceIndex = 0x0517;
gSaveContext.cutsceneIndex = 0xFFF0;
}
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/code/z_demo/Cutscene_HandleConditionalTriggers.s")
#endif
void Cutscene_SetSegment(GlobalContext* globalCtx, u32 segment) {
if (SEGMENT_NUMBER(segment) != 0) {