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