2014-05-30 20:14:47 +02: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
|
2014-08-04 14:30:16 +02:00
|
|
|
#pragma warning(disable:4201) // nonstandard extension used: nameless struct/union
|
2014-05-30 20:14:47 +02:00
|
|
|
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
|
|
|
#define _USE_MATH_DEFINES
|
|
|
|
|
2015-02-08 19:52:41 +01:00
|
|
|
#define WINVER 0x0501
|
|
|
|
#define _WIN32_WINNT 0x0501
|
2014-05-30 20:14:47 +02:00
|
|
|
|
|
|
|
#include <windows.h>
|
2014-08-03 15:38:53 +02:00
|
|
|
#include <utility>
|
|
|
|
#include <cassert>
|
|
|
|
#include <tuple>
|
2014-06-16 16:31:46 +02:00
|
|
|
#include <Shlwapi.h>
|
2015-04-23 17:32:18 +02:00
|
|
|
#include <ShlObj.h>
|
2014-05-30 20:14:47 +02:00
|
|
|
|
|
|
|
#define RwEngineInstance (*rwengine)
|
|
|
|
|
|
|
|
#include <rwcore.h>
|
|
|
|
#include <rpworld.h>
|
2014-08-19 12:57:35 +02:00
|
|
|
#include <rphanim.h>
|
2014-06-06 14:59:16 +02:00
|
|
|
#include <rtpng.h>
|
2014-05-30 20:14:47 +02:00
|
|
|
|
2014-08-03 15:38:53 +02:00
|
|
|
#include <d3d9.h>
|
|
|
|
|
2015-02-08 19:52:41 +01:00
|
|
|
#include "resource.h"
|
|
|
|
|
2014-05-30 20:14:47 +02:00
|
|
|
#include "MemoryMgr.h"
|
2014-06-03 02:10:03 +02:00
|
|
|
#include "Maths.h"
|
|
|
|
|
2014-08-03 15:38:53 +02: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 18:31:19 +02:00
|
|
|
// SA operator delete
|
2014-08-03 15:38:53 +02:00
|
|
|
extern void (*GTAdelete)(void* data);
|
2014-08-12 22:30:37 +02:00
|
|
|
extern const char* (*GetFrameNodeName)(RwFrame*);
|
2014-08-19 12:57:35 +02:00
|
|
|
extern RpHAnimHierarchy* (*GetAnimHierarchyFromSkinClump)(RpClump*);
|
2014-06-10 18:31:19 +02:00
|
|
|
|
2014-06-15 19:56:43 +02:00
|
|
|
extern unsigned char& nGameClockDays;
|
|
|
|
extern unsigned char& nGameClockMonths;
|
|
|
|
|
2014-06-23 14:54:36 +02:00
|
|
|
template<typename T>
|
|
|
|
inline T random(T a, T b)
|
|
|
|
{
|
|
|
|
return a + static_cast<T>(rand() * (1.0f/(RAND_MAX+1)) * (b - a));
|
|
|
|
}
|
|
|
|
|
2014-06-03 02:10:03 +02:00
|
|
|
//#define HIDE_MATERIAL
|
|
|
|
//#define EXPAND_ALPHA_ENTITY_LISTS 800
|
2014-08-21 00:21:07 +02:00
|
|
|
//#define EXPAND_BOAT_ALPHA_ATOMIC_LISTS 400
|