Compare commits

...

5 Commits

5 changed files with 54 additions and 69 deletions

View File

@@ -110,7 +110,7 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>$(SolutionDir)external\zydis\Libs;$(SolutionDir)external\Maths;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>Zydis.lib;Maths.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -138,7 +138,7 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>$(SolutionDir)external\zydis\Libs;$(SolutionDir)external\Maths;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>Zydis.lib;Maths.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -165,7 +165,7 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>$(SolutionDir)external\zydis\Libs;$(SolutionDir)external\Maths;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>Zydis.lib;Maths.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -193,7 +193,7 @@
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>$(SolutionDir)external\zydis\Libs;$(SolutionDir)external\Maths;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>Zydis.lib;Maths.lib;$(SolutionDir)x64\Release\UEngine.lib;%(AdditionalDependencies)</AdditionalDependencies>

View File

@@ -1,13 +1,10 @@
#include <string>
#include <spdlog/spdlog.h>
#include <spdlog/sinks/rotating_file_sink.h>
#include <filesystem>
#include <safetyhook.hpp>
#include "CommonHeaders.h"
#include "GameFixes.h"
#include "GameInformations.h"
#include "ObfuscateString.h"
#include "Memory.hpp";
#include "Maths.hpp";
#include "UEngine.hpp";
#include "Memory.hpp"
#include "Maths.hpp"
#include "UEngine.hpp"
#include "SDK/Basic.hpp"
#include "SDK/Engine_classes.hpp"
#include "SDK/LVL_SplashScreens_classes.hpp"
@@ -72,7 +69,7 @@ static void VolumetricFogFixEnabled();
static void EnableConsole();
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;
if (g_fix_enabled && !AOBScanDone) {
@@ -206,66 +203,28 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled)
logger->info("-------------- Fixes initialisation -------------");
}
if (FOVaddress) FOVFixEnabled();
if (DOFaddress) DOFFixEnabled();
if (CAaddress) CAFixEnabled();
if (Vignettingaddress) VignettingFixEnabled();
if (Fogaddress) FogFixEnabled();
if (VolumetricFogaddress) VolumetricFogFixEnabled();
if (AspectRatioAxisConstraintaddress && ConstrainAspectRatioaddress) UltraWideFixEnabled();
if (!g_Console_Enabled && GObjectsaddress && GNamesaddress && ProcessEventaddress)
EnableConsole();
if (!init && FOVaddress) FOVFixEnabled();
if (!init && DOFaddress) DOFFixEnabled();
if (!init && CAaddress) CAFixEnabled();
if (!init && Vignettingaddress) VignettingFixEnabled();
if (!init && Fogaddress) FogFixEnabled();
if (!init && VolumetricFogaddress) VolumetricFogFixEnabled();
if (!init && AspectRatioAxisConstraintaddress && ConstrainAspectRatioaddress) UltraWideFixEnabled();
}
// Setters for Reshade addon call
extern "C" __declspec(dllexport) void SetFOVFixEnabled(bool enabled, bool init)
{
g_fov_fix_enabled = enabled;
if (!init) FOVFixEnabled();
extern "C" __declspec(dllexport) void SetFixesEnabled(GameFixes fix, bool enabled)
{ // Set each fix individually
if (fix == GameFixes::DevConsole && enabled) EnableConsole();
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)
{
g_AdditionalFOVValue = fov;

View File

@@ -59,12 +59,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Silent Hill f", "SilentHill
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "includes", "includes", "{994ABCB9-8633-4AD7-8035-48BB86A7F725}"
ProjectSection(SolutionItems) = preProject
external\includes\CommonHeaders.h = external\includes\CommonHeaders.h
external\includes\GameFixes.h = external\includes\GameFixes.h
external\includes\GameInformations.h = external\includes\GameInformations.h
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Blood Of Mehran", "BloodOfMehran\BloodOfMehran.vcxproj", "{2B4DF13E-3FEB-479C-AE5B-234C0278151E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Little Nightmare III", "LittleNightmareIII\LittleNightmareIII.vcxproj", "{6AB78675-DE3D-47E0-8054-C64C77B23CCB}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Little Nightmares III", "LittleNightmareIII\LittleNightmareIII.vcxproj", "{6AB78675-DE3D-47E0-8054-C64C77B23CCB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

7
external/includes/CommonHeaders.h vendored Normal file
View File

@@ -0,0 +1,7 @@
#pragma once
#include <string>
#include <filesystem>
#include <safetyhook.hpp>
#include <spdlog/spdlog.h>
#include <spdlog/sinks/rotating_file_sink.h>

17
external/includes/GameFixes.h vendored Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
enum class GameFixes : int {
FOV = 1,
UltraWide,
Camera,
Cutscenes,
SkipIntro,
DevConsole,
Resolution,
HUD,
DOF,
ChromaticAberrations,
Vignetting,
Fog,
VolumetricFog
};