From 594c4f65c729c4afeb2492353f2163a619368539 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 9 Aug 2021 21:34:24 -0500 Subject: [PATCH 1/8] bad constructor usage! bad! GCC no like! --- Engine/source/console/consoleFunctions.cpp | 4 ++-- Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp | 6 +++--- Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Engine/source/console/consoleFunctions.cpp b/Engine/source/console/consoleFunctions.cpp index 6dd1f1902..236b17434 100644 --- a/Engine/source/console/consoleFunctions.cpp +++ b/Engine/source/console/consoleFunctions.cpp @@ -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()); } diff --git a/Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp index 38a339053..84b724e29 100644 --- a/Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/debugVizFeatureHLSL.cpp @@ -180,9 +180,9 @@ void DebugVizHLSL::processPix(Vector& 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, diff --git a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp index bf826fea9..09fb93fc2 100644 --- a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp @@ -3138,9 +3138,9 @@ void ReflectionProbeFeatHLSL::processPix(Vector &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, From 76386f433c73eb2cc2db6409fa40596b313bf4bf Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 9 Aug 2021 22:08:55 -0500 Subject: [PATCH 2/8] fix eronous extra glue code in macro, fix slash direction in include --- Engine/source/T3D/assets/MaterialAsset.h | 2 +- Engine/source/materials/materialDefinition.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/source/T3D/assets/MaterialAsset.h b/Engine/source/T3D/assets/MaterialAsset.h index 3ba5cdce4..c1582dcf8 100644 --- a/Engine/source/T3D/assets/MaterialAsset.h +++ b/Engine/source/T3D/assets/MaterialAsset.h @@ -248,7 +248,7 @@ public: \ }\ SimObjectPtr get##name##Resource() \ {\ - return m##name##;\ + return m##name;\ } #define DECLARE_MATERIALASSET_SETGET(className, name)\ diff --git a/Engine/source/materials/materialDefinition.cpp b/Engine/source/materials/materialDefinition.cpp index 987a60f36..7eb49ffc0 100644 --- a/Engine/source/materials/materialDefinition.cpp +++ b/Engine/source/materials/materialDefinition.cpp @@ -37,7 +37,7 @@ #include "core/util/safeDelete.h" #include "T3D/accumulationVolume.h" #include "gui/controls/guiTreeViewCtrl.h" -#include +#include IMPLEMENT_CONOBJECT(Material); From 1037b5d7180a6c4c2d9f9fe9b2477861ece86cec Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 9 Aug 2021 22:24:03 -0500 Subject: [PATCH 3/8] extraneous entry --- Engine/source/gui/controls/guiPopUpCtrlEx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/gui/controls/guiPopUpCtrlEx.h b/Engine/source/gui/controls/guiPopUpCtrlEx.h index fe5f1c20b..c3f193156 100644 --- a/Engine/source/gui/controls/guiPopUpCtrlEx.h +++ b/Engine/source/gui/controls/guiPopUpCtrlEx.h @@ -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 From 20e4f3c1200f56de05323502e5028686e40e5423 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 9 Aug 2021 22:24:20 -0500 Subject: [PATCH 4/8] wrap to remove ambiguity --- Engine/source/forest/forest.cpp | 2 +- Engine/source/ts/tsShapeConstruct.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/source/forest/forest.cpp b/Engine/source/forest/forest.cpp index ce4a4186c..2a7c7329a 100644 --- a/Engine/source/forest/forest.cpp +++ b/Engine/source/forest/forest.cpp @@ -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() ); diff --git a/Engine/source/ts/tsShapeConstruct.cpp b/Engine/source/ts/tsShapeConstruct.cpp index 232f21895..4fcc54ba2 100644 --- a/Engine/source/ts/tsShapeConstruct.cpp +++ b/Engine/source/ts/tsShapeConstruct.cpp @@ -417,7 +417,7 @@ TSShapeConstructor* TSShapeConstructor::findShapeConstructorByFilename(const Fil for (S32 i = 0; i < group->size(); i++) { TSShapeConstructor* tss = dynamic_cast(group->at(i)); - FileName shapePath = tss->getShapePath(); + FileName shapePath = (FileName)(tss->getShapePath()); char buf[1024]; FileName fullShapePath = String(Platform::makeFullPathName(shapePath, buf, sizeof(buf))); From cd6e027d1fa0fea165fa353624a6457a69810a7c Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 9 Aug 2021 22:31:58 -0500 Subject: [PATCH 5/8] nother specifier wrapper --- Engine/source/T3D/assets/assetImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/T3D/assets/assetImporter.cpp b/Engine/source/T3D/assets/assetImporter.cpp index c1758a44a..f333e62c4 100644 --- a/Engine/source/T3D/assets/assetImporter.cpp +++ b/Engine/source/T3D/assets/assetImporter.cpp @@ -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 From 0285e073b941074afa955b5af837a4b2dd4ceec7 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 9 Aug 2021 22:40:41 -0500 Subject: [PATCH 6/8] wrap all the things! --- Engine/source/ts/collada/colladaUtils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Engine/source/ts/collada/colladaUtils.cpp b/Engine/source/ts/collada/colladaUtils.cpp index 578d7275b..6563bbd2c 100644 --- a/Engine/source/ts/collada/colladaUtils.cpp +++ b/Engine/source/ts/collada/colladaUtils.cpp @@ -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"; } From c7b44203ad2fda18ffb0cd2da1d974c2e6a62386 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Tue, 10 Aug 2021 03:11:52 -0500 Subject: [PATCH 7/8] sanity check --- Engine/source/app/net/net.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Engine/source/app/net/net.cpp b/Engine/source/app/net/net.cpp index 3de813e89..9f1def406 100644 --- a/Engine/source/app/net/net.cpp +++ b/Engine/source/app/net/net.cpp @@ -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]; From a2ecbe53dd212f604d59f9d5e1a4cc90aa4a381e Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Tue, 10 Aug 2021 03:13:46 -0500 Subject: [PATCH 8/8] gcc seems to have an issue converting nullptr to Resource, so this will at least get it compiling --- Engine/source/T3D/assets/ShapeAsset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/T3D/assets/ShapeAsset.h b/Engine/source/T3D/assets/ShapeAsset.h index d7cf981c0..d2ec353e7 100644 --- a/Engine/source/T3D/assets/ShapeAsset.h +++ b/Engine/source/T3D/assets/ShapeAsset.h @@ -517,7 +517,7 @@ public: \ Resource get##name##Resource(const U32& index) \ {\ if(index >= sm##name##Count || index < 0)\ - return nullptr;\ + return ResourceManager::get().load( "" );\ return m##name[index];\ }