From 277515a56bc797f2cd24784f75a75fc0ef10f1f3 Mon Sep 17 00:00:00 2001 From: Echo J Date: Thu, 7 Nov 2024 00:42:44 +0200 Subject: [PATCH] SilentPatchIII/VC: Remove extern from ppUserFilesDir variable definitions This fixes compile warnings with MinGW GCC --- SilentPatch/Common_ddraw.cpp | 2 -- SilentPatch/Common_ddraw.h | 4 +++- SilentPatchIII/SilentPatchIII.cpp | 2 +- SilentPatchVC/SilentPatchVC.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SilentPatch/Common_ddraw.cpp b/SilentPatch/Common_ddraw.cpp index a0880ed..968c8fa 100644 --- a/SilentPatch/Common_ddraw.cpp +++ b/SilentPatch/Common_ddraw.cpp @@ -15,8 +15,6 @@ #pragma comment(lib, "shlwapi.lib") -extern char** ppUserFilesDir; - namespace Common { char* GetMyDocumentsPath() { diff --git a/SilentPatch/Common_ddraw.h b/SilentPatch/Common_ddraw.h index 577df68..be179cc 100644 --- a/SilentPatch/Common_ddraw.h +++ b/SilentPatch/Common_ddraw.h @@ -2,6 +2,8 @@ #include +extern char** ppUserFilesDir; + namespace Common { namespace Patches @@ -18,4 +20,4 @@ namespace Common void DDraw_Common(); } -}; \ No newline at end of file +}; diff --git a/SilentPatchIII/SilentPatchIII.cpp b/SilentPatchIII/SilentPatchIII.cpp index 9fed18f..26fe548 100644 --- a/SilentPatchIII/SilentPatchIII.cpp +++ b/SilentPatchIII/SilentPatchIII.cpp @@ -377,7 +377,7 @@ __declspec(naked) void RadarBoundsCheckEntityBlip() } } -extern char** ppUserFilesDir = AddressByVersion(0x580C16, 0x580F66, 0x580E66); +char** ppUserFilesDir = AddressByVersion(0x580C16, 0x580F66, 0x580E66); static LARGE_INTEGER FrameTime; NOBUFFERCHECKS int32_t GetTimeSinceLastFrame() diff --git a/SilentPatchVC/SilentPatchVC.cpp b/SilentPatchVC/SilentPatchVC.cpp index 37be2fe..8777977 100644 --- a/SilentPatchVC/SilentPatchVC.cpp +++ b/SilentPatchVC/SilentPatchVC.cpp @@ -696,7 +696,7 @@ __declspec(naked) void CreateInstance_BikeFix() } } -extern char** ppUserFilesDir = AddressByVersion(0x6022AA, 0x60228A, 0x601ECA); +char** ppUserFilesDir = AddressByVersion(0x6022AA, 0x60228A, 0x601ECA); static LARGE_INTEGER FrameTime; NOBUFFERCHECKS int32_t GetTimeSinceLastFrame()