mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-28 07:45:40 +00:00
Merge pull request #342 from lukaspj/fix/replace-dstrcmp
Replace uses of dStrCmp with new String::compare
This commit is contained in:
commit
d50f1f0b81
85 changed files with 213 additions and 189 deletions
|
|
@ -129,7 +129,7 @@ void AssimpAppMaterial::initMaterial(const Torque::Path& path, Material* mat) co
|
|||
aiString 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;
|
||||
blendOp = Material::None;
|
||||
|
|
@ -141,7 +141,7 @@ void AssimpAppMaterial::initMaterial(const Torque::Path& path, Material* mat) co
|
|||
mat->mAlphaTest = true;
|
||||
}
|
||||
}
|
||||
else if (dStrcmp("BLEND", opacityMode.C_Str()) == 0)
|
||||
else if (String::compare("BLEND", opacityMode.C_Str()) == 0)
|
||||
{
|
||||
translucent = true;
|
||||
blendOp = Material::LerpAlpha;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ protected:
|
|||
// search the technique contents for the desired parameter
|
||||
for (S32 iParam = 0; iParam < pTechnique->getContents().getCount(); iParam++) {
|
||||
const domAny* param = daeSafeCast<domAny>(pTechnique->getContents()[iParam]);
|
||||
if (param && !dStrcmp(param->getElementName(), name))
|
||||
if (param && !String::compare(param->getElementName(), name))
|
||||
return param;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ bool ColladaShapeLoader::canLoadCachedDTS(const Torque::Path& path)
|
|||
|
||||
//assume the dts is good since it was zipped on purpose
|
||||
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);
|
||||
|
||||
|
|
@ -722,7 +722,7 @@ TSShape* loadColladaShape(const Torque::Path &path)
|
|||
if (dtsStream.open(cachedPath.getFullPath(), Torque::FS::File::Write))
|
||||
{
|
||||
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::printf("Writing cached COLLADA shape to %s", cachedPath.getFullPath().c_str());
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ void AnimData::parseTargetString(const char* target, S32 fullCount, const char*
|
|||
else if (const char* p2 = dStrrchr(target, '.')) {
|
||||
// Check for named elements
|
||||
for (S32 iElem = 0; elements[iElem][0] != 0; iElem++) {
|
||||
if (!dStrcmp(p2, elements[iElem])) {
|
||||
if (!String::compare(p2, elements[iElem])) {
|
||||
targetValueOffset = iElem;
|
||||
targetValueCount = 1;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -735,7 +735,7 @@ DefineTSShapeConstructorMethod( writeChangeSet, void, (),,
|
|||
while ( !f.isEOF() )
|
||||
{
|
||||
const char* buffer = (const char *) f.readLine();
|
||||
if ( !dStrcmp( buffer, beginMessage ))
|
||||
if ( !String::compare( buffer, beginMessage ))
|
||||
break;
|
||||
stream->writeText( buffer );
|
||||
stream->writeText( "\r\n" );
|
||||
|
|
@ -756,7 +756,7 @@ DefineTSShapeConstructorMethod( writeChangeSet, void, (),,
|
|||
while ( !f.isEOF() )
|
||||
{
|
||||
const char* buffer = (const char *) f.readLine();
|
||||
if ( !dStrcmp( buffer, endMessage ))
|
||||
if ( !String::compare( buffer, endMessage ))
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ bool TSShape::addNode(const String& name, const String& parentName, const Point3
|
|||
|
||||
// Find the parent node (OK for name to be empty => node is at root level)
|
||||
S32 parentIndex = -1;
|
||||
if (dStrcmp(parentName, ""))
|
||||
if (String::compare(parentName, ""))
|
||||
{
|
||||
parentIndex = findNode(parentName);
|
||||
if (parentIndex < 0)
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ void TSShapeInstance::setMeshForceHidden( const char *meshName, bool hidden )
|
|||
S32 nameIndex = iter->object->nameIndex;
|
||||
const char *name = mShape->names[ nameIndex ];
|
||||
|
||||
if ( dStrcmp( meshName, name ) == 0 )
|
||||
if ( String::compare( meshName, name ) == 0 )
|
||||
{
|
||||
iter->forceHidden = hidden;
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue