Bläddra i källkod

Merge pull request #1016 from Azaezel/alpha41/mangledMath

clean up math varsize complaints
Brian Roberts 2 år sedan
förälder
incheckning
a6f03897ed
30 ändrade filer med 73 tillägg och 68 borttagningar
  1. 1 1
      Engine/lib/opcode/Ice/IceMemoryMacros.h
  2. 3 3
      Engine/lib/opcode/OPC_OptimizedTree.h
  3. 2 2
      Engine/source/T3D/assets/assetImporter.cpp
  4. 2 1
      Engine/source/T3D/tsStatic.cpp
  5. 1 1
      Engine/source/console/astNodes.cpp
  6. 5 5
      Engine/source/console/compiledEval.cpp
  7. 1 1
      Engine/source/console/engineObject.cpp
  8. 2 2
      Engine/source/console/engineObject.h
  9. 8 8
      Engine/source/core/color.h
  10. 1 1
      Engine/source/core/strings/stringFunctions.cpp
  11. 1 1
      Engine/source/gfx/bitmap/gBitmap.h
  12. 5 5
      Engine/source/gfx/bitmap/loaders/bitmapPng.cpp
  13. 1 1
      Engine/source/gui/editor/guiInspectorTypes.cpp
  14. 8 8
      Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp
  15. 1 1
      Engine/source/materials/materialDefinition.cpp
  16. 1 1
      Engine/source/materials/processedShaderMaterial.cpp
  17. 1 1
      Engine/source/math/mPoint2.h
  18. 3 3
      Engine/source/persistence/taml/fsTinyXml.cpp
  19. 1 1
      Engine/source/platform/nativeDialogs/fileDialog.cpp
  20. 2 1
      Engine/source/platformWin32/nativeDialogs/win32MsgBox.cpp
  21. 1 1
      Engine/source/platformWin32/winConsole.cpp
  22. 1 1
      Engine/source/platformWin32/winProcessControl.cpp
  23. 2 2
      Engine/source/sfx/media/sfxVorbisStream.cpp
  24. 1 1
      Engine/source/terrain/terrFile.cpp
  25. 1 1
      Engine/source/terrain/terrFile.h
  26. 2 0
      Engine/source/ts/assimp/assimpShapeLoader.cpp
  27. 1 1
      Engine/source/ts/collada/colladaAppMesh.cpp
  28. 3 3
      Engine/source/ts/collada/colladaImport.cpp
  29. 2 1
      Engine/source/ts/collada/colladaShapeLoader.cpp
  30. 9 9
      Engine/source/ts/collada/colladaUtils.h

+ 1 - 1
Engine/lib/opcode/Ice/IceMemoryMacros.h

@@ -91,7 +91,7 @@
 	//!	\see		CopyMemory
 	inline_ void MoveMemory(void* dest, const void* src, udword size)	{ memmove(dest, src, size);		}
 
-	#define SIZEOFOBJECT		sizeof(*this)									//!< Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)").
+	#define SIZEOFOBJECT		   udword(sizeof(*this))					//!< Gives the size of current object. Avoid some mistakes (e.g. "sizeof(this)").
 	//#define CLEAROBJECT		{ memset(this, 0, SIZEOFOBJECT);	}			//!< Clears current object. Laziness is my business. HANDLE WITH CARE.
 	#define DELETESINGLE(x)		if (x) { delete x;				x = null; }		//!< Deletes an instance of a class.
 	#define DELETEARRAY(x)		if (x) { delete []x;			x = null; }		//!< Deletes an array.

+ 3 - 3
Engine/lib/opcode/OPC_OptimizedTree.h

@@ -31,7 +31,7 @@
 		/* Data access */																					\
 		inline_			const base_class*	GetPos()		const	{ return (base_class*)mData;		}	\
 		inline_			const base_class*	GetNeg()		const	{ return ((base_class*)mData)+1;	}	\
-		inline_			udword				GetPrimitive()	const	{ return (mData>>1);				}	\
+		inline_			udword				GetPrimitive()	const	{ return (udword(mData>>1));				}	\
 		/* Stats */																							\
 		inline_			udword				GetNodeSize()	const	{ return SIZEOFOBJECT;				}	\
 																											\
@@ -50,8 +50,8 @@
 		/* Data access */																					\
 		inline_			const base_class*	GetPos()			const	{ return (base_class*)mPosData;	}	\
 		inline_			const base_class*	GetNeg()			const	{ return (base_class*)mNegData;	}	\
-		inline_			udword				GetPosPrimitive()	const	{ return (mPosData>>1);			}	\
-		inline_			udword				GetNegPrimitive()	const	{ return (mNegData>>1);			}	\
+		inline_			udword				GetPosPrimitive()	const	{ return (udword(mPosData>>1));			}	\
+		inline_			udword				GetNegPrimitive()	const	{ return (udword(mNegData>>1));			}	\
 		/* Stats */																							\
 		inline_			udword				GetNodeSize()		const	{ return SIZEOFOBJECT;			}	\
 																											\

+ 2 - 2
Engine/source/T3D/assets/assetImporter.cpp

@@ -1173,7 +1173,7 @@ static bool enumColladaForImport(const char* shapePath, GuiTreeViewCtrl* tree, b
    for (S32 i = 0; i < root->getLibrary_materials_array().getCount(); i++)
    {
       const domLibrary_materials* libraryMats = root->getLibrary_materials_array()[i];
-      stats.numMaterials += libraryMats->getMaterial_array().getCount();
+      stats.numMaterials += (S32)libraryMats->getMaterial_array().getCount();
       for (S32 j = 0; j < libraryMats->getMaterial_array().getCount(); j++)
       {
          domMaterial* mat = libraryMats->getMaterial_array()[j];
@@ -1267,7 +1267,7 @@ static bool enumColladaForImport(const char* shapePath, GuiTreeViewCtrl* tree, b
    for (S32 i = 0; i < root->getLibrary_animation_clips_array().getCount(); i++)
    {
       const domLibrary_animation_clips* libraryClips = root->getLibrary_animation_clips_array()[i];
-      stats.numClips += libraryClips->getAnimation_clip_array().getCount();
+      stats.numClips += (S32)libraryClips->getAnimation_clip_array().getCount();
       for (S32 j = 0; j < libraryClips->getAnimation_clip_array().getCount(); j++)
       {
          domAnimation_clip* clip = libraryClips->getAnimation_clip_array()[j];

+ 2 - 1
Engine/source/T3D/tsStatic.cpp

@@ -1641,7 +1641,7 @@ void TSStatic::onInspect(GuiInspector* inspector)
 {
    //if (mShapeAsset == nullptr)
       return;
-
+/*
    //Put the GameObject group before everything that'd be gameobject-effecting, for orginazational purposes
    GuiInspectorGroup* materialGroup = inspector->findExistentGroup(StringTable->insert("Materials"));
    if (!materialGroup)
@@ -1709,6 +1709,7 @@ void TSStatic::onInspect(GuiInspector* inspector)
          }
       }
    }
+   */
 }
 #endif
 DefineEngineMethod(TSStatic, getTargetName, const char*, (S32 index), (0),

+ 1 - 1
Engine/source/console/astNodes.cpp

@@ -1556,7 +1556,7 @@ U32 FunctionDeclStmtNode::compileStmt(CodeStream& codeStream, U32 ip)
    // map local variables to registers for this function.
    // Note we have to map these in order because the table itself is ordered by the register id.
    CompilerLocalVariableToRegisterMappingTable* tbl = &getFunctionVariableMappingTable();
-   for (size_t i = 0; i < gFuncVars->variableNameMap.size(); ++i)
+   for (S32 i = 0; i < gFuncVars->variableNameMap.size(); ++i)
    {
       StringTableEntry varName = gFuncVars->variableNameMap[i];
       tbl->add(fnName, nameSpace, varName);

+ 5 - 5
Engine/source/console/compiledEval.cpp

@@ -615,7 +615,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
    gExecCount++;
 #endif
 
-   const dsize_t TRACE_BUFFER_SIZE = 1024;
+   const U32 TRACE_BUFFER_SIZE = 1024;
    static char traceBuffer[TRACE_BUFFER_SIZE];
    U32 i;
 
@@ -648,12 +648,12 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
          }
          if (thisNamespace && thisNamespace->mName)
          {
-            dSprintf(traceBuffer + dStrlen(traceBuffer), sizeof(traceBuffer) - dStrlen(traceBuffer),
+            dSprintf(traceBuffer + (U32)dStrlen(traceBuffer), sizeof(traceBuffer) - (U32)dStrlen(traceBuffer),
                "%s::%s(", thisNamespace->mName, thisFunctionName);
          }
          else
          {
-            dSprintf(traceBuffer + dStrlen(traceBuffer), sizeof(traceBuffer) - dStrlen(traceBuffer),
+            dSprintf(traceBuffer + (U32)dStrlen(traceBuffer), sizeof(traceBuffer) - (U32)dStrlen(traceBuffer),
                "%s(", thisFunctionName);
          }
          for (i = 0; i < wantedArgc; i++)
@@ -2317,12 +2317,12 @@ execFinished:
          }
          if (thisNamespace && thisNamespace->mName)
          {
-            dSprintf(traceBuffer + dStrlen(traceBuffer), sizeof(traceBuffer) - dStrlen(traceBuffer),
+            dSprintf(traceBuffer + (U32)dStrlen(traceBuffer), sizeof(traceBuffer) - (U32)dStrlen(traceBuffer),
                "%s::%s() - return %s", thisNamespace->mName, thisFunctionName, returnValue.getString());
          }
          else
          {
-            dSprintf(traceBuffer + dStrlen(traceBuffer), sizeof(traceBuffer) - dStrlen(traceBuffer),
+            dSprintf(traceBuffer + (U32)dStrlen(traceBuffer), sizeof(traceBuffer) - (U32)dStrlen(traceBuffer),
                "%s() - return %s", thisFunctionName, returnValue.getString());
          }
          Con::printf("%s", traceBuffer);

+ 1 - 1
Engine/source/console/engineObject.cpp

@@ -276,7 +276,7 @@ void EngineObject::debugEnumInstances( const char* className, DebugEnumInstances
 
 //-----------------------------------------------------------------------------
 
-void* EngineCRuntimeObjectPool::allocateObject( U32 size TORQUE_TMM_ARGS_DECL )
+void* EngineCRuntimeObjectPool::allocateObject(size_t size TORQUE_TMM_ARGS_DECL )
 {
    #ifdef TORQUE_DISABLE_MEMORY_MANAGER
       return dMalloc( size );

+ 2 - 2
Engine/source/console/engineObject.h

@@ -456,7 +456,7 @@ class IEngineObjectPool
    
       /// Allocate a new object memory block of the given size.
       /// @return Pointer to a new memory block or NULL on failure.
-      virtual void* allocateObject( U32 size TORQUE_TMM_ARGS_DECL ) = 0;
+      virtual void* allocateObject( size_t size TORQUE_TMM_ARGS_DECL ) = 0;
       
       /// Return the member for the object at the given address to the
       /// allocator for reuse.
@@ -485,7 +485,7 @@ class EngineCRuntimeObjectPool : public IEngineObjectPool
       static EngineCRuntimeObjectPool* instance() { return &smInstance; }
       
       // IEngineObjectPool
-      virtual void* allocateObject( U32 size TORQUE_TMM_ARGS_DECL );
+      virtual void* allocateObject(size_t size TORQUE_TMM_ARGS_DECL );
       virtual void freeObject( void* ptr );
 };
 

+ 8 - 8
Engine/source/core/color.h

@@ -849,10 +849,10 @@ inline ColorI LinearColorF::toColorI(const bool keepAsLinear)
          float b = mPow(blue, gOneOverGamma);
          return ColorI(U8(r * 255.0f + 0.5), U8(g * 255.0f + 0.5), U8(b * 255.0f + 0.5), U8(alpha * 255.0f + 0.5));
    #else
-         float r = red < 0.0031308f ? 12.92f * red : 1.055 * mPow(red, 1.0f / 2.4f) - 0.055f;
-         float g = green < 0.0031308f ? 12.92f * green : 1.055 * mPow(green, 1.0f / 2.4f) - 0.055f;
-         float b = blue < 0.0031308f ? 12.92f * blue : 1.055 * mPow(blue, 1.0f / 2.4f) - 0.055f;
-         return ColorI(U8(r * 255.0f + 0.5), U8(g * 255.0f + 0.5), U8(b * 255.0f + 0.5), U8(alpha * 255.0f + 0.5));
+         float r = red < 0.0031308f ? 12.92f * red : 1.055f * mPow(red, 1.0f / 2.4f) - 0.055f;
+         float g = green < 0.0031308f ? 12.92f * green : 1.055f * mPow(green, 1.0f / 2.4f) - 0.055f;
+         float b = blue < 0.0031308f ? 12.92f * blue : 1.055f * mPow(blue, 1.0f / 2.4f) - 0.055f;
+         return ColorI(U8(r * 255.0f + 0.5), U8(g * 255.0f + 0.5), U8(b * 255.0f + 0.5), U8(alpha * 255.0f + 0.5f));
    #endif
       }
    }
@@ -873,10 +873,10 @@ inline ColorI LinearColorF::toColorI(const bool keepAsLinear)
          float b = mPow(blue, gOneOverGamma);
          return ColorI(U8(r * 255.0f + 0.5), U8(g * 255.0f + 0.5), U8(b * 255.0f + 0.5), U8(alpha * 255.0f + 0.5));
    #else
-         float r = red < 0.0031308f ? 12.92f * red : 1.055 * mPow(red, 1.0f / 2.4f) - 0.055f;
-         float g = green < 0.0031308f ? 12.92f * green : 1.055 * mPow(green, 1.0f / 2.4f) - 0.055f;
-         float b = blue < 0.0031308f ? 12.92f * blue : 1.055 * mPow(blue, 1.0f / 2.4f) - 0.055f;
-         return ColorI(U8(r * 255.0f + 0.5), U8(g * 255.0f + 0.5), U8(b * 255.0f + 0.5), U8(alpha * 255.0f + 0.5));
+         float r = red < 0.0031308f ? 12.92f * red : 1.055f * mPow(red, 1.0f / 2.4f) - 0.055f;
+         float g = green < 0.0031308f ? 12.92f * green : 1.055f * mPow(green, 1.0f / 2.4f) - 0.055f;
+         float b = blue < 0.0031308f ? 12.92f * blue : 1.055f * mPow(blue, 1.0f / 2.4f) - 0.055f;
+         return ColorI(U8(r * 255.0f + 0.5f), U8(g * 255.0f + 0.5f), U8(b * 255.0f + 0.5f), U8(alpha * 255.0f + 0.5f));
    #endif
       }
    }

+ 1 - 1
Engine/source/core/strings/stringFunctions.cpp

@@ -582,7 +582,7 @@ char* dStristr( char* str1, const char* str2 )
 
    // Slow but at least we have it.
 
-   U32 str2len = strlen( str2 );
+   U64 str2len = (U64)strlen( str2 );
    while( *str1 )
    {
       if( strncasecmp( str1, str2, str2len ) == 0 )

+ 1 - 1
Engine/source/gfx/bitmap/gBitmap.h

@@ -323,7 +323,7 @@ inline U8* GBitmap::getWritableBits(const U32 in_mipLevel)
 
 inline U8* GBitmap::getAddress(const S32 in_x, const S32 in_y, const U32 mipLevel)
 {
-   return (getWritableBits(mipLevel) + ((in_y * getWidth(mipLevel)) + in_x) * mBytesPerPixel);
+   return (getWritableBits(mipLevel) + (U64)(((in_y * getWidth(mipLevel)) + in_x) * mBytesPerPixel));
 }
 
 inline const U8* GBitmap::getAddress(const S32 in_x, const S32 in_y, const U32 mipLevel) const

+ 5 - 5
Engine/source/gfx/bitmap/loaders/bitmapPng.cpp

@@ -75,7 +75,7 @@ static void pngReadDataFn(png_structp png_ptr,
    AssertFatal(png_get_io_ptr(png_ptr) != NULL, "No stream?");
 
    Stream *strm = (Stream*)png_get_io_ptr(png_ptr);
-   bool success = strm->read(length, data);
+   bool success = strm->read((U32)length, data);
    AssertFatal(success, "pngReadDataFn - failed to read from stream!");
 }
 
@@ -88,7 +88,7 @@ static void pngWriteDataFn(png_structp png_ptr,
    AssertFatal(png_get_io_ptr(png_ptr) != NULL, "No stream?");
 
    Stream *strm = (Stream*)png_get_io_ptr(png_ptr);
-   bool success = strm->write(length, data);
+   bool success = strm->write((U32)length, data);
    AssertFatal(success, "pngWriteDataFn - failed to write to stream!");
 }
 
@@ -101,7 +101,7 @@ static void pngFlushDataFn(png_structp /*png_ptr*/)
 
 static png_voidp pngMallocFn(png_structp /*png_ptr*/, png_size_t size)
 {
-   return FrameAllocator::alloc(size);
+   return FrameAllocator::alloc((U32)size);
 }
 
 static void pngFreeFn(png_structp /*png_ptr*/, png_voidp /*mem*/)
@@ -265,7 +265,7 @@ static bool sReadPNG(Stream &stream, GBitmap *bitmap)
    //  above...
    png_read_update_info(png_ptr, info_ptr);
 
-   png_uint_32 rowBytes = png_get_rowbytes(png_ptr, info_ptr);
+   png_uint_32 rowBytes = (png_uint_32)png_get_rowbytes(png_ptr, info_ptr);
    if (format == GFXFormatR8G8B8) 
    {
       AssertFatal(rowBytes == width * 3,
@@ -642,4 +642,4 @@ void DeferredPNGWriter::end()
    png_destroy_write_struct(&mData->png_ptr, (png_infopp)NULL);
 
    mActive = false;
-}
+}

+ 1 - 1
Engine/source/gui/editor/guiInspectorTypes.cpp

@@ -902,7 +902,7 @@ void GuiInspectorTypeCommand::_setCommand( GuiButtonCtrl *ctrl, StringTableEntry
 
 	   S32 written = dSprintf( szBuffer, len, "%s(\"", mTextEditorCommand );
       expandEscape(szBuffer.address() + written, command);
-      written = strlen(szBuffer);
+      written = (S32)strlen(szBuffer);
       dSprintf( szBuffer.address() + written, len - written, "\", \"%d.apply\", %d.getRoot());", getId(), getId() );
 
 	   ctrl->setField( "Command", szBuffer );

+ 8 - 8
Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp

@@ -648,17 +648,17 @@ void GuiConvexEditorCtrl::on3DMouseDragged(const Gui3DMouseEvent & event)
 	     F32 scalar = 1;
 		  mConvexSEL->mSurfaceUVs[mFaceSEL].scale += (Point2F(scale.x, scale.y) * scalar);
 
-        if (mConvexSEL->mSurfaceUVs[mFaceSEL].scale.x < 0.01)
-           mConvexSEL->mSurfaceUVs[mFaceSEL].scale.x = 0.01;
+        if (mConvexSEL->mSurfaceUVs[mFaceSEL].scale.x < 0.01f)
+           mConvexSEL->mSurfaceUVs[mFaceSEL].scale.x = 0.01f;
 
-        if (mConvexSEL->mSurfaceUVs[mFaceSEL].scale.y < 0.01)
-           mConvexSEL->mSurfaceUVs[mFaceSEL].scale.y = 0.01;
+        if (mConvexSEL->mSurfaceUVs[mFaceSEL].scale.y < 0.01f)
+           mConvexSEL->mSurfaceUVs[mFaceSEL].scale.y = 0.01f;
 
-        if (mConvexSEL->mSurfaceUVs[mFaceSEL].scale.x > 100)
-           mConvexSEL->mSurfaceUVs[mFaceSEL].scale.x = 100;
+        if (mConvexSEL->mSurfaceUVs[mFaceSEL].scale.x > 100.0f)
+           mConvexSEL->mSurfaceUVs[mFaceSEL].scale.x = 100.0f;
 
-        if (mConvexSEL->mSurfaceUVs[mFaceSEL].scale.y > 100)
-           mConvexSEL->mSurfaceUVs[mFaceSEL].scale.y = 100;
+        if (mConvexSEL->mSurfaceUVs[mFaceSEL].scale.y > 100.0f)
+           mConvexSEL->mSurfaceUVs[mFaceSEL].scale.y = 100.0f;
 
         Point2F test = mConvexSEL->mSurfaceUVs[mFaceSEL].scale;
 		  mConvexSEL->setMaskBits( ConvexShape::UpdateMask );

+ 1 - 1
Engine/source/materials/materialDefinition.cpp

@@ -661,7 +661,7 @@ void Material::_mapMaterial()
                mMapTo = mDiffuseMapName[0];
             else
                // use everything after the last slash
-               mMapTo = String(mDiffuseMapName[0]).substr(slashPos + 1, strlen(mDiffuseMapName[0]) - slashPos - 1);
+               mMapTo = String(mDiffuseMapName[0]).substr(slashPos + 1, (U32)strlen(mDiffuseMapName[0]) - slashPos - 1);
          }
          else if (!mDiffuseMapAsset->isNull())
          {

+ 1 - 1
Engine/source/materials/processedShaderMaterial.cpp

@@ -230,7 +230,7 @@ bool ProcessedShaderMaterial::init( const FeatureSet &features,
    }
    if (mMaterial && mMaterial->mDiffuseMapName[0] != StringTable->EmptyString() && String(mMaterial->mDiffuseMapName[0]).startsWith("#"))
    {
-      String texTargetBufferName = String(mMaterial->mDiffuseMapName[0]).substr(1, strlen(mMaterial->mDiffuseMapName[0]) - 1);
+      String texTargetBufferName = String(mMaterial->mDiffuseMapName[0]).substr(1, (U32)strlen(mMaterial->mDiffuseMapName[0]) - 1);
       NamedTexTarget *texTarget = NamedTexTarget::find(texTargetBufferName);
       RenderPassData* rpd = getPass(0);
 

+ 1 - 1
Engine/source/math/mPoint2.h

@@ -915,7 +915,7 @@ inline bool mIsNaN( const Point2F &p )
 /// Return negative if p0p1p2 are clockwise 
 inline F64 mCross(const Point2F &p0, const Point2F &p1, const Point2F &pt2)
 {
-   return (p1.x - p0.x) * (pt2.y - p0.y) - (p1.y - p0.y) * (pt2.x - p0.x);
+   return F64((p1.x - p0.x) * (pt2.y - p0.y) - (p1.y - p0.y) * (pt2.x - p0.x));
 }
 
 

+ 3 - 3
Engine/source/persistence/taml/fsTinyXml.cpp

@@ -53,7 +53,7 @@ void VfsXMLPrinter::Print(const char* format, ...)
 
 void VfsXMLPrinter::Write(const char* data, size_t size)
 {
-   m_Stream.write(size, data);
+   m_Stream.write((U32)size, data);
 }
 
 void VfsXMLPrinter::Putc(char ch)
@@ -250,12 +250,12 @@ void VfsXMLDocument::SetError(tinyxml2::XMLError error, int lineNum, const char*
 
    if (format) {
       size_t len = strlen(buffer);
-      dSprintf(buffer + len, BUFFER_SIZE - len, ": ");
+      dSprintf(buffer + len, (U32)(BUFFER_SIZE - len), ": ");
       len = strlen(buffer);
 
       va_list va;
       va_start(va, format);
-      dSprintf(buffer + len, BUFFER_SIZE - len, format, va);
+      dSprintf(buffer + len, (U32)(BUFFER_SIZE - len), format, va);
       va_end(va);
    }
    _errorStr.SetStr(buffer);

+ 1 - 1
Engine/source/platform/nativeDialogs/fileDialog.cpp

@@ -295,7 +295,7 @@ bool FileDialog::Execute()
    else if (mData.mStyle & FileDialogData::FDS_MULTIPLEFILES)
    {
       //check if we have multiple files actually selected or not
-      U32 fileCount = NFD_PathSet_GetCount(&pathSet);
+      U32 fileCount = (U32)NFD_PathSet_GetCount(&pathSet);
       if (fileCount > 1)
       {
          //yep, so parse through them and prep our return

+ 2 - 1
Engine/source/platformWin32/nativeDialogs/win32MsgBox.cpp

@@ -37,6 +37,7 @@ struct _FlagMap
    U32 flag;
 };
 
+#ifndef TORQUE_SDL
 static _FlagMap sgButtonMap[] =
 {
    { MBOk,                 MB_OK },
@@ -65,7 +66,7 @@ static _FlagMap sgMsgBoxRetMap[] =
    { IDYES,                MROk },
    { 0xffffffff,           0xffffffff }
 };
-
+#endif
 //-----------------------------------------------------------------------------
 
 static U32 getMaskFromID(_FlagMap *map, S32 id)

+ 1 - 1
Engine/source/platformWin32/winConsole.cpp

@@ -147,7 +147,7 @@ void WinConsole::printf(const char *s, ...)
    // Axe the color characters.
    Con::stripColorChars(buffer);
    // Print it.
-   WriteFile(stdOut, buffer, strlen(buffer), &bytes, NULL);
+   WriteFile(stdOut, buffer, (U32)strlen(buffer), &bytes, NULL);
    FlushFileBuffers( stdOut );
 }
 

+ 1 - 1
Engine/source/platformWin32/winProcessControl.cpp

@@ -59,7 +59,7 @@ void Platform::outputDebugString( const char *string, ... )
    // twice as in a multi-threaded environment, some other thread may output some
    // stuff in between the two calls.
 
-   U32 length = strlen( buffer );
+   U32 length = (U32)strlen( buffer );
    if( length == ( sizeof( buffer ) - 1 ) )
       length --;
 

+ 2 - 2
Engine/source/sfx/media/sfxVorbisStream.cpp

@@ -85,12 +85,12 @@ size_t SFXVorbisStream::_read_func( void *ptr, size_t size, size_t nmemb, void *
    // Stream::read() returns true if any data was
    // read, so we must track the read bytes ourselves.
    U32 startByte = stream->getPosition();
-   stream->read( size * nmemb, ptr );
+   stream->read((U32)(size * nmemb), ptr );
    U32 endByte = stream->getPosition();
 
    // How many did we actually read?
    U32 readBytes = ( endByte - startByte );
-   U32 readItems = readBytes / size;
+   U32 readItems = (U32)(readBytes / size);
 
    return readItems;
 }

+ 1 - 1
Engine/source/terrain/terrFile.cpp

@@ -115,7 +115,7 @@ void TerrainFile::_buildGridMap()
    for ( S32 i = mGridLevels; i >= 0; i-- )
    {
       mGridMap[i] = grid;
-	  grid += 1 << ( 2 * ( mGridLevels - i ) );
+	  grid += (U64)1 << (U64)( 2 * ( mGridLevels - i ) );
    }
 
    for( S32 i = mGridLevels; i >= 0; i-- )

+ 1 - 1
Engine/source/terrain/terrFile.h

@@ -201,7 +201,7 @@ inline TerrainSquare* TerrainFile::findSquare( U32 level, U32 x, U32 y ) const
    x >>= level;
    y >>= level;
 
-   return mGridMap[level] + x + ( y << ( mGridLevels - level ) );
+   return mGridMap[level] + x + U64( y << U32( mGridLevels - level ) );
 }
 
 inline void TerrainFile::setHeight( U32 x, U32 y, U16 height )

+ 2 - 0
Engine/source/ts/assimp/assimpShapeLoader.cpp

@@ -427,6 +427,7 @@ bool AssimpShapeLoader::fillGuiTreeView(const char* sourceShapePath, GuiTreeView
 void AssimpShapeLoader::updateMaterialsScript(const Torque::Path &path)
 {
    return;
+   /*
    Torque::Path scriptPath(path);
    scriptPath.setFileName("materials");
    scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
@@ -460,6 +461,7 @@ void AssimpShapeLoader::updateMaterialsScript(const Torque::Path &path)
       return;
 
    persistMgr.saveDirty();
+   */
 }
 
 /// Check if an up-to-date cached DTS is available for this DAE file

+ 1 - 1
Engine/source/ts/collada/colladaAppMesh.cpp

@@ -512,7 +512,7 @@ void ColladaAppMesh::getPrimitives(const domGeometry* geometry)
       if (!pTriData)
          continue;
 
-      U32 numTriangles = pTriData->getCount() / meshPrims[iPrim]->getStride() / 3;
+      U32 numTriangles = (U32)(pTriData->getCount() / meshPrims[iPrim]->getStride() / 3);
       if (!numTriangles)
          continue;
 

+ 3 - 3
Engine/source/ts/collada/colladaImport.cpp

@@ -195,8 +195,8 @@ DefineEngineFunction( enumColladaForImport, bool, (const char * shapePath, const
    for (S32 i = 0; i < root->getLibrary_materials_array().getCount(); i++)
    {
       const domLibrary_materials* libraryMats = root->getLibrary_materials_array()[i];
-      stats.numMaterials += libraryMats->getMaterial_array().getCount();
-      for (S32 j = 0; j < libraryMats->getMaterial_array().getCount(); j++)
+      stats.numMaterials += (S32)libraryMats->getMaterial_array().getCount();
+      for (S32 j = 0; j < (S32)libraryMats->getMaterial_array().getCount(); j++)
       {
          domMaterial* mat = libraryMats->getMaterial_array()[j];
          tree->insertItem(matsID, _GetNameOrId(mat), "", "", 0, 0);
@@ -225,7 +225,7 @@ DefineEngineFunction( enumColladaForImport, bool, (const char * shapePath, const
    for (S32 i = 0; i < root->getLibrary_animation_clips_array().getCount(); i++)
    {
       const domLibrary_animation_clips* libraryClips = root->getLibrary_animation_clips_array()[i];
-      stats.numClips += libraryClips->getAnimation_clip_array().getCount();
+      stats.numClips += (S32)libraryClips->getAnimation_clip_array().getCount();
       for (S32 j = 0; j < libraryClips->getAnimation_clip_array().getCount(); j++)
       {
          domAnimation_clip* clip = libraryClips->getAnimation_clip_array()[j];

+ 2 - 1
Engine/source/ts/collada/colladaShapeLoader.cpp

@@ -462,7 +462,7 @@ void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false)
 #endif
 
    return;
-
+   /*
    Torque::Path scriptPath(path);
    scriptPath.setFileName("materials");
    scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
@@ -510,6 +510,7 @@ void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false)
    }
 
    persistMgr.saveDirty();
+   */
 }
 
 //-----------------------------------------------------------------------------

+ 9 - 9
Engine/source/ts/collada/colladaUtils.h

@@ -527,7 +527,7 @@ public:
    {
       if ((index >= 0) && (index < size())) {
          if (source->getFloat_array())
-            return &source->getFloat_array()->getValue()[index*stride()];
+            return &source->getFloat_array()->getValue()[(U64)(index*stride())];
       }
       return 0;
    }
@@ -541,9 +541,9 @@ public:
       if ((index >= 0) && (index < size())) {
          // could be plain strings or IDREFs
          if (source->getName_array())
-            return source->getName_array()->getValue()[index*stride()];
+            return source->getName_array()->getValue()[(U64)(index*stride())];
          else if (source->getIDREF_array())
-            return source->getIDREF_array()->getValue()[index*stride()].getID();
+            return source->getIDREF_array()->getValue()[(U64)(index*stride())].getID();
       }
       return "";
    }
@@ -708,7 +708,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTristrips>::getTrian
             continue;
 
          domUint* pSrcData = &(P->getValue()[0]);
-         size_t numTriangles = (P->getValue().getCount() / stride) - 2;
+         U64 numTriangles = (P->getValue().getCount() / stride) - 2;
 
          // Convert the strip back to a triangle list
          domUint* v0 = pSrcData;
@@ -723,7 +723,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTristrips>::getTrian
             else
             {
                // CCW triangle
-               pTriangleData->appendArray(stride*3, v0);
+               pTriangleData->appendArray((U64)(stride*3), v0);
             }
          }
       }
@@ -749,7 +749,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domTrifans>::getTriangl
             continue;
 
          domUint* pSrcData = &(P->getValue()[0]);
-         size_t numTriangles = (P->getValue().getCount() / stride) - 2;
+         U64 numTriangles = (P->getValue().getCount() / stride) - 2;
 
          // Convert the fan back to a triangle list
          domUint* v0 = pSrcData + stride;
@@ -781,7 +781,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolygons>::getTriang
             continue;
 
          domUint* pSrcData = &(P->getValue()[0]);
-         size_t numPoints = P->getValue().getCount() / stride;
+         U64 numPoints = P->getValue().getCount() / stride;
 
          // Use a simple tri-fan (centered at the first point) method of
          // converting the polygon to triangles.
@@ -789,7 +789,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolygons>::getTriang
          pSrcData += stride;
          for (S32 iTri = 0; iTri < numPoints-2; iTri++) {
             pTriangleData->appendArray(stride, v0);
-            pTriangleData->appendArray(stride*2, pSrcData);
+            pTriangleData->appendArray((U64)(stride*2), pSrcData);
             pSrcData += stride;
          }
       }
@@ -831,7 +831,7 @@ template<> inline const domListOfUInts *ColladaPrimitive<domPolylist>::getTriang
          pSrcData += stride;
          for (S32 iTri = 0; iTri < vcount[iPoly]-2; iTri++) {
             pTriangleData->appendArray(stride, v0);
-            pTriangleData->appendArray(stride*2, pSrcData);
+            pTriangleData->appendArray((U64)(stride*2), pSrcData);
             pSrcData += stride;
          }
          pSrcData += stride;