Added Starfield. Removed the need of ASI loader.

This commit is contained in:
2025-07-25 15:03:35 +02:00
parent c4e1f130d8
commit 731218faa7
15 changed files with 623 additions and 97 deletions

View File

@@ -5,7 +5,6 @@
#include <reshade.hpp>
#include <fstream>
#include <string>
#include <Windows.h>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool, bool);
@@ -47,17 +46,18 @@ 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&currency_code=EUR";
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
// 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
fixLib = LoadLibraryA("DaysGoneCore.dll"); // 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");
@@ -268,9 +268,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 360));
ImGui::Text("=============== Fix informations ===============");
if (GetFOVIn && GetFOVOut)
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true); // true = border
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -5,9 +5,6 @@
#include <reshade.hpp>
#include <fstream>
#include <string>
#include <thread>
#include <chrono>
#include <Windows.h>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool,bool);
@@ -35,18 +32,19 @@ const char* WORLD_FOV_FIX_SETTING = "WorldFOVFIX=";
const char* WORLD_FOV_SETTING = "WorldFOV=";
const char* FIX_VERSION = "1.0.2";
const char* FIX_INFORMATIONS = "This fix allows to :\r\n- Change FOV in game.\r\nThis will not affect inventory,store or bench tool.";
const char* DONATION_URL = "https://www.paypal.com/donate/?business=W92C47N3WZZZG&no_recurring=0&currency_code=EUR";
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
// Load and unload game core dll functions /!\ necessary
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("DeadSpace2023Core.asi"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
fixLib = LoadLibraryA("DeadSpace2023Core.dll"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
if (!fixLib) {
// Optionnel: message d'erreur ou fallback
MessageBoxA(nullptr, "Impossible to load game core dll", "Erreur", MB_OK);
return;
}
SetFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFixEnabled");
SetFOVFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFOVFixEnabled");
SetFOV = (SetIntFn)GetProcAddress(fixLib, "SetFOV");
@@ -170,8 +168,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 200));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true); // true = border
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -45,7 +45,7 @@ const char* DONATION_URL = "https://www.paypal.com/donate/?business=W92C47N3WZZZ
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("EmpireOfTheAntsCore.asi"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
fixLib = LoadLibraryA("EmpireOfTheAntsCore.dll"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
if (!fixLib) {
// Optionnel: message d'erreur ou fallback
@@ -205,8 +205,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 200));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true); // true = border
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -46,13 +46,13 @@ const char* WORLD_FOV_SETTING = "WorldFOV=";
const char* CINEMATICS_FOV_SETTING = "CinematicsFOV=";
const char* FIX_VERSION = "1.0.3";
const char* FIX_INFORMATIONS = "This fix allows to:\r\n - Modify FOV in game\r\n - Modify Cinematics FOV.\r\n - Disable depth of field in cutscenes.\r\n - Unlock cinematics frametime.\r\n - Enable frame generation with cutscenes.\r\n\r\nThe game has a narrow FOV in cinematics for displays with a ratio above 21/9.\r\nCinematics FOV will be compensated for ultrawide displays.\r\nCinematics FOV won't affect world or menus FOVs.\r\nDepth of field fix should affect all the game.";
const char* DONATION_URL = "https://www.paypal.com/donate/?business=W92C47N3WZZZG&no_recurring=0&currency_code=EUR";
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
// Load and unload game core dll functions /!\ necessary
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("IndianaJonesTGCCore.asi");
fixLib = LoadLibraryA("IndianaJonesTGCCore.dll");
if (!fixLib) {
MessageBoxA(nullptr, "Impossible to load game core dll", "Erreur", MB_OK);
@@ -230,9 +230,13 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 240));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
ImGui::Text("Cinematics FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetCinematicsFOVIn(), GetCinematicsCompensadedFOV(), GetCinematicsFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true);
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
ImGui::Text("Cinematics FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetCinematicsFOVIn(), GetCinematicsCompensadedFOV(), GetCinematicsFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -5,7 +5,6 @@
#include <reshade.hpp>
#include <fstream>
#include <string>
#include <Windows.h>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool, bool);
@@ -47,10 +46,9 @@ const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("MetroExodusCore.asi"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
fixLib = LoadLibraryA("MetroExodusCore.dll");
if (!fixLib) {
// Optionnel: message d'erreur ou fallback
MessageBoxA(nullptr, "Impossible to load game core dll", "Erreur", MB_OK);
return;
}
@@ -63,9 +61,9 @@ static void LoadFixDLL()
GetFOVIn = (GetFloatFn)GetProcAddress(fixLib, "GetFOVIn");
GetFOVOut = (GetFloatFn)GetProcAddress(fixLib, "GetFOVOut");;
// Appliquer les valeurs initiales chargées
// Apply initial values loaded from ini
if (SetFOV) SetFOV(worldFOVvalue);
if (SetCutscenesFOV) SetFOV(cutscenesFOVvalue);
if (SetCutscenesFOV) SetCutscenesFOV(cutscenesFOVvalue);
if (SetFOVFixEnabled) SetFOVFixEnabled(fov_fix_enabled, true);
if (SetCutscenesFOVFixEnabled) SetCutscenesFOVFixEnabled(cutscenes_fov_fix_enabled, true);
if (SetAspectRatioFixEnabled) SetAspectRatioFixEnabled(aspect_ratio_fix_enabled, true);
@@ -160,7 +158,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Generic fix
ImGui::SetCursorPos(ImVec2(10, 60));
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
@@ -172,7 +170,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -185,7 +183,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
ImGui::EndChild();
ImGui::SetCursorPos(ImVec2(10, 180));
ImGui::BeginChild("CutscenesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("CutscenesHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("Cutscenes additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -199,7 +197,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false);
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("FOV Fix", &fov_fix_enabled)) {
@@ -223,8 +221,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 240));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true); // true = border
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -5,7 +5,6 @@
#include <reshade.hpp>
#include <fstream>
#include <string>
#include <Windows.h>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool, bool);
@@ -45,7 +44,7 @@ const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("MindseyeCore.asi"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
fixLib = LoadLibraryA("MindseyeCore.dll");
if (!fixLib) {
// Optionnel: message d'erreur ou fallback
@@ -61,7 +60,7 @@ static void LoadFixDLL()
GetCompensadedFOV = (GetFloatFn)GetProcAddress(fixLib, "GetCompensatedFOV");
GetFOVOut = (GetFloatFn)GetProcAddress(fixLib, "GetFOVOut");;
// Appliquer les valeurs initiales chargées
// Apply initial values load from ini
if (SetFOV) SetFOV(worldFOVvalue);
if (SetFOVFixEnabled) SetFOVFixEnabled(fov_fix_enabled, true);
if (SetAspectRatioFixEnabled) SetAspectRatioFixEnabled(aspect_ratio_fix_enabled, true);
@@ -154,7 +153,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Generic fix
ImGui::SetCursorPos(ImVec2(10, 60));
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
@@ -166,7 +165,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -180,7 +179,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false);
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Enable FOV Fix", &fov_fix_enabled)) {
@@ -204,8 +203,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 200));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true); // true = border
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -29,6 +29,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Robocop UB", "Robocop UB\Ro
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TLOU", "TLOU\TLOU.vcxproj", "{01175866-A908-4941-B4EE-2ECDD7AF075C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Starfield", "Starfield\Starfield.vcxproj", "{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@@ -133,6 +135,14 @@ Global
{01175866-A908-4941-B4EE-2ECDD7AF075C}.Release|x64.Build.0 = Release|x64
{01175866-A908-4941-B4EE-2ECDD7AF075C}.Release|x86.ActiveCfg = Release|Win32
{01175866-A908-4941-B4EE-2ECDD7AF075C}.Release|x86.Build.0 = Release|Win32
{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}.Debug|x64.ActiveCfg = Debug|x64
{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}.Debug|x64.Build.0 = Debug|x64
{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}.Debug|x86.ActiveCfg = Debug|Win32
{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}.Debug|x86.Build.0 = Debug|Win32
{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}.Release|x64.ActiveCfg = Release|x64
{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}.Release|x64.Build.0 = Release|x64
{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}.Release|x86.ActiveCfg = Release|Win32
{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -5,7 +5,6 @@
#include <reshade.hpp>
#include <fstream>
#include <string>
#include <Windows.h>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool, bool);
@@ -45,7 +44,7 @@ const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("RobocopUBCore.asi");
fixLib = LoadLibraryA("RobocopUBCore.dll");
if (!fixLib) {
// Optionnel: message d'erreur ou fallback
@@ -154,7 +153,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Generic fix
ImGui::SetCursorPos(ImVec2(10, 60));
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
@@ -166,7 +165,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -180,7 +179,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false);
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Enable FOV Fix", &fov_fix_enabled)) {
@@ -204,8 +203,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 200));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true); // true = border
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -36,19 +36,18 @@ const char* ASPECT_FIX_SETTING = "AspectFIX=";
const char* WORLD_FOV_SETTING = "WorldFOV=";
const char* FIX_VERSION = "1.0.1";
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control in game FOV.\n - Force aspect ratio.\r\nFOV will be compensated when aspect fix is checked.";
const char* DONATION_URL = "https://www.paypal.com/donate/?business=W92C47N3WZZZG&no_recurring=0&currency_code=EUR";
const char* DONATION_URL2 = "https://buymeacoffee.com/k4sh44";
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
// Load and unload game core dll functions /!\ necessary
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("SouthOfMidnightCore.asi"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
fixLib = LoadLibraryA("SouthOfMidnightCore.dll");
if (!fixLib) {
// Optionnel: message d'erreur ou fallback
MessageBoxA(nullptr, "Impossible to load game core dll", "Erreur", MB_OK);
return;
}
SetFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFixEnabled");
SetFOVFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFOVFixEnabled");
SetAspectRatioFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetAspectRatioFixEnabled");
@@ -57,7 +56,7 @@ static void LoadFixDLL()
GetCompensadedFOV = (GetFloatFn)GetProcAddress(fixLib, "GetCompensatedFOV");
GetFOVOut = (GetFloatFn)GetProcAddress(fixLib, "GetFOVOut");;
// Appliquer les valeurs initiales chargées
// Apply initial values loaded from ini
if (SetFOV) SetFOV(worldFOVvalue);
if (SetFOVFixEnabled) SetFOVFixEnabled(fov_fix_enabled, true);
if (SetAspectRatioFixEnabled) SetAspectRatioFixEnabled(aspect_ratio_fix_enabled, true);
@@ -130,8 +129,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
ImGui::SetCursorPos(ImVec2(130, 33));
if (ImGui::Button("consider donation"))
{
//ShellExecuteA(NULL, "open", DONATION_URL, NULL, NULL, SW_SHOWNORMAL);
ShellExecuteA(NULL, "open", DONATION_URL2, NULL, NULL, SW_SHOWNORMAL);
ShellExecuteA(NULL, "open", DONATION_URL, NULL, NULL, SW_SHOWNORMAL);
}
// Fix informations
@@ -144,7 +142,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Generic fix
ImGui::SetCursorPos(ImVec2(10, 60));
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
@@ -156,7 +154,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -170,7 +168,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false);
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Enable FOV Fix", &fov_fix_enabled)) {
@@ -188,8 +186,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 200));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true);
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -5,7 +5,6 @@
#include <reshade.hpp>
#include <fstream>
#include <string>
#include <Windows.h>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool, bool);
@@ -45,7 +44,7 @@ const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("SpiritOfTheNorthCore.asi"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
fixLib = LoadLibraryA("SpiritOfTheNorthCore.dll");
if (!fixLib) {
// Optionnel: message d'erreur ou fallback
@@ -154,7 +153,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Generic fix
ImGui::SetCursorPos(ImVec2(10, 60));
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
@@ -166,7 +165,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -180,7 +179,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false);
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Enable FOV Fix", &fov_fix_enabled)) {
@@ -204,8 +203,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 200));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true);
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Compensated : %.2f, Out : %.2f", GetFOVIn(), GetCompensadedFOV(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

156
Starfield/Starfield.vcxproj Normal file
View File

@@ -0,0 +1,156 @@
<?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>{762480CC-C755-4AB5-A8EE-FBF7050E4DFE}</ProjectGuid>
<RootNamespace>Starfield</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>Starfield</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>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</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>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</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>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</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>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</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>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

328
Starfield/dllmain.cpp Normal file
View File

@@ -0,0 +1,328 @@
#define IMGUI_DISABLE_INCLUDE_IMCONFIG_H
#define IMGUI_HAS_DOCK 1
#include <imgui.h>
#include <reshade.hpp>
#include <fstream>
#include <string>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool,bool);
typedef void (*SetIntFn)(int);
typedef void (*SetFloatFn)(float);
typedef float (*GetFloatFn)();
static HMODULE fixLib = nullptr;
static SetBoolFn SetFixEnabled = nullptr;
static SetBoolFn SetDialogFOVFixEnabled = nullptr;
static SetBoolFn SetWeaponFOVFixEnabled = nullptr;
static SetBoolFn SetHUDFixEnabled = nullptr;
static SetBoolFn SetPhotoModeFixEnabled = nullptr;
static SetIntFn SetDialogFOV = nullptr;
static SetIntFn SetWeaponFOV = nullptr;
static SetIntFn SetHUDX = nullptr;
static SetIntFn SetHUDY = nullptr;
static GetFloatFn GetDialogFOVIn = nullptr;
static GetFloatFn GetDialogFOVOut = nullptr;
static GetFloatFn GetWeaponFOVIn = nullptr;
static GetFloatFn GetWeaponFOVOut = nullptr;
// Plugin variables for checkboxes and sliders
static bool fix_enabled = false;
static bool dialog_fov_fix_enabled = false;
static bool weapon_fov_fix_enabled = false;
static bool HUD_fix_enabled = false;
static bool Photomode_fix_enabled = false;
static int dialogFOVvalue = 0;
static int weaponFOVvalue = 0;
static int HUDXvalue = 0;
static int HUDYvalue = 0;
static bool popup_Informations = false;
// Plugin settings
const char* SETTINGS_FILE = "PluginSettings.ini";
const char* GENERAL_FIX_SETTING = "GeneralFIX=";
const char* DIALOG_FOV_FIX_SETTING = "DialogFOVFIX=";
const char* WEAPON_FOV_FIX_SETTING = "WeaponFOVFIX=";
const char* HUD_FIX_SETTING = "HUDFIX=";
const char* PHOTOMODE_FIX_SETTING = "PhotomodeFIX=";
const char* DIALOG_FOV_SETTING = "DialogFOV=";
const char* WEAPON_FOV_SETTING = "WeaponFOV=";
const char* HUDX_SETTING = "HUDX=";
const char* HUDY_SETTING = "HUDY=";
const char* FIX_VERSION = "1.0.1";
const char* FIX_INFORMATIONS = "This fix allows to:\r\n - Control dialog and weapon FOV.\r\n - Control HUD safe zone.\r\n - Disable photomode black bars.";
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
// Load and unload game core dll functions /!\ necessary
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = LoadLibraryA("StarfieldCore.dll");
if (!fixLib) {
MessageBoxA(nullptr, "Impossible to load game core dll", "Erreur", MB_OK);
return;
}
SetFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFixEnabled");
SetDialogFOVFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetDialogFOVFixEnabled");
SetWeaponFOVFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetWeaponFOVFixEnabled");
SetHUDFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetHUDFixEnabled");
SetPhotoModeFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetPhotoModeFixEnabled");
SetDialogFOV = (SetIntFn)GetProcAddress(fixLib, "SetDialogFOV");
SetWeaponFOV = (SetIntFn)GetProcAddress(fixLib, "SetWeaponFOV");
SetHUDX = (SetIntFn)GetProcAddress(fixLib, "SetHUDX");
SetHUDY = (SetIntFn)GetProcAddress(fixLib, "SetHUDY");
GetDialogFOVIn = (GetFloatFn)GetProcAddress(fixLib, "GetDialogFOVIn");
GetDialogFOVOut = (GetFloatFn)GetProcAddress(fixLib, "GetDialogFOVOut");
GetWeaponFOVIn = (GetFloatFn)GetProcAddress(fixLib, "GetWeaponFOVIn");
GetWeaponFOVOut = (GetFloatFn)GetProcAddress(fixLib, "GetWeaponFOVOut");
// Apply initial settings loaded from ini file
if (SetDialogFOV) SetDialogFOV(dialogFOVvalue);
if (SetWeaponFOV) SetWeaponFOV(weaponFOVvalue);
if (SetHUDX) SetHUDX(HUDXvalue);
if (SetHUDY) SetHUDY(HUDYvalue);
if (SetDialogFOVFixEnabled) SetDialogFOVFixEnabled(dialog_fov_fix_enabled, true);
if (SetWeaponFOVFixEnabled) SetWeaponFOVFixEnabled(weapon_fov_fix_enabled, true);
if (SetHUDFixEnabled) SetHUDFixEnabled(HUD_fix_enabled, true);
if (SetPhotoModeFixEnabled) SetPhotoModeFixEnabled(Photomode_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 << DIALOG_FOV_FIX_SETTING << (dialog_fov_fix_enabled ? "1" : "0") << "\n";
file << WEAPON_FOV_FIX_SETTING << (weapon_fov_fix_enabled ? "1" : "0") << "\n";
file << HUD_FIX_SETTING << (HUD_fix_enabled ? "1" : "0") << "\n";
file << PHOTOMODE_FIX_SETTING << (Photomode_fix_enabled ? "1" : "0") << "\n";
file << DIALOG_FOV_SETTING << dialogFOVvalue << "\n";
file << WEAPON_FOV_SETTING << weaponFOVvalue << "\n";
file << HUDX_SETTING << HUDXvalue << "\n";
file << HUDY_SETTING << HUDYvalue << "\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(DIALOG_FOV_FIX_SETTING) == 0)
{
std::string val = line.substr(strlen(DIALOG_FOV_FIX_SETTING));
dialog_fov_fix_enabled = (val == "1" || val == "true");
}
else if (line.find(WEAPON_FOV_FIX_SETTING) == 0)
{
std::string val = line.substr(strlen(WEAPON_FOV_FIX_SETTING));
weapon_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(PHOTOMODE_FIX_SETTING) == 0)
{
std::string val = line.substr(strlen(PHOTOMODE_FIX_SETTING));
Photomode_fix_enabled = (val == "1" || val == "true");
}
else if (line.find(DIALOG_FOV_SETTING) == 0)
dialogFOVvalue = std::stoi(line.substr(strlen(DIALOG_FOV_SETTING)));
else if (line.find(WEAPON_FOV_SETTING) == 0)
weaponFOVvalue = std::stoi(line.substr(strlen(DIALOG_FOV_SETTING)));
else if (line.find(HUDX_SETTING) == 0)
HUDXvalue = std::stof(line.substr(strlen(HUDX_SETTING)));
else if (line.find(HUDY_SETTING) == 0)
HUDYvalue = std::stof(line.substr(strlen(HUDY_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();
// Dialog FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("DialogFOVHeader", ImVec2(220, 0), false); // true = bordure
if (ImGui::CollapsingHeader("Dialog additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
if (ImGui::SliderInt("##DialogFOVSlider", &dialogFOVvalue, 0, 70)) {}
if (ImGui::IsItemDeactivatedAfterEdit()) {
if (SetDialogFOV) SetDialogFOV(dialogFOVvalue);
SaveSettings();
}
}
ImGui::EndChild();
// Weapon FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 180));
ImGui::BeginChild("WeaponFOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("Weapon additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
if (ImGui::SliderInt("##WeaponFOVSlider", &weaponFOVvalue, 0, 50)) {}
if (ImGui::IsItemDeactivatedAfterEdit()) {
if (SetWeaponFOV) SetWeaponFOV(weaponFOVvalue);
SaveSettings();
}
}
ImGui::EndChild();
// Safe zone X axis
ImGui::SetCursorPos(ImVec2(10, 240));
ImGui::BeginChild("HUDXHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("HUD width scaling", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
if (ImGui::SliderInt("##HUDXSlider", &HUDXvalue, 0, 80)) {}
if (ImGui::IsItemDeactivatedAfterEdit()) {
if (SetHUDX) SetHUDX(HUDXvalue);
SaveSettings();
}
}
ImGui::EndChild();
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Dialog FOV Fix", &dialog_fov_fix_enabled)) {
if (SetDialogFOVFixEnabled) SetDialogFOVFixEnabled(dialog_fov_fix_enabled, false);
SaveSettings();
}
ImGui::SetCursorPos(ImVec2(5, 55));
if (ImGui::Checkbox("Weapon FOV Fix", &weapon_fov_fix_enabled)) {
if (SetWeaponFOVFixEnabled) SetWeaponFOVFixEnabled(weapon_fov_fix_enabled, false);
SaveSettings();
}
ImGui::SetCursorPos(ImVec2(5, 80));
if (ImGui::Checkbox("HUD safe zone fix", &HUD_fix_enabled)) {
if (SetHUDFixEnabled) SetHUDFixEnabled(HUD_fix_enabled, false);
SaveSettings();
}
ImGui::SetCursorPos(ImVec2(5, 105));
if (ImGui::Checkbox("Photomode aspect fix", &Photomode_fix_enabled)) {
if (SetPhotoModeFixEnabled) SetPhotoModeFixEnabled(Photomode_fix_enabled, false);
SaveSettings();
}
}
ImGui::EndChild();
// Safe zone Y axis
ImGui::SetCursorPos(ImVec2(240, 240));
ImGui::BeginChild("HUDYHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("HUD height scaling", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
if (ImGui::SliderInt("##HUDYSlider", &HUDYvalue, 0, 80)) {}
if (ImGui::IsItemDeactivatedAfterEdit()) {
if (SetHUDY) SetHUDY(HUDYvalue);
SaveSettings();
}
}
ImGui::EndChild();
// Fix status
ImGui::SetCursorPos(ImVec2(10, 320));
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true); // true = border
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("Dialog FOV In: %.2f, Out : %.2f", GetDialogFOVIn(), GetDialogFOVOut());
ImGui::Text("Weapon FOV In: %.2f, Out : %.2f", GetWeaponFOVIn(), GetWeaponFOVOut());
}
ImGui::EndChild();
}
static void UnLoadFixDLL() {
MessageBoxA(nullptr, "Déchargement dll", "Erreur", MB_OK);
}
// 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("Starfield", &on_overlay_draw);
reshade::register_event<reshade::addon_event::init_effect_runtime>(
[](reshade::api::effect_runtime* runtime) {
LoadFixDLL();
});
break;
case DLL_PROCESS_DETACH:
fixLib = nullptr;
reshade::unregister_addon(hinstDLL);
break;
}
return TRUE;
}

