mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-02 01:30:00 -04:00
added experimental setting for autosave
This commit is contained in:
@@ -63,6 +63,7 @@ struct UserSettings {
|
||||
ConfigVar<bool> instantSaves;
|
||||
ConfigVar<bool> instantText;
|
||||
ConfigVar<bool> sunsSong;
|
||||
ConfigVar<bool> autoSave;
|
||||
|
||||
// Preferences
|
||||
ConfigVar<bool> enableMirrorMode;
|
||||
|
||||
@@ -41,6 +41,7 @@ static void ApplyPresetDusk() {
|
||||
s.game.enableFrameInterpolation.setValue(true);
|
||||
s.game.sunsSong.setValue(true);
|
||||
s.game.bloomMode.setValue(BloomMode::Dusk);
|
||||
s.game.autoSave.setValue(true);
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
|
||||
@@ -65,6 +65,18 @@ namespace dusk {
|
||||
ImGui::SetTooltip("Skip the delay when writing to the Memory Card.");
|
||||
}
|
||||
|
||||
config::ImGuiCheckbox("Autosave", getSettings().game.autoSave);
|
||||
const bool autoSaveHovered = ImGui::IsItemHovered();
|
||||
ImGui::SameLine();
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.72f, 0.2f, 1.0f));
|
||||
ImGui::TextUnformatted("[EXPERIMENTAL]");
|
||||
ImGui::PopStyleColor();
|
||||
if (autoSaveHovered || ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip(
|
||||
"Automatically saves the game when going to new areas,\n"
|
||||
"getting an item, or opening a dungeon door.");
|
||||
}
|
||||
|
||||
config::ImGuiCheckbox("Hold B for Instant Text", getSettings().game.instantText);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Make text scroll immediately by holding B.");
|
||||
|
||||
+12
-10
@@ -29,7 +29,7 @@ UserSettings g_userSettings = {
|
||||
.disableRupeeCutscenes {"game.disableRupeeCutscenes", false},
|
||||
.noSwordRecoil {"game.noSwordRecoil", false},
|
||||
.damageMultiplier {"game.damageMultiplier", 1},
|
||||
.noHeartDrops{"game.noHeartDrops", false},
|
||||
.noHeartDrops {"game.noHeartDrops", false},
|
||||
.instantDeath {"game.instantDeath", false},
|
||||
.fastClimbing {"game.fastClimbing", false},
|
||||
.noMissClimbing {"game.noMissClimbing", false},
|
||||
@@ -37,6 +37,7 @@ UserSettings g_userSettings = {
|
||||
.instantSaves {"game.instantSaves", false},
|
||||
.instantText {"game.instantText", false},
|
||||
.sunsSong {"game.sunsSong", false},
|
||||
.autoSave {"game.autoSave", false},
|
||||
|
||||
// Preferences
|
||||
.enableMirrorMode {"game.enableMirrorMode", false},
|
||||
@@ -48,7 +49,7 @@ UserSettings g_userSettings = {
|
||||
.bloomMode {"game.bloomMode", BloomMode::Classic},
|
||||
.bloomMultiplier {"game.bloomMultiplier", 1.0f},
|
||||
.disableWaterRefraction {"game.disableWaterRefraction", false},
|
||||
.enableFrameInterpolation = {"game.enableFrameInterpolation", false},
|
||||
.enableFrameInterpolation {"game.enableFrameInterpolation", false},
|
||||
.internalResolutionScale {"game.internalResolutionScale", 0},
|
||||
.shadowResolutionMultiplier {"game.shadowResolutionMultiplier", 1},
|
||||
|
||||
@@ -69,14 +70,14 @@ UserSettings g_userSettings = {
|
||||
|
||||
// Cheats
|
||||
.infiniteHearts {"game.infiniteHearts", false},
|
||||
.infiniteArrows{"game.infiniteArrows", false},
|
||||
.infiniteBombs{"game.infiniteBombs", false},
|
||||
.infiniteOil{"game.infiniteOil", false},
|
||||
.infiniteOxygen{"game.infiniteOxygen", false},
|
||||
.infiniteRupees{"game.infiniteRupees", false},
|
||||
.moonJump{"game.moonJump", false},
|
||||
.superClawshot{"game.superClawshot", false},
|
||||
.alwaysGreatspin{"game.alwaysGreatspin", false},
|
||||
.infiniteArrows {"game.infiniteArrows", false},
|
||||
.infiniteBombs {"game.infiniteBombs", false},
|
||||
.infiniteOil {"game.infiniteOil", false},
|
||||
.infiniteOxygen {"game.infiniteOxygen", false},
|
||||
.infiniteRupees {"game.infiniteRupees", false},
|
||||
.moonJump {"game.moonJump", false},
|
||||
.superClawshot {"game.superClawshot", false},
|
||||
.alwaysGreatspin {"game.alwaysGreatspin", false},
|
||||
.enableFastIronBoots {"game.enableFastIronBoots", false},
|
||||
.canTransformAnywhere {"game.canTransformAnywhere", false},
|
||||
.fastSpinner {"game.fastSpinner", false},
|
||||
@@ -134,6 +135,7 @@ void registerSettings() {
|
||||
Register(g_userSettings.game.instantSaves);
|
||||
Register(g_userSettings.game.instantText);
|
||||
Register(g_userSettings.game.sunsSong);
|
||||
Register(g_userSettings.game.autoSave);
|
||||
Register(g_userSettings.game.enableMirrorMode);
|
||||
Register(g_userSettings.game.invertCameraXAxis);
|
||||
Register(g_userSettings.game.disableMainHUD);
|
||||
|
||||
@@ -755,7 +755,7 @@ static AutoSaveFuncs AutoSaveFuncsProc[] = {
|
||||
void noAutoSave() {}
|
||||
|
||||
void triggerAutoSave() {
|
||||
if (mAutoSaveProc == 0 && strcmp(dComIfGp_getStartStageName(), "F_SP102") != 0 && dComIfGp_getStartStageLayer() != 0)
|
||||
if (dusk::getSettings().game.autoSave && mAutoSaveProc == 0 && strcmp(dComIfGp_getStartStageName(), "F_SP102") != 0 && dComIfGp_getStartStageLayer() != 0)
|
||||
{
|
||||
mAutoSaveProc = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user