85 lines
3.8 KiB
C++
85 lines
3.8 KiB
C++
#pragma once
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
constexpr int MARS_DOUBLE_TAP_WINDOW_MIN = 2;
|
|
constexpr int MARS_DOUBLE_TAP_WINDOW_MAX = 20;
|
|
|
|
// REPENTOGON's own options (REPENTOGONOptions), kept by section in Repentogon/options.ini in the save folder, with its
|
|
// defaults, plus the rebuild's vanilla parity switch, which keeps the game's behaviour exactly the original's.
|
|
// Keys it does not know are kept as read. Only the parity switch changes anything yet: the callback dispatch.
|
|
struct RepentogonOptions
|
|
{
|
|
std::map<std::string, std::map<std::string, std::string>> ini;
|
|
std::string path;
|
|
|
|
int consoleAutofillLimit = 10;
|
|
int consoleKeyMode = 0;
|
|
int consoleKeyScancode = 41;
|
|
int consoleKeyVK = 192;
|
|
int fontRenderStyle = 0;
|
|
int fontSize = 8;
|
|
int imGuiScale = 0;
|
|
int lastSaveFile = 0;
|
|
int marsDoubleTapWindow = 10;
|
|
|
|
bool isBetterVoidGeneration = false;
|
|
bool isBlockUnknownDevices = false;
|
|
bool isDidInputConfigsImport = false;
|
|
bool isDisableExitPrompt = false;
|
|
bool isEcoMode = false;
|
|
bool isEnableDocking = true;
|
|
bool isEnableImGuiMultiView = false;
|
|
bool isFileMap = true;
|
|
bool isHushLaserSpeedFix = true;
|
|
bool isInterpolV2 = false;
|
|
bool isPreventModUpdates = false;
|
|
bool isQuickRoomClear = false;
|
|
bool isRenderDebugFindInRadius = false;
|
|
bool isSkipArchiveChecks = false;
|
|
bool isSkipIntro = false;
|
|
bool isStatHudPlanetarium = true;
|
|
bool isSyncModsEnabled = true;
|
|
bool isSyncVanillaOptions = true;
|
|
bool isVanillaParity = true;
|
|
|
|
void load();
|
|
void save();
|
|
};
|
|
|
|
// Calls visit with each option's section, key and value, in the order REPENTOGON saves them, the parity switch first.
|
|
template <typename Visit> void repentogon_options_visit(RepentogonOptions& options, Visit visit)
|
|
{
|
|
visit("Rebuild", "VanillaParity", options.isVanillaParity);
|
|
visit("OptionsSyncing", "SyncVanillaOptions", options.isSyncVanillaOptions);
|
|
visit("OptionsSyncing", "SyncModsEnabled", options.isSyncModsEnabled);
|
|
visit("VanillaTweaks", "BetterVoidGeneration", options.isBetterVoidGeneration);
|
|
visit("VanillaTweaks", "HushLaserSpeedFix", options.isHushLaserSpeedFix);
|
|
visit("VanillaTweaks", "QuickRoomClear", options.isQuickRoomClear);
|
|
visit("VanillaTweaks", "PreventModUpdates", options.isPreventModUpdates);
|
|
visit("VanillaTweaks", "StatHUDPlanetarium", options.isStatHudPlanetarium);
|
|
visit("VanillaTweaks", "SkipIntro", options.isSkipIntro);
|
|
visit("VanillaTweaks", "InterpolV2", options.isInterpolV2);
|
|
visit("VanillaTweaks", "MarsDoubleTapWindow", options.marsDoubleTapWindow);
|
|
visit("VanillaTweaks", "ConsoleAutofillLimit", options.consoleAutofillLimit);
|
|
visit("VanillaTweaks", "ConsoleKeyMode", options.consoleKeyMode);
|
|
visit("VanillaTweaks", "ConsoleKeyVK", options.consoleKeyVK);
|
|
visit("VanillaTweaks", "ConsoleKeyScancode", options.consoleKeyScancode);
|
|
visit("VanillaTweaks", "EcoMode", options.isEcoMode);
|
|
visit("VanillaTweaks", "DisableExitPrompt", options.isDisableExitPrompt);
|
|
visit("VanillaTweaks", "BlockUnknownDevices", options.isBlockUnknownDevices);
|
|
visit("internal", "LastSaveFile", options.lastSaveFile);
|
|
visit("internal", "FileMap", options.isFileMap);
|
|
visit("internal", "ImGuiScale", options.imGuiScale);
|
|
visit("internal", "RenderDebugFindInRadius", options.isRenderDebugFindInRadius);
|
|
visit("internal", "SkipArchiveChecks", options.isSkipArchiveChecks);
|
|
visit("internal", "DidInputConfigsImport", options.isDidInputConfigsImport);
|
|
visit("internal", "FontSize", options.fontSize);
|
|
visit("internal", "FontRenderStyle", options.fontRenderStyle);
|
|
visit("internal", "EnableImGuiMultiView", options.isEnableImGuiMultiView);
|
|
visit("internal", "EnableDocking", options.isEnableDocking);
|
|
}
|
|
|
|
extern RepentogonOptions repentogonOptions;
|