mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
Convert dStrcmp to String::compare for more cases
This commit is contained in:
parent
c999baf7ed
commit
197a62f6ea
22 changed files with 45 additions and 45 deletions
|
|
@ -2558,7 +2558,7 @@ Torque::Path AssetImporter::importImageAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
//If it's not a re-import, check that the file isn't being in-place imported. If it isn't, store off the original
|
//If it's not a re-import, check that the file isn't being in-place imported. If it isn't, store off the original
|
||||||
//file path for reimporting support later
|
//file path for reimporting support later
|
||||||
if (!isReimport && dStrcmp(qualifiedFromFile, qualifiedToFile))
|
if (!isReimport && String::compare(qualifiedFromFile, qualifiedToFile))
|
||||||
{
|
{
|
||||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
||||||
}
|
}
|
||||||
|
|
@ -2578,7 +2578,7 @@ Torque::Path AssetImporter::importImageAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
if (!isReimport)
|
if (!isReimport)
|
||||||
{
|
{
|
||||||
bool isInPlace = !dStrcmp(qualifiedFromFile, qualifiedToFile);
|
bool isInPlace = !String::compare(qualifiedFromFile, qualifiedToFile);
|
||||||
|
|
||||||
if (!isInPlace && !dPathCopy(qualifiedFromFile, qualifiedToFile, !isReimport))
|
if (!isInPlace && !dPathCopy(qualifiedFromFile, qualifiedToFile, !isReimport))
|
||||||
{
|
{
|
||||||
|
|
@ -2877,7 +2877,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
//If it's not a re-import, check that the file isn't being in-place imported. If it isn't, store off the original
|
//If it's not a re-import, check that the file isn't being in-place imported. If it isn't, store off the original
|
||||||
//file path for reimporting support later
|
//file path for reimporting support later
|
||||||
if (!isReimport && dStrcmp(qualifiedFromFile, qualifiedToFile))
|
if (!isReimport && String::compare(qualifiedFromFile, qualifiedToFile))
|
||||||
{
|
{
|
||||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
||||||
}
|
}
|
||||||
|
|
@ -2930,7 +2930,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
||||||
bool makeNewConstructor = true;
|
bool makeNewConstructor = true;
|
||||||
if (!isReimport)
|
if (!isReimport)
|
||||||
{
|
{
|
||||||
bool isInPlace = !dStrcmp(qualifiedFromFile, qualifiedToFile);
|
bool isInPlace = !String::compare(qualifiedFromFile, qualifiedToFile);
|
||||||
|
|
||||||
if (!isInPlace && !dPathCopy(qualifiedFromFile, qualifiedToFile, !isReimport))
|
if (!isInPlace && !dPathCopy(qualifiedFromFile, qualifiedToFile, !isReimport))
|
||||||
{
|
{
|
||||||
|
|
@ -3109,7 +3109,7 @@ Torque::Path AssetImporter::importSoundAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
//If it's not a re-import, check that the file isn't being in-place imported. If it isn't, store off the original
|
//If it's not a re-import, check that the file isn't being in-place imported. If it isn't, store off the original
|
||||||
//file path for reimporting support later
|
//file path for reimporting support later
|
||||||
if (!isReimport && dStrcmp(qualifiedFromFile, qualifiedToFile))
|
if (!isReimport && String::compare(qualifiedFromFile, qualifiedToFile))
|
||||||
{
|
{
|
||||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
||||||
}
|
}
|
||||||
|
|
@ -3126,7 +3126,7 @@ Torque::Path AssetImporter::importSoundAsset(AssetImportObject* assetItem)
|
||||||
|
|
||||||
if (!isReimport)
|
if (!isReimport)
|
||||||
{
|
{
|
||||||
bool isInPlace = !dStrcmp(qualifiedFromFile, qualifiedToFile);
|
bool isInPlace = !String::compare(qualifiedFromFile, qualifiedToFile);
|
||||||
|
|
||||||
if (!isInPlace && !dPathCopy(qualifiedFromFile, qualifiedToFile, !isReimport))
|
if (!isInPlace && !dPathCopy(qualifiedFromFile, qualifiedToFile, !isReimport))
|
||||||
{
|
{
|
||||||
|
|
@ -3165,7 +3165,7 @@ Torque::Path AssetImporter::importShapeAnimationAsset(AssetImportObject* assetIt
|
||||||
|
|
||||||
//If it's not a re-import, check that the file isn't being in-place imported. If it isn't, store off the original
|
//If it's not a re-import, check that the file isn't being in-place imported. If it isn't, store off the original
|
||||||
//file path for reimporting support later
|
//file path for reimporting support later
|
||||||
if (!isReimport && dStrcmp(qualifiedFromFile, qualifiedToFile))
|
if (!isReimport && String::compare(qualifiedFromFile, qualifiedToFile))
|
||||||
{
|
{
|
||||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
||||||
}
|
}
|
||||||
|
|
@ -3182,7 +3182,7 @@ Torque::Path AssetImporter::importShapeAnimationAsset(AssetImportObject* assetIt
|
||||||
|
|
||||||
if (!isReimport)
|
if (!isReimport)
|
||||||
{
|
{
|
||||||
bool isInPlace = !dStrcmp(qualifiedFromFile, qualifiedToFile);
|
bool isInPlace = !String::compare(qualifiedFromFile, qualifiedToFile);
|
||||||
|
|
||||||
if (!isInPlace && !dPathCopy(qualifiedFromFile, qualifiedToFile, !isReimport))
|
if (!isInPlace && !dPathCopy(qualifiedFromFile, qualifiedToFile, !isReimport))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -259,11 +259,11 @@ bool ReflectionProbe::_setReflectionMode(void *object, const char *index, const
|
||||||
{
|
{
|
||||||
ReflectionProbe* probe = reinterpret_cast<ReflectionProbe*>(object);
|
ReflectionProbe* probe = reinterpret_cast<ReflectionProbe*>(object);
|
||||||
|
|
||||||
if (!dStrcmp(data,"Static Cubemap"))
|
if (!String::compare(data,"Static Cubemap"))
|
||||||
{
|
{
|
||||||
probe->mReflectionModeType = StaticCubemap;
|
probe->mReflectionModeType = StaticCubemap;
|
||||||
}
|
}
|
||||||
else if (!dStrcmp(data, "Baked Cubemap"))
|
else if (!String::compare(data, "Baked Cubemap"))
|
||||||
{
|
{
|
||||||
//Clear our cubemap if we changed it to be baked, just for cleanliness
|
//Clear our cubemap if we changed it to be baked, just for cleanliness
|
||||||
probe->mReflectionModeType = BakedCubemap;
|
probe->mReflectionModeType = BakedCubemap;
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@ namespace VPersistence
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *docVersion = rootElement->Attribute( "Version" );
|
const char *docVersion = rootElement->Attribute( "Version" );
|
||||||
if ( !docVersion || dStrcmp( VSFVersionString, docVersion ) != 0 )
|
if ( !docVersion || String::compare( VSFVersionString, docVersion ) != 0 )
|
||||||
{
|
{
|
||||||
Con::errorf( "VPersistence::readFile() - Invalid file version." );
|
Con::errorf( "VPersistence::readFile() - Invalid file version." );
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -1041,7 +1041,7 @@ DefineEngineMethod( VController, sortGroups, void, (),, "( void ) - Sort Groups
|
||||||
}
|
}
|
||||||
|
|
||||||
// Swap?
|
// Swap?
|
||||||
if ( dStrcmp( groupA->getLabel(), groupB->getLabel() ) > 0 )
|
if ( String::compare( groupA->getLabel(), groupB->getLabel() ) > 0 )
|
||||||
{
|
{
|
||||||
// Get Outer Siblings.
|
// Get Outer Siblings.
|
||||||
ITreeNode *prevNode = groupA->mSiblingPrevNode;
|
ITreeNode *prevNode = groupA->mSiblingPrevNode;
|
||||||
|
|
@ -1100,7 +1100,7 @@ DefineEngineMethod( VController, sortTracks, void, (),, "( void ) - Sort Tracks
|
||||||
}
|
}
|
||||||
|
|
||||||
// Swap?
|
// Swap?
|
||||||
if ( dStrcmp( trackA->getLabel(), trackB->getLabel() ) > 0 )
|
if ( String::compare( trackA->getLabel(), trackB->getLabel() ) > 0 )
|
||||||
{
|
{
|
||||||
// Get Outer Siblings.
|
// Get Outer Siblings.
|
||||||
ITreeNode *prevNode = trackA->mSiblingPrevNode;
|
ITreeNode *prevNode = trackA->mSiblingPrevNode;
|
||||||
|
|
|
||||||
|
|
@ -538,7 +538,7 @@ VectorF VPath::getMountVelocity( const U32 &pIndex )
|
||||||
void VPath::readFields( void )
|
void VPath::readFields( void )
|
||||||
{
|
{
|
||||||
const char *nodeData = "";
|
const char *nodeData = "";
|
||||||
for ( S32 nodeIndex = 0; dStrcmp( nodeData = getDataField( StringTable->insert( avar( "Node%d", nodeIndex ) ), NULL ), "" ) != 0; nodeIndex++ )
|
for ( S32 nodeIndex = 0; String::compare( nodeData = getDataField( StringTable->insert( avar( "Node%d", nodeIndex ) ), NULL ), "" ) != 0; nodeIndex++ )
|
||||||
{
|
{
|
||||||
// Create Node.
|
// Create Node.
|
||||||
VPathNode *node = createNode();
|
VPathNode *node = createNode();
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ bool afxConstraintDef::parseSpec(const char* spec, bool runs_on_server,
|
||||||
// move words to words2 while extracting #center and #history
|
// move words to words2 while extracting #center and #history
|
||||||
for (S32 i = 0; i < n_words; i++)
|
for (S32 i = 0; i < n_words; i++)
|
||||||
{
|
{
|
||||||
if (dStrcmp(words[i], "#center") == 0)
|
if (String::compare(words[i], "#center") == 0)
|
||||||
mPos_at_box_center = true;
|
mPos_at_box_center = true;
|
||||||
else if (dStrncmp(words[i], "#history(", 9) == 0)
|
else if (dStrncmp(words[i], "#history(", 9) == 0)
|
||||||
hist_spec = words[i];
|
hist_spec = words[i];
|
||||||
|
|
|
||||||
|
|
@ -1188,7 +1188,7 @@ DefineEngineFunction( isValidIP, bool, ( const char* str),,
|
||||||
"@endtsexample\n"
|
"@endtsexample\n"
|
||||||
"@ingroup Strings" )
|
"@ingroup Strings" )
|
||||||
{
|
{
|
||||||
if(dStrcmp(str, "localhost") == 0)
|
if(String::compare(str, "localhost") == 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2247,7 +2247,7 @@ DefineEngineMethod( PersistenceManager, isDirty, bool, ( const char * objName ),
|
||||||
"Returns true if the SimObject is on the dirty list.")
|
"Returns true if the SimObject is on the dirty list.")
|
||||||
{
|
{
|
||||||
SimObject *dirtyObject = NULL;
|
SimObject *dirtyObject = NULL;
|
||||||
if (dStrcmp ( objName,"")!=0)
|
if (String::compare ( objName,"")!=0)
|
||||||
{
|
{
|
||||||
if (!Sim::findObject(objName, dirtyObject))
|
if (!Sim::findObject(objName, dirtyObject))
|
||||||
{
|
{
|
||||||
|
|
@ -2328,7 +2328,7 @@ DefineEngineMethod( PersistenceManager, saveDirtyObject, bool, (const char * obj
|
||||||
"Save a dirty SimObject to it's file.")
|
"Save a dirty SimObject to it's file.")
|
||||||
{
|
{
|
||||||
SimObject *dirtyObject = NULL;
|
SimObject *dirtyObject = NULL;
|
||||||
if (dStrcmp ( objName, "")!=0)
|
if (String::compare ( objName, "")!=0)
|
||||||
{
|
{
|
||||||
if (!Sim::findObject(objName, dirtyObject))
|
if (!Sim::findObject(objName, dirtyObject))
|
||||||
{
|
{
|
||||||
|
|
@ -2353,7 +2353,7 @@ DefineEngineMethod( PersistenceManager, removeObjectFromFile, void, (const char
|
||||||
the one it was created in.")
|
the one it was created in.")
|
||||||
{
|
{
|
||||||
SimObject *dirtyObject = NULL;
|
SimObject *dirtyObject = NULL;
|
||||||
if (dStrcmp ( objName , "")!=0)
|
if (String::compare ( objName , "")!=0)
|
||||||
{
|
{
|
||||||
if (!Sim::findObject(objName, dirtyObject))
|
if (!Sim::findObject(objName, dirtyObject))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1060,7 +1060,7 @@ void GFXD3D11Shader::_getShaderConstants( ID3D11ShaderReflection *refTable,
|
||||||
#ifdef TORQUE_DEBUG
|
#ifdef TORQUE_DEBUG
|
||||||
AssertFatal(constantBufferDesc.Type == D3D_CT_CBUFFER, "Only scalar cbuffers supported for now.");
|
AssertFatal(constantBufferDesc.Type == D3D_CT_CBUFFER, "Only scalar cbuffers supported for now.");
|
||||||
|
|
||||||
if (dStrcmp(constantBufferDesc.Name, "$Globals") != 0 && dStrcmp(constantBufferDesc.Name, "$Params") != 0)
|
if (String::compare(constantBufferDesc.Name, "$Globals") != 0 && String::compare(constantBufferDesc.Name, "$Params") != 0)
|
||||||
AssertFatal(false, "Only $Global and $Params cbuffer supported for now.");
|
AssertFatal(false, "Only $Global and $Params cbuffer supported for now.");
|
||||||
#endif
|
#endif
|
||||||
#ifdef D3D11_DEBUG_SPEW
|
#ifdef D3D11_DEBUG_SPEW
|
||||||
|
|
|
||||||
|
|
@ -1120,7 +1120,7 @@ DefineEngineFunction(saveCompositeTexture, void, (const char* pathR, const char*
|
||||||
{
|
{
|
||||||
U32 inputKey[4] = {0,0,0,0};
|
U32 inputKey[4] = {0,0,0,0};
|
||||||
|
|
||||||
if (dStrcmp(inputKeyString, "") != 0)
|
if (String::compare(inputKeyString, "") != 0)
|
||||||
{
|
{
|
||||||
dSscanf(inputKeyString, "%i %i %i %i", &inputKey[0], &inputKey[1], &inputKey[2], &inputKey[3]);
|
dSscanf(inputKeyString, "%i %i %i %i", &inputKey[0], &inputKey[1], &inputKey[2], &inputKey[3]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -500,7 +500,7 @@ void GuiGameListMenuCtrl::addRow(const char* label, const char* optionsList, boo
|
||||||
const char* option = StringUnit::getUnit(optionsList, i, DELIM);
|
const char* option = StringUnit::getUnit(optionsList, i, DELIM);
|
||||||
options.push_back(StringTable->insert(option, true));
|
options.push_back(StringTable->insert(option, true));
|
||||||
|
|
||||||
if (dStrcmp(option, defaultValue) == 0)
|
if (String::compare(option, defaultValue) == 0)
|
||||||
defaultOption = options.size() - 1;
|
defaultOption = options.size() - 1;
|
||||||
}
|
}
|
||||||
row->mOptions = options;
|
row->mOptions = options;
|
||||||
|
|
@ -1073,7 +1073,7 @@ bool GuiGameListMenuCtrl::selectOption(S32 rowIndex, const char* theOption)
|
||||||
|
|
||||||
for (Vector<StringTableEntry>::iterator anOption = row->mOptions.begin(); anOption < row->mOptions.end(); ++anOption)
|
for (Vector<StringTableEntry>::iterator anOption = row->mOptions.begin(); anOption < row->mOptions.end(); ++anOption)
|
||||||
{
|
{
|
||||||
if (dStrcmp(*anOption, theOption) == 0)
|
if (String::compare(*anOption, theOption) == 0)
|
||||||
{
|
{
|
||||||
S32 newIndex = anOption - row->mOptions.begin();
|
S32 newIndex = anOption - row->mOptions.begin();
|
||||||
row->mSelectedOption = newIndex;
|
row->mSelectedOption = newIndex;
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ void GuiPopupMenuTextListCtrl::onRenderCell(Point2I offset, Point2I cell, bool s
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (dStrcmp(mList[cell.y].text + 3, "-\t")) // Was: dStrcmp(mList[cell.y].text + 2, "-\t")) but has been changed to take into account the submenu flag
|
if (String::compare(mList[cell.y].text + 3, "-\t")) // Was: String::compare(mList[cell.y].text + 2, "-\t")) but has been changed to take into account the submenu flag
|
||||||
{
|
{
|
||||||
Parent::onRenderCell(offset, cell, selected, mouseOver);
|
Parent::onRenderCell(offset, cell, selected, mouseOver);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1974,11 +1974,11 @@ void GuiConvexEditorCtrl::setSelectedFaceMaterial(const char* materialName)
|
||||||
bool found = false;
|
bool found = false;
|
||||||
U32 oldmatID = mConvexSEL->mSurfaceUVs[mFaceSEL].matID;
|
U32 oldmatID = mConvexSEL->mSurfaceUVs[mFaceSEL].matID;
|
||||||
|
|
||||||
if (dStrcmp(materialName, mConvexSEL->getMaterialName().c_str()))
|
if (String::compare(materialName, mConvexSEL->getMaterialName().c_str()))
|
||||||
{
|
{
|
||||||
for (U32 i = 0; i < mConvexSEL->mSurfaceTextures.size(); i++)
|
for (U32 i = 0; i < mConvexSEL->mSurfaceTextures.size(); i++)
|
||||||
{
|
{
|
||||||
if (!dStrcmp(mConvexSEL->mSurfaceTextures[i].materialName, materialName))
|
if (!String::compare(mConvexSEL->mSurfaceTextures[i].materialName, materialName))
|
||||||
{
|
{
|
||||||
//found a match
|
//found a match
|
||||||
mConvexSEL->mSurfaceUVs[mFaceSEL].matID = i + 1;
|
mConvexSEL->mSurfaceUVs[mFaceSEL].matID = i + 1;
|
||||||
|
|
@ -2958,7 +2958,7 @@ DefineEngineMethod(GuiConvexEditorCtrl, setSelectedFaceMaterial, void, (const ch
|
||||||
"@return true if successful, false if failed (objB is not valid)")
|
"@return true if successful, false if failed (objB is not valid)")
|
||||||
{
|
{
|
||||||
//return Point2F(0, 0);
|
//return Point2F(0, 0);
|
||||||
if (!dStrcmp(materialName, ""))
|
if (!String::compare(materialName, ""))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
object->setSelectedFaceMaterial(materialName);
|
object->setSelectedFaceMaterial(materialName);
|
||||||
|
|
|
||||||
|
|
@ -2415,7 +2415,7 @@ DefineEngineMethod( TerrainEditor, attachTerrain, void, (const char * terrain),
|
||||||
VectorPtr<TerrainBlock*> terrains;
|
VectorPtr<TerrainBlock*> terrains;
|
||||||
|
|
||||||
// attach to first found terrainBlock
|
// attach to first found terrainBlock
|
||||||
if (dStrcmp (terrain,"")==0)
|
if (String::compare (terrain,"")==0)
|
||||||
{
|
{
|
||||||
for(SimSetIterator itr(scene); *itr; ++itr)
|
for(SimSetIterator itr(scene); *itr; ++itr)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ S32 QSORT_CALLBACK moduleDependencySort(const void* a, const void* b)
|
||||||
bool foundDependant = false;
|
bool foundDependant = false;
|
||||||
for (ModuleDefinition::typeModuleDependencyVector::const_iterator dependencyItr = moduleDependencies.begin(); dependencyItr != moduleDependencies.end(); ++dependencyItr)
|
for (ModuleDefinition::typeModuleDependencyVector::const_iterator dependencyItr = moduleDependencies.begin(); dependencyItr != moduleDependencies.end(); ++dependencyItr)
|
||||||
{
|
{
|
||||||
if (dStrcmp(dependencyItr->mModuleId, pDefinition2->getModuleId())
|
if (String::compare(dependencyItr->mModuleId, pDefinition2->getModuleId())
|
||||||
&& (dependencyItr->mVersionId == pDefinition2->getVersionId()))
|
&& (dependencyItr->mVersionId == pDefinition2->getVersionId()))
|
||||||
foundDependant = true;
|
foundDependant = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ bool FileDialog::Execute()
|
||||||
//The first of each pair is the name, which we'll skip because NFD doesn't support named filters atm
|
//The first of each pair is the name, which we'll skip because NFD doesn't support named filters atm
|
||||||
String filter = StringUnit::getUnit(mData.mFilters, i, "|");
|
String filter = StringUnit::getUnit(mData.mFilters, i, "|");
|
||||||
|
|
||||||
if (!dStrcmp(filter.c_str(), "*.*"))
|
if (!String::compare(filter.c_str(), "*.*"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
U32 subFilterCount = StringUnit::getUnitCount(filter, ";");
|
U32 subFilterCount = StringUnit::getUnitCount(filter, ";");
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ static bool deleteDirectoryRecusrive(const char* pPath)
|
||||||
StringTableEntry basePath = *basePathItr;
|
StringTableEntry basePath = *basePathItr;
|
||||||
|
|
||||||
// Skip if the base path.
|
// Skip if the base path.
|
||||||
if (basePathItr == directories.begin() && dStrcmp(pPath, basePath) == 0)
|
if (basePathItr == directories.begin() && String::compare(pPath, basePath) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Delete any directories recursively.
|
// Delete any directories recursively.
|
||||||
|
|
@ -624,4 +624,4 @@ DefineEngineFunction( getUserHomeDirectory, const char *, (), , "getUserHomeDire
|
||||||
DefineEngineFunction(setMainDotCsDir, void, (const char* path), , "setMainDotCsDir()")
|
DefineEngineFunction(setMainDotCsDir, void, (const char* path), , "setMainDotCsDir()")
|
||||||
{
|
{
|
||||||
Platform::setMainDotCsDir(StringTable->insert(path));
|
Platform::setMainDotCsDir(StringTable->insert(path));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1874,7 +1874,7 @@ DefineEngineMethod(SceneObject, attachToParent, bool, (const char*_sceneObject),
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((!dStrcmp("0", _sceneObject))|| (!dStrcmp("", _sceneObject)))
|
if ((!String::compare("0", _sceneObject))|| (!String::compare("", _sceneObject)))
|
||||||
return object->attachToParent(NULL);
|
return object->attachToParent(NULL);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -309,7 +309,7 @@ void VertPixelConnectorGLSL::print( Stream &stream, bool isVerterShader )
|
||||||
U8 output[256];
|
U8 output[256];
|
||||||
|
|
||||||
Var *var = mElementList[i];
|
Var *var = mElementList[i];
|
||||||
if(!dStrcmp((const char*)var->name, "gl_Position"))
|
if(!String::compare((const char*)var->name, "gl_Position"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(var->arraySize <= 1)
|
if(var->arraySize <= 1)
|
||||||
|
|
@ -339,7 +339,7 @@ void VertPixelConnectorGLSL::printOnMain( Stream &stream, bool isVerterShader )
|
||||||
U8 output[256];
|
U8 output[256];
|
||||||
|
|
||||||
Var *var = mElementList[i];
|
Var *var = mElementList[i];
|
||||||
if(!dStrcmp((const char*)var->name, "gl_Position"))
|
if(!String::compare((const char*)var->name, "gl_Position"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dSprintf((char*)output, sizeof(output), " %s IN_%s = _%s_;\r\n", var->type, var->name, var->connectName);
|
dSprintf((char*)output, sizeof(output), " %s IN_%s = _%s_;\r\n", var->type, var->name, var->connectName);
|
||||||
|
|
@ -415,7 +415,7 @@ void VertPixelConnectorGLSL::printStructDefines( Stream &stream, bool in )
|
||||||
U8 output[256];
|
U8 output[256];
|
||||||
|
|
||||||
Var *var = mElementList[i];
|
Var *var = mElementList[i];
|
||||||
if(!dStrcmp((const char*)var->name, "gl_Position"))
|
if(!String::compare((const char*)var->name, "gl_Position"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(!in)
|
if(!in)
|
||||||
|
|
|
||||||
|
|
@ -195,14 +195,14 @@ Var * ShaderFeatureGLSL::getVertTexCoord( const String &name )
|
||||||
|
|
||||||
for( U32 i=0; i<LangElement::elementList.size(); i++ )
|
for( U32 i=0; i<LangElement::elementList.size(); i++ )
|
||||||
{
|
{
|
||||||
if( !dStrcmp( (char*)LangElement::elementList[i]->name, name.c_str() ) )
|
if( !String::compare( (char*)LangElement::elementList[i]->name, name.c_str() ) )
|
||||||
{
|
{
|
||||||
inTex = dynamic_cast<Var*>( LangElement::elementList[i] );
|
inTex = dynamic_cast<Var*>( LangElement::elementList[i] );
|
||||||
if ( inTex )
|
if ( inTex )
|
||||||
{
|
{
|
||||||
// NOTE: This used to do this check...
|
// NOTE: This used to do this check...
|
||||||
//
|
//
|
||||||
// dStrcmp( (char*)inTex->structName, "IN" )
|
// String::compare( (char*)inTex->structName, "IN" )
|
||||||
//
|
//
|
||||||
// ... to ensure that the var was from the input
|
// ... to ensure that the var was from the input
|
||||||
// vertex structure, but this kept some features
|
// vertex structure, but this kept some features
|
||||||
|
|
@ -389,7 +389,7 @@ Var* ShaderFeatureGLSL::getOutTexCoord( const char *name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AssertFatal( dStrcmp( type, (const char*)texCoord->type ) == 0,
|
AssertFatal( String::compare( type, (const char*)texCoord->type ) == 0,
|
||||||
"ShaderFeatureGLSL::getOutTexCoord - Type mismatch!" );
|
"ShaderFeatureGLSL::getOutTexCoord - Type mismatch!" );
|
||||||
|
|
||||||
return texCoord;
|
return texCoord;
|
||||||
|
|
@ -409,7 +409,7 @@ Var* ShaderFeatureGLSL::getInTexCoord( const char *name,
|
||||||
texCoord->setType( type );
|
texCoord->setType( type );
|
||||||
}
|
}
|
||||||
|
|
||||||
AssertFatal( dStrcmp( type, (const char*)texCoord->type ) == 0,
|
AssertFatal( String::compare( type, (const char*)texCoord->type ) == 0,
|
||||||
"ShaderFeatureGLSL::getInTexCoord - Type mismatch!" );
|
"ShaderFeatureGLSL::getInTexCoord - Type mismatch!" );
|
||||||
|
|
||||||
return texCoord;
|
return texCoord;
|
||||||
|
|
@ -429,7 +429,7 @@ Var* ShaderFeatureGLSL::getInColor( const char *name,
|
||||||
inColor->setType( type );
|
inColor->setType( type );
|
||||||
}
|
}
|
||||||
|
|
||||||
AssertFatal( dStrcmp( type, (const char*)inColor->type ) == 0,
|
AssertFatal( String::compare( type, (const char*)inColor->type ) == 0,
|
||||||
"ShaderFeatureGLSL::getInColor - Type mismatch!" );
|
"ShaderFeatureGLSL::getInColor - Type mismatch!" );
|
||||||
|
|
||||||
return inColor;
|
return inColor;
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ void AssimpAppMaterial::initMaterial(const Torque::Path& path, Material* mat) co
|
||||||
aiString opacityMode;
|
aiString opacityMode;
|
||||||
if (AI_SUCCESS == mAIMat->Get("$mat.gltf.alphaMode", 0, 0, opacityMode))
|
if (AI_SUCCESS == mAIMat->Get("$mat.gltf.alphaMode", 0, 0, opacityMode))
|
||||||
{
|
{
|
||||||
if (dStrcmp("MASK", opacityMode.C_Str()) == 0)
|
if (String::compare("MASK", opacityMode.C_Str()) == 0)
|
||||||
{
|
{
|
||||||
translucent = true;
|
translucent = true;
|
||||||
blendOp = Material::None;
|
blendOp = Material::None;
|
||||||
|
|
@ -141,7 +141,7 @@ void AssimpAppMaterial::initMaterial(const Torque::Path& path, Material* mat) co
|
||||||
mat->mAlphaTest = true;
|
mat->mAlphaTest = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (dStrcmp("BLEND", opacityMode.C_Str()) == 0)
|
else if (String::compare("BLEND", opacityMode.C_Str()) == 0)
|
||||||
{
|
{
|
||||||
translucent = true;
|
translucent = true;
|
||||||
blendOp = Material::LerpAlpha;
|
blendOp = Material::LerpAlpha;
|
||||||
|
|
|
||||||
|
|
@ -530,7 +530,7 @@ bool ColladaShapeLoader::canLoadCachedDTS(const Torque::Path& path)
|
||||||
|
|
||||||
//assume the dts is good since it was zipped on purpose
|
//assume the dts is good since it was zipped on purpose
|
||||||
Torque::FS::FileSystemRef ref = Torque::FS::GetFileSystem(cachedPath);
|
Torque::FS::FileSystemRef ref = Torque::FS::GetFileSystem(cachedPath);
|
||||||
if (ref && !dStrcmp("Zip", ref->getTypeStr()))
|
if (ref && !String::compare("Zip", ref->getTypeStr()))
|
||||||
{
|
{
|
||||||
bool forceLoadDAE = Con::getBoolVariable("$collada::forceLoadDAE", false);
|
bool forceLoadDAE = Con::getBoolVariable("$collada::forceLoadDAE", false);
|
||||||
|
|
||||||
|
|
@ -722,7 +722,7 @@ TSShape* loadColladaShape(const Torque::Path &path)
|
||||||
if (dtsStream.open(cachedPath.getFullPath(), Torque::FS::File::Write))
|
if (dtsStream.open(cachedPath.getFullPath(), Torque::FS::File::Write))
|
||||||
{
|
{
|
||||||
Torque::FS::FileSystemRef ref = Torque::FS::GetFileSystem(daePath);
|
Torque::FS::FileSystemRef ref = Torque::FS::GetFileSystem(daePath);
|
||||||
if (ref && !dStrcmp("Zip", ref->getTypeStr()))
|
if (ref && !String::compare("Zip", ref->getTypeStr()))
|
||||||
Con::errorf("No cached dts file found in archive for %s. Forcing cache to disk.", daePath.getFullFileName().c_str());
|
Con::errorf("No cached dts file found in archive for %s. Forcing cache to disk.", daePath.getFullFileName().c_str());
|
||||||
|
|
||||||
Con::printf("Writing cached COLLADA shape to %s", cachedPath.getFullPath().c_str());
|
Con::printf("Writing cached COLLADA shape to %s", cachedPath.getFullPath().c_str());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue