Bläddra i källkod

Merge pull request #1017 from Azaezel/alpha41/validateVars

uninitialized and unused value cleanups
Brian Roberts 2 år sedan
förälder
incheckning
0cdced232d
37 ändrade filer med 184 tillägg och 326 borttagningar
  1. 4 4
      Engine/source/T3D/assets/ImageAssetInspectors.h
  2. 0 5
      Engine/source/T3D/assets/ShapeAsset.cpp
  3. 0 3
      Engine/source/T3D/assets/TerrainAsset.cpp
  4. 3 3
      Engine/source/T3D/assets/assetImporter.cpp
  5. 0 94
      Engine/source/T3D/convexShape.cpp
  6. 4 4
      Engine/source/T3D/lighting/reflectionProbe.cpp
  7. 12 1
      Engine/source/T3D/lighting/reflectionProbe.h
  8. 1 1
      Engine/source/core/util/tSignal.h
  9. 5 1
      Engine/source/core/util/uuid.h
  10. 3 3
      Engine/source/environment/meshRoad.cpp
  11. 1 1
      Engine/source/environment/skySphere.cpp
  12. 4 3
      Engine/source/environment/skySphere.h
  13. 1 1
      Engine/source/gfx/bitmap/loaders/bitmapJpeg.cpp
  14. 0 3
      Engine/source/gfx/gl/gfxGLCubemap.cpp
  15. 43 105
      Engine/source/gui/controls/guiGameSettingsCtrl.cpp
  16. 2 2
      Engine/source/lighting/advanced/glsl/advancedLightingFeaturesGLSL.cpp
  17. 2 2
      Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp
  18. 23 5
      Engine/source/materials/sceneData.h
  19. 1 1
      Engine/source/platform/threads/threadSafePriorityQueue.h
  20. 6 6
      Engine/source/platformSDL/threads/thread.cpp
  21. 1 1
      Engine/source/platformWin32/winCPUInfo.cpp
  22. 2 2
      Engine/source/sfx/openal/sfxALDevice.cpp
  23. 2 3
      Engine/source/sfx/openal/sfxALProvider.cpp
  24. 2 2
      Engine/source/sfx/sfxProvider.h
  25. 0 1
      Engine/source/sfx/sfxSystem.cpp
  26. 1 1
      Engine/source/shaderGen/GLSL/customFeatureGLSL.cpp
  27. 2 9
      Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp
  28. 1 1
      Engine/source/shaderGen/HLSL/customFeatureHLSL.cpp
  29. 0 13
      Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp
  30. 5 8
      Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp
  31. 2 2
      Engine/source/shaderGen/shaderFeature.h
  32. 23 15
      Engine/source/terrain/terrData.cpp
  33. 1 2
      Engine/source/ts/tsLastDetail.cpp
  34. 0 2
      Engine/source/ts/tsShapeInstance.cpp
  35. 22 11
      Engine/source/ts/tsShapeInstance.h
  36. 1 1
      Engine/source/windowManager/platformWindow.h
  37. 4 4
      Engine/source/windowManager/windowInputGenerator.h

+ 4 - 4
Engine/source/T3D/assets/ImageAssetInspectors.h

@@ -13,10 +13,10 @@ class GuiInspectorTypeImageAssetPtr : public GuiInspectorTypeFileName
    typedef GuiInspectorTypeFileName Parent;
 public:
 
-   GuiTextCtrl* mLabel;
-   GuiBitmapButtonCtrl* mPreviewBorderButton;
-   GuiBitmapCtrl* mPreviewImage;
-   GuiButtonCtrl* mEditButton;
+   GuiTextCtrl* mLabel = NULL;
+   GuiBitmapButtonCtrl* mPreviewBorderButton = NULL;
+   GuiBitmapCtrl* mPreviewImage = NULL;
+   GuiButtonCtrl* mEditButton = NULL;
 
    DECLARE_CONOBJECT(GuiInspectorTypeImageAssetPtr);
    static void consoleInit();

+ 0 - 5
Engine/source/T3D/assets/ShapeAsset.cpp

