Add initial project files (excluding ignored content)
This commit is contained in:
176
Days Gone/Days Gone.vcxproj
Normal file
176
Days Gone/Days Gone.vcxproj
Normal file
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{4ECBBBA5-A265-464D-ADAC-311FB1C3FF38}</ProjectGuid>
|
||||
<RootNamespace>Days Gone</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
<ProjectName>Days Gone</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<SpectreMitigation>Spectre</SpectreMitigation>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetExt>.addon</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<TargetExt>.addon</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<TargetExt>.addon</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<TargetExt>.addon</TargetExt>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;TLOU2_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)external\reshade\include;$(SolutionDir)external\reshade\deps\imgui</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;TLOU2_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)external\reshade\include;$(SolutionDir)external\reshade\deps\imgui</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;TLOU2_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)external\reshade\include;$(SolutionDir)external\reshade\deps\imgui</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;TLOU2_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)external\reshade\include;$(SolutionDir)external\reshade\deps\imgui</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<OmitFramePointers>false</OmitFramePointers>
|
||||
<ControlFlowGuard>Guard</ControlFlowGuard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableUAC>false</EnableUAC>
|
||||
<GenerateMapFile>true</GenerateMapFile>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
298
Days Gone/dllmain.cpp
Normal file
298
Days Gone/dllmain.cpp
Normal file
@@ -0,0 +1,298 @@
|
||||
#define IMGUI_DISABLE_INCLUDE_IMCONFIG_H
|
||||
#define IMGUI_HAS_DOCK 1
|
||||
|
||||
#include <imgui.h>
|
||||
#include <reshade.hpp>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <Windows.h>
|
||||
|
||||
// Core game dll functions declarations
|
||||
typedef void (*SetBoolFn)(bool, bool);
|
||||
typedef void (*SetIntFn)(int);
|
||||
typedef float (*GetFloatFn)();
|
||||
|
||||
static HMODULE fixLib = nullptr;
|
||||
static SetBoolFn SetFixEnabled = nullptr;
|
||||
static SetBoolFn SetFOVFixEnabled = nullptr;
|
||||
static SetBoolFn SetHUDFixEnabled = nullptr;
|
||||
static SetIntFn SetFOV = nullptr;
|
||||
static SetIntFn SetVehicleFOV = nullptr;
|
||||
static SetIntFn SetOtherFOV = nullptr;
|
||||
static SetIntFn SetHUDLeft = nullptr;
|
||||
static SetIntFn SetHUDRight = nullptr;
|
||||
static GetFloatFn GetFOVIn = nullptr;
|
||||
static GetFloatFn GetFOVOut = nullptr;
|
||||
|
||||
// Plugin variables for checkboxes and sliders
|
||||
static bool fix_enabled = false;
|
||||
static bool fov_fix_enabled = false;
|
||||
static bool hud_fix_enabled = false;
|
||||
static int worldFOVvalue = 0;
|
||||
static int vehicleFOVvalue = 0;
|
||||
static int otherFOVvalue = 0;
|
||||
static int HUDLeftvalue = 0;
|
||||
static int HUDRightvalue = 0;
|
||||
static bool popup_Informations = false;
|
||||
|
||||
// Plugin settings
|
||||
const char* SETTINGS_FILE = "PluginSettings.ini";
|
||||
const char* GENERAL_FIX_SETTING = "GeneralFIX=";
|
||||
const char* FOV_FIX_SETTING = "FOVFIX=";
|
||||
const char* HUD_FIX_SETTING = "HUDFIX=";
|
||||
const char* WORLD_FOV_SETTING = "WorldFOV=";
|
||||
const char* VEHICLE_FOV_SETTING = "VehicleFOV=";
|
||||
const char* OTHER_FOV_SETTING = "OtherFOV=";
|
||||
const char* HUD_LEFT_SETTING = "HUDLeft=";
|
||||
const char* HUD_RIGHT_SETTING = "HUDRight=";
|
||||
const char* FIX_VERSION = "1.0.4";
|
||||
const char* FIX_INFORMATIONS = "This fix will allow to:\r\n -Modify FOV in game (acts as an additional FOV).\r\n -Set HUD safe zone (21/9,16/9 ...).";
|
||||
const char* DONATION_URL = "https://www.paypal.com/donate/?business=W92C47N3WZZZG&no_recurring=0¤cy_code=EUR";
|
||||
|
||||
// Load and unload game core dll functions /!\ necessary
|
||||
static void LoadFixDLL()
|
||||
{
|
||||
if (fixLib) return;
|
||||
fixLib = GetModuleHandleA("DaysGoneCore.asi"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
|
||||
if (!fixLib) {
|
||||
MessageBoxA(nullptr, "Impossible to load game core dll", "Erreur", MB_OK);
|
||||
return;
|
||||
}
|
||||
SetFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFixEnabled");
|
||||
SetFOVFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFOVFixEnabled");
|
||||
SetHUDFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetHUDFixEnabled");
|
||||
SetFOV = (SetIntFn)GetProcAddress(fixLib, "SetFOV");
|
||||
SetVehicleFOV = (SetIntFn)GetProcAddress(fixLib, "SetVehicleFOV");
|
||||
SetOtherFOV = (SetIntFn)GetProcAddress(fixLib, "SetOtherFOV");
|
||||
SetHUDLeft = (SetIntFn)GetProcAddress(fixLib, "SetHUDLeft");
|
||||
SetHUDRight = (SetIntFn)GetProcAddress(fixLib, "SetHUDRight");
|
||||
GetFOVIn = (GetFloatFn)GetProcAddress(fixLib, "GetFOVIn");
|
||||
GetFOVOut = (GetFloatFn)GetProcAddress(fixLib, "GetFOVOut");;
|
||||
|
||||
// Apply initial values loaded
|
||||
if (SetFOV) SetFOV(worldFOVvalue);
|
||||
if (SetVehicleFOV) SetVehicleFOV(vehicleFOVvalue);
|
||||
if (SetOtherFOV) SetOtherFOV(otherFOVvalue);
|
||||
if (SetHUDLeft) SetHUDLeft(HUDLeftvalue);
|
||||
if (SetHUDRight) SetHUDRight(HUDRightvalue);
|
||||
if (SetFOVFixEnabled) SetFOVFixEnabled(fov_fix_enabled, true);
|
||||
if (SetHUDFixEnabled) SetHUDFixEnabled(hud_fix_enabled, true);
|
||||
if (SetFixEnabled) SetFixEnabled(fix_enabled, true);
|
||||
}
|
||||
|
||||
// Addon functions
|
||||
static void SaveSettings()
|
||||
{
|
||||
std::ofstream file(SETTINGS_FILE);
|
||||
if (file.is_open())
|
||||
{
|
||||
file << GENERAL_FIX_SETTING << (fix_enabled ? "1" : "0") << "\n";
|
||||
file << FOV_FIX_SETTING << (fov_fix_enabled ? "1" : "0") << "\n";
|
||||
file << HUD_FIX_SETTING << (hud_fix_enabled ? "1" : "0") << "\n";
|
||||
file << WORLD_FOV_SETTING << worldFOVvalue << "\n";
|
||||
file << VEHICLE_FOV_SETTING << vehicleFOVvalue << "\n";
|
||||
file << OTHER_FOV_SETTING << otherFOVvalue << "\n";
|
||||
file << HUD_LEFT_SETTING << HUDLeftvalue << "\n";
|
||||
file << HUD_RIGHT_SETTING << HUDRightvalue << "\n";
|
||||
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
|
||||
static void LoadSettings()
|
||||
{
|
||||
std::ifstream file(SETTINGS_FILE);
|
||||
if (file.is_open())
|
||||
{
|
||||
std::string line;
|
||||
while (std::getline(file, line))
|
||||
{
|
||||
if (line.find(GENERAL_FIX_SETTING) == 0)
|
||||
{
|
||||
std::string val = line.substr(strlen(GENERAL_FIX_SETTING));
|
||||
fix_enabled = (val == "1" || val == "true");
|
||||
}
|
||||
else if (line.find(FOV_FIX_SETTING) == 0)
|
||||
{
|
||||
std::string val = line.substr(strlen(FOV_FIX_SETTING));
|
||||
fov_fix_enabled = (val == "1" || val == "true");
|
||||
}
|
||||
else if (line.find(HUD_FIX_SETTING) == 0)
|
||||
{
|
||||
std::string val = line.substr(strlen(HUD_FIX_SETTING));
|
||||
hud_fix_enabled = (val == "1" || val == "true");
|
||||
}
|
||||
else if (line.find(WORLD_FOV_SETTING) == 0)
|
||||
worldFOVvalue = std::stoi(line.substr(strlen(WORLD_FOV_SETTING)));
|
||||
else if (line.find(VEHICLE_FOV_SETTING) == 0)
|
||||
vehicleFOVvalue = std::stoi(line.substr(strlen(VEHICLE_FOV_SETTING)));
|
||||
else if (line.find(OTHER_FOV_SETTING) == 0)
|
||||
otherFOVvalue = std::stoi(line.substr(strlen(OTHER_FOV_SETTING)));
|
||||
else if (line.find(HUD_LEFT_SETTING) == 0)
|
||||
HUDLeftvalue = std::stoi(line.substr(strlen(HUD_LEFT_SETTING)));
|
||||
else if (line.find(HUD_RIGHT_SETTING) == 0)
|
||||
HUDRightvalue = std::stoi(line.substr(strlen(HUD_RIGHT_SETTING)));
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
}
|
||||
|
||||
static void displayFixInformations() {
|
||||
// Fix version
|
||||
ImGui::Begin("Informations", &popup_Informations); //
|
||||
ImGui::SetCursorPos(ImVec2(10, 36));
|
||||
ImGui::Text("Version : %s", FIX_VERSION);
|
||||
ImGui::SetCursorPos(ImVec2(10, 76));
|
||||
ImGui::Text(FIX_INFORMATIONS);
|
||||
ImGui::End();
|
||||
}
|
||||
|
||||
// Initialize ImGui widgets for Reshade
|
||||
static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
||||
{
|
||||
ImGui::SetNextWindowPos(ImVec2(100, 200), ImGuiCond_Once);
|
||||
ImGui::SetNextWindowSize(ImVec2(350, 150), ImGuiCond_Once);
|
||||
|
||||
// Donation ?
|
||||
ImGui::SetCursorPos(ImVec2(10, 36));
|
||||
ImGui::Text("Like my work ?");
|
||||
ImGui::SetCursorPos(ImVec2(130, 33));
|
||||
if (ImGui::Button("consider donation"))
|
||||
{
|
||||
ShellExecuteA(NULL, "open", DONATION_URL, NULL, NULL, SW_SHOWNORMAL);
|
||||
}
|
||||
|
||||
// Fix informations
|
||||
ImGui::SetCursorPos(ImVec2(270, 33));
|
||||
if (ImGui::Button("Fix informations"))
|
||||
popup_Informations = true;
|
||||
|
||||
if (popup_Informations)
|
||||
displayFixInformations();
|
||||
|
||||
// Generic fix
|
||||
ImGui::SetCursorPos(ImVec2(10, 60));
|
||||
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
|
||||
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
ImGui::SetCursorPos(ImVec2(5, 30));
|
||||
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
|
||||
if (SetFixEnabled) SetFixEnabled(fix_enabled, false);
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
// Individual fixes
|
||||
ImGui::SetCursorPos(ImVec2(240, 60));
|
||||
ImGui::BeginChild("IndividualFixesHeader", ImVec2(220, 0), false); // true = bordure
|
||||
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
ImGui::SetCursorPos(ImVec2(5, 30));
|
||||
if (ImGui::Checkbox("Enable FOV Fix", &fov_fix_enabled)) {
|
||||
if (SetFOVFixEnabled) SetFOVFixEnabled(fov_fix_enabled, false);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
ImGui::SetCursorPos(ImVec2(5, 55));
|
||||
if (ImGui::Checkbox("Enable HUD Fix", &hud_fix_enabled)) {
|
||||
if (SetHUDFixEnabled) SetHUDFixEnabled(hud_fix_enabled, false);
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
// Sliders
|
||||
ImGui::SetCursorPos(ImVec2(10, 120));
|
||||
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
|
||||
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
ImGui::SetCursorPos(ImVec2(5, 30));
|
||||
ImGui::SetNextItemWidth(150.0f);
|
||||
if (ImGui::SliderInt("##FOVSlider", &worldFOVvalue, -20, 50)) {}
|
||||
if (ImGui::IsItemDeactivatedAfterEdit()) {
|
||||
if (SetFOV) SetFOV(worldFOVvalue);
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::SetCursorPos(ImVec2(10, 200));
|
||||
ImGui::BeginChild("VehicleFOVHeader", ImVec2(220, 0), false); // true = bordure
|
||||
if (ImGui::CollapsingHeader("Vehicle additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
ImGui::SetCursorPos(ImVec2(5, 30));
|
||||
ImGui::SetNextItemWidth(150.0f);
|
||||
if (ImGui::SliderInt("##VehicleFOVSlider", &vehicleFOVvalue, -20, 50)) {}
|
||||
if (ImGui::IsItemDeactivatedAfterEdit()) {
|
||||
if (SetVehicleFOV) SetVehicleFOV(vehicleFOVvalue);
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::SetCursorPos(ImVec2(240, 200));
|
||||
ImGui::BeginChild("OtherFOVHeader", ImVec2(220, 80), false); // true = bordure
|
||||
if (ImGui::CollapsingHeader("Other additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
ImGui::SetCursorPos(ImVec2(5, 30));
|
||||
ImGui::SetNextItemWidth(150.0f);
|
||||
if (ImGui::SliderInt("##OtherFOVSlider", &otherFOVvalue, -20, 50)) {}
|
||||
if (ImGui::IsItemDeactivatedAfterEdit()) {
|
||||
if (SetOtherFOV) SetOtherFOV(otherFOVvalue);
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::SetCursorPos(ImVec2(10, 280));
|
||||
ImGui::BeginChild("HUDLeftHeader", ImVec2(220, 0), false); // true = bordure
|
||||
if (ImGui::CollapsingHeader("HUD safe zone left (%)", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
ImGui::SetCursorPos(ImVec2(5, 30));
|
||||
ImGui::SetNextItemWidth(150.0f);
|
||||
if (ImGui::SliderInt("##HUDLeftSlider", &HUDLeftvalue, 0, 40)) {}
|
||||
if (ImGui::IsItemDeactivatedAfterEdit()) {
|
||||
if (SetHUDLeft) SetHUDLeft(HUDLeftvalue);
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::SetCursorPos(ImVec2(240, 280));
|
||||
ImGui::BeginChild("HUDRightHeader", ImVec2(220, 0), false); // true = bordure
|
||||
if (ImGui::CollapsingHeader("HUD safe zone RIGHT (%)", ImGuiTreeNodeFlags_DefaultOpen)) {
|
||||
ImGui::SetCursorPos(ImVec2(5, 30));
|
||||
ImGui::SetNextItemWidth(150.0f);
|
||||
if (ImGui::SliderInt("##HUDRightSlider", &HUDRightvalue, 0, 40)) {}
|
||||
if (ImGui::IsItemDeactivatedAfterEdit()) {
|
||||
if (SetHUDRight) SetHUDRight(HUDRightvalue);
|
||||
SaveSettings();
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
|
||||
// Fix status
|
||||
ImGui::SetCursorPos(ImVec2(10, 360));
|
||||
ImGui::Text("=============== Fix informations ===============");
|
||||
if (GetFOVIn && GetFOVOut)
|
||||
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
|
||||
}
|
||||
|
||||
// Main dll intrance
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD ul_reason_for_call, LPVOID)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
if (!reshade::register_addon(hinstDLL))
|
||||
return FALSE;
|
||||
|
||||
LoadSettings();
|
||||
reshade::register_overlay("Days Gone", &on_overlay_draw);
|
||||
reshade::register_event<reshade::addon_event::init_effect_runtime>( // Will load asi core only once
|
||||
[](reshade::api::effect_runtime* runtime) {
|
||||
LoadFixDLL();
|
||||
});
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
reshade::unregister_addon(hinstDLL);
|
||||
fixLib = nullptr;
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
14
Days Gone/resource.h
Normal file
14
Days Gone/resource.h
Normal file
@@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by SOM.rc
|
||||
|
||||
// Valeurs par défaut suivantes des nouveaux objets
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user