mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #608 from DraconicEnt/bugfix-msvc-compiler-warnings
BugFix: Correct MSVC Compiler Warnings
This commit is contained in:
commit
8f8a8384e3
30 changed files with 32 additions and 152 deletions
|
|
@ -65,8 +65,6 @@ ConsoleSetType(TypeGUIAssetPtr)
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
{
|
{
|
||||||
// Yes, so fetch field value.
|
// Yes, so fetch field value.
|
||||||
const char* pFieldValue = argv[0];
|
|
||||||
|
|
||||||
*((const char**)dptr) = StringTable->insert(argv[0]);
|
*((const char**)dptr) = StringTable->insert(argv[0]);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -274,22 +274,8 @@ void ImageAsset::loadImage()
|
||||||
|
|
||||||
mLoadedState = Ok;
|
mLoadedState = Ok;
|
||||||
mIsValidImage = true;
|
mIsValidImage = true;
|
||||||
return;
|
|
||||||
|
|
||||||
//GFXTexHandle texture = getTexture(&GFXStaticTextureSRGBProfile);
|
|
||||||
|
|
||||||
//mTexture.set(mImagePath, &GFXStaticTextureSRGBProfile, avar("%s() - mImage (line %d)", __FUNCTION__, __LINE__));
|
|
||||||
|
|
||||||
/*if (texture.isValid())
|
|
||||||
{
|
|
||||||
mIsValidImage = true;
|
|
||||||
|
|
||||||
//mBitmap = texture.getBitmap();
|
|
||||||
|
|
||||||
return;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
mChangeSignal.trigger();
|
mChangeSignal.trigger();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
mLoadedState = BadFileReference;
|
mLoadedState = BadFileReference;
|
||||||
|
|
||||||
|
|
@ -497,8 +483,6 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
|
||||||
mInspector->getInspectObject()->getIdString(), mCaption);
|
mInspector->getInspectObject()->getIdString(), mCaption);
|
||||||
mBrowseButton->setField("Command", szBuffer);
|
mBrowseButton->setField("Command", szBuffer);
|
||||||
|
|
||||||
const char* id = mInspector->getInspectObject()->getIdString();
|
|
||||||
|
|
||||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||||
|
|
||||||
// Create "Open in ShapeEditor" button
|
// Create "Open in ShapeEditor" button
|
||||||
|
|
|
||||||
|
|
@ -190,17 +190,12 @@ bool ScriptAsset::execScript()
|
||||||
if (handle)
|
if (handle)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (Torque::FS::IsScriptFile(mScriptPath))
|
if (Torque::FS::IsScriptFile(mScriptPath))
|
||||||
{
|
{
|
||||||
return Con::executeFile(mScriptPath, false, false);
|
return Con::executeFile(mScriptPath, false, false);
|
||||||
}
|
}
|
||||||
else
|
Con::errorf("ScriptAsset:execScript() - Script asset must have a valid file to exec");
|
||||||
{
|
return false;
|
||||||
Con::errorf("ScriptAsset:execScript() - Script asset must have a valid file to exec");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod(ScriptAsset, execScript, bool, (), ,
|
DefineEngineMethod(ScriptAsset, execScript, bool, (), ,
|
||||||
|
|
|
||||||
|
|
@ -603,8 +603,6 @@ GuiControl* GuiInspectorTypeShapeAssetPtr::constructEditControl()
|
||||||
mInspector->getInspectObject()->getIdString(), mCaption);
|
mInspector->getInspectObject()->getIdString(), mCaption);
|
||||||
mBrowseButton->setField("Command", szBuffer);
|
mBrowseButton->setField("Command", szBuffer);
|
||||||
|
|
||||||
const char* id = mInspector->getInspectObject()->getIdString();
|
|
||||||
|
|
||||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||||
|
|
||||||
// Create "Open in ShapeEditor" button
|
// Create "Open in ShapeEditor" button
|
||||||
|
|
|
||||||
|
|
@ -468,8 +468,6 @@ GuiControl* GuiInspectorTypeTerrainAssetPtr::constructEditControl()
|
||||||
mInspector->getInspectObject()->getIdString(), mCaption);
|
mInspector->getInspectObject()->getIdString(), mCaption);
|
||||||
mBrowseButton->setField("Command", szBuffer);
|
mBrowseButton->setField("Command", szBuffer);
|
||||||
|
|
||||||
const char* id = mInspector->getInspectObject()->getIdString();
|
|
||||||
|
|
||||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||||
|
|
||||||
// Create "Open in ShapeEditor" button
|
// Create "Open in ShapeEditor" button
|
||||||
|
|
|
||||||
|
|
@ -1821,10 +1821,8 @@ void AssetImporter::processShapeAsset(AssetImportObject* assetItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
S32 meshCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_meshCount"), nullptr));
|
S32 meshCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_meshCount"), nullptr));
|
||||||
S32 shapeItem = assetItem->shapeInfo->findItemByName("Meshes");
|
|
||||||
|
|
||||||
S32 animCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_animCount"), nullptr));
|
S32 animCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_animCount"), nullptr));
|
||||||
S32 animItem = assetItem->shapeInfo->findItemByName("Animations");
|
|
||||||
|
|
||||||
S32 materialCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_materialCount"), nullptr));
|
S32 materialCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_materialCount"), nullptr));
|
||||||
S32 matItem = assetItem->shapeInfo->findItemByName("Materials");
|
S32 matItem = assetItem->shapeInfo->findItemByName("Materials");
|
||||||
|
|
@ -2005,9 +2003,7 @@ void AssetImporter::validateAsset(AssetImportObject* assetItem)
|
||||||
if (assetItem->importStatus == AssetImportObject::Skipped || assetItem->importStatus == AssetImportObject::NotProcessed)
|
if (assetItem->importStatus == AssetImportObject::Skipped || assetItem->importStatus == AssetImportObject::NotProcessed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool hasCollision = checkAssetForCollision(assetItem);
|
if (checkAssetForCollision(assetItem))
|
||||||
|
|
||||||
if (hasCollision)
|
|
||||||
{
|
{
|
||||||
importIssues = true;
|
importIssues = true;
|
||||||
return;
|
return;
|
||||||
|
|
@ -2018,7 +2014,6 @@ void AssetImporter::validateAsset(AssetImportObject* assetItem)
|
||||||
AssetQuery aQuery;
|
AssetQuery aQuery;
|
||||||
U32 numAssetsFound = AssetDatabase.findAllAssets(&aQuery);
|
U32 numAssetsFound = AssetDatabase.findAllAssets(&aQuery);
|
||||||
|
|
||||||
hasCollision = false;
|
|
||||||
for (U32 i = 0; i < numAssetsFound; i++)
|
for (U32 i = 0; i < numAssetsFound; i++)
|
||||||
{
|
{
|
||||||
StringTableEntry assetId = aQuery.mAssetList[i];
|
StringTableEntry assetId = aQuery.mAssetList[i];
|
||||||
|
|
@ -2032,7 +2027,6 @@ void AssetImporter::validateAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
if (assetName == StringTable->insert(assetItem->assetName.c_str()))
|
if (assetName == StringTable->insert(assetItem->assetName.c_str()))
|
||||||
{
|
{
|
||||||
hasCollision = true;
|
|
||||||
assetItem->status = "Error";
|
assetItem->status = "Error";
|
||||||
assetItem->statusType = "DuplicateAsset";
|
assetItem->statusType = "DuplicateAsset";
|
||||||
assetItem->statusInfo = "Duplicate asset names found within the target module!\nAsset \"" + assetItem->assetName + "\" of type \"" + assetItem->assetType + "\" has a matching name.\nPlease rename it and try again!";
|
assetItem->statusInfo = "Duplicate asset names found within the target module!\nAsset \"" + assetItem->assetName + "\" of type \"" + assetItem->assetType + "\" has a matching name.\nPlease rename it and try again!";
|
||||||
|
|
@ -2241,7 +2235,6 @@ void AssetImporter::resetImportConfig()
|
||||||
activeImportConfig->registerObject();
|
activeImportConfig->registerObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool foundConfig = false;
|
|
||||||
Settings* editorSettings;
|
Settings* editorSettings;
|
||||||
//See if we can get our editor settings
|
//See if we can get our editor settings
|
||||||
if (Sim::findObject("EditorSettings", editorSettings))
|
if (Sim::findObject("EditorSettings", editorSettings))
|
||||||
|
|
|
||||||
|
|
@ -222,7 +222,6 @@ bool ConvexShape::protectedSetSurface( void *object, const char *index, const ch
|
||||||
*/
|
*/
|
||||||
|
|
||||||
String t = data;
|
String t = data;
|
||||||
S32 len = t.length();
|
|
||||||
|
|
||||||
dSscanf( data, "%g %g %g %g %g %g %g %i %g %g %g %g %f", &quat.x, &quat.y, &quat.z, &quat.w, &pos.x, &pos.y, &pos.z,
|
dSscanf( data, "%g %g %g %g %g %g %g %i %g %g %g %g %f", &quat.x, &quat.y, &quat.z, &quat.w, &pos.x, &pos.y, &pos.z,
|
||||||
&matID, &offset.x, &offset.y, &scale.x, &scale.y, &rot);
|
&matID, &offset.x, &offset.y, &scale.x, &scale.y, &rot);
|
||||||
|
|
@ -961,17 +960,6 @@ bool ConvexShape::castRay( const Point3F &start, const Point3F &end, RayInfo *in
|
||||||
VectorF rayDir( end - start );
|
VectorF rayDir( end - start );
|
||||||
rayDir.normalizeSafe();
|
rayDir.normalizeSafe();
|
||||||
|
|
||||||
if ( false )
|
|
||||||
{
|
|
||||||
PlaneF plane( Point3F(0,0,0), Point3F(0,0,1) );
|
|
||||||
Point3F sp( 0,0,-1 );
|
|
||||||
Point3F ep( 0,0,1 );
|
|
||||||
|
|
||||||
F32 t = plane.intersect( sp, ep );
|
|
||||||
Point3F hitPnt;
|
|
||||||
hitPnt.interpolate( sp, ep, t );
|
|
||||||
}
|
|
||||||
|
|
||||||
for ( S32 i = 0; i < planeCount; i++ )
|
for ( S32 i = 0; i < planeCount; i++ )
|
||||||
{
|
{
|
||||||
// Don't hit the back-side of planes.
|
// Don't hit the back-side of planes.
|
||||||
|
|
@ -1376,8 +1364,6 @@ void ConvexShape::_updateGeometry( bool updateCollision )
|
||||||
{
|
{
|
||||||
U32 count = faceList[i].triangles.size();
|
U32 count = faceList[i].triangles.size();
|
||||||
|
|
||||||
S32 matID = mSurfaceUVs[i].matID;
|
|
||||||
|
|
||||||
mSurfaceBuffers[mSurfaceUVs[i].matID].mPrimCount += count;
|
mSurfaceBuffers[mSurfaceUVs[i].matID].mPrimCount += count;
|
||||||
mSurfaceBuffers[mSurfaceUVs[i].matID].mVertCount += count * 3;
|
mSurfaceBuffers[mSurfaceUVs[i].matID].mVertCount += count * 3;
|
||||||
}
|
}
|
||||||
|
|
@ -1429,9 +1415,6 @@ void ConvexShape::_updateGeometry( bool updateCollision )
|
||||||
{
|
{
|
||||||
if (mSurfaceBuffers[i].mVertCount > 0)
|
if (mSurfaceBuffers[i].mVertCount > 0)
|
||||||
{
|
{
|
||||||
U32 primCount = mSurfaceBuffers[i].mPrimCount;
|
|
||||||
U32 vertCount = mSurfaceBuffers[i].mVertCount;
|
|
||||||
|
|
||||||
mSurfaceBuffers[i].mVertexBuffer.set(GFX, mSurfaceBuffers[i].mVertCount, GFXBufferTypeStatic);
|
mSurfaceBuffers[i].mVertexBuffer.set(GFX, mSurfaceBuffers[i].mVertCount, GFXBufferTypeStatic);
|
||||||
VertexType *pVert = mSurfaceBuffers[i].mVertexBuffer.lock();
|
VertexType *pVert = mSurfaceBuffers[i].mVertexBuffer.lock();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ namespace IBLUtilities
|
||||||
}
|
}
|
||||||
|
|
||||||
GFXShaderConstBufferRef irrConsts = irrShader->allocConstBuffer();
|
GFXShaderConstBufferRef irrConsts = irrShader->allocConstBuffer();
|
||||||
GFXShaderConstHandle* irrEnvMapSC = irrShader->getShaderConstHandle("$environmentMap");
|
|
||||||
GFXShaderConstHandle* irrFaceSC = irrShader->getShaderConstHandle("$face");
|
GFXShaderConstHandle* irrFaceSC = irrShader->getShaderConstHandle("$face");
|
||||||
|
|
||||||
GFXStateBlockDesc desc;
|
GFXStateBlockDesc desc;
|
||||||
|
|
@ -132,7 +131,6 @@ namespace IBLUtilities
|
||||||
}
|
}
|
||||||
|
|
||||||
GFXShaderConstBufferRef prefilterConsts = prefilterShader->allocConstBuffer();
|
GFXShaderConstBufferRef prefilterConsts = prefilterShader->allocConstBuffer();
|
||||||
GFXShaderConstHandle* prefilterEnvMapSC = prefilterShader->getShaderConstHandle("$environmentMap");
|
|
||||||
GFXShaderConstHandle* prefilterFaceSC = prefilterShader->getShaderConstHandle("$face");
|
GFXShaderConstHandle* prefilterFaceSC = prefilterShader->getShaderConstHandle("$face");
|
||||||
GFXShaderConstHandle* prefilterRoughnessSC = prefilterShader->getShaderConstHandle("$roughness");
|
GFXShaderConstHandle* prefilterRoughnessSC = prefilterShader->getShaderConstHandle("$roughness");
|
||||||
GFXShaderConstHandle* prefilterMipSizeSC = prefilterShader->getShaderConstHandle("$mipSize");
|
GFXShaderConstHandle* prefilterMipSizeSC = prefilterShader->getShaderConstHandle("$mipSize");
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,6 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr)
|
||||||
{
|
{
|
||||||
if (!Parent::preload(server, errorStr))
|
if (!Parent::preload(server, errorStr))
|
||||||
return false;
|
return false;
|
||||||
bool shapeError = false;
|
|
||||||
|
|
||||||
// Resolve objects transmitted from server
|
// Resolve objects transmitted from server
|
||||||
if (!server) {
|
if (!server) {
|
||||||
|
|
|
||||||
|
|
@ -827,7 +827,6 @@ void SimXMLDocument::setObjectAttributes(const char* objectID)
|
||||||
|
|
||||||
char textbuf[1024];
|
char textbuf[1024];
|
||||||
tinyxml2::XMLElement* field = m_qDocument->NewElement("Field");
|
tinyxml2::XMLElement* field = m_qDocument->NewElement("Field");
|
||||||
tinyxml2::XMLElement* group = m_qDocument->NewElement("FieldGroup");
|
|
||||||
pElement->SetAttribute( "Name", pObject->getName() );
|
pElement->SetAttribute( "Name", pObject->getName() );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ void StmtNode::addBreakLine(CodeStream& code)
|
||||||
|
|
||||||
//------------------------------------------------------------
|
//------------------------------------------------------------
|
||||||
|
|
||||||
StmtNode::StmtNode()
|
StmtNode::StmtNode() : dbgLineNumber(0)
|
||||||
{
|
{
|
||||||
next = NULL;
|
next = NULL;
|
||||||
dbgFileName = CodeBlock::smCurrentParser->getCurrentFile();
|
dbgFileName = CodeBlock::smCurrentParser->getCurrentFile();
|
||||||
|
|
@ -84,12 +84,12 @@ void StmtNode::setPackage(StringTableEntry)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void StmtNode::append(StmtNode* next)
|
void StmtNode::append(StmtNode* appended)
|
||||||
{
|
{
|
||||||
StmtNode* walk = this;
|
StmtNode* walk = this;
|
||||||
while (walk->next)
|
while (walk->next)
|
||||||
walk = walk->next;
|
walk = walk->next;
|
||||||
walk->next = next;
|
walk->next = appended;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -717,7 +717,7 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
||||||
TelDebugger->pushStackFrame();
|
TelDebugger->pushStackFrame();
|
||||||
|
|
||||||
StringTableEntry var, objParent;
|
StringTableEntry var, objParent;
|
||||||
U32 failJump;
|
U32 failJump = 0;
|
||||||
StringTableEntry fnName;
|
StringTableEntry fnName;
|
||||||
StringTableEntry fnNamespace, fnPackage;
|
StringTableEntry fnNamespace, fnPackage;
|
||||||
|
|
||||||
|
|
@ -776,7 +776,6 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
||||||
fnNamespace = CodeToSTE(code, ip + 2);
|
fnNamespace = CodeToSTE(code, ip + 2);
|
||||||
fnPackage = CodeToSTE(code, ip + 4);
|
fnPackage = CodeToSTE(code, ip + 4);
|
||||||
bool hasBody = (code[ip + 6] & 0x01) != 0;
|
bool hasBody = (code[ip + 6] & 0x01) != 0;
|
||||||
U32 lineNumber = code[ip + 6] >> 1;
|
|
||||||
|
|
||||||
Namespace::unlinkPackages();
|
Namespace::unlinkPackages();
|
||||||
if (fnNamespace == NULL && fnPackage == NULL)
|
if (fnNamespace == NULL && fnPackage == NULL)
|
||||||
|
|
@ -1819,8 +1818,6 @@ ConsoleValue CodeBlock::exec(U32 ip, const char* functionName, Namespace* thisNa
|
||||||
// it handles this method. It is set to an enum from the table
|
// it handles this method. It is set to an enum from the table
|
||||||
// above indicating whether it handles it on a component it owns
|
// above indicating whether it handles it on a component it owns
|
||||||
// or just on the object.
|
// or just on the object.
|
||||||
S32 routingId = 0;
|
|
||||||
|
|
||||||
fnName = CodeToSTE(code, ip);
|
fnName = CodeToSTE(code, ip);
|
||||||
fnNamespace = CodeToSTE(code, ip + 2);
|
fnNamespace = CodeToSTE(code, ip + 2);
|
||||||
U32 callType = code[ip + 4];
|
U32 callType = code[ip + 4];
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,6 @@ void CloudLayer::unpackUpdate( NetConnection *conn, BitStream *stream )
|
||||||
|
|
||||||
stream->read( &mBaseColor );
|
stream->read( &mBaseColor );
|
||||||
|
|
||||||
F32 oldCoverage = mCoverage;
|
|
||||||
stream->read( &mCoverage );
|
stream->read( &mCoverage );
|
||||||
stream->read( &mExposure );
|
stream->read( &mExposure );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2896,7 +2896,6 @@ void MeshRoad::_generateVerts()
|
||||||
|
|
||||||
// Make Primitive Buffers
|
// Make Primitive Buffers
|
||||||
U32 p00, p01, p11, p10;
|
U32 p00, p01, p11, p10;
|
||||||
U32 pb00, pb01, pb11, pb10;
|
|
||||||
U32 offset = 0;
|
U32 offset = 0;
|
||||||
U16 *pIdx = NULL;
|
U16 *pIdx = NULL;
|
||||||
U32 curIdx = 0;
|
U32 curIdx = 0;
|
||||||
|
|
|
||||||
|
|
@ -190,8 +190,6 @@ void ForestItemData::unpackData(BitStream* stream)
|
||||||
stream->read( &localName );
|
stream->read( &localName );
|
||||||
setInternalName( localName );
|
setInternalName( localName );
|
||||||
|
|
||||||
char readBuffer[1024];
|
|
||||||
|
|
||||||
UNPACKDATA_SHAPEASSET(Shape);
|
UNPACKDATA_SHAPEASSET(Shape);
|
||||||
|
|
||||||
mCollidable = stream->readFlag();
|
mCollidable = stream->readFlag();
|
||||||
|
|
|
||||||
|
|
@ -528,9 +528,6 @@ void GFXD3D11CubemapArray::init(const U32 cubemapCount, const U32 cubemapFaceSiz
|
||||||
|
|
||||||
void GFXD3D11CubemapArray::updateTexture(const GFXCubemapHandle &cubemap, const U32 slot)
|
void GFXD3D11CubemapArray::updateTexture(const GFXCubemapHandle &cubemap, const U32 slot)
|
||||||
{
|
{
|
||||||
U32 cubeMapSz = cubemap->getSize();
|
|
||||||
U32 cubeMapSize = cubemap->getMipMapLevels();
|
|
||||||
|
|
||||||
AssertFatal(slot <= mNumCubemaps, "GFXD3D11CubemapArray::updateTexture - trying to update a cubemap texture that is out of bounds!");
|
AssertFatal(slot <= mNumCubemaps, "GFXD3D11CubemapArray::updateTexture - trying to update a cubemap texture that is out of bounds!");
|
||||||
AssertFatal(mFormat == cubemap->getFormat(), "GFXD3D11CubemapArray::updateTexture - Destination format doesn't match");
|
AssertFatal(mFormat == cubemap->getFormat(), "GFXD3D11CubemapArray::updateTexture - Destination format doesn't match");
|
||||||
AssertFatal(mSize == cubemap->getSize(), "GFXD3D11CubemapArray::updateTexture - Destination size doesn't match");
|
AssertFatal(mSize == cubemap->getSize(), "GFXD3D11CubemapArray::updateTexture - Destination size doesn't match");
|
||||||
|
|
|
||||||
|
|
@ -275,8 +275,6 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
|
||||||
Point2I arrowOffset;
|
Point2I arrowOffset;
|
||||||
S32 columnSplit = profile->mColumnSplit * xScale;
|
S32 columnSplit = profile->mColumnSplit * xScale;
|
||||||
|
|
||||||
S32 iconIndex;
|
|
||||||
|
|
||||||
bool isRowSelected = (getSelected() != NO_ROW) && (row == mRows[getSelected()]);
|
bool isRowSelected = (getSelected() != NO_ROW) && (row == mRows[getSelected()]);
|
||||||
bool isRowHighlighted = (getHighlighted() != NO_ROW) ? ((row == mRows[getHighlighted()]) && (row->mEnabled)) : false;
|
bool isRowHighlighted = (getHighlighted() != NO_ROW) ? ((row == mRows[getHighlighted()]) && (row->mEnabled)) : false;
|
||||||
/*if (profileHasArrows)
|
/*if (profileHasArrows)
|
||||||
|
|
@ -384,8 +382,6 @@ void GuiGameListMenuCtrl::onRenderKeybindOption(Row* row, Point2I currentOffset)
|
||||||
|
|
||||||
S32 rowHeight = profile->getRowHeight();
|
S32 rowHeight = profile->getRowHeight();
|
||||||
|
|
||||||
S32 optionWidth = xScale - columnSplit;
|
|
||||||
|
|
||||||
GFXDrawUtil* drawer = GFX->getDrawUtil();
|
GFXDrawUtil* drawer = GFX->getDrawUtil();
|
||||||
//drawer->drawBitmap(row->mBitmap, )
|
//drawer->drawBitmap(row->mBitmap, )
|
||||||
|
|
||||||
|
|
@ -1048,7 +1044,6 @@ RectI GuiGameListMenuCtrl::getRowBounds(S32 rowIndex)
|
||||||
{
|
{
|
||||||
GuiGameListMenuProfile* profile = (GuiGameListMenuProfile*)mProfile;
|
GuiGameListMenuProfile* profile = (GuiGameListMenuProfile*)mProfile;
|
||||||
|
|
||||||
F32 xScale = (float)getWidth() / profile->getRowWidth();
|
|
||||||
S32 rowHeight = profile->getRowHeight();
|
S32 rowHeight = profile->getRowHeight();
|
||||||
|
|
||||||
Point2I currentOffset = Point2I::Zero;
|
Point2I currentOffset = Point2I::Zero;
|
||||||
|
|
@ -1375,9 +1370,6 @@ void GuiGameListMenuCtrl::clickKeybind(Row* row, S32 xPos)
|
||||||
|
|
||||||
S32 rowHeight = profile->getRowHeight();
|
S32 rowHeight = profile->getRowHeight();
|
||||||
|
|
||||||
S32 optionWidth = xScale - columnSplit;
|
|
||||||
|
|
||||||
GFXDrawUtil* drawer = GFX->getDrawUtil();
|
|
||||||
//drawer->drawBitmap(row->mBitmap, )
|
//drawer->drawBitmap(row->mBitmap, )
|
||||||
|
|
||||||
Point2I button;
|
Point2I button;
|
||||||
|
|
@ -1388,7 +1380,6 @@ void GuiGameListMenuCtrl::clickKeybind(Row* row, S32 xPos)
|
||||||
buttonSize.x = rowHeight / 2;
|
buttonSize.x = rowHeight / 2;
|
||||||
buttonSize.y = rowHeight / 2;
|
buttonSize.y = rowHeight / 2;
|
||||||
|
|
||||||
GFXTextureObject* texture = row->mBitmapTex;
|
|
||||||
RectI rect(button, buttonSize);
|
RectI rect(button, buttonSize);
|
||||||
|
|
||||||
if (rect.pointInRect(Point2I(xPos, rowHeight / 2)))
|
if (rect.pointInRect(Point2I(xPos, rowHeight / 2)))
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,6 @@ void GuiPopUpMenuCtrl::initPersistFields(void)
|
||||||
|
|
||||||
bool GuiPopUpMenuCtrl::_setBitmaps(void* obj, const char* index, const char* data)
|
bool GuiPopUpMenuCtrl::_setBitmaps(void* obj, const char* index, const char* data)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
|
||||||
GuiPopUpMenuCtrl* object = static_cast<GuiPopUpMenuCtrl*>(obj);
|
GuiPopUpMenuCtrl* object = static_cast<GuiPopUpMenuCtrl*>(obj);
|
||||||
|
|
||||||
object->setBitmap(data);
|
object->setBitmap(data);
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,6 @@ void GuiPopUpMenuCtrlEx::initPersistFields(void)
|
||||||
|
|
||||||
bool GuiPopUpMenuCtrlEx::_setBitmaps(void* obj, const char* index, const char* data)
|
bool GuiPopUpMenuCtrlEx::_setBitmaps(void* obj, const char* index, const char* data)
|
||||||
{
|
{
|
||||||
bool ret = false;
|
|
||||||
GuiPopUpMenuCtrlEx* object = static_cast<GuiPopUpMenuCtrlEx*>(obj);
|
GuiPopUpMenuCtrlEx* object = static_cast<GuiPopUpMenuCtrlEx*>(obj);
|
||||||
|
|
||||||
object->setBitmap(data);
|
object->setBitmap(data);
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,6 @@ void GuiRenderTargetVizCtrl::onRender(Point2I offset,
|
||||||
|
|
||||||
camObject = dynamic_cast<Camera*>(camObject->getClientObject());
|
camObject = dynamic_cast<Camera*>(camObject->getClientObject());
|
||||||
|
|
||||||
bool servObj = camObject->isServerObject();
|
|
||||||
|
|
||||||
if (camObject)
|
if (camObject)
|
||||||
{
|
{
|
||||||
GFXTexHandle targ = camObject->getCameraRenderTarget();
|
GFXTexHandle targ = camObject->getCameraRenderTarget();
|
||||||
|
|
|
||||||
|
|
@ -323,8 +323,6 @@ void AdvancedLightBinManager::_scoreLights(const MatrixF& cameraTrans)
|
||||||
{
|
{
|
||||||
if (dist > smLightFadeStart)
|
if (dist > smLightFadeStart)
|
||||||
{
|
{
|
||||||
F32 brightness = light.lightInfo->getBrightness();
|
|
||||||
|
|
||||||
float fadeOutAmt = (dist - smLightFadeStart) / (smLightFadeEnd - smLightFadeStart);
|
float fadeOutAmt = (dist - smLightFadeStart) / (smLightFadeEnd - smLightFadeStart);
|
||||||
fadeOutAmt = 1 - fadeOutAmt;
|
fadeOutAmt = 1 - fadeOutAmt;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1290,16 +1290,9 @@ void ProcessedShaderMaterial::setCustomShaderData(Vector<CustomShaderBindingData
|
||||||
|
|
||||||
for (U32 i = 0; i < shaderData.size(); i++)
|
for (U32 i = 0; i < shaderData.size(); i++)
|
||||||
{
|
{
|
||||||
for (U32 h = 0; h < handles->mCustomHandles.size(); ++h)
|
|
||||||
{
|
|
||||||
StringTableEntry handleName = shaderData[i].getHandleName();
|
|
||||||
bool tmp = true;
|
|
||||||
}
|
|
||||||
//roll through and try setting our data!
|
//roll through and try setting our data!
|
||||||
for (U32 h = 0; h < handles->mCustomHandles.size(); ++h)
|
for (U32 h = 0; h < handles->mCustomHandles.size(); ++h)
|
||||||
{
|
{
|
||||||
StringTableEntry handleName = shaderData[i].getHandleName();
|
|
||||||
StringTableEntry rpdHandleName = handles->mCustomHandles[h].handleName;
|
|
||||||
if (handles->mCustomHandles[h].handleName == shaderData[i].getHandleName())
|
if (handles->mCustomHandles[h].handleName == shaderData[i].getHandleName())
|
||||||
{
|
{
|
||||||
if (handles->mCustomHandles[h].handle->isValid())
|
if (handles->mCustomHandles[h].handle->isValid())
|
||||||
|
|
|
||||||
|
|
@ -640,7 +640,7 @@ ImplementEnumType(_TamlFormatMode,
|
||||||
|
|
||||||
// Iterate fields.
|
// Iterate fields.
|
||||||
U8 arrayDepth = 0;
|
U8 arrayDepth = 0;
|
||||||
TamlCustomNode* currentArrayNode;
|
TamlCustomNode* currentArrayNode = NULL;
|
||||||
for (U32 index = 0; index < fieldCount; ++index)
|
for (U32 index = 0; index < fieldCount; ++index)
|
||||||
{
|
{
|
||||||
// Fetch field.
|
// Fetch field.
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ void AsyncPacketBufferedInputStream< Stream, Packet >::_requestNext()
|
||||||
if( resettable )
|
if( resettable )
|
||||||
{
|
{
|
||||||
IPositionable< U32 >* positionable = dynamic_cast< IPositionable< U32 >* >( &Deref( stream ) );
|
IPositionable< U32 >* positionable = dynamic_cast< IPositionable< U32 >* >( &Deref( stream ) );
|
||||||
U32 pos;
|
U32 pos = 0;
|
||||||
if(positionable)
|
if(positionable)
|
||||||
pos = positionable->getPosition();
|
pos = positionable->getPosition();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,36 +95,6 @@ typedef int SOCKET;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TORQUE_USE_WINSOCK)
|
|
||||||
static const char* strerror_wsa( S32 code )
|
|
||||||
{
|
|
||||||
switch( code )
|
|
||||||
{
|
|
||||||
#define E( name ) case name: return #name;
|
|
||||||
E( WSANOTINITIALISED );
|
|
||||||
E( WSAENETDOWN );
|
|
||||||
E( WSAEADDRINUSE );
|
|
||||||
E( WSAEINPROGRESS );
|
|
||||||
E( WSAEALREADY );
|
|
||||||
E( WSAEADDRNOTAVAIL );
|
|
||||||
E( WSAEAFNOSUPPORT );
|
|
||||||
E( WSAEFAULT );
|
|
||||||
E( WSAEINVAL );
|
|
||||||
E( WSAEISCONN );
|
|
||||||
E( WSAENETUNREACH );
|
|
||||||
E( WSAEHOSTUNREACH );
|
|
||||||
E( WSAENOBUFS );
|
|
||||||
E( WSAENOTSOCK );
|
|
||||||
E( WSAETIMEDOUT );
|
|
||||||
E( WSAEWOULDBLOCK );
|
|
||||||
E( WSAEACCES );
|
|
||||||
#undef E
|
|
||||||
default:
|
|
||||||
return "Unknown";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "core/util/tVector.h"
|
#include "core/util/tVector.h"
|
||||||
#include "platform/platformNetAsync.h"
|
#include "platform/platformNetAsync.h"
|
||||||
#include "console/console.h"
|
#include "console/console.h"
|
||||||
|
|
@ -1243,7 +1213,8 @@ void Net::process()
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PolledSocket::NameLookupRequired:
|
case PolledSocket::NameLookupRequired:
|
||||||
U32 newState;
|
{
|
||||||
|
U32 newState = Net::NoError;
|
||||||
|
|
||||||
// is the lookup complete?
|
// is the lookup complete?
|
||||||
if (!gNetAsync.checkLookup(
|
if (!gNetAsync.checkLookup(
|
||||||
|
|
@ -1262,7 +1233,7 @@ void Net::process()
|
||||||
{
|
{
|
||||||
// try to connect
|
// try to connect
|
||||||
out_h_addr.port = currentSock->remotePort;
|
out_h_addr.port = currentSock->remotePort;
|
||||||
const sockaddr *ai_addr = NULL;
|
const sockaddr* ai_addr = NULL;
|
||||||
int ai_addrlen = 0;
|
int ai_addrlen = 0;
|
||||||
sockaddr_in socketAddress;
|
sockaddr_in socketAddress;
|
||||||
sockaddr_in6 socketAddress6;
|
sockaddr_in6 socketAddress6;
|
||||||
|
|
@ -1304,7 +1275,7 @@ void Net::process()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Con::errorf("Error connecting to %s: Invalid Protocol",
|
Con::errorf("Error connecting to %s: Invalid Protocol",
|
||||||
currentSock->remoteAddr);
|
currentSock->remoteAddr);
|
||||||
newState = Net::ConnectFailed;
|
newState = Net::ConnectFailed;
|
||||||
removeSock = true;
|
removeSock = true;
|
||||||
removeSockHandle = currentSock->handleFd;
|
removeSockHandle = currentSock->handleFd;
|
||||||
|
|
@ -1319,7 +1290,7 @@ void Net::process()
|
||||||
if (err != Net::WouldBlock)
|
if (err != Net::WouldBlock)
|
||||||
{
|
{
|
||||||
Con::errorf("Error connecting to %s: %u",
|
Con::errorf("Error connecting to %s: %u",
|
||||||
currentSock->remoteAddr, err);
|
currentSock->remoteAddr, err);
|
||||||
newState = Net::ConnectFailed;
|
newState = Net::ConnectFailed;
|
||||||
removeSock = true;
|
removeSock = true;
|
||||||
removeSockHandle = currentSock->handleFd;
|
removeSockHandle = currentSock->handleFd;
|
||||||
|
|
@ -1340,6 +1311,7 @@ void Net::process()
|
||||||
|
|
||||||
smConnectionNotify->trigger(currentSock->handleFd, newState);
|
smConnectionNotify->trigger(currentSock->handleFd, newState);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case PolledSocket::Listening:
|
case PolledSocket::Listening:
|
||||||
NetAddress incomingAddy;
|
NetAddress incomingAddy;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,6 @@ void RenderTranslucentMgr::render( SceneRenderState *state )
|
||||||
GFXTextureObject *lastLM = NULL;
|
GFXTextureObject *lastLM = NULL;
|
||||||
GFXCubemap *lastCubemap = NULL;
|
GFXCubemap *lastCubemap = NULL;
|
||||||
GFXTextureObject *lastReflectTex = NULL;
|
GFXTextureObject *lastReflectTex = NULL;
|
||||||
GFXTextureObject *lastMiscTex = NULL;
|
|
||||||
GFXTextureObject *lastAccuTex = NULL;
|
GFXTextureObject *lastAccuTex = NULL;
|
||||||
|
|
||||||
// Find the particle render manager (if we don't have it)
|
// Find the particle render manager (if we don't have it)
|
||||||
|
|
|
||||||
|
|
@ -615,8 +615,6 @@ bool TerrainCellMaterial::_initShader(bool deferredMat,
|
||||||
mOrmTexArrayConst = mShader->getShaderConstHandle("$ormMapSampler");
|
mOrmTexArrayConst = mShader->getShaderConstHandle("$ormMapSampler");
|
||||||
if (mOrmTexArrayConst->isValid())
|
if (mOrmTexArrayConst->isValid())
|
||||||
{
|
{
|
||||||
GFXTextureProfile* profile = &GFXStaticTextureProfile;
|
|
||||||
|
|
||||||
const S32 sampler = mOrmTexArrayConst->getSamplerRegister();
|
const S32 sampler = mOrmTexArrayConst->getSamplerRegister();
|
||||||
|
|
||||||
desc.samplers[sampler] = GFXSamplerStateDesc::getWrapLinear();
|
desc.samplers[sampler] = GFXSamplerStateDesc::getWrapLinear();
|
||||||
|
|
|
||||||
|
|
@ -992,8 +992,6 @@ void TerrainBlock::addMaterial( const String &name, U32 insertAt )
|
||||||
mFile->mMaterials.push_back( mat );
|
mFile->mMaterials.push_back( mat );
|
||||||
mFile->_initMaterialInstMapping();
|
mFile->_initMaterialInstMapping();
|
||||||
|
|
||||||
bool isSrv = isServerObject();
|
|
||||||
|
|
||||||
//now we update our asset
|
//now we update our asset
|
||||||
if (mTerrainAsset)
|
if (mTerrainAsset)
|
||||||
{
|
{
|
||||||
|
|
@ -1418,7 +1416,7 @@ void TerrainBlock::unpackUpdate(NetConnection* con, BitStream *stream)
|
||||||
|
|
||||||
char buffer[256];
|
char buffer[256];
|
||||||
stream->readString(buffer);
|
stream->readString(buffer);
|
||||||
bool validAsset = setTerrainAsset(StringTable->insert(buffer));
|
setTerrainAsset(StringTable->insert(buffer));
|
||||||
}
|
}
|
||||||
if (baseTexSizeChanged && isProperlyAdded())
|
if (baseTexSizeChanged && isProperlyAdded())
|
||||||
_updateBaseTexture(NONE);
|
_updateBaseTexture(NONE);
|
||||||
|
|
|
||||||
|
|
@ -1044,9 +1044,9 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
|
||||||
// We need the default mesh transform.
|
// We need the default mesh transform.
|
||||||
MatrixF localXfm;
|
MatrixF localXfm;
|
||||||
getNodeWorldTransform( object.nodeIndex, &localXfm );
|
getNodeWorldTransform( object.nodeIndex, &localXfm );
|
||||||
Point3F t = localXfm.getPosition();
|
Point3F nodeWorldPosition = localXfm.getPosition();
|
||||||
t.convolve(scale);
|
nodeWorldPosition.convolve(scale);
|
||||||
localXfm.setPosition(t);
|
localXfm.setPosition(nodeWorldPosition);
|
||||||
|
|
||||||
// We have some sort of collision shape... so allocate it.
|
// We have some sort of collision shape... so allocate it.
|
||||||
if ( !colShape )
|
if ( !colShape )
|
||||||
|
|
@ -1061,9 +1061,9 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
|
||||||
// Add the offset to the center of the bounds
|
// Add the offset to the center of the bounds
|
||||||
// into the local space transform.
|
// into the local space transform.
|
||||||
MatrixF centerXfm( true );
|
MatrixF centerXfm( true );
|
||||||
Point3F t = mesh->getBounds().getCenter();
|
Point3F meshBoundsCenter = mesh->getBounds().getCenter();
|
||||||
t.convolve(scale);
|
meshBoundsCenter.convolve(scale);
|
||||||
centerXfm.setPosition(t);
|
centerXfm.setPosition(meshBoundsCenter);
|
||||||
localXfm.mul( centerXfm );
|
localXfm.mul( centerXfm );
|
||||||
|
|
||||||
colShape->addBox( halfWidth, localXfm );
|
colShape->addBox( halfWidth, localXfm );
|
||||||
|
|
@ -1077,9 +1077,9 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
|
||||||
// Add the offset to the center of the bounds
|
// Add the offset to the center of the bounds
|
||||||
// into the local space transform.
|
// into the local space transform.
|
||||||
MatrixF primXfm( true );
|
MatrixF primXfm( true );
|
||||||
Point3F t = mesh->getBounds().getCenter();
|
Point3F meshBoundsCenter = mesh->getBounds().getCenter();
|
||||||
t.convolve(scale);
|
meshBoundsCenter.convolve(scale);
|
||||||
primXfm.setPosition(t);
|
primXfm.setPosition(meshBoundsCenter);
|
||||||
localXfm.mul( primXfm );
|
localXfm.mul( primXfm );
|
||||||
|
|
||||||
colShape->addSphere( radius, localXfm );
|
colShape->addSphere( radius, localXfm );
|
||||||
|
|
@ -1092,9 +1092,9 @@ PhysicsCollision* TSShape::_buildColShapes( bool useVisibleMesh, const Point3F &
|
||||||
|
|
||||||
// We need to center the capsule and align it to the Y axis.
|
// We need to center the capsule and align it to the Y axis.
|
||||||
MatrixF primXfm( true );
|
MatrixF primXfm( true );
|
||||||
Point3F t = mesh->getBounds().getCenter();
|
Point3F meshBoundsCenter = mesh->getBounds().getCenter();
|
||||||
t.convolve(scale);
|
meshBoundsCenter.convolve(scale);
|
||||||
primXfm.setPosition(t);
|
primXfm.setPosition(meshBoundsCenter);
|
||||||
|
|
||||||
// Use the longest axis as the capsule height.
|
// Use the longest axis as the capsule height.
|
||||||
F32 height = -radius * 2.0f;
|
F32 height = -radius * 2.0f;
|
||||||
|
|
|
||||||
|
|
@ -550,7 +550,7 @@ void PlatformWindowSDL::_triggerTextNotify(const SDL_Event& evt)
|
||||||
}
|
}
|
||||||
else // get a wchar string
|
else // get a wchar string
|
||||||
{
|
{
|
||||||
const U32 len = strlen(evt.text.text);
|
const dsize_t len = strlen(evt.text.text);
|
||||||
U16 wchar[16] = {};
|
U16 wchar[16] = {};
|
||||||
dMemcpy(wchar, evt.text.text, sizeof(char)*len);
|
dMemcpy(wchar, evt.text.text, sizeof(char)*len);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue