SilentPatch/SAFix/StdAfxSA.h

66 lines
1.6 KiB
C
Raw Normal View History

2014-05-31 00:14:47 +06:00
#pragma warning(disable:4481) // nonstandard extension used: override specifier 'override'
#pragma warning(disable:4401) // member is bit field
#pragma warning(disable:4733) // handler not registered as safe handler
#pragma warning(disable:4725) // instruction may be inaccurate on some Pentiums
#pragma warning(disable:4201) // nonstandard extension used: nameless struct/union
2014-05-31 00:14:47 +06:00
#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
2014-06-10 22:31:19 +06:00
#define WINVER 0x0500
#define _WIN32_WINNT 0x0500
2014-05-31 00:14:47 +06:00
#include <windows.h>
2014-08-03 19:38:53 +06:00
#include <utility>
#include <cassert>
#include <tuple>
#include <shlwapi.h>
/*#include <windows.h>
2014-05-31 00:14:47 +06:00
#include <limits>
#include <utility>
#include <mmsystem.h>
2014-06-16 20:31:46 +06:00
#include <Shlwapi.h>
2014-06-23 06:37:03 +06:00
#include <tuple>
2014-08-03 19:38:53 +06:00
#include <cassert>*/
2014-05-31 00:14:47 +06:00
#define RwEngineInstance (*rwengine)
#define RWFRAMESTATICPLUGINSSIZE 24
#include <rwcore.h>
#include <rpworld.h>
#include <rtpng.h>
2014-05-31 00:14:47 +06:00
2014-08-03 19:38:53 +06:00
#include <d3d9.h>
2014-05-31 00:14:47 +06:00
#include "MemoryMgr.h"
#include "Maths.h"
2014-08-03 19:38:53 +06:00
struct AlphaObjectInfo
{
RpAtomic* pAtomic;
RpAtomic* (*callback)(RpAtomic*, float);
float fCompareValue;
friend bool operator < (const AlphaObjectInfo &a, const AlphaObjectInfo &b)
{ return a.fCompareValue < b.fCompareValue; }
};
2014-06-10 22:31:19 +06:00
// SA operator delete
2014-08-03 19:38:53 +06:00
extern void (*GTAdelete)(void* data);
2014-06-10 22:31:19 +06:00
extern unsigned char& nGameClockDays;
extern unsigned char& nGameClockMonths;
2014-06-23 18:54:36 +06:00
template<typename T>
inline T random(T a, T b)
{
return a + static_cast<T>(rand() * (1.0f/(RAND_MAX+1)) * (b - a));
}
//#define HIDE_MATERIAL
//#define EXPAND_ALPHA_ENTITY_LISTS 800
2014-06-05 03:09:13 +06:00
//#define EXPAND_BOAT_ALPHA_ATOMIC_LISTS 400
//#define SA_STEAM_TEST