View File

@@ -44,13 +44,13 @@ const char* CAMERA_SETTING = "Camera=";
const char* SHARPNESS_SETTING = "Sharpness=";
const char* FIX_VERSION = "1.0.1";
const char* FIX_INFORMATIONS = "This fix allows to:\r\n - Control in game FOV.\r\n - Control camera distance.\r\n - Control image sharpening.\n\nModifying FOV may affect performance.\r\nSharpening fix will override game's setting. A good range would be (0 - 1).\r\nSet the slider to 0 to completely deactivate it.\r\nCamera distance in settings is a scale between 0.9 - 1.1 (-5 to +5 slider).";
const char* DONATION_URL = "https://www.paypal.com/donate/?business=W92C47N3WZZZG&no_recurring=0&currency_code=EUR";
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
// Load and unload game core dll functions /!\ necessary
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("TLOUCore.asi");
fixLib = LoadLibraryA("TLOUCore.dll");
if (!fixLib) {
MessageBoxA(nullptr, "Impossible to laod game core dll", "Erreur", MB_OK);
@@ -169,7 +169,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Generic fix
ImGui::SetCursorPos(ImVec2(10, 60));
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
@@ -181,7 +181,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -195,7 +195,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Camera distance adjustment
ImGui::SetCursorPos(ImVec2(10, 200));
ImGui::BeginChild("CAMERAHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("CAMERAHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("Camera distance", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -209,7 +209,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Sharpness adjustment
ImGui::SetCursorPos(ImVec2(10, 280));
ImGui::BeginChild("SHARPNESSHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("SHARPNESSHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("Sharpness", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -223,7 +223,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = border
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Enable FOV Fix", &fov_fix_enabled)) {
@@ -247,8 +247,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 350));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true);
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance

View File

@@ -5,9 +5,6 @@
#include <reshade.hpp>
#include <fstream>
#include <string>
#include <thread>
#include <chrono>
#include <Windows.h>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool,bool);
@@ -47,16 +44,15 @@ const char* CAMERA_SETTING = "Camera=";
const char* SHARPNESS_SETTING = "Sharpness=";
const char* FIX_VERSION = "1.0.2";
const char* FIX_INFORMATIONS = "This fix allows to:\r\n - Control in game FOV.\r\n - Control camera distance.\r\n - Disable image sharpening.\r\n\r\nModifying FOV may affect performance.\r\nSharpening, when set to 0 in game still applies some slight effect to images.\r\nSet the slider to 0 to completely deactivate it.\r\nA good range result would be between 0-1.\r\nCamera distance in settings is a scale between 0.9 - 1.1 (-5 to +5 slider).";
const char* DONATION_URL = "https://www.paypal.com/donate/?business=W92C47N3WZZZG&no_recurring=0&currency_code=EUR";
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
// Load and unload game core dll functions /!\ necessary
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("TLOU2Core.asi"); // ou EmpireOfTheAntsCore.dll si tu gardes le .dll
fixLib = LoadLibraryA("TLOU2Core.dll");
if (!fixLib) {
// Optionnel: message d'erreur ou fallback
MessageBoxA(nullptr, "Impossible to laod game core dll", "Erreur", MB_OK);
return;
}
@@ -173,7 +169,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Generic fix
ImGui::SetCursorPos(ImVec2(10, 60));
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
@@ -185,7 +181,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -199,7 +195,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Camera distance adjustment
ImGui::SetCursorPos(ImVec2(10, 200));
ImGui::BeginChild("CAMERAHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("CAMERAHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("Camera distance", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -213,7 +209,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Sharpness adjustment
ImGui::SetCursorPos(ImVec2(10, 280));
ImGui::BeginChild("SHARPNESSHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("SHARPNESSHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("Sharpness", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -227,7 +223,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false);
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Enable FOV Fix", &fov_fix_enabled)) {
@@ -251,8 +247,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 350));
ImGui::Text("=============== Fix informations ===============");
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true);
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
}
ImGui::EndChild();
}
DWORD WINAPI MainThread(LPVOID)
@@ -274,7 +274,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD ul_reason_for_call, LPVOID)
return FALSE;
LoadSettings();
reshade::register_overlay("The Last Of Us : PArt II", &on_overlay_draw);
reshade::register_overlay("The Last Of Us : Part II", &on_overlay_draw);
reshade::register_event<reshade::addon_event::init_effect_runtime>(
[](reshade::api::effect_runtime* runtime) {
LoadFixDLL();

View File

@@ -5,7 +5,6 @@
#include <reshade.hpp>
#include <fstream>
#include <string>
#include <Windows.h>
// Core game dll functions declarations
typedef void (*SetBoolFn)(bool,bool);
@@ -67,7 +66,7 @@ const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
static void LoadFixDLL()
{
if (fixLib) return;
fixLib = GetModuleHandleA("UnchartedLOTCCore.asi");
fixLib = LoadLibraryA("UnchartedLOTCCore.dll");
if (!fixLib) {
MessageBoxA(nullptr, "Impossible to load game core dll", "Erreur", MB_OK);
@@ -214,7 +213,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Generic fix
ImGui::SetCursorPos(ImVec2(10, 60));
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AllFixesHeader", ImVec2(220, 0), false); // true = border
if (ImGui::CollapsingHeader("Enable fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::Checkbox("Fix enabled", &fix_enabled)) {
@@ -226,7 +225,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// FOV adjustment
ImGui::SetCursorPos(ImVec2(10, 120));
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("FOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("In game additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -239,7 +238,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
ImGui::EndChild();
ImGui::SetCursorPos(ImVec2(10, 180));
ImGui::BeginChild("PhotoFOVHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("PhotoFOVHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("Photo mode additional FOV", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::SetNextItemWidth(150.0f);
@@ -252,7 +251,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
ImGui::EndChild();
ImGui::SetCursorPos(ImVec2(10, 240));
ImGui::BeginChild("AspectHeader", ImVec2(220, 0), false); // true = bordure
ImGui::BeginChild("AspectHeader", ImVec2(220, 0), false);
if (ImGui::CollapsingHeader("Game aspect ratio", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
if (ImGui::InputFloat("", &aspectRatiovalue, 0.0f, 0.0f, "% .2f")) {
@@ -264,7 +263,7 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
ImGui::EndChild();
// Individual fixes
ImGui::SetCursorPos(ImVec2(240, 60));
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false); // true = bordure
ImGui::BeginChild("IndividualFixesHeader", ImVec2(250, 0), false);
if (ImGui::CollapsingHeader("Individual fixes", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30)); // FOV
if (ImGui::Checkbox("Enable FOV fix", &fov_fix_enabled)) {
@@ -306,9 +305,12 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
// Fix status
ImGui::SetCursorPos(ImVec2(10, 300));
ImGui::Text("=============== Fix informations ===============");
if (GetFOVIn && GetFOVOut)
ImGui::BeginChild("INFOSHeader", ImVec2(480, 80), true);
if (ImGui::CollapsingHeader("Fix informations", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::SetCursorPos(ImVec2(5, 30));
ImGui::Text("FOV In: %.2f, Out : %.2f", GetFOVIn(), GetFOVOut());
}
ImGui::EndChild();
}
// Main dll intrance