mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Merge pull request #522 from Azaezel/alpha40/stringstringShenanigans
bad constructor usage! bad! GCC no like!
This commit is contained in:
commit
9dd9e9fae5
|
|
@ -248,7 +248,7 @@ public: \
|
|||
}\
|
||||
SimObjectPtr<Material> get##name##Resource() \
|
||||
{\
|
||||
return m##name##;\
|
||||
return m##name;\
|
||||
}
|
||||
|
||||
#define DECLARE_MATERIALASSET_SETGET(className, name)\
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ public: \
|
|||
Resource<TSShape> get##name##Resource(const U32& index) \
|
||||
{\
|
||||
if(index >= sm##name##Count || index < 0)\
|
||||
return nullptr;\
|
||||
return ResourceManager::get().load( "" );\
|
||||
return m##name[index];\
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1671,7 +1671,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
if(mat)
|
||||
{
|
||||
//We found a match, so just modify our asset item's info to point against it. This will create the asset definition, but otherwise leave the material definition as-is.
|
||||
assetItem->filePath = mat->getFilename();
|
||||
assetItem->filePath = (Torque::Path)(mat->getFilename());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@
|
|||
|
||||
// de-tag the command name
|
||||
|
||||
if (mArgc < 1 || mArgv[1][0] != StringTagPrefixByte)
|
||||
return;
|
||||
|
||||
for(S32 i = mArgc - 1; i >= 0; i--)
|
||||
{
|
||||
char *arg = mArgv[i+1];
|
||||
|
|
|
|||
|
|
@ -2805,7 +2805,7 @@ DefineEngineFunction( getMaxDynamicVerts, S32, (),,
|
|||
DefineEngineFunction( getStringHash, S32, (const char* _inString, bool _sensitive), ("", true), "generate a hash from a string. foramt is (string, casesensitive). defaults to true")
|
||||
{
|
||||
if (_sensitive)
|
||||
return S32(String::String(_inString).getHashCaseSensitive());
|
||||
return S32(String(_inString).getHashCaseSensitive());
|
||||
else
|
||||
return S32(String::String(_inString).getHashCaseInsensitive());
|
||||
return S32(String(_inString).getHashCaseInsensitive());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ void Forest::createNewFile()
|
|||
|
||||
//If we didn't already define a forestfile to work with, just base it off our filename
|
||||
if (basePath.isEmpty())
|
||||
basePath = levelAsset->getLevelPath();
|
||||
basePath = (Torque::Path)(levelAsset->getLevelPath());
|
||||
|
||||
String fileName = Torque::FS::MakeUniquePath( basePath.getPath(), basePath.getFileName(), "forest" );
|
||||
mDataFileName = StringTable->insert( fileName.c_str() );
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl
|
|||
};
|
||||
|
||||
DECLARE_IMAGEASSET_ARRAY(GuiPopUpMenuCtrlEx, Bitmap, GFXDefaultGUIProfile, NumBitmapModes);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(GuiPopUpMenuCtrlEx, Bitmap, NumBitmapModes);
|
||||
DECLARE_IMAGEASSET_ARRAY_SETGET(GuiPopUpMenuCtrlEx, Bitmap);
|
||||
|
||||
Point2I mBitmapBounds; // Added
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#include "core/util/safeDelete.h"
|
||||
#include "T3D/accumulationVolume.h"
|
||||
#include "gui/controls/guiTreeViewCtrl.h"
|
||||
#include <console\persistenceManager.h>
|
||||
#include <console/persistenceManager.h>
|
||||
|
||||
IMPLEMENT_CONOBJECT(Material);
|
||||
|
||||
|
|
|
|||
|
|
@ -180,9 +180,9 @@ void DebugVizHLSL::processPix(Vector<ShaderComponent*>& componentList,
|
|||
dSprintf(buf, sizeof(buf), " @ = %s;\r\n", showDiff);
|
||||
meta->addStatement(new GenOp(buf, new DecOp(showDiffVar)));
|
||||
|
||||
String computeForwardProbes = String::String(" @ = debugVizForwardProbes(@,@,@,@,@,@,@,@,\r\n\t\t");
|
||||
computeForwardProbes += String::String("@,TORQUE_SAMPLER2D_MAKEARG(@),\r\n\t\t");
|
||||
computeForwardProbes += String::String("TORQUE_SAMPLERCUBEARRAY_MAKEARG(@),TORQUE_SAMPLERCUBEARRAY_MAKEARG(@), @, @, @, @).rgb; \r\n");
|
||||
String computeForwardProbes = String(" @ = debugVizForwardProbes(@,@,@,@,@,@,@,@,\r\n\t\t");
|
||||
computeForwardProbes += String("@,TORQUE_SAMPLER2D_MAKEARG(@),\r\n\t\t");
|
||||
computeForwardProbes += String("TORQUE_SAMPLERCUBEARRAY_MAKEARG(@),TORQUE_SAMPLERCUBEARRAY_MAKEARG(@), @, @, @, @).rgb; \r\n");
|
||||
|
||||
meta->addStatement(new GenOp(computeForwardProbes.c_str(), ibl, surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, refScaleArray, inRefPosArray,
|
||||
skylightCubemapIdx, BRDFTexture,
|
||||
|
|
|
|||
|
|
@ -3138,9 +3138,9 @@ void ReflectionProbeFeatHLSL::processPix(Vector<ShaderComponent*> &componentList
|
|||
ibl = new Var("ibl", "float3");
|
||||
}
|
||||
|
||||
String computeForwardProbes = String::String(" @ = computeForwardProbes(@,@,@,@,@,@,@,@,\r\n\t\t");
|
||||
computeForwardProbes += String::String("@,TORQUE_SAMPLER2D_MAKEARG(@),\r\n\t\t");
|
||||
computeForwardProbes += String::String("TORQUE_SAMPLERCUBEARRAY_MAKEARG(@),TORQUE_SAMPLERCUBEARRAY_MAKEARG(@)).rgb; \r\n");
|
||||
String computeForwardProbes = String(" @ = computeForwardProbes(@,@,@,@,@,@,@,@,\r\n\t\t");
|
||||
computeForwardProbes += String("@,TORQUE_SAMPLER2D_MAKEARG(@),\r\n\t\t");
|
||||
computeForwardProbes += String("TORQUE_SAMPLERCUBEARRAY_MAKEARG(@),TORQUE_SAMPLERCUBEARRAY_MAKEARG(@)).rgb; \r\n");
|
||||
|
||||
meta->addStatement(new GenOp(computeForwardProbes.c_str(), new DecOp(ibl), surface, cubeMips, numProbes, worldToObjArray, probeConfigData, inProbePosArray, refScaleArray, inRefPosArray,
|
||||
skylightCubemapIdx, BRDFTexture,
|
||||
|
|
|
|||
|
|
@ -1031,7 +1031,7 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
|
|||
Torque::Path diffusePath;
|
||||
|
||||
if (mat->mDiffuseMapName[0] != StringTable->EmptyString())
|
||||
diffusePath = mat->mDiffuseMapName[0];
|
||||
diffusePath = Torque::Path(mat->mDiffuseMapName[0]);
|
||||
else
|
||||
diffusePath = String("warningMat");
|
||||
|
||||
|
|
@ -1041,7 +1041,7 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
|
|||
else
|
||||
{
|
||||
if (mat->mDiffuseMapName[0] != StringTable->EmptyString())
|
||||
diffuseMap += mat->mDiffuseMapName[0];
|
||||
diffuseMap += Torque::Path(mat->mDiffuseMapName[0]);
|
||||
else
|
||||
diffuseMap += "warningMat";
|
||||
}
|
||||
|
|
@ -1317,7 +1317,7 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
|
|||
Torque::Path diffusePath;
|
||||
|
||||
if (mat->mDiffuseMapName[0] != StringTable->EmptyString())
|
||||
diffusePath = mat->mDiffuseMapName[0];
|
||||
diffusePath = Torque::Path(mat->mDiffuseMapName[0]);
|
||||
else
|
||||
diffusePath = String("warningMat");
|
||||
|
||||
|
|
@ -1327,7 +1327,7 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const
|
|||
else
|
||||
{
|
||||
if (mat->mDiffuseMapName[0] != StringTable->EmptyString())
|
||||
diffuseMap += mat->mDiffuseMapName[0];
|
||||
diffuseMap += Torque::Path(mat->mDiffuseMapName[0]);
|
||||
else
|
||||
diffuseMap += "warningMat";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ TSShapeConstructor* TSShapeConstructor::findShapeConstructorByFilename(const Fil
|
|||
for (S32 i = 0; i < group->size(); i++)
|
||||
{
|
||||
TSShapeConstructor* tss = dynamic_cast<TSShapeConstructor*>(group->at(i));
|
||||
FileName shapePath = tss->getShapePath();
|
||||
FileName shapePath = (FileName)(tss->getShapePath());
|
||||
|
||||
char buf[1024];
|
||||
FileName fullShapePath = String(Platform::makeFullPathName(shapePath, buf, sizeof(buf)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue