From a9ece90b81131e24c5ef8865e69c5d1696022cae Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Mon, 14 Dec 2009 17:17:41 +0000 Subject: [PATCH] FIX: Scons workspace was missing a reference to contrib/ConvertUTF. FIX: assimp_cmd doesn't anymore execute ConvertToLeftHanded if only -fuv or -fwo is specified. FIX: Amd64-Build with vc8 - invalid integer promotion FIX: Remove '_asm int 3' debug stuff from IrrXML. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@512 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/PretransformVertices.cpp | 4 ++-- contrib/irrXML/irrTypes.h | 8 +++++--- tools/assimp_cmd/Main.cpp | 4 ++-- workspaces/SCons/SConstruct | 5 ++++- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/code/PretransformVertices.cpp b/code/PretransformVertices.cpp index c58816d22..ccf725d7f 100644 --- a/code/PretransformVertices.cpp +++ b/code/PretransformVertices.cpp @@ -105,13 +105,13 @@ unsigned int PretransformVertices::GetMeshVFormat(aiMesh* pcMesh) // from scratch. The pointer is unused as animations are lost // during PretransformVertices. if (pcMesh->mBones) - return (unsigned int)(unsigned long)pcMesh->mBones; + return (unsigned int)(uint64_t)pcMesh->mBones; const unsigned int iRet = GetMeshVFormatUnique(pcMesh); // store the value for later use - pcMesh->mBones = (aiBone**)(unsigned long)iRet; + pcMesh->mBones = (aiBone**)(uint64_t)iRet; return iRet; } diff --git a/contrib/irrXML/irrTypes.h b/contrib/irrXML/irrTypes.h index da7cf09bb..760359a57 100644 --- a/contrib/irrXML/irrTypes.h +++ b/contrib/irrXML/irrTypes.h @@ -79,10 +79,10 @@ typedef unsigned short wchar_t; #endif // microsoft compiler //! define a break macro for debugging only in Win32 mode. -// WORKAROUND (ASSIMP): __asm int 3 not av. for x64 +// WORKAROUND (ASSIMP): remove __asm #if defined(WIN32) && defined(_MSC_VER) && defined(_DEBUG) #if defined(_M_IX86) -#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3} +#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) /*if (_CONDITION_) {_asm int 3}*/ #else #define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) #endif @@ -96,8 +96,10 @@ When you call unmanaged code that returns a bool type value of false from manage the return value may appear as true. See http://support.microsoft.com/default.aspx?kbid=823071 for details. Compiler version defines: VC6.0 : 1200, VC7.0 : 1300, VC7.1 : 1310, VC8.0 : 1400*/ + +// WORKAROUND (ASSIMP): remove __asm #if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER > 1299) && (_MSC_VER < 1400) -#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX __asm mov eax,100 +#define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX /*__asm mov eax,100*/ #else #define _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX #endif // _IRR_MANAGED_MARSHALLING_BUGFIX diff --git a/tools/assimp_cmd/Main.cpp b/tools/assimp_cmd/Main.cpp index 90d1888d7..b0cab8bb0 100644 --- a/tools/assimp_cmd/Main.cpp +++ b/tools/assimp_cmd/Main.cpp @@ -246,10 +246,10 @@ int ProcessStandardArguments(ImportData& fill, const char** params, fill.ppFlags |= aiProcess_ConvertToLeftHanded; } else if (! ::strcmp(params[i], "-fuv") || ! ::strcmp(params[i], "--flip-uv")) { - fill.ppFlags |= aiProcess_ConvertToLeftHanded; + fill.ppFlags |= aiProcess_FlipUVs; } else if (! ::strcmp(params[i], "-fwo") || ! ::strcmp(params[i], "--flip-winding-order")) { - fill.ppFlags |= aiProcess_ConvertToLeftHanded; + fill.ppFlags |= aiProcess_FlipWindingOrder; } else if (! ::strcmp(params[i], "-tuv") || ! ::strcmp(params[i], "--transform-uv-coords")) { fill.ppFlags |= aiProcess_TransformUVCoords; diff --git a/workspaces/SCons/SConstruct b/workspaces/SCons/SConstruct index fe9931bbf..31eae61c7 100644 --- a/workspaces/SCons/SConstruct +++ b/workspaces/SCons/SConstruct @@ -17,7 +17,7 @@ g_IncPath = Split(""" /usr/local/include/ """) #------------------------------------------------------------------------------ -g_assimp_lib_Source = Glob(r"../../code/*.cpp") + Glob(r"../../contrib/irrXML/*.cpp") + Glob(r"../../contrib/zlib/*.c") + Glob(r"../../code/extra/*.cpp") +g_assimp_lib_Source = Glob(r"../../code/*.cpp") + Glob(r"../../contrib/irrXML/*.cpp") + Glob(r"../../contrib/zlib/*.c") + Glob(r"../../code/extra/*.cpp") + Glob(r"../../contrib/ConvertUTF/*.c") #------------------------------------------------------------------------------ # don't reset CC/CXX-variable, other users might have set it to something special @@ -29,6 +29,9 @@ if ARGUMENTS.get('debug', 0): ccflags = ccflags + ' -g -pg -Wall -pedantic ' else: ccflags = ccflags + ' -Os -fno-strict-aliasing -msse -Wall -pedantic' + +#if ARGUMENTS.get('noboost', 0): +# ccflags = ccflags + ' -DASSIMP_BUILD_BOOST_WORKAROUND ' env = Environment(CCFLAGS = ccflags, CPPPATH = g_IncPath, LIBPATH=g_LibPath) conf = Configure( env )