SilentPatchIII/VC/SA: Mark some function pointers as inline

MinGW GCC's linker can't find them otherwise
This commit is contained in:
Echo J 2024-11-07 09:11:06 +02:00
parent 04f74335c1
commit 1af97eef26
6 changed files with 25 additions and 17 deletions

View file

@ -2,6 +2,13 @@
#include <cstdint>
// Workaround for old MSVC inline function bugs
#if defined(_MSC_VER) && _MSC_VER < 1930
#define STATIC_INLINE static
#else
#define STATIC_INLINE static inline
#endif
namespace ExtraCompSpecularity
{
void ReadExtraCompSpecularityExceptions(const wchar_t* pPath);

View file

@ -1040,7 +1040,7 @@ namespace SlidingTextsScalingFixes
static inline float** pHorShadowValue;
template<std::size_t Index>
static void (*orgPrintString)(float,float,const wchar_t*);
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
template<std::size_t Index>
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
@ -1067,7 +1067,7 @@ namespace SlidingTextsScalingFixes
static inline bool bSlidingEnabled = false;
template<std::size_t Index>
static void (*orgPrintString)(float,float,const wchar_t*);
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
template<std::size_t Index>
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)

View file

@ -2,6 +2,7 @@
#define __GENERAL
#include <stdint.h>
#include "Common.h"
#include "TheFLAUtils.h"
class CSimpleTransform

View file

@ -2851,7 +2851,7 @@ namespace CreditsScalingFixes
static const unsigned int FIXED_RES_HEIGHT_SCALE = 448;
template<std::size_t Index>
static void (*orgPrintString)(float,float,const wchar_t*);
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
template<std::size_t Index>
static void PrintString_ScaleY(float fX, float fY, const wchar_t* pText)
@ -2888,7 +2888,7 @@ namespace SlidingTextsScalingFixes
static inline bool bSlidingEnabled = false;
template<std::size_t Index>
static void (*orgPrintString)(float,float,const wchar_t*);
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
template<std::size_t Index>
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
@ -2898,7 +2898,7 @@ namespace SlidingTextsScalingFixes
}
template<std::size_t Index>
static void (*orgSetRightJustifyWrap)(float wrap);
STATIC_INLINE void (*orgSetRightJustifyWrap)(float wrap);
template<std::size_t Index>
static void SetRightJustifyWrap_Slide(float wrap)
@ -2915,7 +2915,7 @@ namespace SlidingTextsScalingFixes
static inline bool bSlidingEnabled = false;
template<std::size_t Index>
static void (*orgPrintString)(float,float,const wchar_t*);
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
template<std::size_t Index>
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)

View file

@ -302,7 +302,7 @@ public:
private:
template<std::size_t Index>
static void (CVehicle::*orgDoHeadLightBeam)(int type, CMatrix& m, bool right);
STATIC_INLINE void (CVehicle::*orgDoHeadLightBeam)(int type, CMatrix& m, bool right);
template<std::size_t Index>
void DoHeadLightBeam_LightBeamFixSaveObj(int type, CMatrix& m, bool right)
@ -337,7 +337,7 @@ public:
public:
template<std::size_t Index>
static void (CAutomobile::*orgAutomobilePreRender)();
STATIC_INLINE void (CAutomobile::*orgAutomobilePreRender)();
template<std::size_t Index>
void PreRender_SilentPatch()
@ -352,7 +352,7 @@ public:
void HideDestroyedWheels_SilentPatch(void (CAutomobile::*spawnFlyingComponentCB)(int, unsigned int), int nodeID, unsigned int modelID);
template<std::size_t Index>
static void (CAutomobile::*orgSpawnFlyingComponent)(int, unsigned int);
STATIC_INLINE void (CAutomobile::*orgSpawnFlyingComponent)(int, unsigned int);
template<std::size_t Index>
void SpawnFlyingComponent_HideWheels(int nodeID, unsigned int modelID)
@ -448,7 +448,7 @@ private:
private:
template<std::size_t Index>
static CVehicle* (CStoredCar::*orgRestoreCar)();
STATIC_INLINE CVehicle* (CStoredCar::*orgRestoreCar)();
template<std::size_t Index>
CVehicle* RestoreCar_SilentPatch()

View file

@ -356,7 +356,7 @@ namespace RadarTraceOutlineFixes
}
template<std::size_t Index>
static void (*orgShowRadarTraceWithHeight)(float, float, unsigned int, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char);
STATIC_INLINE void (*orgShowRadarTraceWithHeight)(float, float, unsigned int, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char);
template<std::size_t Index>
static void ShowRadarTraceWithHeight_RecalculatePositions(float a1, float a2, unsigned int a3, unsigned char a4, unsigned char a5, unsigned char a6, unsigned char a7, unsigned char a8)
@ -456,7 +456,7 @@ namespace SlidingTextsScalingFixes
static inline bool bSlidingEnabled = false;
template<std::size_t Index>
static void (*orgPrintString)(float,float,const wchar_t*);
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
template<std::size_t Index>
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
@ -466,7 +466,7 @@ namespace SlidingTextsScalingFixes
}
template<std::size_t Index>
static void (*orgSetRightJustifyWrap)(float wrap);
STATIC_INLINE void (*orgSetRightJustifyWrap)(float wrap);
template<std::size_t Index>
static void SetRightJustifyWrap_Slide(float wrap)
@ -483,7 +483,7 @@ namespace SlidingTextsScalingFixes
static inline bool bSlidingEnabled = false;
template<std::size_t Index>
static void (*orgPrintString)(float,float,const wchar_t*);
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
template<std::size_t Index>
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)