Fix a few issues related to tricks (#426)

* Fix missing DList

* Add variable save delay.
This commit is contained in:
louist103
2024-05-22 09:05:05 -05:00
committed by Garrett Cox
parent d68545ccdf
commit e3a257c734
3 changed files with 10 additions and 5 deletions
+4 -1
View File
@@ -381,7 +381,10 @@ void DrawEnhancementsMenu() {
UIWidgets::CVarCheckbox("Do not reset Rupees", "gEnhancements.Cycle.DoNotResetRupees", {
.tooltip = "Playing the Song Of Time will not reset the your rupees."
});
UIWidgets::CVarSliderInt("Save Delay", "gEnhancements.Save.SaveDelay", 0, 5, 0, {
.tooltip = "Sets the delay between pressing save and the save being marked as complete. Original game was 2."
});
ImGui::EndMenu();
}
+4 -2
View File
@@ -1082,7 +1082,8 @@ Gfx* sPlayerFirstPersonRightShoulderDLs[PLAYER_FORM_MAX] = {
Gfx* sPlayerFirstPersonRightHandDLs[PLAYER_FORM_MAX] = {
gLinkFierceDeityRightHandDL,
//! @bug This is in the middle of a texture in the link_goron object. It has the same offset as a link_nuts dlist
(Gfx*)0x060038C0,
// 2S2H [Port] Put the DList that makes the most sense here. In reality nothing makes sense since goron has no first person items, but we need something here to prevent a crash.
gLinkGoronRightHandOpenDL,
gLinkZoraRightHandOpenDL,
gLinkDekuRightHandDL,
object_link_child_DL_018490,
@@ -1091,7 +1092,8 @@ Gfx* sPlayerFirstPersonRightHandDLs[PLAYER_FORM_MAX] = {
Gfx* sPlayerFirstPersonRightHandHookshotDLs[PLAYER_FORM_MAX] = {
gLinkFierceDeityRightHandDL,
//! @bug This is in the middle of a texture in the link_goron object. It has the same offset as a link_nuts dlist
(Gfx*)0x060038C0,
// 2S2H [Port] Put the DList that makes the most sense here. In reality nothing makes sense since goron has no first person items, but we need something here to prevent a crash.
gLinkGoronRightHandOpenDL,
gLinkZoraRightHandOpenDL,
gLinkDekuRightHandDL,
object_link_child_DL_017B40,
+2 -2
View File
@@ -1994,7 +1994,7 @@ void Sram_UpdateWriteToFlashDefault(SramContext* sramCtx) {
sramCtx->status = 4;
}
}
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER(0 /*2*/)) { // 2S2H [Port] Remove arbitrary 2 second delay
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER(CVarGetInteger("gEnhancements.Save.SaveDelay", 0))) { // 2S2H [Port] Some tricks require a save delay so we can't just force it to zero
// Finished status is hardcoded to 2 seconds instead of when the task finishes
sramCtx->status = 0;
}
@@ -2032,7 +2032,7 @@ void Sram_UpdateWriteToFlashOwlSave(SramContext* sramCtx) {
sramCtx->status = 4;
}
}
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER(0 /*2*/)) { // 2S2H [Port] Remove arbitrary 2 second delay
} else if (OSTIME_TO_TIMER(osGetTime() - sramCtx->startWriteOsTime) >= SECONDS_TO_TIMER(CVarGetInteger("gEnhancements.Save.SaveDelay", 0))) { // 2S2H [Port] Some tricks require a save delay so we can't just force it to zero
// Finished status is hardcoded to 2 seconds instead of when the task finishes
sramCtx->status = 0;
memset(sramCtx->saveBuf, 0, SAVE_BUFFER_SIZE);