00001 //--------------------------------------------------------------------------------- 00002 // File Name: Common.h 00003 // Description: 00004 // 00005 // Copyright (C) 2004 - 2006 True Axis Pty Ltd, Australia. 00006 // All Rights Reserved. 00007 // 00008 // History: 00009 // Created File. 00010 //--------------------------------------------------------------------------------- 00011 00012 #ifndef TA_COMMON_H 00013 #define TA_COMMON_H 00014 00015 //#define TA_ANSI_C 00016 //#ifndef TA_GCC 00017 #ifdef __GNUC__ 00018 #define TA_GCC 00019 #ifndef __MINGW32__ 00020 #define TA_GCC_LINUX 00021 #endif 00022 #endif 00023 00024 #define TA_VERSION 1201 00025 00026 #ifndef TA_OBFUSCATED 00027 #define TA_OBFUSCATION_RESERVED_ON 00028 #define TA_OBFUSCATION_RESERVED_OFF 00029 #define TA_OBFUSCATION_RESERVED_FULL_ON 00030 #define TA_OBFUSCATION_RESERVED_FULL_OFF 00031 #define TA_OBFUSCATION_SKIP_PASS_2 00032 #endif 00033 00034 #ifdef TA_GCC 00035 #ifndef TA_DISABLE_INLINE_ASM 00036 #define TA_GCC_X86_INLINE_ASM 00037 #endif 00038 #else 00039 #define TA_MSVC 00040 #ifndef TA_DISABLE_INLINE_ASM 00041 #define TA_IN_PLACE_ASSERT 00042 #define TA_MSVC_X86_INLINE_ASM 00043 #endif 00044 // SpellCheckerDisable 00045 // SpellCheckerEnabled 00046 /*#pragma warning(disable: 4061) // warning C4061: enumerate 'xxx' in switch of enum 'ETSEScriptNode' is not explicitly handled by a case label 00047 #pragma warning(disable: 4127) // warning C4127: conditional expression is constant 00048 //#pragma warning(disable: 4201) // warning C4201: nonstandard extension used : nameless struct/union 00049 //#pragma warning(disable: 4204) // warning C4204: nonstandard extension used : non-constant aggregate initializer 00050 //#pragma warning(disable: 4214) // warning C4214: nonstandard extension used : bit field types other than int 00051 #pragma warning(disable: 4255) // warning C4255: 'x' : no function prototype given: converting '()' to '(void)' 00052 //#pragma warning(disable: 4311) // warning C4311: 'type cast' : pointer truncation from 'int *__w64 ' to 'unsigned int' 00053 #pragma warning(disable: 4514) // warning C4514: 'x' : unreferenced inline function has been removed 00054 #pragma warning(disable: 4512) // warning C4512: 'x' : assignment operator could not be generated 00055 #pragma warning(disable: 4668) // warning C4668: 'x' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' 00056 #pragma warning(disable: 4710) // warning C4710: function 'x' not inlined 00057 #pragma warning(disable: 4711) // warning C4711: function 'x' selected for automatic inline expansion 00058 #pragma warning(disable: 4820) // warning C4820: 'x' : '2' bytes padding added after member 'EffectiveOnly' 00059 00060 #pragma warning(disable: 4625) // warning C4625: 'x' : copy constructor could not be generated because a base class copy constructor is inaccessible 00061 #pragma warning(disable: 4511) // C4511: 'x' : copy constructor could not be generated 00062 00063 // workarounds 00064 #pragma warning(disable: 4619) // warning C4619: #pragma warning : there is no warning number '4284'*/ 00065 #endif 00066 00067 #define TACOMMON_CLASS 00068 #ifdef TA_MSVC 00069 #ifdef _DEBUG 00070 #define TAC_CALL __stdcall 00071 #define TA_FAST_CALL __stdcall 00072 #define TA_CALL_BACK __stdcall 00073 #else 00074 #define TAC_CALL __fastcall 00075 #define TA_FAST_CALL __fastcall 00076 #define TA_CALL_BACK __stdcall 00077 #endif // _DEBUG 00078 #define TA_ALIGN_16 __declspec(align(16)) 00079 00080 #if (_MSC_VER >= 1400 ) 00081 #define TA_RESTRICT __restrict 00082 #define TA_DECLSPEC_NOALIAS __declspec (noalias) 00083 #else 00084 #define TA_RESTRICT 00085 #define TA_DECLSPEC_NOALIAS 00086 #endif 00087 00088 #define TA_FORCE_INLINE __forceinline 00089 #else 00090 #define TAC_CALL 00091 #define TA_FAST_CALL 00092 #define TA_ALIGN_16 00093 #define TA_CALL_BACK 00094 00095 #define TA_FORCE_INLINE inline 00096 #define TA_RESTRICT 00097 #define TA_DECLSPEC_NOALIAS 00098 #endif 00099 00100 00101 #ifdef _DEBUG 00102 namespace TA 00103 { 00104 extern bool g_bDebugHeavy; 00105 } 00106 #endif // _DEBUG 00107 00108 00109 #endif // TA_COMMON_H