Centralized headers. Centralized fixes in one function
This commit is contained in:
@@ -1,13 +1,10 @@
|
|||||||
#include <string>
|
#include "CommonHeaders.h"
|
||||||
#include <spdlog/spdlog.h>
|
#include "GameFixes.h"
|
||||||
#include <spdlog/sinks/rotating_file_sink.h>
|
|
||||||
#include <filesystem>
|
|
||||||
#include <safetyhook.hpp>
|
|
||||||
#include "GameInformations.h"
|
#include "GameInformations.h"
|
||||||
#include "ObfuscateString.h"
|
#include "ObfuscateString.h"
|
||||||
#include "Memory.hpp";
|
#include "Memory.hpp"
|
||||||
#include "Maths.hpp";
|
#include "Maths.hpp"
|
||||||
#include "UEngine.hpp";
|
#include "UEngine.hpp"
|
||||||
#include "SDK/Basic.hpp"
|
#include "SDK/Basic.hpp"
|
||||||
#include "SDK/Engine_classes.hpp"
|
#include "SDK/Engine_classes.hpp"
|
||||||
#include "SDK/LVL_SplashScreens_classes.hpp"
|
#include "SDK/LVL_SplashScreens_classes.hpp"
|
||||||
@@ -72,7 +69,7 @@ static void VolumetricFogFixEnabled();
|
|||||||
static void EnableConsole();
|
static void EnableConsole();
|
||||||
static void SkipIntro();
|
static void SkipIntro();
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
|
extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init)
|
||||||
{
|
{
|
||||||
g_fix_enabled = enabled;
|
g_fix_enabled = enabled;
|
||||||
if (g_fix_enabled && !AOBScanDone) {
|
if (g_fix_enabled && !AOBScanDone) {
|
||||||
@@ -206,66 +203,28 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
|
|||||||
logger->info("-------------- Fixes initialisation -------------");
|
logger->info("-------------- Fixes initialisation -------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FOVaddress) FOVFixEnabled();
|
if (!init && FOVaddress) FOVFixEnabled();
|
||||||
if (DOFaddress) DOFFixEnabled();
|
if (!init && DOFaddress) DOFFixEnabled();
|
||||||
if (CAaddress) CAFixEnabled();
|
if (!init && CAaddress) CAFixEnabled();
|
||||||
if (Vignettingaddress) VignettingFixEnabled();
|
if (!init && Vignettingaddress) VignettingFixEnabled();
|
||||||
if (Fogaddress) FogFixEnabled();
|
if (!init && Fogaddress) FogFixEnabled();
|
||||||
if (VolumetricFogaddress) VolumetricFogFixEnabled();
|
if (!init && VolumetricFogaddress) VolumetricFogFixEnabled();
|
||||||
if (AspectRatioAxisConstraintaddress && ConstrainAspectRatioaddress) UltraWideFixEnabled();
|
if (!init && AspectRatioAxisConstraintaddress && ConstrainAspectRatioaddress) UltraWideFixEnabled();
|
||||||
if (!g_Console_Enabled && GObjectsaddress && GNamesaddress && ProcessEventaddress)
|
|
||||||
EnableConsole();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setters for Reshade addon call
|
// Setters for Reshade addon call
|
||||||
extern "C" __declspec(dllexport) void SetFOVFixEnabled(bool enabled, bool init)
|
extern "C" __declspec(dllexport) void SetFixesEnabled(GameFixes fix, bool enabled)
|
||||||
{
|
{ // Set each fix individually
|
||||||
g_fov_fix_enabled = enabled;
|
if (fix == GameFixes::DevConsole && enabled) EnableConsole();
|
||||||
if (!init) FOVFixEnabled();
|
if (fix == GameFixes::SkipIntro && enabled) SkipIntro();
|
||||||
|
if (fix == GameFixes::FOV) { g_fov_fix_enabled = enabled; FOVFixEnabled(); }
|
||||||
|
if (fix == GameFixes::UltraWide) { g_ultrawide_fix_enabled = enabled; UltraWideFixEnabled(); }
|
||||||
|
if (fix == GameFixes::ChromaticAberrations) { g_CA_fix_enabled = enabled; CAFixEnabled(); }
|
||||||
|
if (fix == GameFixes::Vignetting) { g_Vignetting_fix_enabled = enabled; VignettingFixEnabled(); }
|
||||||
|
if (fix == GameFixes::Fog) { g_Fog_fix_enabled = enabled; FogFixEnabled(); }
|
||||||
|
if (fix == GameFixes::VolumetricFog) { g_VolumetricFog_fix_enabled = enabled; VolumetricFogFixEnabled(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetUltraWideFixEnabled(bool enabled, bool init)
|
|
||||||
{
|
|
||||||
g_ultrawide_fix_enabled = enabled;
|
|
||||||
if (!init) UltraWideFixEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetDOFFixEnabled(bool enabled, bool init)
|
|
||||||
{
|
|
||||||
g_DOF_fix_enabled = enabled;
|
|
||||||
if (!init) DOFFixEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetCAFixEnabled(bool enabled, bool init)
|
|
||||||
{
|
|
||||||
g_CA_fix_enabled = enabled;
|
|
||||||
if (!init) CAFixEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetVignettingFixEnabled(bool enabled, bool init)
|
|
||||||
{
|
|
||||||
g_Vignetting_fix_enabled = enabled;
|
|
||||||
if (!init) VignettingFixEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetFogFixEnabled(bool enabled, bool init)
|
|
||||||
{
|
|
||||||
g_Fog_fix_enabled = enabled;
|
|
||||||
if (!init) FogFixEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetVolumetricFogFixEnabled(bool enabled, bool init)
|
|
||||||
{
|
|
||||||
g_VolumetricFog_fix_enabled = enabled;
|
|
||||||
if (!init) VolumetricFogFixEnabled();
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetSkipIntroEnabled(bool enabled)
|
|
||||||
{
|
|
||||||
if (enabled) SkipIntro();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetFOV(int fov)
|
extern "C" __declspec(dllexport) void SetFOV(int fov)
|
||||||
{
|
{
|
||||||
g_AdditionalFOVValue = fov;
|
g_AdditionalFOVValue = fov;
|
||||||
|
|||||||
Reference in New Issue
Block a user