Files
gta5_build_patches/rage/base/src/forceinclude/win64_rscdebug.h
T
Akkariin a4f85d47ac Init
2024-01-01 01:47:09 +08:00

536 lines
14 KiB
C++

// This file is automatically generated. DO NOT MODIFY DIRECTLY!
// To rebuild the forceinclude files, modify the templates in rage/base/src/forceinclude/templates/
// and then run rage/base/src/forceinclude/templates/makeheaders.bat
#ifndef _RSG_FORCE_INCLUDE_
#define _RSG_FORCE_INCLUDE_
#pragma once
#ifdef __cplusplus
#define BEGIN_NS_RAGE namespace rage {
#define END_NS_RAGE }
#else
#define BEGIN_NS_RAGE
#define END_NS_RAGE
#endif
#define RAGE_RELEASE 378
#define RAGE_RELEASE_STRING "378"
#define RAGE_MAJOR_VERSION 1
#define RAGE_MINOR_VERSION 15
#ifdef __GNUG__
#define NULL __null
#else
#define NULL 0
#endif
#define UNUSED_PARAM(x)
// So we can tell it's the new build system and not the VC6-based one.
#define BUILD_SYSTEM_VERSION 0x0200
// For compatibility with old code
#define IS_CONSOLE __CONSOLE
#ifndef __SPUFRAG
#define __SPUFRAG 0
#endif
// Ensure that the correct compiler version is being used
// 2008 ?
#if _MSC_VER == 1500
# if _MSC_FULL_VER != 150030729 || _MSC_BUILD != 01
# error "When compiling with Visual Studio 2008, service pack 1 is required"
# endif
// 2010 ?
#elif _MSC_VER == 1600
# if _MSC_FULL_VER != 160040219 || _MSC_BUILD != 01
# error "When compiling with Visual Studio 2010, service pack 1 is required"
# endif
#endif
#define I64FMT "I64"
#define LI64FMT L"I64"
#ifdef _M_X64
#define SIZETFMT "I"
#define PTRDIFFTFMT "I"
#else
#define SIZETFMT ""
#define PTRDIFFTFMT ""
#endif
// Networking
#define RSG_NP 0
#define RSG_XBL 0
#define RSG_GAMESPY 1
// Basic types
BEGIN_NS_RAGE
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
typedef unsigned __int64 u64;
typedef struct __declspec(intrin_type) __declspec(align(16)) __u128 {
float m128_f32[4];
} __u128;
typedef __u128 u128;
typedef signed char s8;
typedef signed short s16;
typedef signed int s32;
typedef signed __int64 s64;
typedef float f32;
#if defined(_M_X64)
typedef u64 uptr;
#else
#error "x64 tools not installed on this machine!"
#endif
END_NS_RAGE
#define GTA_REPLAY_RAGE
// Platform definitions
#define __BE 0
#define __CONSOLE 0
#define __PS3 0
#define __PPU 0
#define __SPU 0
#define __WIN32 1
#define __OSX 0
#define __POSIX 0
#define __XENON 0
#define __PSP2 0
#define __CAFE 0
#define __LINUX 0
#define __WIN32PC 1
#define __PAGING 1
#define __GAMETOOL 0
#define __RESOURCECOMPILER 1
#define RSG_BE 0
#define RSG_PS3 0
#define RSG_PPU 0
#define RSG_SPU 0
#define RSG_WIN32 1
#define RSG_XENON 0
#define RSG_PC 1
#define RSG_DURANGO 0
#define RSG_ORBIS 0
#define RSG_WINRT 0
#define RSG_XDK 0
#define RSG_GDK 0
#define RSG_LINUX 0
#define RSG_IOS 0
#define RSG_ANDROID 0
#define RSG_WINPHONE 0
#define RSG_MOBILE (RSG_IOS | RSG_ANDROID | RSG_WINPHONE)
#define RSG_NX 0
#define RSG_P 0
#define RSG_GGP 0
#define RSG_OSX 0
#define RSG_SCE 0
#define RSG_XBOX 0
#define RSG_PROSPERO 0
#define RSG_SCARLETT 0
#define RSG_CPU_PPC 0
#define RSG_CPU_SPU 0
#define RSG_CPU_INTEL 1
#define RSG_CPU_X86 0
#define RSG_CPU_X64 1
#define CONSOLE_ONLY(...)
#define PS3_ONLY(...)
#define PPU_ONLY(...)
#define SPU_ONLY(...)
#define WIN32_ONLY(...) __VA_ARGS__
#define XENON_ONLY(...)
#define PSP2_ONLY(...)
#define CAFE_ONLY(...)
#define LINUX_ONLY(...)
#define WIN32PC_ONLY(...) __VA_ARGS__
#define ORBIS_ONLY(...)
#define PROSPERO_ONLY(...)
#define NP_ONLY(...)
#define SCE_ONLY(...)
#define DURANGO_ONLY(...)
#define WINRT_ONLY(...)
#define SCARLETT_ONLY(...)
#define XBL_ONLY(...)
#define XDK_ONLY(...)
#define GDK_ONLY(...)
#define XBOX_ONLY(...)
#define ALIGNAS(x) __declspec(align(x))
#define BEGIN_ALIGNED(x) __declspec(align(x))
#define ALIGNED(x)
#define DEPRECATED __declspec(deprecated)
#define RESTRICT
#define MAY_ALIAS
#pragma warning(disable: 4127)
#pragma warning(disable: 4200)
#pragma warning(disable: 4244) // 'initializing': conversion from 'big' to 'small', possible loss of data
#pragma warning(disable: 4267) // arg: conversion from 'big' to 'small', possible loss of data
#pragma warning(disable: 4291)
#pragma warning(disable: 4324) // structure was padded due to __declspec(align)
#pragma warning(disable: 4512)
#pragma warning(disable: 4530)
#pragma warning(disable: 4505)
#pragma warning(disable: 4710)
#pragma warning(error: 4062)
#pragma warning(error: 4263)
#pragma warning(error: 4265)
#pragma warning(error: 4668)
#define _CRT_SECURE_NO_DEPRECATE
#define _SCL_SECURE_NO_WARNINGS
#define __builtin_trap() __debugbreak()
#define PRAGMA_OPTIMIZE_OFF() __pragma(optimize("", off)) // PRAGMA-OPTIMIZE-ALLOW
// Build type definitions
#define __DEV 1
#define __OPTIMIZED 0
#define __BANK 1
#define __ASSERT 1
#define __FINAL 0
#define __MASTER 0
#define __EDITOR 0
#define __TOOL 0
#define __EXPORTER 0
#define __PROFILE 0
#define __PACKEDDEBUG 1
#define __SKIPDEBUGAUTH 1
#define __USEDEBUGAUDIO 0
#define DEBUGAUDIO_ONLY(...)
#define DEBUGUNPACKED_ONLY(...)
#define RSG_DEV __DEV
#define RSG_BANK __BANK
#define RSG_ASSERT __ASSERT
#define RSG_TOOL __TOOL
#define RSG_RSC __RESOURCECOMPILER
#define RSG_FINAL __FINAL
#define RSG_LAUNCHER 0
#define GTA_SCRIPT_LEGACY_PLATFORM_VERSION 0
// Decode build system macros set above.
#if __DEV
# define DEV_ONLY(...) __VA_ARGS__
#else
# define DEV_ONLY(...)
#endif
#if __BANK
# define BANK_ONLY(...) __VA_ARGS__
#else
# define BANK_ONLY(...)
#endif
#if __PPU || __PSP2
# define Likely(x) __builtin_expect(!!(x),1)
# define Unlikely(x) __builtin_expect(!!(x),0)
#else
# define Likely(x) (x)
# define Unlikely(x) (x)
#endif
#ifdef __GNUG__
# define PRINTF_LIKE_N(a) __attribute__((format (printf, (a), (a)+1)))
#else
# define PRINTF_LIKE_N(a)
#endif
#if __DEV
# define OPTIMISATIONS_OFF() PRAGMA_OPTIMIZE_OFF() // PRAGMA-OPTIMIZE-ALLOW
#else
# define OPTIMISATIONS_OFF()
#endif
#if __DEV && __XENON
# define __forceinline inline
#endif
#if __ASSERT
# define RAGE_MINIMAL_ASSERTS (__XENON && __OPTIMIZED)
# if RAGE_MINIMAL_ASSERTS
# ifdef __SNC__
# pragma diag_suppress 178
# pragma diag_suppress 552
# pragma diag_suppress 828
# elif defined(_MSC_VER)
# pragma warning(disable: 4100)
# pragma warning(disable: 4101)
# pragma warning(disable: 4189)
# endif
# define Assertf(x,fmt,...) Assert(x)
# define Verifyf(x,fmt,...) AssertVerify(x)
# else
# define Assertf(x,fmt,...) (void)(Likely(x) || ::rage::diagAssertHelper(__FILE__,__LINE__,"%s: " fmt,#x,##__VA_ARGS__) || (__debugbreak(),0))
# define Verifyf(x,fmt,...) (Likely(x) || ((::rage::diagAssertHelper(__FILE__,__LINE__,"%s: " fmt,#x,##__VA_ARGS__) || (__debugbreak(),0)),false))
# endif
# define Assert(x) (void)(Likely(x) || ::rage::diagAssertHelper2(__FILE__,__LINE__,#x) || (__debugbreak(),0))
# define FatalAssert(x) do{if(Unlikely(!(x))){Quitf(0,__FILE__"(%d): %s",__LINE__,#x);}}while(0)
# define FatalAssertf(x,fmt,...) do{if(Unlikely(!(x))){Errorf(__FILE__"(%d): %s",__LINE__,#x);Quitf(0,fmt,##__VA_ARGS__);}}while(0)
# define AssertVerify(x) (Likely(x) || ((::rage::diagAssertHelper2(__FILE__,__LINE__,#x) || (__debugbreak(),0)),false))
# define ASSERT_ONLY(...) __VA_ARGS__
# define AssertMsg(x,msg) Assertf(x,"%s",msg)
# define FatalAssertMsg(x,msg) FatalAssertf(x,"%s",msg)
# if __TOOL || !__OPTIMIZED || __WIN32PC
# define FastAssert(x) Assert(x)
# else
# define FastAssert(x) (Likely(x) || (__debugbreak(),0))
# endif
BEGIN_NS_RAGE
extern int diagAssertHelper(const char*,int,const char*,...)
#ifdef __ORBIS__
PRINTF_LIKE_N(3)
#endif
;
extern int diagAssertHelper2(const char*,int,const char*);
extern int DebugAssertFailed(void);
END_NS_RAGE
# define DebugAssert(x) (void)(Likely(x) || ::rage::DebugAssertFailed())
# if RSG_ORBIS
// Enable Sony's asserts in GNM
# define SCE_GNM_DEBUG
# endif
#else // !__ASSERT
# define ASSERT_ONLY(...)
# define Assert(x)
# define Assertf(x,fmt,...)
# define FastAssert(x)
# define FatalAssert(x)
# define FatalAssertf(x,fmt,...)
# define FatalAssertMsg(x,msg)
# define AssertMsg(x,msg)
# define AssertVerify(x) (x)
# define Verifyf(x,fmt,...) (x)
# define DebugAssert(x)
#endif
#define AlignedAssert(x,a) Assert(((::rage::uptr)(x) & ((a)-1)) == 0)
#define AlignedAssertf(x,a,fmt,...) Assertf(((::rage::uptr)(x) & ((a)-1)) == 0,fmt,##__VA_ARGS__)
#define Assert16(x) AlignedAssert(x,16)
#define Assert128(x) AlignedAssert(x,128)
#define MacroJoin( X, Y ) MacroDoJoin(X, Y)
#define MacroDoJoin( X, Y ) MacroDoJoin2(X, Y)
#define MacroDoJoin2( X, Y ) X##Y
#define CompileTimeAssert(e) typedef char MacroJoin(MacroJoin(__COMPILETIME_ASSERT, __LINE__), __)[(e)?1:-1]
#define AlignedCompileTimeAssert(x,a) CompileTimeAssert(((::rage::uptr)(x) & ((a)-1)) == 0)
#define CompileTimeAssert16(x) AlignedCompileTimeAssert(x,16)
#define CompileTimeAssert128(x) AlignedCompileTimeAssert(x,128)
#if __EDITOR
# define EDITOR_ONLY(...) __VA_ARGS__
#else
# define EDITOR_ONLY(...)
#endif
#if __TOOL
# define TOOL_ONLY(...) __VA_ARGS__
# define NOTTOOL_ONLY(...)
#else
# define TOOL_ONLY(...)
# define NOTTOOL_ONLY(...) __VA_ARGS__
#endif
#if __EXPORTER
# define EXPORTER_ONLY(...) __VA_ARGS__
#else
# define EXPORTER_ONLY(...)
#endif
#if __PAGING
# define PAGING_ONLY(...) __VA_ARGS__
#else
# define PAGING_ONLY(...)
#endif
#if __FINAL
# define NOTFINAL_ONLY(...)
#else
# define NOTFINAL_ONLY(...) __VA_ARGS__
#endif
#if __ASSERT
# define AssertType(type,ptr) Assert(SafeCast(type,ptr) && #type)
#else
# define AssertType(type,ptr)
#endif
#ifdef __cplusplus
template <class L,class R> __forceinline const L& Assign(L& left,const R right) {
left = static_cast<L>(right); FastAssert(left == right); return left; }
template <typename _Type, int actualSize,int expectedSize> struct CTASHelper { CompileTimeAssert(actualSize == expectedSize); };
#endif
#define BitfieldAssign(x,y) do { (x)=(y); FastAssert(unsigned(x) == unsigned(y)); } while (0)
#define __LTCG (__XENON && 0)
#if RSG_ORBIS
#define ATTR_UNUSED __attribute__((unused))
#else
#define ATTR_UNUSED
#endif
#if defined(__LP64__) || defined(_M_X64)
# define __64BIT 1
# define CompileTimeAssertSize(s,if32,if64) ATTR_UNUSED static CTASHelper<s,int(sizeof(s)),if64> MacroJoin(MacroJoin(s,__LINE__),Helper)
# define OffsetOf(s,m) ((size_t)((::rage::s64)&(((s*)0)->m)))
#else
# define __64BIT 0
# if __PPU
# define OffsetOf(s,m) ((size_t)&(((s*)1)->m)-1)
# define CompileTimeAssertSize(s,if32,if64) static __attribute__((unused)) CTASHelper<s,int(sizeof(s)),if32> MacroJoin(MacroJoin(s,__LINE__),Helper)
# else
# define OffsetOf(s,m) ((size_t)&(((s*)0)->m))
# define CompileTimeAssertSize(s,if32,if64) static CTASHelper<s,int(sizeof(s)),if32> MacroJoin(MacroJoin(s,__LINE__),Helper)
# endif // __PPU
#endif
#if defined(__SNC__) && __SN_VER__ < 43001
# define ATTR_COLD __attribute__((cold)) // same as =Xsaverestorefuncs=1 for this function
# define ATTR_HOT __attribute__((hot)) // inlinesrf and also likely virtual target
# define ATTR_INLINESRF __attribute__((inlinesrf)) // same as =Xsaverestorefuncs=0 for this function
#else
# define ATTR_COLD
# define ATTR_HOT
# define ATTR_INLINESRF
#endif
#if __64BIT && !__PROFILE && !__FINAL && defined(__cplusplus)
inline int ptrdiff_t_to_int(long long v) { if (v != int(v)) __debugbreak(); return int(v); }
#elif __64BIT
# define ptrdiff_t_to_int(x) ((int)(x))
#else
# define ptrdiff_t_to_int(x) (x)
#endif
#define istrlen(x) ((int)strlen(x))
#define ustrlen(x) ((unsigned)strlen(x))
BEGIN_NS_RAGE
#if __DEV
typedef u8 dev_u8;
typedef s8 dev_s8;
typedef u16 dev_u16;
typedef s16 dev_s16;
typedef u32 dev_u32;
typedef s32 dev_s32;
typedef u64 dev_u64;
typedef s64 dev_s64;
typedef float dev_float;
# ifdef __cplusplus
typedef bool dev_bool;
# endif // __cplusplus
#else // __DEV
typedef const u8 dev_u8;
typedef const s8 dev_s8;
typedef const u16 dev_u16;
typedef const s16 dev_s16;
typedef const u32 dev_u32;
typedef const s32 dev_s32;
typedef const u64 dev_u64;
typedef const s64 dev_s64;
typedef const float dev_float;
# ifdef __cplusplus
typedef const bool dev_bool;
# endif // __cplusplus
#endif // __DEV
#if __BANK
typedef u8 bank_u8;
typedef s8 bank_s8;
typedef u16 bank_u16;
typedef s16 bank_s16;
typedef u32 bank_u32;
typedef s32 bank_s32;
typedef u64 bank_u64;
typedef s64 bank_s64;
typedef float bank_float;
# ifdef __cplusplus
typedef bool bank_bool;
# endif // __cplusplus
#else // __BANK
typedef const u8 bank_u8;
typedef const s8 bank_s8;
typedef const u16 bank_u16;
typedef const s16 bank_s16;
typedef const u32 bank_u32;
typedef const s32 bank_s32;
typedef const u64 bank_u64;
typedef const s64 bank_s64;
typedef const float bank_float;
# ifdef __cplusplus
typedef const bool bank_bool;
# endif // __cplusplus
#endif // __BANK
END_NS_RAGE
#define __FINAL_LOGGING 0
#define __NO_OUTPUT (__FINAL && !__FINAL_LOGGING)
#define RSG_OUTPUT (!__NO_OUTPUT)
#if __NO_OUTPUT
#define OUTPUT_ONLY(...)
#if !RSG_PC
#define Quitf(...) __debugbreak()
#else
extern void QuitNoOutput(int errorCode);
#define Quitf(errorCode,...) do { (void)(__VA_ARGS__); QuitNoOutput(errorCode); } while(0)
#endif // !RSG_PC
#define Printf(...) do { } while (0)
#define Displayf(...) do { } while (0)
#define Warningf(...) do { } while (0)
#define Errorf(...) do { } while (0)
#define Debugf1(...) do { } while (0)
#define Debugf2(...) do { } while (0)
#define Debugf3(...) do { } while (0)
#else
#define OUTPUT_ONLY(...) __VA_ARGS__
#ifdef __cplusplus
extern void Printf(const char *fmt,...) PRINTF_LIKE_N(1);
extern void Displayf(const char *fmt,...) PRINTF_LIKE_N(1);
extern void Warningf(const char *fmt,...) PRINTF_LIKE_N(1);
extern void Errorf(const char *fmt,...) PRINTF_LIKE_N(1);
extern void Quitf(const char *fmt,...) PRINTF_LIKE_N(1);
extern void Quitf(int errorCode,const char *fmt,...) PRINTF_LIKE_N(2);
extern void Debugf1(int level,const char *fmt,...) PRINTF_LIKE_N(2);
extern void Debugf2(int level,const char *fmt,...) PRINTF_LIKE_N(2);
extern void Debugf3(int level,const char *fmt,...) PRINTF_LIKE_N(2);
#endif
#endif // __NO_OUTPUT
#define HACK_GTA4 1
#define HACK_MC4 0
#define HACK_RDR2 0
#define HACK_MP3 0
#define HACK_JIMMY 0
#define HACK_BULLY2 0
#define HACK_MC5 0
#define HACK_RDR3 0
#define GTA_VERSION 501
#define RDR_VERSION 0
#ifdef USING_RAGE
using namespace rage;
#endif // USING_RAGE
#endif //_RSG_FORCE_INCLUDE_