mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2025-01-01 16:53:01 +05:00
Compare commits
18 commits
8a75bc73f2
...
0f30079500
Author | SHA1 | Date | |
---|---|---|---|
|
0f30079500 | ||
|
dcde67d8e2 | ||
|
00a48ec059 | ||
|
135ceed86c | ||
|
75004322ab | ||
|
b386f216e4 | ||
|
37a53c384a | ||
|
52038fdd27 | ||
|
8233e826ec | ||
|
9cf2881779 | ||
|
96e971e364 | ||
|
f523ea372a | ||
|
b1a86e8a89 | ||
|
9d988b3396 | ||
|
3eab9e4461 | ||
|
743fedfed2 | ||
|
a14472a16d | ||
|
661336ecc9 |
8 changed files with 33 additions and 25 deletions
|
@ -2,6 +2,13 @@
|
||||||
|
|
||||||
#include <cstdint>
|
#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
|
||||||
|
|
||||||
#define RwEngineInstance (*rwengine)
|
#define RwEngineInstance (*rwengine)
|
||||||
|
|
||||||
extern "C" void** rwengine;
|
extern "C" void** rwengine;
|
||||||
|
|
|
@ -1254,7 +1254,7 @@ namespace SlidingTextsScalingFixes
|
||||||
static inline float** pHorShadowValue;
|
static inline float** pHorShadowValue;
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static inline void (*orgPrintString)(float,float,const wchar_t*);
|
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
||||||
|
@ -1281,7 +1281,7 @@ namespace SlidingTextsScalingFixes
|
||||||
static inline bool bSlidingEnabled = false;
|
static inline bool bSlidingEnabled = false;
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static inline void (*orgPrintString)(float,float,const wchar_t*);
|
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define __AUDIOHARDWARE
|
#define __AUDIOHARDWARE
|
||||||
|
|
||||||
// IStream
|
// IStream
|
||||||
#include <Objidl.h>
|
#include <objidl.h>
|
||||||
|
|
||||||
enum eDecoderType
|
enum eDecoderType
|
||||||
{
|
{
|
||||||
|
@ -205,4 +205,4 @@ public:
|
||||||
static_assert(sizeof(CAEDataStreamOld) == 0x28, "Wrong size: CAEDataStreamOld");
|
static_assert(sizeof(CAEDataStreamOld) == 0x28, "Wrong size: CAEDataStreamOld");
|
||||||
static_assert(sizeof(CAEDataStreamNew) == 0x2C, "Wrong size: CAEDataStreamNew");
|
static_assert(sizeof(CAEDataStreamNew) == 0x2C, "Wrong size: CAEDataStreamNew");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include "AudioHardwareSA.h"
|
#include "AudioHardwareSA.h"
|
||||||
|
|
||||||
// libflac
|
// libflac
|
||||||
#include "FLAC\stream_decoder.h"
|
#include "FLAC/stream_decoder.h"
|
||||||
#include "FLAC\metadata.h"
|
#include "FLAC/metadata.h"
|
||||||
|
|
||||||
class CAEFLACDecoder final : public CAEStreamingDecoder
|
class CAEFLACDecoder final : public CAEStreamingDecoder
|
||||||
{
|
{
|
||||||
|
@ -45,4 +45,4 @@ public:
|
||||||
{ return m_streamMeta->data.stream_info.sample_rate; }
|
{ return m_streamMeta->data.stream_info.sample_rate; }
|
||||||
virtual uint32_t GetStreamID() const override
|
virtual uint32_t GetStreamID() const override
|
||||||
{ return GetStream()->GetID(); }
|
{ return GetStream()->GetID(); }
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define __GENERAL
|
#define __GENERAL
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "Common.h"
|
||||||
#include "TheFLAUtils.h"
|
#include "TheFLAUtils.h"
|
||||||
|
|
||||||
class CSimpleTransform
|
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(CObject) == 0x17C, "Wrong size: CObject");
|
||||||
static_assert(sizeof(CEscalator) == 0x150, "Wrong size: CEscalator");
|
static_assert(sizeof(CEscalator) == 0x150, "Wrong size: CEscalator");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <d3d9.h>
|
#include <d3d9.h>
|
||||||
#include <Shlwapi.h>
|
#include <shlwapi.h>
|
||||||
#include <ShlObj.h>
|
#include <shlobj.h>
|
||||||
#include <ShellAPI.h>
|
#include <shellapi.h>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
#include "ScriptSA.h"
|
#include "ScriptSA.h"
|
||||||
|
@ -2851,7 +2851,7 @@ namespace CreditsScalingFixes
|
||||||
static const unsigned int FIXED_RES_HEIGHT_SCALE = 448;
|
static const unsigned int FIXED_RES_HEIGHT_SCALE = 448;
|
||||||
|
|
||||||
template<std::size_t Index>
|
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>
|
template<std::size_t Index>
|
||||||
static void PrintString_ScaleY(float fX, float fY, const wchar_t* pText)
|
static void PrintString_ScaleY(float fX, float fY, const wchar_t* pText)
|
||||||
|
@ -2888,7 +2888,7 @@ namespace SlidingTextsScalingFixes
|
||||||
static inline bool bSlidingEnabled = false;
|
static inline bool bSlidingEnabled = false;
|
||||||
|
|
||||||
template<std::size_t Index>
|
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>
|
template<std::size_t Index>
|
||||||
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
||||||
|
@ -2898,7 +2898,7 @@ namespace SlidingTextsScalingFixes
|
||||||
}
|
}
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static void (*orgSetRightJustifyWrap)(float wrap);
|
STATIC_INLINE void (*orgSetRightJustifyWrap)(float wrap);
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static void SetRightJustifyWrap_Slide(float wrap)
|
static void SetRightJustifyWrap_Slide(float wrap)
|
||||||
|
@ -2915,7 +2915,7 @@ namespace SlidingTextsScalingFixes
|
||||||
static inline bool bSlidingEnabled = false;
|
static inline bool bSlidingEnabled = false;
|
||||||
|
|
||||||
template<std::size_t Index>
|
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>
|
template<std::size_t Index>
|
||||||
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
||||||
|
@ -3961,7 +3961,7 @@ DarkVehiclesFix4_MakeItDark:
|
||||||
}
|
}
|
||||||
// 1.0 ONLY ENDS HERE
|
// 1.0 ONLY ENDS HERE
|
||||||
|
|
||||||
__declspec(safebuffers) static int _Timers_ftol_internal( double timer, double& remainder )
|
NOBUFFERCHECKS static int _Timers_ftol_internal( double timer, double& remainder )
|
||||||
{
|
{
|
||||||
double integral;
|
double integral;
|
||||||
remainder = modf( timer + remainder, &integral );
|
remainder = modf( timer + remainder, &integral );
|
||||||
|
|
|
@ -302,7 +302,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template<std::size_t Index>
|
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>
|
template<std::size_t Index>
|
||||||
void DoHeadLightBeam_LightBeamFixSaveObj(int type, CMatrix& m, bool right)
|
void DoHeadLightBeam_LightBeamFixSaveObj(int type, CMatrix& m, bool right)
|
||||||
|
@ -337,7 +337,7 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static void (CAutomobile::*orgAutomobilePreRender)();
|
STATIC_INLINE void (CAutomobile::*orgAutomobilePreRender)();
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
void PreRender_SilentPatch()
|
void PreRender_SilentPatch()
|
||||||
|
@ -352,7 +352,7 @@ public:
|
||||||
void HideDestroyedWheels_SilentPatch(void (CAutomobile::*spawnFlyingComponentCB)(int, unsigned int), int nodeID, unsigned int modelID);
|
void HideDestroyedWheels_SilentPatch(void (CAutomobile::*spawnFlyingComponentCB)(int, unsigned int), int nodeID, unsigned int modelID);
|
||||||
|
|
||||||
template<std::size_t Index>
|
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>
|
template<std::size_t Index>
|
||||||
void SpawnFlyingComponent_HideWheels(int nodeID, unsigned int modelID)
|
void SpawnFlyingComponent_HideWheels(int nodeID, unsigned int modelID)
|
||||||
|
@ -448,7 +448,7 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static CVehicle* (CStoredCar::*orgRestoreCar)();
|
STATIC_INLINE CVehicle* (CStoredCar::*orgRestoreCar)();
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
CVehicle* RestoreCar_SilentPatch()
|
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(CAutomobile) == 0x988, "Wrong size: CAutomobile");
|
||||||
static_assert(sizeof(CStoredCar) == 0x40, "Wrong size: CStoredCar");
|
static_assert(sizeof(CStoredCar) == 0x40, "Wrong size: CStoredCar");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -356,7 +356,7 @@ namespace RadarTraceOutlineFixes
|
||||||
}
|
}
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static inline 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>
|
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)
|
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;
|
static inline bool bSlidingEnabled = false;
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static inline void (*orgPrintString)(float,float,const wchar_t*);
|
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
||||||
|
@ -466,7 +466,7 @@ namespace SlidingTextsScalingFixes
|
||||||
}
|
}
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static inline void (*orgSetRightJustifyWrap)(float wrap);
|
STATIC_INLINE void (*orgSetRightJustifyWrap)(float wrap);
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static void SetRightJustifyWrap_Slide(float wrap)
|
static void SetRightJustifyWrap_Slide(float wrap)
|
||||||
|
@ -483,7 +483,7 @@ namespace SlidingTextsScalingFixes
|
||||||
static inline bool bSlidingEnabled = false;
|
static inline bool bSlidingEnabled = false;
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static inline void (*orgPrintString)(float,float,const wchar_t*);
|
STATIC_INLINE void (*orgPrintString)(float,float,const wchar_t*);
|
||||||
|
|
||||||
template<std::size_t Index>
|
template<std::size_t Index>
|
||||||
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
static void PrintString_Slide(float fX, float fY, const wchar_t* pText)
|
||||||
|
|
Loading…
Reference in a new issue