diff --git a/Engine/source/T3D/assets/ImageAssetInspectors.h b/Engine/source/T3D/assets/ImageAssetInspectors.h index f83e3705e..5c4a38dbf 100644 --- a/Engine/source/T3D/assets/ImageAssetInspectors.h +++ b/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(); diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index 91fb9a379..4ef66af84 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/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)); diff --git a/Engine/source/T3D/assets/TerrainAsset.cpp b/Engine/source/T3D/assets/TerrainAsset.cpp index af68777ac..4b295a95b 100644 --- a/Engine/source/T3D/assets/TerrainAsset.cpp +++ b/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; diff --git a/Engine/source/T3D/assets/assetImporter.cpp b/Engine/source/T3D/assets/assetImporter.cpp index c832e93e4..15a52ec60 100644 --- a/Engine/source/T3D/assets/assetImporter.cpp +++ b/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(assetId); + AssetDatabase.acquireAsset(assetId); AssetDatabase.releaseAsset(assetId); } } diff --git a/Engine/source/T3D/convexShape.cpp b/Engine/source/T3D/convexShape.cpp index bdf32d833..b59163392 100644 --- a/Engine/source/T3D/convexShape.cpp +++ b/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() diff --git a/Engine/source/T3D/lighting/reflectionProbe.cpp b/Engine/source/T3D/lighting/reflectionProbe.cpp index c947413c1..9d92b69ce 100644 --- a/Engine/source/T3D/lighting/reflectionProbe.cpp +++ b/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; } } diff --git a/Engine/source/T3D/lighting/reflectionProbe.h b/Engine/source/T3D/lighting/reflectionProbe.h index 75570ce52..2b3751cf8 100644 --- a/Engine/source/T3D/lighting/reflectionProbe.h +++ b/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 diff --git a/Engine/source/core/util/tSignal.h b/Engine/source/core/util/tSignal.h index b249aa6fd..4bf3e16b3 100644 --- a/Engine/source/core/util/tSignal.h +++ b/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 ) ) { diff --git a/Engine/source/core/util/uuid.h b/Engine/source/core/util/uuid.h index 28cc984e8..e4b5b17d2 100644 --- a/Engine/source/core/util/uuid.h +++ b/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; + } } /// diff --git a/Engine/source/environment/meshRoad.cpp b/Engine/source/environment/meshRoad.cpp index 0fcb1d7b4..5e8d42a6d 100644 --- a/Engine/source/environment/meshRoad.cpp +++ b/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; diff --git a/Engine/source/environment/skySphere.cpp b/Engine/source/environment/skySphere.cpp index fc9255bde..2b755722d 100644 --- a/Engine/source/environment/skySphere.cpp +++ b/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 diff --git a/Engine/source/environment/skySphere.h b/Engine/source/environment/skySphere.h index 37a6fbd12..b68ef07ce 100644 --- a/Engine/source/environment/skySphere.h +++ b/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 tmpVertices; @@ -119,8 +120,8 @@ public: { Point3F pos; Point3F nor; - F32 s; - F32 t; + F32 s = 0.0f; + F32 t = 0.0f; }; Vector finalVertData; diff --git a/Engine/source/gfx/bitmap/loaders/bitmapJpeg.cpp b/Engine/source/gfx/bitmap/loaders/bitmapJpeg.cpp index 3711b3507..84a729001 100644 --- a/Engine/source/gfx/bitmap/loaders/bitmapJpeg.cpp +++ b/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); } diff --git a/Engine/source/gfx/gl/gfxGLCubemap.cpp b/Engine/source/gfx/gl/gfxGLCubemap.cpp index 7192c705b..e60865c4b 100644 --- a/Engine/source/gfx/gl/gfxGLCubemap.cpp +++ b/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 diff --git a/Engine/source/gui/controls/guiGameSettingsCtrl.cpp b/Engine/source/gui/controls/guiGameSettingsCtrl.cpp index 04d39ca10..6f80414f0 100644 --- a/Engine/source/gui/controls/guiGameSettingsCtrl.cpp +++ b/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()) + // 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 left arrow - bool arrowOnL = (isSelected() || isHighlighted()) && (mWrapOptions || (mSelectedOption > 0)); - arrowOffset.x = currentOffset.x + mColumnSplit; - arrowOffset.y = currentOffset.y + arrowOffsetY; + 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); + 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 + mColumnSplit; - arrowOffset.y = currentOffset.y + height/2; + if (mNextBitmapAsset.notNull()) + { + arrowOffset.x = currentOffset.x + getWidth() - mRightPad - mArrowSize; + arrowOffset.y = currentOffset.y + arrowOffsetY; - drawer->clearBitmapModulation(); + 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->drawLine(arrowOffset, Point2I(arrowOffset.x + mArrowSize, currentOffset.y), ColorI::WHITE); - drawer->drawLine(arrowOffset, Point2I(arrowOffset.x + mArrowSize, currentOffset.y + height), ColorI::WHITE); + 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 + getWidth() - mRightPad - 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); - } - // 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(); diff --git a/Engine/source/lighting/advanced/glsl/advancedLightingFeaturesGLSL.cpp b/Engine/source/lighting/advanced/glsl/advancedLightingFeaturesGLSL.cpp index ff8fc81f8..5a8dc8c7e 100644 --- a/Engine/source/lighting/advanced/glsl/advancedLightingFeaturesGLSL.cpp +++ b/Engine/source/lighting/advanced/glsl/advancedLightingFeaturesGLSL.cpp @@ -573,8 +573,8 @@ void DeferredSubSurfaceGLSL::processPix( Vector &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)); diff --git a/Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp b/Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp index 77f2251d2..1fcf0303d 100644 --- a/Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp +++ b/Engine/source/lighting/advanced/hlsl/advancedLightingFeaturesHLSL.cpp @@ -613,8 +613,8 @@ void DeferredSubSurfaceHLSL::processPix( Vector &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)); diff --git a/Engine/source/materials/sceneData.h b/Engine/source/materials/sceneData.h index a67c9a273..f27a49cea 100644 --- a/Engine/source/materials/sceneData.h +++ b/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 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; } diff --git a/Engine/source/platform/threads/threadSafePriorityQueue.h b/Engine/source/platform/threads/threadSafePriorityQueue.h index 6e8a8f55e..8f6c382b8 100644 --- a/Engine/source/platform/threads/threadSafePriorityQueue.h +++ b/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. } diff --git a/Engine/source/platformSDL/threads/thread.cpp b/Engine/source/platformSDL/threads/thread.cpp index fb0c1f2ab..bef141c8a 100644 --- a/Engine/source/platformSDL/threads/thread.cpp +++ b/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; diff --git a/Engine/source/platformWin32/winCPUInfo.cpp b/Engine/source/platformWin32/winCPUInfo.cpp index 7b058fd8c..c8e05f44f 100644 --- a/Engine/source/platformWin32/winCPUInfo.cpp +++ b/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 diff --git a/Engine/source/sfx/openal/sfxALDevice.cpp b/Engine/source/sfx/openal/sfxALDevice.cpp index 513fce129..765cb01ff 100644 --- a/Engine/source/sfx/openal/sfxALDevice.cpp +++ b/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 ) ); diff --git a/Engine/source/sfx/openal/sfxALProvider.cpp b/Engine/source/sfx/openal/sfxALProvider.cpp index 4f3e30aff..e6742f515 100644 --- a/Engine/source/sfx/openal/sfxALProvider.cpp +++ b/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; diff --git a/Engine/source/sfx/sfxProvider.h b/Engine/source/sfx/sfxProvider.h index 6382f92c5..34cbc832c 100644 --- a/Engine/source/sfx/sfxProvider.h +++ b/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() {} }; diff --git a/Engine/source/sfx/sfxSystem.cpp b/Engine/source/sfx/sfxSystem.cpp index a08c05ab6..f7d185d70 100644 --- a/Engine/source/sfx/sfxSystem.cpp +++ b/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"); diff --git a/Engine/source/shaderGen/GLSL/customFeatureGLSL.cpp b/Engine/source/shaderGen/GLSL/customFeatureGLSL.cpp index 99414d133..3743b000f 100644 --- a/Engine/source/shaderGen/GLSL/customFeatureGLSL.cpp +++ b/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(mComponentList[C_CONNECTOR]); + //ShaderConnector* connectComp = dynamic_cast(mComponentList[C_CONNECTOR]); //Get element S32 element = -1; diff --git a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp index 143a1590a..ca937ac7f 100644 --- a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp @@ -2139,8 +2139,6 @@ void RTLightingFeatGLSL::processPix( Vector &componentList, if ( fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit] ) return; - ShaderConnector *connectComp = dynamic_cast( componentList[C_CONNECTOR] ); - MultiLine *meta = new MultiLine; // Now the wsPosition and wsView. @@ -2202,10 +2200,7 @@ void RTLightingFeatGLSL::processPix( Vector &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& componentList if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit]) return; - ShaderConnector * connectComp = dynamic_cast(componentList[C_CONNECTOR]); - MultiLine * meta = new MultiLine; - + // Now the wsPosition and wsView. Var *wsPosition = getInWsPosition(componentList); Var *worldToTangent = getInWorldToTangent(componentList); diff --git a/Engine/source/shaderGen/HLSL/customFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/customFeatureHLSL.cpp index e50661056..03cf0b219 100644 --- a/Engine/source/shaderGen/HLSL/customFeatureHLSL.cpp +++ b/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(mComponentList[C_CONNECTOR]); + //ShaderConnector* connectComp = dynamic_cast(mComponentList[C_CONNECTOR]); //Get element S32 element = -1; diff --git a/Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp index db86f62fd..bef95f4fd 100644 --- a/Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp @@ -122,8 +122,6 @@ void DebugVizHLSL::processPix(Vector& componentList, if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit]) return; - ShaderConnector* connectComp = dynamic_cast(componentList[C_CONNECTOR]); - MultiLine* meta = new MultiLine; // Now the wsPosition and wsView. @@ -146,21 +144,10 @@ void DebugVizHLSL::processPix(Vector& 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"); diff --git a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp index af8866301..0af9f770c 100644 --- a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp @@ -2217,10 +2217,10 @@ void RTLightingFeatHLSL::processPix( Vector &componentList, if ( fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit] ) return; - ShaderConnector *connectComp = dynamic_cast( componentList[C_CONNECTOR] ); + //ShaderConnector *connectComp = dynamic_cast( 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 &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 &componentList if (fd.features[MFT_LightMap] || fd.features[MFT_ToneMap] || fd.features[MFT_VertLit]) return; - ShaderConnector *connectComp = dynamic_cast(componentList[C_CONNECTOR]); + //ShaderConnector *connectComp = dynamic_cast(componentList[C_CONNECTOR]); MultiLine *meta = new MultiLine; - + // Now the wsPosition and wsView. Var* wsPosition = getInWsPosition(componentList); Var* worldToTangent = getInWorldToTangent(componentList); diff --git a/Engine/source/shaderGen/shaderFeature.h b/Engine/source/shaderGen/shaderFeature.h index 6116151ce..9bed4e7ac 100644 --- a/Engine/source/shaderGen/shaderFeature.h +++ b/Engine/source/shaderGen/shaderFeature.h @@ -130,8 +130,8 @@ public: //************************************************************************** struct Resources { - U32 numTex; - U32 numTexReg; + U32 numTex = 0; + U32 numTexReg = 0; Resources() { diff --git a/Engine/source/terrain/terrData.cpp b/Engine/source/terrain/terrData.cpp index b529ccb0b..8ee2bc504 100644 --- a/Engine/source/terrain/terrData.cpp +++ b/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; } } diff --git a/Engine/source/ts/tsLastDetail.cpp b/Engine/source/ts/tsLastDetail.cpp index 950b4c5f6..b18385a96 100644 --- a/Engine/source/ts/tsLastDetail.cpp +++ b/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. diff --git a/Engine/source/ts/tsShapeInstance.cpp b/Engine/source/ts/tsShapeInstance.cpp index 53c41680e..6d5c830dd 100644 --- a/Engine/source/ts/tsShapeInstance.cpp +++ b/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(); diff --git a/Engine/source/ts/tsShapeInstance.h b/Engine/source/ts/tsShapeInstance.h index d1131d0a3..9f074f46b 100644 --- a/Engine/source/ts/tsShapeInstance.h +++ b/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); diff --git a/Engine/source/windowManager/platformWindow.h b/Engine/source/windowManager/platformWindow.h index 5c98d2ffd..4aa2806e8 100644 --- a/Engine/source/windowManager/platformWindow.h +++ b/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 ); } diff --git a/Engine/source/windowManager/windowInputGenerator.h b/Engine/source/windowManager/windowInputGenerator.h index f4c3d2a76..e10399018 100644 --- a/Engine/source/windowManager/windowInputGenerator.h +++ b/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 mAcceleratorMap; @@ -128,4 +128,4 @@ class WindowInputGenerator } }; -#endif // _WINDOW_INPUTGENERATOR_H_ \ No newline at end of file +#endif // _WINDOW_INPUTGENERATOR_H_