mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge remote-tracking branch 'bpay/clang-cl-build-fixes' into development
Conflicts: Engine/source/T3D/shapeBase.h
This commit is contained in:
commit
c2e5dc3345
|
|
@ -40,7 +40,6 @@
|
|||
#include "scene/sceneRenderState.h"
|
||||
#include "scene/sceneObjectLightingPlugin.h"
|
||||
#include "T3D/fx/explosion.h"
|
||||
#include "T3D/fx/particleEmitter.h"
|
||||
#include "T3D/fx/cameraFXMgr.h"
|
||||
#include "environment/waterBlock.h"
|
||||
#include "T3D/debris.h"
|
||||
|
|
|
|||
|
|
@ -63,14 +63,15 @@
|
|||
#include "console/dynamicTypes.h"
|
||||
#endif
|
||||
|
||||
// Need full definition visible for SimObjectPtr<ParticleEmitter>
|
||||
#include "T3D/fx/particleEmitter.h"
|
||||
|
||||
class GFXCubemap;
|
||||
class TSShapeInstance;
|
||||
class SceneRenderState;
|
||||
class TSThread;
|
||||
class GameConnection;
|
||||
struct CameraScopeQuery;
|
||||
class ParticleEmitter;
|
||||
class ParticleEmitterData;
|
||||
class ProjectileData;
|
||||
class ExplosionData;
|
||||
struct DebrisData;
|
||||
|
|
|
|||
|
|
@ -293,11 +293,10 @@ private:
|
|||
// causes an ambiguous cast compile error. Making it private is simply
|
||||
// more insurance that it isn't used on different compilers.
|
||||
// NOTE: disable on GCC since it causes hyper casting to U32 on gcc.
|
||||
#ifndef TORQUE_COMPILER_GCC
|
||||
#if !defined(TORQUE_COMPILER_GCC) && !defined(__clang__)
|
||||
operator const bool() const { return false; }
|
||||
#endif
|
||||
|
||||
|
||||
static void copy(StringChar *dst, const StringChar *src, U32 size);
|
||||
|
||||
StringData *_string;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ inline void D3D9Assert( HRESULT hr, const char *info )
|
|||
|
||||
// Typedefs
|
||||
#define D3DX_FUNCTION(fn_name, fn_return, fn_args) \
|
||||
typedef fn_return (WINAPI *D3DXFNPTR##fn_name##)##fn_args##;
|
||||
typedef fn_return (WINAPI *D3DXFNPTR##fn_name)fn_args;
|
||||
#include "gfx/D3D9/d3dx9Functions.h"
|
||||
#undef D3DX_FUNCTION
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ extern _D3DDECLTYPE GFXD3D9DeclType[GFXDeclType_COUNT];
|
|||
|
||||
#define GFXREVERSE_LOOKUP( tablearray, enumprefix, val ) \
|
||||
for( S32 i = enumprefix##_FIRST; i < enumprefix##_COUNT; i++ ) \
|
||||
if( (S32)tablearray##[i] == val ) \
|
||||
if( (S32)tablearray[i] == val ) \
|
||||
{ \
|
||||
val = i; \
|
||||
break; \
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ _D3DDECLTYPE GFXD3D9DeclType[GFXDeclType_COUNT];
|
|||
|
||||
#define INIT_LOOKUPTABLE( tablearray, enumprefix, type ) \
|
||||
for( S32 i = enumprefix##_FIRST; i < enumprefix##_COUNT; i++ ) \
|
||||
tablearray##[i] = (##type##)GFX_UNINIT_VAL;
|
||||
tablearray[i] = (type)GFX_UNINIT_VAL;
|
||||
|
||||
#define VALIDATE_LOOKUPTABLE( tablearray, enumprefix ) \
|
||||
for( S32 i = enumprefix##_FIRST; i < enumprefix##_COUNT; i++ ) \
|
||||
if( (S32)tablearray##[i] == GFX_UNINIT_VAL ) \
|
||||
if( (S32)tablearray[i] == GFX_UNINIT_VAL ) \
|
||||
Con::warnf( "GFXD3D9EnumTranslate: Unassigned value in " #tablearray ": %i", i ); \
|
||||
else if( (S32)tablearray##[i] == GFX_UNSUPPORTED_VAL ) \
|
||||
else if( (S32)tablearray[i] == GFX_UNSUPPORTED_VAL ) \
|
||||
Con::warnf( "GFXD3D9EnumTranslate: Unsupported value in " #tablearray ": %i", i );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@ class GuiRolloutCtrl : public GuiTickCtrl
|
|||
|
||||
DECLARE_CALLBACK( void, onCollapsed, () );
|
||||
/// @}
|
||||
virtual void processTick();
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -152,7 +153,6 @@ class GuiRolloutCtrl : public GuiTickCtrl
|
|||
|
||||
// Sizing Animation Functions
|
||||
void animateTo( S32 height );
|
||||
virtual void processTick();
|
||||
|
||||
void collapse() { animateTo( mHeader.extent.y ); }
|
||||
void expand() { animateTo( mExpanded.extent.y ); }
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@
|
|||
#include "console/simObjectMemento.h"
|
||||
#endif
|
||||
|
||||
class GuiInspectorField;
|
||||
// Need full definition visible for SimObjectPtr<GuiInspectorField>
|
||||
#include "gui/editor/inspector/field.h"
|
||||
|
||||
class GuiInspector;
|
||||
|
||||
class MECreateUndoAction : public UndoAction
|
||||
|
|
|
|||
|
|
@ -54,7 +54,17 @@ struct EmptyType {}; ///< "Null" type used by templates
|
|||
//////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef char UTF8; ///< Compiler independent 8 bit Unicode encoded character
|
||||
|
||||
#if defined(_MSC_VER) && defined(__clang__)
|
||||
// Clang's MSVC compatibility mode doesn't currently support /Zc:wchar_t-,
|
||||
// which we rely on to avoid type conversion errors when calling system
|
||||
// APIs when UTF16 is defined as unsigned short. So, just define UTF16
|
||||
// as wchar_t instead since it's always a 2 byte unsigned on windows anyway.
|
||||
typedef wchar_t UTF16;
|
||||
#else
|
||||
typedef unsigned short UTF16; ///< Compiler independent 16 bit Unicode encoded character
|
||||
#endif
|
||||
|
||||
typedef unsigned int UTF32; ///< Compiler independent 32 bit Unicode encoded character
|
||||
|
||||
typedef const char* StringTableEntry;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ typedef unsigned _int64 U64;
|
|||
#if _MSC_VER < 1200
|
||||
// No support for old compilers
|
||||
# error "VC: Minimum VisualC++ 6.0 or newer required"
|
||||
#else _MSC_VER >= 1200
|
||||
#else // _MSC_VER >= 1200
|
||||
# define TORQUE_COMPILER_STRING "VisualC++"
|
||||
#endif
|
||||
|
||||
|
|
@ -84,8 +84,10 @@ typedef unsigned _int64 U64;
|
|||
# define TORQUE_CPU_STRING "x86"
|
||||
# define TORQUE_CPU_X86
|
||||
# define TORQUE_LITTLE_ENDIAN
|
||||
#ifndef __clang__ // asm not yet supported with clang
|
||||
# define TORQUE_SUPPORTS_NASM
|
||||
# define TORQUE_SUPPORTS_VC_INLINE_X86_ASM
|
||||
#endif
|
||||
#elif defined( TORQUE_OS_XENON )
|
||||
# define TORQUE_CPU_STRING "ppc"
|
||||
# define TORQUE_CPU_PPC
|
||||
|
|
|
|||
|
|
@ -450,7 +450,7 @@ int DInputManager::getXInputState(S32 controllerID, S32 property, bool current)
|
|||
switch(property)
|
||||
{
|
||||
#define CHECK_PROP_ANALOG(prop, stateTest) \
|
||||
case prop: (current) ? retVal = mXInputStateNew[controllerID].state.Gamepad.##stateTest : retVal = mXInputStateOld[controllerID].state.Gamepad.##stateTest; return retVal;
|
||||
case prop: (current) ? retVal = mXInputStateNew[controllerID].state.Gamepad.stateTest : retVal = mXInputStateOld[controllerID].state.Gamepad.stateTest; return retVal;
|
||||
|
||||
CHECK_PROP_ANALOG(XI_THUMBLX, sThumbLX)
|
||||
CHECK_PROP_ANALOG(XI_THUMBLY, sThumbLY)
|
||||
|
|
|
|||
|
|
@ -1411,9 +1411,9 @@ static bool recurseDumpDirectories(const char *basePath, const char *subPath, Ve
|
|||
if( ( subPath && ( dStrncmp( subPath, "", 1 ) != 0 ) ))
|
||||
{
|
||||
if( subTrail == '/' )
|
||||
dSprintf(search, search.size, "%s%s", subPath, fileName);
|
||||
dSprintf(search, search.size, "%s%s", subPath, fileName.ptr);
|
||||
else
|
||||
dSprintf(search, search.size, "%s/%s", subPath, fileName);
|
||||
dSprintf(search, search.size, "%s/%s", subPath, fileName.ptr);
|
||||
char* child = search;
|
||||
|
||||
if( currentDepth < recurseDepth || recurseDepth == -1 )
|
||||
|
|
@ -1427,7 +1427,7 @@ static bool recurseDumpDirectories(const char *basePath, const char *subPath, Ve
|
|||
child = fileName;
|
||||
else
|
||||
{
|
||||
dSprintf(search, search.size, "/%s", fileName);
|
||||
dSprintf(search, search.size, "/%s", fileName.ptr);
|
||||
child = search;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ ConsoleFunction( mathInit, void, 1, 10, "( ... )"
|
|||
properties |= CPU_PROP_SSE;
|
||||
continue;
|
||||
}
|
||||
Con::printf("Error: MathInit(): ignoring unknown math extension '%s'", *argv);
|
||||
Con::printf("Error: MathInit(): ignoring unknown math extension '%s'", argv->getStringValue());
|
||||
}
|
||||
Math::init(properties);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#ifndef _SCENEPOLYHEDRALOBJECT_H_
|
||||
#include "scene/mixin/scenePolyhedralObject.h"
|
||||
#endif
|
||||
|
||||
#include "scene/mixin/scenePolyhedralObject.impl.h"
|
||||
|
||||
///
|
||||
class ScenePolyhedralSpace : public ScenePolyhedralObject< SceneSpace >
|
||||
|
|
|
|||
|
|
@ -439,8 +439,8 @@ void Win32Window::centerWindow()
|
|||
|
||||
// Get the monitor's extents.
|
||||
MONITORINFO monInfo;
|
||||
dMemset(&monInfo, 0, sizeof MONITORINFO);
|
||||
monInfo.cbSize = sizeof MONITORINFO;
|
||||
dMemset(&monInfo, 0, sizeof(MONITORINFO));
|
||||
monInfo.cbSize = sizeof(MONITORINFO);
|
||||
GetMonitorInfo(hMon, &monInfo);
|
||||
|
||||
// Calculate the offset to center the window in the working area
|
||||
|
|
@ -502,8 +502,8 @@ bool Win32Window::setSize( const Point2I &newSize )
|
|||
|
||||
// Get the monitor's extents.
|
||||
MONITORINFO monInfo;
|
||||
dMemset(&monInfo, 0, sizeof MONITORINFO);
|
||||
monInfo.cbSize = sizeof MONITORINFO;
|
||||
dMemset(&monInfo, 0, sizeof(MONITORINFO));
|
||||
monInfo.cbSize = sizeof(MONITORINFO);
|
||||
GetMonitorInfo(hMon, &monInfo);
|
||||
|
||||
// Calculate the offset to center the window in the working area
|
||||
|
|
|
|||
|
|
@ -502,8 +502,8 @@ void Win32WindowManager::lowerCurtain()
|
|||
|
||||
// Get the monitor's extents.
|
||||
MONITORINFO monInfo;
|
||||
dMemset(&monInfo, 0, sizeof MONITORINFO);
|
||||
monInfo.cbSize = sizeof MONITORINFO;
|
||||
dMemset(&monInfo, 0, sizeof(MONITORINFO));
|
||||
monInfo.cbSize = sizeof(MONITORINFO);
|
||||
|
||||
GetMonitorInfo(hMon, &monInfo);
|
||||
|
||||
|
|
|
|||
|
|
@ -137,14 +137,14 @@ static void _keyboardEvent(Win32Window* window,UINT message, WPARAM wParam, WPAR
|
|||
&& window->getKeyboardTranslation()
|
||||
&& !window->shouldNotTranslate( torqueMods, newVirtKey ) )
|
||||
{
|
||||
U16 chars[ 64 ];
|
||||
wchar_t chars[ 64 ];
|
||||
dMemset( chars, 0, sizeof( chars ) );
|
||||
|
||||
S32 res = ToUnicode( keyCode, scanCode, keyboardState, chars, sizeof( chars ) / sizeof( chars[ 0 ] ), 0 );
|
||||
|
||||
// This should only happen on Window 9x/ME systems
|
||||
if( res == 0 )
|
||||
res = ToAscii( keyCode, scanCode, keyboardState, chars, 0 );
|
||||
res = ToAscii( keyCode, scanCode, keyboardState, (LPWORD)chars, 0 );
|
||||
|
||||
if( res >= 1 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue