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