From 60977fd74d34b0a86d7d0ef714f491825b202319 Mon Sep 17 00:00:00 2001 From: Echo J Date: Wed, 13 Nov 2024 18:49:03 +0200 Subject: [PATCH] SilentPatch: Move RwEngineInstance definition to headers MinGW GCC can't locate it in some files otherwise --- SilentPatch/RWGTA.cpp | 2 -- SilentPatch/RWGTA.h | 4 ++++ SilentPatch/RWUtils.hpp | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/SilentPatch/RWGTA.cpp b/SilentPatch/RWGTA.cpp index cb5cad6..245777e 100644 --- a/SilentPatch/RWGTA.cpp +++ b/SilentPatch/RWGTA.cpp @@ -1,8 +1,6 @@ #include "Utils/MemoryMgr.h" #include "Utils/Patterns.h" -#define RwEngineInstance (*rwengine) - #include #include "RWGTA.h" diff --git a/SilentPatch/RWGTA.h b/SilentPatch/RWGTA.h index e184dc9..8a3c34c 100644 --- a/SilentPatch/RWGTA.h +++ b/SilentPatch/RWGTA.h @@ -1,5 +1,9 @@ #pragma once +#define RwEngineInstance (*rwengine) + +extern void** rwengine; + namespace RWGTA::Patches { bool TryLocateRwD3D8(); diff --git a/SilentPatch/RWUtils.hpp b/SilentPatch/RWUtils.hpp index abe0653..11ce366 100644 --- a/SilentPatch/RWUtils.hpp +++ b/SilentPatch/RWUtils.hpp @@ -3,6 +3,10 @@ #include #include +#define RwEngineInstance (*rwengine) + +extern void** rwengine; + template class RwScopedRenderState { @@ -68,4 +72,4 @@ Pred RpGeometryForAllMaterials(RpGeometry* geometry, Pred callback) break; } return callback; -} \ No newline at end of file +}