Added Starfield. Removed the need of ASI loader.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user