@@ -592,9 +592,6 @@ const char* ShapeAsset::generateCachedPreviewImage(S32 resolution, String overri
    // Animate the shape once.
    shape->animate(0);
 
-   // So we don't have to change it everywhere.
-   const GFXFormat format = GFXFormatR8G8B8A8;
-
    GBitmap* imposter = NULL;
    GBitmap* imposterNrml = NULL;
 
@@ -605,8 +602,6 @@ const char* ShapeAsset::generateCachedPreviewImage(S32 resolution, String overri
 
    MatrixF angMat;
 
-   S32 mip = 0;
-
    PROFILE_START(ShapeAsset_generateCachedPreviewImage);
 
    //dMemset(destBmp.getWritableBits(mip), 0, destBmp.getWidth(mip) * destBmp.getHeight(mip) * GFXFormat_getByteSize(format));

+ 0 - 3
Engine/source/T3D/assets/TerrainAsset.cpp

@@ -104,9 +104,6 @@ ConsoleSetType(TypeTerrainAssetId)
    // Was a single argument specified?
    if (argc == 1)
    {
-      // Yes, so fetch field value.
-      const char* pFieldValue = argv[0];
-
       *((const char**)dptr) = StringTable->insert(argv[0]);
 
       return;

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

@@ -638,7 +638,7 @@ AssetImportObject* AssetImporter::addImportingAsset(String assetType, Torque::Pa
    U32 pos = dStrcspn(sanitizedStr, "-+*/%$&�=()[].?\\\"#,;!~<>|�^{}");
    while (pos < dStrlen(sanitizedStr))
    {
-      dStrcpy(sanitizedStr + pos, sanitizedStr + pos + 1, len - pos);
+      dStrcpy(sanitizedStr + pos, sanitizedStr + pos + 1, (dsize_t)(len - pos));
       pos = dStrcspn(sanitizedStr, "-+*/%$&�=()[].?\\\"#,;!~<>|�^{}");
    }
 
@@ -1903,7 +1903,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
 
                         //Check to see if our target module has a matching assetId for this slot already based on our trimmed mat name
                         testAssetId = targetModuleId + ":" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;\t");
-                        bool localAssetFound = false;
+                        localAssetFound = false;
 
                         if (AssetDatabase.isDeclaredAsset(testAssetId.c_str()))
                            localAssetFound = true;
@@ -2792,7 +2792,7 @@ void AssetImporter::acquireAssets(AssetImportObject* assetItem)
 
       if (AssetDatabase.isDeclaredAsset(assetId))
       {
-         AssetBase* assetDef = AssetDatabase.acquireAsset<AssetBase>(assetId);
+         AssetDatabase.acquireAsset<AssetBase>(assetId);
          AssetDatabase.releaseAsset(assetId);
       }
    }

+ 0 - 94
Engine/source/T3D/convexShape.cpp

@@ -1370,48 +1370,6 @@ void ConvexShape::_updateGeometry( bool updateCollision )
 	}
 
    //Build the buffer for our default material
-   /*if (mVertCount > 0)
-   {
-      mVertexBuffer.set(GFX, mVertCount, GFXBufferTypeStatic);
-      VertexType *pVert = mVertexBuffer.lock();
-
-      for (S32 i = 0; i < faceList.size(); i++)
-      {
-         if (mSurfaceUVs[i].matID == -1)
-         {
-            const ConvexShape::Face &face = faceList[i];
-            const Vector< U32 > &facePntMap = face.points;
-            const Vector< ConvexShape::Triangle > &triangles = face.triangles;
-            const ColorI &faceColor = sgConvexFaceColors[i % sgConvexFaceColorCount];
-
-            const Point3F binormal = mCross(face.normal, face.tangent);
-
-                  pVert++;
-               }
-            }
-         }
-      }
-
-      mVertexBuffer.unlock();
-
-      // Allocate PB
-
-      mPrimitiveBuffer.set(GFX, mPrimCount * 3, mPrimCount, GFXBufferTypeStatic);
-
-      U16 *pIndex;
-      mPrimitiveBuffer.lock(&pIndex);
-
-      for (U16 i = 0; i < mPrimCount * 3; i++)
-      {
-         *pIndex = i;
-         pIndex++;
-      }
-
-      mPrimitiveBuffer.unlock();
-   }*/
-
-   //
-   //
    for (U32 i = 0; i < mSurfaceBuffers.size(); i++)
    {
       if (mSurfaceBuffers[i].mVertCount > 0)
@@ -1428,7 +1386,6 @@ void ConvexShape::_updateGeometry( bool updateCollision )
                const ConvexShape::Face &face = faceList[f];
                const Vector< U32 > &facePntMap = face.points;
                const Vector< ConvexShape::Triangle > &triangles = face.triangles;
-               const ColorI &faceColor = sgConvexFaceColors[f % sgConvexFaceColorCount];
 
                const Point3F binormal = mCross(face.normal, face.tangent);
 
@@ -1439,7 +1396,6 @@ void ConvexShape::_updateGeometry( bool updateCollision )
                      pVert->normal = face.normal;
                      pVert->T = face.tangent;
                      pVert->B = mCross(face.normal,face.tangent);
-                     //pVert->color = faceColor;
                      pVert->point = pointList[facePntMap[triangles[j][k]]];
                      pVert->texCoord = face.texcoords[triangles[j][k]];
                      pVert->texCoord2 = pVert->texCoord;
@@ -1469,56 +1425,6 @@ void ConvexShape::_updateGeometry( bool updateCollision )
          mSurfaceBuffers[i].mPrimitiveBuffer.unlock();
       }
    }
-   //
-   //
-
-   /*// Allocate VB and copy in data.
-   for (S32 i = 0; i < faceList.size(); i++)
-   {
-      mVertexBuffer.set(GFX, mVertCount, GFXBufferTypeStatic);
-      VertexType *pVert = mVertexBuffer.lock();
-
-      for (S32 i = 0; i < faceList.size(); i++)
-      {
-         const ConvexShape::Face &face = faceList[i];
-         const Vector< U32 > &facePntMap = face.points;
-         const Vector< ConvexShape::Triangle > &triangles = face.triangles;
-         const ColorI &faceColor = sgConvexFaceColors[i % sgConvexFaceColorCount];
-
-         const Point3F binormal = mCross(face.normal, face.tangent);
-
-         for (S32 j = 0; j < triangles.size(); j++)
-         {
-            for (S32 k = 0; k < 3; k++)
-            {
-               pVert->normal = face.normal;
-               pVert->tangent = face.tangent;
-               pVert->color = faceColor;
-               pVert->point = pointList[facePntMap[triangles[j][k]]];
-               pVert->texCoord = face.texcoords[triangles[j][k]];
-
-               pVert++;
-            }
-         }
-      }
-
-      mVertexBuffer.unlock();
-
-      // Allocate PB
-
-      mPrimitiveBuffer.set(GFX, mPrimCount * 3, mPrimCount, GFXBufferTypeStatic);
-
-      U16 *pIndex;
-      mPrimitiveBuffer.lock(&pIndex);
-
-      for (U16 i = 0; i < mPrimCount * 3; i++)
-      {
-         *pIndex = i;
-         pIndex++;
-      }
-
-      mPrimitiveBuffer.unlock();
-   }*/
 }
 
 void ConvexShape::_updateCollision()

+ 4 - 4
Engine/source/T3D/lighting/reflectionProbe.cpp

@@ -56,7 +56,7 @@
 extern bool gEditingMission;
 extern ColorI gCanvasClearColor;
 bool ReflectionProbe::smRenderPreviewProbes = true;
-
+static MatrixF sEditingTransformMat;
 IMPLEMENT_CO_NETOBJECT_V1(ReflectionProbe);
 
 ConsoleDocClass(ReflectionProbe,
@@ -371,10 +371,10 @@ const MatrixF& ReflectionProbe::getTransform() const
       return mObjToWorld; 
    else
    {
-      MatrixF transformMat = MatrixF::Identity;
-      transformMat.setPosition(mProbeRefOffset);
+      sEditingTransformMat = MatrixF::Identity;
+      sEditingTransformMat.setPosition(mProbeRefOffset);
 
-      return transformMat;
+      return sEditingTransformMat;
    }
 }
 

