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,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();