Add fog fixes and skip intros fix
This commit is contained in:
@@ -28,6 +28,9 @@ static SetBoolFn SetUltraWideFixEnabled = nullptr;
|
||||
static SetBoolFn SetDOFFixEnabled = nullptr;
|
||||
static SetBoolFn SetCAFixEnabled = nullptr;
|
||||
static SetBoolFn SetVignettingFixEnabled = nullptr;
|
||||
static SetBoolFn SetFogFixEnabled = nullptr;
|
||||
static SetBoolFn SetVolumetricFogFixEnabled = nullptr;
|
||||
static SetBoolFn SetSkipIntroEnabled = nullptr;
|
||||
static SetIntFn SetFOV = nullptr;
|
||||
static GetGameInfosStruct GetGameInfos = nullptr;
|
||||
|
||||
@@ -37,6 +40,9 @@ static bool ultrawide_fix_enabled = false;
|
||||
static bool DOF_fix_enabled = false;
|
||||
static bool CA_fix_enabled = false;
|
||||
static bool Vignetting_fix_enabled = false;
|
||||
static bool Fog_fix_enabled = false;
|
||||
static bool VolumetricFog_fix_enabled = false;
|
||||
static bool skip_intro = true;
|
||||
static bool fix_enabled = false;
|
||||
static int worldFOVvalue = 0;
|
||||
|
||||
@@ -47,8 +53,8 @@ static std::string log_content;
|
||||
|
||||
// Plugin settings
|
||||
const std::string SETTINGS_FILE = "./pluginsettings.ini";
|
||||
const char* FIX_VERSION = "1.0.2";
|
||||
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Enable ultrawide.\n - Disable depth of field.\n - Disable chromatic aberrations.\n - Disable vignetting.\n - Re enable dev console.";
|
||||
const char* FIX_VERSION = "1.0.3";
|
||||
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Enable ultrawide.\n - Disable depth of field.\n - Disable chromatic aberrations.\n - Disable vignetting.\n - Disable fog.\n - Re enable dev console.\n - Skip intros.";
|
||||
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
|
||||
|
||||
// Scaling factor based on screen resolution
|
||||
@@ -60,8 +66,8 @@ static void LoadFixDLL()
|
||||
if (InterlockedCompareExchange(&g_coreInitialized, 1, 0) != 0)
|
||||
return;
|
||||
|
||||
if (GetModuleHandleA("LittleNightmareIIICore.dll") == nullptr) {
|
||||
fixLib = LoadLibraryA("LittleNightmareIIICore.dll");
|
||||
if (GetModuleHandleA("LittleNightmaresIIICore.dll") == nullptr) {
|
||||
fixLib = LoadLibraryA("LittleNightmaresIIICore.dll");
|
||||
|
||||
if (!fixLib) {
|
||||
MessageBoxA(nullptr, "Impossible to load game core dll", "Erreur", MB_OK);
|
||||
@@ -74,6 +80,9 @@ static void LoadFixDLL()
|
||||
SetDOFFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetDOFFixEnabled");
|
||||
SetCAFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetCAFixEnabled");
|
||||
SetVignettingFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetVignettingFixEnabled");
|
||||
SetFogFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFogFixEnabled");
|
||||
SetVolumetricFogFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetVolumetricFogFixEnabled");
|
||||
SetSkipIntroEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetSkipIntroEnabled");
|
||||
SetFOV = (SetIntFn)GetProcAddress(fixLib, "SetFOV");
|
||||
GetGameInfos = (GetGameInfosStruct)GetProcAddress(fixLib, "GetGameInfos");
|
||||
|
||||
@@ -84,7 +93,10 @@ static void LoadFixDLL()
|
||||
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, true);
|
||||
if (SetCAFixEnabled) SetCAFixEnabled(CA_fix_enabled, true);
|
||||
if (SetVignettingFixEnabled) SetVignettingFixEnabled(Vignetting_fix_enabled, true);
|
||||
if (SetFogFixEnabled) SetFogFixEnabled(Fog_fix_enabled, true);
|
||||
if (SetVolumetricFogFixEnabled) SetVolumetricFogFixEnabled(VolumetricFog_fix_enabled, true);
|
||||
if (SetFixEnabled) SetFixEnabled(fix_enabled, true);
|
||||
if (SetSkipIntroEnabled) SetSkipIntroEnabled(skip_intro, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,14 +107,18 @@ static void SaveSettings()
|
||||
pluginIniFile["1#General fix"].setComment(std::vector<std::string>{ "The following sections are saved by plugin",
|
||||
"You should not need to modify them",
|
||||
" ",
|
||||
"Controls if fix mod (globally) is enabled" });
|
||||
"Controls if fix mod (globally) is enabled",
|
||||
"Set Skip intro to false if you want spash screens :)"});
|
||||
pluginIniFile["1#General fix"]["Enabled"] = fix_enabled;
|
||||
pluginIniFile["1#General fix"]["Skip intro"] = skip_intro;
|
||||
pluginIniFile["2#Individual fix"].setComment("Controls each fix individually");
|
||||
pluginIniFile["2#Individual fix"]["FOV"] = fov_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["UltraWide"] = ultrawide_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["DOF"] = DOF_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Chromatic aberrations"] = CA_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Vignetting"] = Vignetting_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Fog"] = Fog_fix_enabled;
|
||||
pluginIniFile["2#Individual fix"]["Volumetric fog"] = VolumetricFog_fix_enabled;
|
||||
pluginIniFile["3#Fixes tuning"].setComment("Individual fix fine tune");
|
||||
pluginIniFile["3#Fixes tuning"]["World FOV"] = worldFOVvalue;
|
||||
|
||||
@@ -115,11 +131,14 @@ static void LoadSettings()
|
||||
try {
|
||||
pluginIniFile.load(SETTINGS_FILE);
|
||||
fix_enabled = pluginIniFile["1#General fix"]["Enabled"].as<bool>();
|
||||
skip_intro = pluginIniFile["1#General fix"]["Skip intro"].as<bool>();
|
||||
fov_fix_enabled = pluginIniFile["2#Individual fix"]["FOV"].as<bool>();
|
||||
ultrawide_fix_enabled = pluginIniFile["2#Individual fix"]["UltraWide"].as<bool>();
|
||||
DOF_fix_enabled = pluginIniFile["2#Individual fix"]["DOF"].as<bool>();
|
||||
CA_fix_enabled = pluginIniFile["2#Individual fix"]["Chromatic aberrations"].as<bool>();
|
||||
Vignetting_fix_enabled = pluginIniFile["2#Individual fix"]["Vignetting"].as<bool>();
|
||||
Fog_fix_enabled = pluginIniFile["2#Individual fix"]["Fog"].as<bool>();
|
||||
VolumetricFog_fix_enabled = pluginIniFile["2#Individual fix"]["Volumetric fog"].as<bool>();
|
||||
worldFOVvalue = pluginIniFile["3#Fixes tuning"]["World FOV"].as<int>();
|
||||
}
|
||||
catch (const std::exception& e) {}
|
||||
@@ -160,7 +179,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
||||
if (ImGui::Button("Fix informations")) popup_Informations = true; // Fix information
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("View logs")) {
|
||||
read_log_file("LittleNightmareIII.log");
|
||||
read_log_file("LittleNightmaresIII.log");
|
||||
show_log_overlay = true; // Fix information
|
||||
}
|
||||
|
||||
@@ -212,8 +231,8 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
if (ImGui::BeginTable("IndividualFixesTable", 2, ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableSetupColumn("IndFix1", ImGuiTableColumnFlags_WidthStretch, 0.35f);
|
||||
ImGui::TableSetupColumn("IndFix2", ImGuiTableColumnFlags_WidthStretch, 0.65f);
|
||||
ImGui::TableSetupColumn("IndFix1", ImGuiTableColumnFlags_WidthStretch, 0.4f);
|
||||
ImGui::TableSetupColumn("IndFix2", ImGuiTableColumnFlags_WidthStretch, 0.6f);
|
||||
ImGui::TableNextRow();
|
||||
|
||||
ImGui::TableSetColumnIndex(0);
|
||||
@@ -227,6 +246,21 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Fog", &Fog_fix_enabled)) {
|
||||
if (SetFogFixEnabled) SetFogFixEnabled(Fog_fix_enabled, false);
|
||||
SaveSettings();
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::Text("This fix will disable all fogs including volumetric fog.");
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
if (ImGui::Checkbox("Volumetric fog", &VolumetricFog_fix_enabled)) {
|
||||
if (SetVolumetricFogFixEnabled) SetVolumetricFogFixEnabled(VolumetricFog_fix_enabled, false);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
ImGui::TableSetColumnIndex(1);
|
||||
if (ImGui::Checkbox("Ultrawide", &ultrawide_fix_enabled)) {
|
||||
if (SetUltraWideFixEnabled) SetUltraWideFixEnabled(ultrawide_fix_enabled, false);
|
||||
|
||||
Reference in New Issue
Block a user