+ 12 - 1
Engine/source/T3D/lighting/reflectionProbe.h

@@ -112,7 +112,18 @@ public:
       bool mCanDamp;
    public:
 
-      ProbeInfo() : mScore(0) {}
+      ProbeInfo()
+      {
+         mScore = 0;
+         mAtten = 0.0f;
+         mCanDamp = false;
+         mDirty = false;
+         mIsEnabled = true;
+         mObject = NULL;
+         mPriority = 0;
+         mProbeShapeType = Box;
+         mRadius = 10.0f;
+      }
       ~ProbeInfo() {}
 
       // Copies data passed in from light

+ 1 - 1
Engine/source/core/util/tSignal.h

@@ -202,7 +202,7 @@ public:
 
    void remove( DelegateSig dlg )
    {
-      for( DelegateLink* ptr = mList.next;ptr != &mList; ptr = ptr->next )
+      for( DelegateLink* ptr = mList.next;(ptr != &mList)&& (ptr!= NULL); ptr = ptr->next )
       {
          if( DelegateLinkImpl* del = static_cast< DelegateLinkImpl* >( ptr ) )
          {

+ 5 - 1
Engine/source/core/util/uuid.h

@@ -70,7 +70,11 @@ namespace Torque
       
          UUID()
          {
-            dMemset( this, 0, sizeof( UUID ) );
+            a = b = c = d = e = 0;
+            for (U32 i = 0; i < 6; i++)
+            {
+               f [i]=0;
+            }
          }
          
          ///

+ 3 - 3
Engine/source/environment/meshRoad.cpp

@@ -2452,9 +2452,9 @@ void MeshRoad::_generateSlices()
       profileMat2.setRow(1, slicePtr->uvec);
       profileMat2.setRow(2, slicePtr->fvec);
 
-      for(U32 i = 0; i < 2; i++)
+      for(U32 profile = 0; profile < 2; profile++)
       {
-         if(i)
+         if(profile)
             mSideProfile.setTransform(profileMat2, slicePtr->p0);
          else
             mSideProfile.setTransform(profileMat1, slicePtr->p2);
@@ -2470,7 +2470,7 @@ void MeshRoad::_generateSlices()
             slicePtr->verts.push_back(pos);
             box.extend( pos );
 
-            if(i)
+            if(profile)
                slicePtr->pb0 = pos;
             else
                slicePtr->pb2 = pos;

+ 1 - 1
Engine/source/environment/skySphere.cpp

@@ -319,7 +319,7 @@ void SkySphere::_initRender()
    U32 height = 16;
    U32 radius = 1;
 
-   F32 x, y, z, xy;                              // vertex position
+   F32 x, y;                              // vertex position
    F32 nx, ny, nz, lengthInv = 1.0f / radius;       // normal
    F32 s, t;                                     // texCoord
 

+ 4 - 3
Engine/source/environment/skySphere.h

@@ -107,7 +107,8 @@ public:
    {
       Point3F pos;
       Point3F nor;
-      F32 s, t;
+      F32 s = 0.0f;
+      F32 t = 0.0f;
    };
 
    Vector<SphereVertex> tmpVertices;
@@ -119,8 +120,8 @@ public:
    {
       Point3F pos;
       Point3F nor;
-      F32 s;
-      F32 t;
+      F32 s = 0.0f;
+      F32 t = 0.0f;
    };
 
    Vector<FinalVertexData> finalVertData;

+ 1 - 1
Engine/source/gfx/bitmap/loaders/bitmapJpeg.cpp

@@ -150,7 +150,7 @@ static bool sReadJPG(Stream &stream, GBitmap *bitmap)
    U8* pBase = (U8*)bitmap->getBits();
    for (U32 i = 0; i < bitmap->getHeight(); i++)
    {
-      JSAMPROW rowPointer = pBase + (i * rowBytes);
+      JSAMPROW rowPointer = pBase + (U64)(i * rowBytes);
       jpeg_read_scanlines(&cinfo, &rowPointer, 1);
    }
 

+ 0 - 3
Engine/source/gfx/gl/gfxGLCubemap.cpp

@@ -357,7 +357,6 @@ void GFXGLCubemapArray::init(GFXCubemapHandle *cubemaps, const U32 cubemapCount)
             const U32 mipSize = getMax(U32(1), mSize >> currentMip);
             if (isCompressed)
             {
-               const U32 mipDataSize = getCompressedSurfaceSize(mFormat, mSize, mSize, currentMip);
                glCompressedTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, i * 6 + face, mipSize, mipSize, 1, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], pixelData);
             }
             else
@@ -378,7 +377,6 @@ void GFXGLCubemapArray::init(const U32 cubemapCount, const U32 cubemapFaceSize,
    setCubeTexSize(cubemapFaceSize);
    mFormat = format;
    mNumCubemaps = cubemapCount;
-   const bool isCompressed = ImageUtil::isCompressedFormat(mFormat);
 
    glGenTextures(1, &mCubemap);
    PRESERVE_CUBEMAP_ARRAY_TEXTURE();
@@ -416,7 +414,6 @@ void GFXGLCubemapArray::updateTexture(const GFXCubemapHandle &cubemap, const U32
          const U32 mipSize = getMax(U32(1), mSize >> currentMip);
          if (isCompressed)
          {
-            const U32 mipDataSize = getCompressedSurfaceSize(mFormat, mSize, mSize, currentMip);
             glCompressedTexSubImage3D(GL_TEXTURE_CUBE_MAP_ARRAY, currentMip, 0, 0, slot * 6 + face, mipSize, mipSize, 1, GFXGLTextureFormat[mFormat], GFXGLTextureType[mFormat], pixelData);
          }
          else

+ 43 - 105
Engine/source/gui/controls/guiGameSettingsCtrl.cpp

@@ -118,7 +118,6 @@ void GuiGameSettingsCtrl::onRender(Point2I offset, const RectI &updateRect)
    Point2I iconExtent, iconOffset(0.0f, 0.0f);
 
    bool highlight = mHighlighted;
-   bool depressed = mDepressed;
 
    ColorI fontColor = mActive ? (highlight ? mProfile->mFontColorHL : mProfile->mFontColor) : mProfile->mFontColorNA;
    ColorI fillColor = mActive ? (highlight ? mProfile->mFillColorHL : mProfile->mFillColor) : mProfile->mFillColorNA;
@@ -182,52 +181,51 @@ void GuiGameSettingsCtrl::onRenderListOption(Point2I currentOffset)
    bool hasOptions = (mOptions.size() > 0) && mSelectedOption > -1;
    if (hasOptions)
    {
-      if (mPreviousBitmapAsset.notNull())
-      {
-         // render the left arrow
-         bool arrowOnL = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption > 0));
-         arrowOffset.x = currentOffset.x + mColumnSplit;
-         arrowOffset.y = currentOffset.y + arrowOffsetY;
-
-         drawer->clearBitmapModulation();
-         drawer->drawBitmapStretch(mPreviousBitmap, RectI(arrowOffset, Point2I(mArrowSize, mArrowSize)), GFXBitmapFlip_None, GFXTextureFilterLinear, false);
-      }
-      else
-      {
-         // render the left arrow
-         bool arrowOnL = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption > 0));
-         arrowOffset.x = currentOffset.x + mColumnSplit;
-         arrowOffset.y = currentOffset.y + height/2;
-
-         drawer->clearBitmapModulation();
-
-         drawer->drawLine(arrowOffset, Point2I(arrowOffset.x + mArrowSize, currentOffset.y), ColorI::WHITE);
-         drawer->drawLine(arrowOffset, Point2I(arrowOffset.x + mArrowSize, currentOffset.y + height), ColorI::WHITE);
-      }
-
-      if (mNextBitmapAsset.notNull())
+      // do we render the left or right arrows?
+      bool arrowOnL = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption > 0));
+      bool arrowOnR = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption < mOptions.size() - 1));
+      if (arrowOnL)
       {
-         // render the right arrow
-         bool arrowOnR = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption < mOptions.size() - 1));
-         arrowOffset.x = currentOffset.x + getWidth() - mRightPad - mArrowSize;
-         arrowOffset.y = currentOffset.y + arrowOffsetY;
-
-         drawer->clearBitmapModulation();
-         drawer->drawBitmapStretch(mNextBitmap, RectI(arrowOffset, Point2I(mArrowSize, mArrowSize)), GFXBitmapFlip_None, GFXTextureFilterLinear, false);
+         if (mPreviousBitmapAsset.notNull())
+         {
+            arrowOffset.x = currentOffset.x + mColumnSplit;
+            arrowOffset.y = currentOffset.y + arrowOffsetY;
+
+            drawer->clearBitmapModulation();
+            drawer->drawBitmapStretch(mPreviousBitmap, RectI(arrowOffset, Point2I(mArrowSize, mArrowSize)), GFXBitmapFlip_None, GFXTextureFilterLinear, false);
+         }
+         else
+         {
+            arrowOffset.x = currentOffset.x + mColumnSplit;
+            arrowOffset.y = currentOffset.y + height / 2;
+
+            drawer->clearBitmapModulation();
+
+            drawer->drawLine(arrowOffset, Point2I(arrowOffset.x + mArrowSize, currentOffset.y), ColorI::WHITE);
+            drawer->drawLine(arrowOffset, Point2I(arrowOffset.x + mArrowSize, currentOffset.y + height), ColorI::WHITE);
+         }
       }
-      else
+      if (arrowOnR)
       {
-         // render the left arrow
-         bool arrowOnL = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption > 0));
-         arrowOffset.x = currentOffset.x + getWidth() - mRightPad;
-         arrowOffset.y = currentOffset.y + height / 2;
-
-         drawer->clearBitmapModulation();
-
-         drawer->drawLine(arrowOffset, Point2I(arrowOffset.x - mArrowSize, currentOffset.y), ColorI::WHITE);
-         drawer->drawLine(arrowOffset, Point2I(arrowOffset.x - mArrowSize, currentOffset.y + height), ColorI::WHITE);
+         if (mNextBitmapAsset.notNull())
+         {
+            arrowOffset.x = currentOffset.x + getWidth() - mRightPad - mArrowSize;
+            arrowOffset.y = currentOffset.y + arrowOffsetY;
+
+            drawer->clearBitmapModulation();
+            drawer->drawBitmapStretch(mNextBitmap, RectI(arrowOffset, Point2I(mArrowSize, mArrowSize)), GFXBitmapFlip_None, GFXTextureFilterLinear, false);
+         }
+         else
+         {
+            arrowOffset.x = currentOffset.x + getWidth() - mRightPad;
+            arrowOffset.y = currentOffset.y + height / 2;
+
+            drawer->clearBitmapModulation();
+
+            drawer->drawLine(arrowOffset, Point2I(arrowOffset.x - mArrowSize, currentOffset.y), ColorI::WHITE);
+            drawer->drawLine(arrowOffset, Point2I(arrowOffset.x - mArrowSize, currentOffset.y + height), ColorI::WHITE);
+         }
       }
-
       // get the appropriate font color
       ColorI fontColor;
       if (!mEnabled)
@@ -265,65 +263,13 @@ void GuiGameSettingsCtrl::onRenderListOption(Point2I currentOffset)
 
 void GuiGameSettingsCtrl::onRenderSliderOption(Point2I currentOffset)
 {
-   F32 xScale = (float)getWidth();
-
    S32 height = getHeight();
 
-   S32 arrowOffsetY = 0;
-
    GFXDrawUtil* drawer = GFX->getDrawUtil();
 
-   Point2I arrowOffset;
+   //Point2I arrowOffset;
    S32 columnSplit = mColumnSplit;
 
-   
-
-   /*if (mPreviousBitmapAsset.notNull())
-   {
-      // render the left arrow
-      bool arrowOnL = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption > 0));
-      arrowOffset.x = currentOffset.x + columnSplit;
-      arrowOffset.y = currentOffset.y + arrowOffsetY;
-
-      drawer->clearBitmapModulation();
-      drawer->drawBitmapStretch(mPreviousBitmap, RectI(arrowOffset, Point2I(mArrowSize, mArrowSize)), GFXBitmapFlip_None, GFXTextureFilterLinear, false);
-   }
-   else
-   {
-      // render the left arrow
-      bool arrowOnL = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption > 0));
-      arrowOffset.x = currentOffset.x + mColumnSplit;
-      arrowOffset.y = currentOffset.y + height / 2;
-
-      drawer->clearBitmapModulation();
-
-      drawer->drawLine(arrowOffset, Point2I(arrowOffset.x + mArrowSize, currentOffset.y), ColorI::WHITE);
-      drawer->drawLine(arrowOffset, Point2I(arrowOffset.x + mArrowSize, currentOffset.y + height), ColorI::WHITE);
-   }
-
-   if (mNextBitmapAsset.notNull())
-   {
-      // render the right arrow
-      bool arrowOnR = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption < mOptions.size() - 1));
-      arrowOffset.x = currentOffset.x + mRightPad * xScale - mArrowSize;
-      arrowOffset.y = currentOffset.y + arrowOffsetY;
-
-      drawer->clearBitmapModulation();
-      drawer->drawBitmapStretch(mNextBitmap, RectI(arrowOffset, Point2I(mArrowSize, mArrowSize)), GFXBitmapFlip_None, GFXTextureFilterLinear, false);
-   }
-   else
-   {
-      // render the left arrow
-      bool arrowOnL = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption > 0));
-      arrowOffset.x = currentOffset.x + getWidth() - mRightPad;
-      arrowOffset.y = currentOffset.y + height / 2;
-
-      drawer->clearBitmapModulation();
-
-      drawer->drawLine(arrowOffset, Point2I(arrowOffset.x - mArrowSize, currentOffset.y), ColorI::WHITE);
-      drawer->drawLine(arrowOffset, Point2I(arrowOffset.x - mArrowSize, currentOffset.y + height), ColorI::WHITE);
-   }*/
-
    //Draw the slider bar
 
    RectI sliderRect;
@@ -389,13 +335,10 @@ void GuiGameSettingsCtrl::onRenderSliderOption(Point2I currentOffset)
       fontColor = mProfile->mFontColor;
    }
 
-   // calculate text to be at the center between the arrows
-   GFont* font = mProfile->mFont;
-
    char stringVal[32];
    dSprintf(stringVal, 32, "%.1f", mValue);
 
-   S32 stringWidth = font->getStrWidth(stringVal);
+   //S32 stringWidth = font->getStrWidth(stringVal); //adaptive width
    Point2I textOffset(sliderRect.point.x + sliderRect.extent.x, 0);
 
    // render the option text itself
@@ -413,7 +356,6 @@ void GuiGameSettingsCtrl::onRenderSliderOption(Point2I currentOffset)
 
 void GuiGameSettingsCtrl::onRenderKeybindOption(Point2I currentOffset)
 {
-   F32 xScale = (float)getWidth();
    S32 columnSplit = mColumnSplit;
 
    S32 height = getHeight();
@@ -696,8 +638,6 @@ void GuiGameSettingsCtrl::addOption(const char* displayText, const char* keyText
 
 void GuiGameSettingsCtrl::clickOption(S32 xPos)
 {
-   F32 xScale = (float)getWidth();
-
    S32 leftArrowX1 = mColumnSplit;
    S32 leftArrowX2 = leftArrowX1 + mArrowSize;
 
@@ -814,8 +754,6 @@ void GuiGameSettingsCtrl::clickSlider(S32 xPos)
 
 void GuiGameSettingsCtrl::clickKeybind(S32 xPos)
 {
-   S32 columnSplit = mColumnSplit;
-
    S32 height = getHeight();
    S32 width = getWidth();
 

+ 2 - 2
Engine/source/lighting/advanced/glsl/advancedLightingFeaturesGLSL.cpp

@@ -573,8 +573,8 @@ void DeferredSubSurfaceGLSL::processPix(  Vector<ShaderComponent*> &componentLis
    subSurfaceParams->uniform = true;
    subSurfaceParams->constSortPos = cspPotentialPrimitive;
 
-   Var *d_lightcolor = (Var*)LangElement::find( "d_lightcolor" );
-   Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" );
+   //Var *d_lightcolor = (Var*)LangElement::find( "d_lightcolor" );
+   //Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" );
 
    MultiLine *meta = new MultiLine;
    Var* targ = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget));

+ 2 - 2
Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp

@@ -613,8 +613,8 @@ void DeferredSubSurfaceHLSL::processPix(  Vector<ShaderComponent*> &componentLis
    subSurfaceParams->uniform = true;
    subSurfaceParams->constSortPos = cspPotentialPrimitive;
 
-   Var *d_lightcolor = (Var*)LangElement::find( "d_lightcolor" );
-   Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" );
+   //Var *d_lightcolor = (Var*)LangElement::find( "d_lightcolor" );
+   //Var *d_NL_Att = (Var*)LangElement::find( "d_NL_Att" );
 
    MultiLine *meta = new MultiLine;
    Var* targ = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget));

+ 23 - 5
Engine/source/materials/sceneData.h

@@ -56,7 +56,10 @@ struct SceneData
       /// @afxRenderHighlightMgr  
       HighlightBin,
    };
-
+   enum
+   {
+      MAX_LIGHTS = 8
+   };
    /// This defines when we're rendering a special bin 
    /// type that the material or lighting system needs
    /// to know about.
@@ -71,7 +74,7 @@ struct SceneData
    
    /// The current lights to use in rendering
    /// in order of the light importance.
-   LightInfo* lights[8];
+   LightInfo* lights[MAX_LIGHTS];
 
    ///
    LinearColorF ambientLightColor;
@@ -98,9 +101,24 @@ struct SceneData
    Vector<CustomShaderBindingData*> customShaderData;
 
    /// Constructor.
-   SceneData() 
-   { 
-      dMemset( this, 0, sizeof( SceneData ) );
+   SceneData()
+   {
+      accuTex = NULL;
+      backBuffTex = NULL;
+      binType = RegularBin;
+      cubemap = NULL;
+      fogDensity = 0.0f;
+      fogDensityOffset = 0.0f;
+      fogHeightFalloff = 0.0f;
+      lightmap = NULL;
+      for (U32 i = 0; i < MAX_LIGHTS; i++)
+      {
+         lights[i] = NULL;
+      }
+      materialHint = NULL;
+      miscTex = NULL;
+      reflectTex = NULL;
+      wireframe = false;
       objTrans = &MatrixF::Identity;
       visibility = 1.0f;
    }

+ 1 - 1
Engine/source/platform/threads/threadSafePriorityQueue.h

@@ -389,7 +389,7 @@ inline ThreadSafePriorityQueue< T, K, SORT_MIN_TO_MAX, MAX_LEVEL, PROBABILISTIC_
      mPriority( priority ),
      mValue( value )
 {
-   dMemset( mNext, 0, sizeof( Node* ) * ( getLevel() + 1 ) );
+   dMemset( mNext, 0, sizeof( Node* ) * (U32)( getLevel() + 1 ) );
 
    // Level is already set by the allocation routines.
 }

+ 6 - 6
Engine/source/platformSDL/threads/thread.cpp

@@ -30,13 +30,13 @@
 class PlatformThreadData
 {
 public:
-   ThreadRunFunction       mRunFunc;
-   void*                   mRunArg;
-   Thread*                 mThread;
+   ThreadRunFunction       mRunFunc = NULL;
+   void*                   mRunArg = NULL;
+   Thread*                 mThread = NULL;
    Semaphore               mGateway; // default count is 1
-   SDL_threadID            mThreadID;
-   SDL_Thread*             mSdlThread;
-   bool                    mDead;
+   SDL_threadID            mThreadID = 0;
+   SDL_Thread*             mSdlThread = NULL;
+   bool                    mDead = true;
 };
 
 ThreadManager::MainThreadId ThreadManager::smMainThreadId;

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

@@ -78,7 +78,7 @@ static void detectCpuFeatures(Platform::SystemInfo_struct::Processor &processor)
 {
    S32 cpuInfo[4];
    __cpuid(cpuInfo, 1);
-   U32 eax = cpuInfo[0];   // eax
+   //U32 eax = cpuInfo[0];   // eax
    U32 edx = cpuInfo[3];  // edx
    U32 ecx = cpuInfo[2]; // ecx
 

+ 2 - 2
Engine/source/sfx/openal/sfxALDevice.cpp

@@ -77,7 +77,7 @@ S32 SFXALDevice::getMaxSources()
 
 S32 SFXALDevice::getMaxSourcesOld()
 {
-   ALuint uiSource[256];
+   ALuint uiSource[256] = {};
    S32 sourceCount = 0;
    
    // clear errors.
@@ -148,7 +148,7 @@ SFXALDevice::SFXALDevice(  SFXProvider *provider,
 #if defined(AL_ALEXT_PROTOTYPES)
        mOpenAL.alcGetIntegerv(mDevice, ALC_MAX_AUXILIARY_SENDS, 1, &iSends);
 #endif
-       U32 err = mOpenAL.alcGetError( mDevice );
+       err = mOpenAL.alcGetError( mDevice );
       
       if( err != ALC_NO_ERROR )
          Con::errorf( "SFXALDevice - Context Initialization Error: %s", mOpenAL.alcGetString( mDevice, err ) );

+ 2 - 3
Engine/source/sfx/openal/sfxALProvider.cpp

@@ -60,7 +60,7 @@ MODULE_BEGIN( OpenAL )
    MODULE_INIT_BEFORE( SFX )
    MODULE_SHUTDOWN_AFTER( SFX )
    
-   SFXALProvider* mProvider;
+   SFXALProvider* mProvider = NULL;
    
    MODULE_INIT
    {
@@ -91,9 +91,8 @@ void SFXALProvider::init()
    }
 
    // Cool, loop through them, and caps em
-   const char *deviceFormat = "OpenAL v%d.%d %s";
+   //const char *deviceFormat = "OpenAL v%d.%d %s";
 
-   char temp[256];
    for( S32 i = 0; i < mALDL->GetNumDevices(); i++ )
    {
       ALDeviceInfo* info = new ALDeviceInfo;

+ 2 - 2
Engine/source/sfx/sfxProvider.h

@@ -37,8 +37,8 @@ struct SFXDeviceInfo
    String   driver;
    String   internalName;
    String   name;
-   bool     hasHardware;
-   S32      maxBuffers;
+   bool     hasHardware = false;
+   S32      maxBuffers =0;
 
    virtual ~SFXDeviceInfo() {}
 };

+ 0 - 1
Engine/source/sfx/sfxSystem.cpp

@@ -1620,7 +1620,6 @@ DefineEngineFunction( sfxPlayOnce, S32, (StringTableEntry assetId, const char* a
    "Create a new play-once source for the given profile or description+filename and start playback of the source.\n"
    "@hide" )
 {
-   SFXDescription* description = NULL;
    if (assetId == StringTable->EmptyString())
    {
       Con::errorf( "sfxPlayOnce - Must Define a sound asset");

+ 1 - 1
Engine/source/shaderGen/GLSL/customFeatureGLSL.cpp

@@ -184,7 +184,7 @@ void CustomFeatureGLSL::addVariable(String name, String type, String defaultValu
 void CustomFeatureGLSL::addConnector(String name, String type, String elementName)
 {
    // grab connector texcoord register
-   ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(mComponentList[C_CONNECTOR]);
+   //ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(mComponentList[C_CONNECTOR]);
 
    //Get element
    S32 element = -1;

+ 2 - 9
Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp

@@ -2139,8 +2139,6 @@ void RTLightingFeatGLSL::processPix(   Vector<ShaderComponent*> &componentList,
    if ( fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit] )
       return;
   
-   ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
-
    MultiLine *meta = new MultiLine;
 
 	// Now the wsPosition and wsView.
@@ -2202,10 +2200,7 @@ void RTLightingFeatGLSL::processPix(   Vector<ShaderComponent*> &componentList,
    {
       Con::errorf("ShaderGen::RTLightingFeatGLSL()  - failed to generate surface!");
       return;
-   }   
-   Var *roughness = (Var*)LangElement::find("roughness");
-
-   Var *metalness = (Var*)LangElement::find("metalness");
+   }
 
    Var *curColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget));
 
@@ -2957,10 +2952,8 @@ void ReflectionProbeFeatGLSL::processPix(Vector<ShaderComponent*>& componentList
    if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit])
       return;
 
-   ShaderConnector * connectComp = dynamic_cast<ShaderConnector*>(componentList[C_CONNECTOR]);
-
    MultiLine * meta = new MultiLine;
-
+      
    // Now the wsPosition and wsView.
    Var *wsPosition = getInWsPosition(componentList);
    Var *worldToTangent = getInWorldToTangent(componentList);

+ 1 - 1
Engine/source/shaderGen/HLSL/customFeatureHLSL.cpp

@@ -201,7 +201,7 @@ void CustomFeatureHLSL::addVariable(String name, String type, String defaultValu
 void CustomFeatureHLSL::addConnector(String name, String type, String elementName)
 {
    // grab connector texcoord register
-   ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(mComponentList[C_CONNECTOR]);
+   //ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(mComponentList[C_CONNECTOR]);
 
    //Get element
    S32 element = -1;

+ 0 - 13
Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp

@@ -122,8 +122,6 @@ void DebugVizHLSL::processPix(Vector<ShaderComponent*>& componentList,
       if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit])
          return;
 
-      ShaderConnector* connectComp = dynamic_cast<ShaderConnector*>(componentList[C_CONNECTOR]);
-
       MultiLine* meta = new MultiLine;
 
       // Now the wsPosition and wsView.
@@ -146,21 +144,10 @@ void DebugVizHLSL::processPix(Vector<ShaderComponent*>& componentList,
       Var* worldToObjArray = (Var*)LangElement::find("inWorldToObjArray");
 
       Var* BRDFTexture = (Var*)LangElement::find("BRDFTexture");
-      Var* BRDFTextureTex = (Var*)LangElement::find("texture_BRDFTexture");
 
       Var* specularCubemapAR = (Var*)LangElement::find("SpecularCubemapAR");
-      Var* specularCubemapARTex = (Var*)LangElement::find("texture_SpecularCubemapAR");
 
       Var* irradianceCubemapAR = (Var*)LangElement::find("IrradianceCubemapAR");
-      Var* irradianceCubemapARTex = (Var*)LangElement::find("texture_IrradianceCubemapAR");
-
-      Var* matinfo = (Var*)LangElement::find("ORMConfig");
-      Var* metalness = (Var*)LangElement::find("metalness");
-      Var* roughness = (Var*)LangElement::find("roughness");
-
-      Var* wsEyePos = (Var*)LangElement::find("eyePosWorld");
-
-      Var* ibl = (Var*)LangElement::find("ibl");
 
       //Reflection vec
       Var* showAttenVar = new Var("showAttenVar", "int");

+ 5 - 8
Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp

@@ -2217,10 +2217,10 @@ void RTLightingFeatHLSL::processPix(   Vector<ShaderComponent*> &componentList,
    if ( fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit] )
       return;
   
-   ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
+   //ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>( componentList[C_CONNECTOR] );
 
    MultiLine *meta = new MultiLine;
-
+      
    // Now the wsPosition and wsView.
    Var *wsPosition = getInWsPosition( componentList );
    Var* worldToTangent = getInWorldToTangent(componentList);
@@ -2280,10 +2280,7 @@ void RTLightingFeatHLSL::processPix(   Vector<ShaderComponent*> &componentList,
    {
       Con::errorf("ShaderGen::RTLightingFeatHLSL()  - failed to generate surface!");
       return;
-   }   
-   Var *roughness = (Var*)LangElement::find("roughness");
-
-   Var *metalness = (Var*)LangElement::find("metalness");
+   }
 
    Var *curColor = (Var*)LangElement::find(getOutputTargetVarName(ShaderFeature::DefaultTarget));
 
@@ -3035,10 +3032,10 @@ void ReflectionProbeFeatHLSL::processPix(Vector<ShaderComponent*> &componentList
    if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit])
       return;
 
-   ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>(componentList[C_CONNECTOR]);
+   //ShaderConnector *connectComp = dynamic_cast<ShaderConnector *>(componentList[C_CONNECTOR]);
 
    MultiLine *meta = new MultiLine;
-   
+      
    // Now the wsPosition and wsView.
    Var* wsPosition = getInWsPosition(componentList);
    Var* worldToTangent = getInWorldToTangent(componentList);

+ 2 - 2
Engine/source/shaderGen/shaderFeature.h

@@ -130,8 +130,8 @@ public:
    //**************************************************************************
    struct Resources
    {
-      U32 numTex;
-      U32 numTexReg;
+      U32 numTex = 0;
+      U32 numTexReg = 0;
 
       Resources()
       {

+ 23 - 15
Engine/source/terrain/terrData.cpp

@@ -1172,7 +1172,7 @@ void TerrainBlock::_updatePhysics()
 
    SAFE_DELETE( mPhysicsRep );
 
-   PhysicsCollision *colShape;
+   PhysicsCollision *colShape = NULL;
 
    // If we can steal the collision shape from the local server
    // object then do so as it saves us alot of cpu time and memory.
@@ -1187,22 +1187,31 @@ void TerrainBlock::_updatePhysics()
    }
    else
    {
-      // Get empty state of each vert
-      bool *holes = new bool[ getBlockSize() * getBlockSize() ];
-      for ( U32 row = 0; row < getBlockSize(); row++ )
-         for ( U32 column = 0; column < getBlockSize(); column++ )
-            holes[ row + (column * getBlockSize()) ] = mFile->isEmptyAt( row, column );
+      if (getBlockSize() > 0)
+      {
+         // Get empty state of each vert
+         bool* holes = new bool[getBlockSize() * getBlockSize()];
+         for (U32 row = 0; row < getBlockSize(); row++)
+            for (U32 column = 0; column < getBlockSize(); column++)
+               holes[row + (column * getBlockSize())] = mFile->isEmptyAt(row, column);
 
-      colShape = PHYSICSMGR->createCollision();
-      colShape->addHeightfield( mFile->getHeightMap().address(), holes, getBlockSize(), mSquareSize, MatrixF::Identity );
+         colShape = PHYSICSMGR->createCollision();
+         colShape->addHeightfield(mFile->getHeightMap().address(), holes, getBlockSize(), mSquareSize, MatrixF::Identity);
 
-      delete [] holes;
+         delete[] holes;
+      }
+   }
+   if (getBlockSize() > 0)
+   {
+      PhysicsWorld* world = PHYSICSMGR->getWorld(isServerObject() ? "server" : "client");
+      mPhysicsRep = PHYSICSMGR->createBody();
+      mPhysicsRep->init(colShape, 0, 0, this, world);
+      mPhysicsRep->setTransform(getTransform());
+   }
+   else
+   {
+      SAFE_DELETE(mPhysicsRep);
    }
-
-   PhysicsWorld *world = PHYSICSMGR->getWorld( isServerObject() ? "server" : "client" );
-   mPhysicsRep = PHYSICSMGR->createBody();
-   mPhysicsRep->init( colShape, 0, 0, this, world );
-   mPhysicsRep->setTransform( getTransform() );
 }
 
 void TerrainBlock::onRemove()
@@ -1470,7 +1479,6 @@ bool TerrainBlock::renameTerrainMaterial(StringTableEntry oldMatName, StringTabl
    {
       if (mFile->mMaterials[i]->getInternalName() == oldMatName)
       {
-         TerrainMaterial* oldMat = mFile->mMaterials[i];
          mFile->mMaterials[i] = newMat;
       }
    }

+ 1 - 2
Engine/source/ts/tsLastDetail.cpp

@@ -224,8 +224,7 @@ void TSLastDetail::update( bool forceUpdate )
    // Do we need to update the imposter?
    const String diffuseMapPath = _getDiffuseMapPath();
    bool isFile = Platform::isFile(diffuseMapPath.c_str());
-   if (  forceUpdate || !Platform::isFile(diffuseMapPath.c_str()) ||
-         Platform::compareModifiedTimes( diffuseMapPath, shapeFile ) <= 0 )
+   if (  forceUpdate || !isFile || Platform::compareModifiedTimes( diffuseMapPath, shapeFile ) <= 0 )
       _update();
 
    // If the time check fails now then the update must have not worked.

+ 0 - 2
Engine/source/ts/tsShapeInstance.cpp

@@ -294,8 +294,6 @@ void TSShapeInstance::reSkin( String newBaseName, String oldBaseName )
    if ( newBaseName.equal( oldBaseName, String::NoCase ) )
       return;
 
-   const U32 oldBaseNameLength = oldBaseName.length();
-
    // Make our own copy of the materials list from the resource if necessary
    if (ownMaterialList() == false)
       cloneMaterialList();

+ 22 - 11
Engine/source/ts/tsShapeInstance.h

@@ -740,25 +740,25 @@ class TSThread
    /// if in transition...
    struct TransitionData
    {
-      bool inTransition;
+      bool inTransition = false;
 
-      F32 duration;
-      F32 pos;
-      F32 direction;
-      F32 targetScale; ///< time scale for sequence we are transitioning to (during transition only)
+      F32 duration = 0.0f;
+      F32 pos = 0.0f;
+      F32 direction = 1.0f;
+      F32 targetScale = 1.0f; ///< time scale for sequence we are transitioning to (during transition only)
                        ///< this is either 1 or 0 (if 1 target sequence plays as we transition, if 0 it doesn't)
       TSIntegerSet oldRotationNodes;    ///< nodes controlled by this thread pre-transition
       TSIntegerSet oldTranslationNodes; ///< nodes controlled by this thread pre-transition
       TSIntegerSet oldScaleNodes;       ///< nodes controlled by this thread pre-transition
-      U32 oldSequence; ///< sequence that was set before transition began
-      F32 oldPos;      ///< position of sequence before transition began
+      U32 oldSequence = 0; ///< sequence that was set before transition began
+      F32 oldPos = 0.0f;      ///< position of sequence before transition began
    } transitionData;
 
    struct
    {
-      F32 start;
-      F32 end;
-      S32 loop;
+      F32 start = 0.0f;
+      F32 end = 0.0f;
+      S32 loop = 0.0f;
    } path;
    bool makePath;
 
@@ -781,7 +781,18 @@ class TSThread
    /// @}
 
    TSThread(TSShapeInstance*);
-   TSThread() {}
+   TSThread() {
+      blendDisabled = true;
+      keyNum1 = 0;
+      keyNum2 = 0;
+      keyPos = 0;
+      mSeqPos = 0;
+      mShapeInstance = NULL;
+      makePath = NULL;
+      priority = 0;
+      sequence = 0;
+      timeScale = 1.0f;
+   }
 
    void setSequence(S32 seq, F32 pos);
    void transitionToSequence(S32 seq, F32 pos, F32 duration, bool continuePlay);

+ 1 - 1
Engine/source/windowManager/platformWindow.h

@@ -109,7 +109,7 @@ protected:
       mSuppressReset = false;
       mOffscreenRender = false;
       mDisplayWindow = false;
-
+      mWindowId = 0;
       // This controller maps window input (Mouse/Keyboard) to a generic input consumer
       mWindowInputGenerator = new WindowInputGenerator( this );
    }

+ 4 - 4
Engine/source/windowManager/windowInputGenerator.h

@@ -66,10 +66,10 @@ class WindowInputGenerator
       /// Accelerator key map
        struct AccKeyMap
        {
-          void *hnd;
+          void *hnd = NULL;
           String cmd;
-          U32 keyCode;
-          U32 modifier;
+          U32 keyCode = 0x000;
+          U32 modifier = 0x000;
        };
        Vector <AccKeyMap> mAcceleratorMap;
       
@@ -128,4 +128,4 @@ class WindowInputGenerator
     }
 };
 
-#endif // _WINDOW_INPUTGENERATOR_H_
+#endif // _WINDOW_INPUTGENERATOR_H_