From 4a7104e5eaf67277c063df57c0f012ee6a979c24 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 13 Jun 2022 12:38:08 -0500 Subject: [PATCH] fix TORQUE_TOOLS = off compilation --- Engine/source/T3D/assets/CubemapAsset.cpp | 3 ++- Engine/source/T3D/assets/CubemapAsset.h | 4 ++-- Engine/source/T3D/assets/GUIAsset.cpp | 2 +- Engine/source/T3D/assets/GUIAsset.h | 4 ++-- Engine/source/T3D/assets/GameObjectAsset.cpp | 2 ++ Engine/source/T3D/assets/GameObjectAsset.h | 4 ++-- Engine/source/T3D/assets/ImageAsset.cpp | 3 ++- Engine/source/T3D/assets/ImageAssetInspectors.h | 2 ++ Engine/source/T3D/assets/MaterialAsset.cpp | 2 ++ Engine/source/T3D/assets/MaterialAsset.h | 4 ++-- Engine/source/T3D/assets/ParticleAsset.cpp | 2 ++ Engine/source/T3D/assets/ParticleAsset.h | 4 ++-- Engine/source/T3D/assets/ShapeAnimationAsset.h | 4 ++-- Engine/source/T3D/assets/ShapeAsset.cpp | 2 +- Engine/source/T3D/assets/ShapeAsset.h | 2 +- Engine/source/T3D/assets/SoundAsset.cpp | 2 +- Engine/source/T3D/assets/SoundAsset.h | 4 ++-- Engine/source/T3D/assets/TerrainAsset.cpp | 2 ++ Engine/source/T3D/assets/TerrainAsset.h | 4 ++-- Engine/source/T3D/assets/TerrainMaterialAsset.cpp | 2 +- Engine/source/T3D/assets/TerrainMaterialAsset.h | 4 ++-- Engine/source/T3D/assets/stateMachineAsset.cpp | 2 ++ Engine/source/T3D/assets/stateMachineAsset.h | 4 ++-- Engine/source/T3D/lighting/reflectionProbe.cpp | 7 +++++-- Engine/source/T3D/tsStatic.cpp | 4 ++-- Engine/source/T3D/tsStatic.h | 4 ++-- Engine/source/T3D/zone.cpp | 8 ++++---- Engine/source/T3D/zone.h | 4 +++- Engine/source/Verve/VPath/VPathEditor.cpp | 2 ++ Engine/source/Verve/VPath/VPathEditor.h | 4 ++-- Engine/source/afx/ui/afxGuiSubstitutionField.cpp | 3 ++- Engine/source/afx/ui/afxGuiSubstitutionField.h | 4 ++-- Engine/source/app/game.cpp | 2 +- Engine/source/gui/containers/guiWindowCtrl.cpp | 2 ++ Engine/source/gui/core/guiCanvas.cpp | 13 ++++++------- Engine/source/gui/core/guiCanvas.h | 4 ++-- Engine/source/navigation/guiNavEditorCtrl.cpp | 3 ++- Engine/source/navigation/guiNavEditorCtrl.h | 4 ++-- 38 files changed, 80 insertions(+), 56 deletions(-) diff --git a/Engine/source/T3D/assets/CubemapAsset.cpp b/Engine/source/T3D/assets/CubemapAsset.cpp index 0ecb56f8d..8a3c9c673 100644 --- a/Engine/source/T3D/assets/CubemapAsset.cpp +++ b/Engine/source/T3D/assets/CubemapAsset.cpp @@ -169,7 +169,7 @@ void CubemapAsset::setScriptFile(const char* pScriptFile) // Refresh the asset. refreshAsset(); } - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -249,3 +249,4 @@ bool GuiInspectorTypeCubemapAssetPtr::updateRects() return resized; } +#endif diff --git a/Engine/source/T3D/assets/CubemapAsset.h b/Engine/source/T3D/assets/CubemapAsset.h index e922d4f8b..095aee68c 100644 --- a/Engine/source/T3D/assets/CubemapAsset.h +++ b/Engine/source/T3D/assets/CubemapAsset.h @@ -92,7 +92,7 @@ protected: }; DefineConsoleType(TypeCubemapAssetPtr, CubemapAsset) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -109,6 +109,6 @@ public: virtual GuiControl* constructEditControl(); virtual bool updateRects(); }; - +#endif #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/GUIAsset.cpp b/Engine/source/T3D/assets/GUIAsset.cpp index 0ecff34ad..abbed3f99 100644 --- a/Engine/source/T3D/assets/GUIAsset.cpp +++ b/Engine/source/T3D/assets/GUIAsset.cpp @@ -233,7 +233,6 @@ DefineEngineMethod(GUIAsset, getGUIPath, const char*, (), , { return object->getGUIPath(); } -#endif //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId @@ -312,3 +311,4 @@ bool GuiInspectorTypeGUIAssetPtr::updateRects() return resized; } +#endif diff --git a/Engine/source/T3D/assets/GUIAsset.h b/Engine/source/T3D/assets/GUIAsset.h index bd3bdcff3..439b79c95 100644 --- a/Engine/source/T3D/assets/GUIAsset.h +++ b/Engine/source/T3D/assets/GUIAsset.h @@ -85,7 +85,7 @@ protected: DefineConsoleType(TypeGUIAssetPtr, GUIAsset) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -102,6 +102,6 @@ public: virtual GuiControl* constructEditControl(); virtual bool updateRects(); }; - +#endif #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/GameObjectAsset.cpp b/Engine/source/T3D/assets/GameObjectAsset.cpp index 559b83f9a..41a8df043 100644 --- a/Engine/source/T3D/assets/GameObjectAsset.cpp +++ b/Engine/source/T3D/assets/GameObjectAsset.cpp @@ -231,6 +231,7 @@ DefineEngineMethod(GameObjectAsset, createObject, const char*, (),, return object->create(); } +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -316,3 +317,4 @@ bool GuiInspectorTypeGameObjectAssetPtr::updateRects() return resized; } +#endif diff --git a/Engine/source/T3D/assets/GameObjectAsset.h b/Engine/source/T3D/assets/GameObjectAsset.h index 3426774e3..bad53d6b9 100644 --- a/Engine/source/T3D/assets/GameObjectAsset.h +++ b/Engine/source/T3D/assets/GameObjectAsset.h @@ -86,7 +86,7 @@ protected: DefineConsoleType(TypeGameObjectAssetPtr, GameObjectAsset) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -103,6 +103,6 @@ public: virtual GuiControl* constructEditControl(); virtual bool updateRects(); }; - +#endif #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/ImageAsset.cpp b/Engine/source/T3D/assets/ImageAsset.cpp index 4f3d2e63e..cb5db078c 100644 --- a/Engine/source/T3D/assets/ImageAsset.cpp +++ b/Engine/source/T3D/assets/ImageAsset.cpp @@ -448,7 +448,6 @@ DefineEngineStaticMethod(ImageAsset, getAssetIdByFilename, const char*, (const c { return ImageAsset::getAssetIdByFilename(StringTable->insert(filePath)); } -#endif //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId @@ -620,3 +619,5 @@ void GuiInspectorTypeImageAssetId::consoleInit() ConsoleBaseType::getType(TypeImageAssetId)->setInspectorFieldType("GuiInspectorTypeImageAssetId"); } + +#endif diff --git a/Engine/source/T3D/assets/ImageAssetInspectors.h b/Engine/source/T3D/assets/ImageAssetInspectors.h index 75b7942d1..253dd356c 100644 --- a/Engine/source/T3D/assets/ImageAssetInspectors.h +++ b/Engine/source/T3D/assets/ImageAssetInspectors.h @@ -6,6 +6,7 @@ #include "gui/editor/guiInspectorTypes.h" #endif +#ifdef TORQUE_TOOLS class GuiInspectorTypeImageAssetPtr : public GuiInspectorTypeFileName { typedef GuiInspectorTypeFileName Parent; @@ -29,3 +30,4 @@ public: DECLARE_CONOBJECT(GuiInspectorTypeImageAssetId); static void consoleInit(); }; +#endif diff --git a/Engine/source/T3D/assets/MaterialAsset.cpp b/Engine/source/T3D/assets/MaterialAsset.cpp index 6153cd3e8..4e9198e8f 100644 --- a/Engine/source/T3D/assets/MaterialAsset.cpp +++ b/Engine/source/T3D/assets/MaterialAsset.cpp @@ -450,6 +450,7 @@ DefineEngineMethod(MaterialAsset, getScriptPath, const char*, (), , } #endif +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -544,3 +545,4 @@ void GuiInspectorTypeMaterialAssetId::consoleInit() ConsoleBaseType::getType(TypeMaterialAssetId)->setInspectorFieldType("GuiInspectorTypeMaterialAssetId"); } +#endif diff --git a/Engine/source/T3D/assets/MaterialAsset.h b/Engine/source/T3D/assets/MaterialAsset.h index 561f02fe5..fb5e01235 100644 --- a/Engine/source/T3D/assets/MaterialAsset.h +++ b/Engine/source/T3D/assets/MaterialAsset.h @@ -131,7 +131,7 @@ protected: DefineConsoleType(TypeMaterialAssetPtr, MaterialAsset) DefineConsoleType(TypeMaterialAssetId, String) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -157,7 +157,7 @@ public: DECLARE_CONOBJECT(GuiInspectorTypeMaterialAssetId); static void consoleInit(); }; - +#endif #pragma region Singular Asset Macros //Singular assets diff --git a/Engine/source/T3D/assets/ParticleAsset.cpp b/Engine/source/T3D/assets/ParticleAsset.cpp index 24005973e..3586277e2 100644 --- a/Engine/source/T3D/assets/ParticleAsset.cpp +++ b/Engine/source/T3D/assets/ParticleAsset.cpp @@ -122,6 +122,7 @@ void ParticleAsset::copyTo(SimObject* object) } +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -199,3 +200,4 @@ bool GuiInspectorTypeParticleAssetPtr::updateRects() return resized; } +#endif diff --git a/Engine/source/T3D/assets/ParticleAsset.h b/Engine/source/T3D/assets/ParticleAsset.h index b446c2cf0..9a94348df 100644 --- a/Engine/source/T3D/assets/ParticleAsset.h +++ b/Engine/source/T3D/assets/ParticleAsset.h @@ -67,7 +67,7 @@ protected: DefineConsoleType(TypeParticleAssetPtr, ParticleAsset) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -84,6 +84,6 @@ public: virtual GuiControl* constructEditControl(); virtual bool updateRects(); }; - +#endif #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/ShapeAnimationAsset.h b/Engine/source/T3D/assets/ShapeAnimationAsset.h index 2a1afd248..c94828de5 100644 --- a/Engine/source/T3D/assets/ShapeAnimationAsset.h +++ b/Engine/source/T3D/assets/ShapeAnimationAsset.h @@ -115,7 +115,7 @@ public: }; DefineConsoleType(TypeShapeAnimationAssetPtr, ShapeAnimationAsset) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -132,6 +132,6 @@ public: virtual GuiControl* constructEditControl(); virtual bool updateRects(); };*/ - +#endif #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index d7954b18b..1ab7c7893 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -720,11 +720,11 @@ DefineEngineStaticMethod(ShapeAsset, getAssetIdByFilename, const char*, (const c } #endif +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- -#ifdef TORQUE_TOOLS IMPLEMENT_CONOBJECT(GuiInspectorTypeShapeAssetPtr); ConsoleDocClass(GuiInspectorTypeShapeAssetPtr, diff --git a/Engine/source/T3D/assets/ShapeAsset.h b/Engine/source/T3D/assets/ShapeAsset.h index c94cd8384..bdb53f430 100644 --- a/Engine/source/T3D/assets/ShapeAsset.h +++ b/Engine/source/T3D/assets/ShapeAsset.h @@ -209,10 +209,10 @@ protected: static const char* getNormalImposterFile(void* obj, const char* data) { return static_cast(obj)->getNormalImposterFile(); } }; -#ifdef TORQUE_TOOLS DefineConsoleType(TypeShapeAssetPtr, S32) DefineConsoleType(TypeShapeAssetId, String) +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/assets/SoundAsset.cpp b/Engine/source/T3D/assets/SoundAsset.cpp index a3b1aed81..b783b6858 100644 --- a/Engine/source/T3D/assets/SoundAsset.cpp +++ b/Engine/source/T3D/assets/SoundAsset.cpp @@ -360,7 +360,6 @@ DefineEngineStaticMethod(SoundAsset, getAssetIdByFilename, const char*, (const c { return SoundAsset::getAssetIdByFileName(StringTable->insert(filePath)); } -#endif IMPLEMENT_CONOBJECT(GuiInspectorTypeSoundAssetPtr); ConsoleDocClass(GuiInspectorTypeSoundAssetPtr, @@ -451,3 +450,4 @@ void GuiInspectorTypeSoundAssetId::consoleInit() ConsoleBaseType::getType(TypeSoundAssetId)->setInspectorFieldType("GuiInspectorTypeSoundAssetId"); } +#endif diff --git a/Engine/source/T3D/assets/SoundAsset.h b/Engine/source/T3D/assets/SoundAsset.h index 13613ab6e..7185e3e7b 100644 --- a/Engine/source/T3D/assets/SoundAsset.h +++ b/Engine/source/T3D/assets/SoundAsset.h @@ -145,7 +145,7 @@ protected: DefineConsoleType(TypeSoundAssetPtr, SoundAsset) DefineConsoleType(TypeSoundAssetId, String) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -171,7 +171,7 @@ public: DECLARE_CONOBJECT(GuiInspectorTypeSoundAssetId); static void consoleInit(); }; - +#endif #pragma region Singular Asset Macros //Singular assets diff --git a/Engine/source/T3D/assets/TerrainAsset.cpp b/Engine/source/T3D/assets/TerrainAsset.cpp index 4e03f4c20..66bd44e6a 100644 --- a/Engine/source/T3D/assets/TerrainAsset.cpp +++ b/Engine/source/T3D/assets/TerrainAsset.cpp @@ -436,6 +436,7 @@ DefineEngineMethod(TerrainAsset, getTerrainFilePath, const char*, (), , return object->getTerrainFilePath(); } +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -529,3 +530,4 @@ void GuiInspectorTypeTerrainAssetId::consoleInit() ConsoleBaseType::getType(TypeTerrainAssetId)->setInspectorFieldType("GuiInspectorTypeTerrainAssetId"); } +#endif diff --git a/Engine/source/T3D/assets/TerrainAsset.h b/Engine/source/T3D/assets/TerrainAsset.h index 66e2f9adc..1ae593c62 100644 --- a/Engine/source/T3D/assets/TerrainAsset.h +++ b/Engine/source/T3D/assets/TerrainAsset.h @@ -101,7 +101,7 @@ protected: DefineConsoleType(TypeTerrainAssetPtr, TerrainAsset) DefineConsoleType(TypeTerrainAssetId, String) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -127,6 +127,6 @@ public: DECLARE_CONOBJECT(GuiInspectorTypeTerrainAssetId); static void consoleInit(); }; - +#endif #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/TerrainMaterialAsset.cpp b/Engine/source/T3D/assets/TerrainMaterialAsset.cpp index 043ce6812..0e1514698 100644 --- a/Engine/source/T3D/assets/TerrainMaterialAsset.cpp +++ b/Engine/source/T3D/assets/TerrainMaterialAsset.cpp @@ -482,7 +482,6 @@ DefineEngineMethod(TerrainMaterialAsset, getFXMaterialDefinition, S32, (), , else return 0; } -#endif //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -577,3 +576,4 @@ void GuiInspectorTypeTerrainMaterialAssetId::consoleInit() ConsoleBaseType::getType(TypeTerrainMaterialAssetId)->setInspectorFieldType("GuiInspectorTypeTerrainMaterialAssetId"); } +#endif diff --git a/Engine/source/T3D/assets/TerrainMaterialAsset.h b/Engine/source/T3D/assets/TerrainMaterialAsset.h index 86b6bc718..e8e268255 100644 --- a/Engine/source/T3D/assets/TerrainMaterialAsset.h +++ b/Engine/source/T3D/assets/TerrainMaterialAsset.h @@ -130,7 +130,7 @@ protected: DefineConsoleType(TypeTerrainMaterialAssetPtr, TerrainMaterialAsset) DefineConsoleType(TypeTerrainMaterialAssetId, String) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -155,6 +155,6 @@ public: DECLARE_CONOBJECT(GuiInspectorTypeTerrainMaterialAssetId); static void consoleInit(); }; - +#endif #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/stateMachineAsset.cpp b/Engine/source/T3D/assets/stateMachineAsset.cpp index c35b34d51..30f459004 100644 --- a/Engine/source/T3D/assets/stateMachineAsset.cpp +++ b/Engine/source/T3D/assets/stateMachineAsset.cpp @@ -156,6 +156,7 @@ DefineEngineMethod(StateMachineAsset, notifyAssetChanged, void, (),,"") ResourceManager::get().getChangedSignal().trigger(object->getStateMachineFile()); } +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -233,3 +234,4 @@ bool GuiInspectorTypeStateMachineAssetPtr::updateRects() return resized; } +#endif diff --git a/Engine/source/T3D/assets/stateMachineAsset.h b/Engine/source/T3D/assets/stateMachineAsset.h index d63b5d892..d1c6cd9f1 100644 --- a/Engine/source/T3D/assets/stateMachineAsset.h +++ b/Engine/source/T3D/assets/stateMachineAsset.h @@ -74,7 +74,7 @@ protected: }; DefineConsoleType(TypeStateMachineAssetPtr, StateMachineAsset) - +#ifdef TORQUE_TOOLS //----------------------------------------------------------------------------- // TypeAssetId GuiInspectorField Class //----------------------------------------------------------------------------- @@ -91,6 +91,6 @@ public: virtual GuiControl* constructEditControl(); virtual bool updateRects(); }; - +#endif #endif diff --git a/Engine/source/T3D/lighting/reflectionProbe.cpp b/Engine/source/T3D/lighting/reflectionProbe.cpp index 1715ac758..fb8d9a2cf 100644 --- a/Engine/source/T3D/lighting/reflectionProbe.cpp +++ b/Engine/source/T3D/lighting/reflectionProbe.cpp @@ -115,9 +115,10 @@ ReflectionProbe::ReflectionProbe() mStaticCubemap = NULL; mProbeUniqueID = ""; +#ifdef TORQUE_TOOLS mEditorShapeInst = NULL; mEditorShape = NULL; - +#endif mRefreshRateMS = 200; mDynamicLastBakeMS = 0; @@ -135,9 +136,11 @@ ReflectionProbe::ReflectionProbe() ReflectionProbe::~ReflectionProbe() { + +#ifdef TORQUE_TOOLS if (mEditorShapeInst) SAFE_DELETE(mEditorShapeInst); - +#endif if (mReflectionModeType == StaticCubemap && mStaticCubemap) mStaticCubemap->deleteObject(); } diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index ca5f1a9a5..021f323fc 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -1635,7 +1635,7 @@ void TSStatic::getUtilizedAssets(Vector* usedAssetsList) //These functions are duplicated in tsStatic and shapeBase. //They each function a little differently; but achieve the same purpose of gathering //target names/counts without polluting simObject. - +#ifdef TORQUE_TOOLS void TSStatic::onInspect(GuiInspector* inspector) { if (mShapeAsset == nullptr) @@ -1716,7 +1716,7 @@ void TSStatic::onInspect(GuiInspector* inspector) } } } - +#endif DefineEngineMethod(TSStatic, getTargetName, const char*, (S32 index), (0), "Get the name of the indexed shape material.\n" "@param index index of the material to get (valid range is 0 - getTargetCount()-1).\n" diff --git a/Engine/source/T3D/tsStatic.h b/Engine/source/T3D/tsStatic.h index 835310c3d..c67fb766c 100644 --- a/Engine/source/T3D/tsStatic.h +++ b/Engine/source/T3D/tsStatic.h @@ -270,9 +270,9 @@ public: const Vector& getLOSDetails() const { return mLOSDetails; } bool hasAnim() { return mAmbientThread != NULL; } - +#ifdef TORQUE_TOOLS virtual void onInspect(GuiInspector*); - +#endif void updateMaterials(); bool isAnimated() { return mPlayAmbient; } diff --git a/Engine/source/T3D/zone.cpp b/Engine/source/T3D/zone.cpp index f906edd60..936df171f 100644 --- a/Engine/source/T3D/zone.cpp +++ b/Engine/source/T3D/zone.cpp @@ -82,6 +82,7 @@ void Zone::consoleInit() getStaticClassRep()->mIsRenderEnabled = false; } +#ifdef TORQUE_TOOLS void Zone::initPersistFields() { addProtectedField("selectAll", TypeBool, Offset(mSelecting, Zone), @@ -90,13 +91,10 @@ void Zone::initPersistFields() Parent::initPersistFields(); } - bool Zone::_doSelect(void* object, const char* index, const char* data) { Zone* zone = reinterpret_cast(object); - zone->selectWithin(); - return false; } @@ -138,6 +136,7 @@ void Zone::selectWithin() } } } +#endif //============================================================================= // Console API. //============================================================================= @@ -162,9 +161,10 @@ DefineEngineMethod( Zone, dumpZoneState, void, ( bool updateFirst ), ( true ), { object->dumpZoneState( updateFirst ); } - +#ifdef TORQUE_TOOLS DefineEngineMethod(Zone, selectWithin, void, () ,, "select a list of all objects assigned to the zone") { object->selectWithin(); } +#endif diff --git a/Engine/source/T3D/zone.h b/Engine/source/T3D/zone.h index 9b0437365..0f4e1e471 100644 --- a/Engine/source/T3D/zone.h +++ b/Engine/source/T3D/zone.h @@ -45,11 +45,13 @@ class Zone : public SceneAmbientSoundObject< ScenePolyhedralZone > { public: + typedef SceneAmbientSoundObject< ScenePolyhedralZone > Parent; bool mSelecting = false; +#ifdef TORQUE_TOOLS static void initPersistFields(); static bool _doSelect(void* object, const char* index, const char* data); - typedef SceneAmbientSoundObject< ScenePolyhedralZone > Parent; void selectWithin(); +#endif protected: // SceneVolume. diff --git a/Engine/source/Verve/VPath/VPathEditor.cpp b/Engine/source/Verve/VPath/VPathEditor.cpp index 84f0fe40c..f135e75de 100644 --- a/Engine/source/Verve/VPath/VPathEditor.cpp +++ b/Engine/source/Verve/VPath/VPathEditor.cpp @@ -20,6 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- +#ifdef TORQUE_TOOLS #include "VPathEditor.h" #include "console/consoleTypes.h" @@ -2188,3 +2189,4 @@ F32 Utility::GetYaw( const VectorF &pVec ) return yaw; } +#endif diff --git a/Engine/source/Verve/VPath/VPathEditor.h b/Engine/source/Verve/VPath/VPathEditor.h index 69c925bd5..6005e54f6 100644 --- a/Engine/source/Verve/VPath/VPathEditor.h +++ b/Engine/source/Verve/VPath/VPathEditor.h @@ -22,7 +22,7 @@ //----------------------------------------------------------------------------- #ifndef _VT_VPATHEDITOR_H_ #define _VT_VPATHEDITOR_H_ - +#ifdef TORQUE_TOOLS #ifndef _EDITTSCTRL_H_ #include "gui/worldEditor/editTSCtrl.h" #endif @@ -291,5 +291,5 @@ namespace Utility }; //----------------------------------------------------------------------------- - +#endif #endif // _VT_VPATHEDITOR_H_ diff --git a/Engine/source/afx/ui/afxGuiSubstitutionField.cpp b/Engine/source/afx/ui/afxGuiSubstitutionField.cpp index 44ec97c84..9156181f0 100644 --- a/Engine/source/afx/ui/afxGuiSubstitutionField.cpp +++ b/Engine/source/afx/ui/afxGuiSubstitutionField.cpp @@ -22,7 +22,7 @@ // IN THE SOFTWARE. // //~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// - +#ifdef TORQUE_TOOLS #include "afx/arcaneFX.h" #include "gui/editor/inspector/customField.h" @@ -203,3 +203,4 @@ void afxGuiSubstitutionField::_executeSelectedCallback() } //~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// +#endif diff --git a/Engine/source/afx/ui/afxGuiSubstitutionField.h b/Engine/source/afx/ui/afxGuiSubstitutionField.h index a9cd7b141..c92217afe 100644 --- a/Engine/source/afx/ui/afxGuiSubstitutionField.h +++ b/Engine/source/afx/ui/afxGuiSubstitutionField.h @@ -25,7 +25,7 @@ #ifndef _AFX_GUI_SUBSTITUTION_FIELD_H_ #define _AFX_GUI_SUBSTITUTION_FIELD_H_ - +#ifdef TORQUE_TOOLS #include "console/simFieldDictionary.h" #include "gui/editor/inspector/field.h" @@ -62,5 +62,5 @@ protected: String subs_string; }; - +#endif #endif // _AFX_SUBSTITUTION_FIELD_H_ diff --git a/Engine/source/app/game.cpp b/Engine/source/app/game.cpp index 5878accd6..f1bedccd3 100644 --- a/Engine/source/app/game.cpp +++ b/Engine/source/app/game.cpp @@ -58,7 +58,7 @@ #include "afx/arcaneFX.h" #endif -#ifdef TORQUE_PLAYER +#if defined(TORQUE_PLAYER) || !defined(TORQUE_TOOLS) // See matching #ifdef in editor/editor.cpp bool gEditingMission = false; #endif diff --git a/Engine/source/gui/containers/guiWindowCtrl.cpp b/Engine/source/gui/containers/guiWindowCtrl.cpp index ddd11bd40..b4fb08128 100644 --- a/Engine/source/gui/containers/guiWindowCtrl.cpp +++ b/Engine/source/gui/containers/guiWindowCtrl.cpp @@ -870,11 +870,13 @@ void GuiWindowCtrl::onMouseDragged(const GuiEvent &event) GuiCanvas* guiCanvas = getRoot(); if (guiCanvas) { +#ifdef TORQUE_TOOLS GuiMenuBar* menuBar = dynamic_cast(guiCanvas->getMenuBar()); if (menuBar) { menuBarHeight = menuBar->getHeight(); } +#endif } // Build valid snap and window vectors to compare against diff --git a/Engine/source/gui/core/guiCanvas.cpp b/Engine/source/gui/core/guiCanvas.cpp index 2549a4ed2..721c3e6b2 100644 --- a/Engine/source/gui/core/guiCanvas.cpp +++ b/Engine/source/gui/core/guiCanvas.cpp @@ -330,7 +330,7 @@ void GuiCanvas::onRemove() Parent::onRemove(); } - +#ifdef TORQUE_TOOLS void GuiCanvas::setMenuBar(SimObject *obj) { GuiControl *oldMenuBar = mMenuBarCtrl; @@ -382,7 +382,7 @@ void GuiCanvas::setMenuBar(SimObject *obj) newMenu->buildWindowAcceleratorMap(*getPlatformWindow()->getInputGenerator()); } } - +#endif void GuiCanvas::setWindowTitle(const char *newTitle) { if (mPlatformWindow) @@ -705,9 +705,6 @@ bool GuiCanvas::processInputEvent(InputEventInfo &inputEvent) if (mCursorEnabled || mForceMouseToGUI || (mAlwaysHandleMouseButtons && inputEvent.objType == SI_BUTTON) ) { - if (inputEvent.objType != SI_AXIS && inputEvent.action == SI_MAKE) - bool asdfasdf = true; - return processMouseEvent(inputEvent); } break; @@ -1441,10 +1438,10 @@ void GuiCanvas::setContentControl(GuiControl *gui) Sim::getGuiGroup()->addObject( ctrl ); } - +#ifdef TORQUE_TOOLS // set current menu bar setMenuBar( mMenuBarCtrl ); - +#endif // lose the first responder from the old GUI GuiControl* responder = gui->findFirstTabable(); if(responder) @@ -2795,6 +2792,7 @@ DefineEngineMethod( GuiCanvas, setFocus, void, (), , "() - Claim OS input focus } } +#ifdef TORQUE_TOOLS DefineEngineMethod( GuiCanvas, setMenuBar, void, ( GuiControl* menu ),, "Translate a coordinate from canvas window-space to screen-space.\n" "@param coordinate The coordinate in window-space.\n" @@ -2802,6 +2800,7 @@ DefineEngineMethod( GuiCanvas, setMenuBar, void, ( GuiControl* menu ),, { return object->setMenuBar( menu ); } +#endif DefineEngineMethod( GuiCanvas, setVideoMode, void, (U32 width, U32 height, bool fullscreen, U32 bitDepth, U32 refreshRate, U32 antialiasLevel), diff --git a/Engine/source/gui/core/guiCanvas.h b/Engine/source/gui/core/guiCanvas.h index fdb1cfd25..4a43fb7a0 100644 --- a/Engine/source/gui/core/guiCanvas.h +++ b/Engine/source/gui/core/guiCanvas.h @@ -222,10 +222,10 @@ public: virtual bool onAdd(); virtual void onRemove(); - +#ifdef TORQUE_TOOLS void setMenuBar(SimObject *obj); SimObject* getMenuBar() { return mMenuBarCtrl; } - +#endif static void initPersistFields(); static CanvasSizeChangeSignal& getCanvasSizeChangeSignal() { return smCanvasSizeChangeSignal; } diff --git a/Engine/source/navigation/guiNavEditorCtrl.cpp b/Engine/source/navigation/guiNavEditorCtrl.cpp index de4d941cd..a951988eb 100644 --- a/Engine/source/navigation/guiNavEditorCtrl.cpp +++ b/Engine/source/navigation/guiNavEditorCtrl.cpp @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- - +#ifdef TORQUE_TOOLS #include "platform/platform.h" #include "guiNavEditorCtrl.h" #include "duDebugDrawTorque.h" @@ -636,3 +636,4 @@ DefineEngineMethod(GuiNavEditorCtrl, setMode, void, (String mode),, "setMode(Str { object->setMode(mode); } +#endif diff --git a/Engine/source/navigation/guiNavEditorCtrl.h b/Engine/source/navigation/guiNavEditorCtrl.h index 2d4c96bce..af91c856b 100644 --- a/Engine/source/navigation/guiNavEditorCtrl.h +++ b/Engine/source/navigation/guiNavEditorCtrl.h @@ -22,7 +22,7 @@ #ifndef _GUINAVEDITORCTRL_H_ #define _GUINAVEDITORCTRL_H_ - +#ifdef TORQUE_TOOLS #ifndef _EDITTSCTRL_H_ #include "gui/worldEditor/editTSCtrl.h" #endif @@ -179,7 +179,7 @@ public: virtual void undo(); virtual void redo() { undo(); } }; - +#endif #endif