mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 23:33:02 +05:00
SilentPatchIII/VC/SA: Mark some function pointers as inline
MinGW GCC's linker can't find them otherwise
This commit is contained in:
parent
9d988b3396
commit
b1a86e8a89
6 changed files with 25 additions and 17 deletions
|
@ -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);
|
||||
|
@ -15,4 +22,4 @@ namespace Common
|
|||
void III_VC_Common();
|
||||
void III_VC_SetDelayedPatchesFunc( void(*func)() );
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1027,7 +1027,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)
|
||||
|
@ -1054,7 +1054,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)
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define __GENERAL
|
||||
|
||||
#include <stdint.h>
|
||||
#include "Common.h"
|
||||
#include "TheFLAUtils.h"
|
||||
|
||||
class CSimpleTransform
|
||||
|
@ -570,4 +571,4 @@ static_assert(sizeof(CPhysical) == 0x138, "Wrong size: CPhysical");
|
|||
static_assert(sizeof(CObject) == 0x17C, "Wrong size: CObject");
|
||||
static_assert(sizeof(CEscalator) == 0x150, "Wrong size: CEscalator");
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
@ -477,4 +477,4 @@ static_assert(sizeof(CVehicle) == 0x5A0, "Wrong size: CVehicle");
|
|||
static_assert(sizeof(CAutomobile) == 0x988, "Wrong size: CAutomobile");
|
||||
static_assert(sizeof(CStoredCar) == 0x40, "Wrong size: CStoredCar");
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue