fix TORQUE_TOOLS = off compilation

This commit is contained in:
AzaezelX 2022-06-13 12:38:08 -05:00
parent 9836f6eb30
commit 4a7104e5ea
38 changed files with 80 additions and 56 deletions

View file

@ -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

View file

@ -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_

View file

@ -233,7 +233,6 @@ DefineEngineMethod(GUIAsset, getGUIPath, const char*, (), ,
{
return object->getGUIPath();
}
#endif
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
@ -312,3 +311,4 @@ bool GuiInspectorTypeGUIAssetPtr::updateRects()
return resized;
}
#endif

View file

@ -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_

View file

@ -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

View file

@ -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_

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -122,6 +122,7 @@ void ParticleAsset::copyTo(SimObject* object)
}
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
@ -199,3 +200,4 @@ bool GuiInspectorTypeParticleAssetPtr::updateRects()
return resized;
}
#endif

View file

@ -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_

View file

@ -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_

View file

@ -720,11 +720,11 @@ DefineEngineStaticMethod(ShapeAsset, getAssetIdByFilename, const char*, (const c
}
#endif
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
#ifdef TORQUE_TOOLS
IMPLEMENT_CONOBJECT(GuiInspectorTypeShapeAssetPtr);
ConsoleDocClass(GuiInspectorTypeShapeAssetPtr,

View file

@ -209,10 +209,10 @@ protected:
static const char* getNormalImposterFile(void* obj, const char* data) { return static_cast<ShapeAsset*>(obj)->getNormalImposterFile(); }
};
#ifdef TORQUE_TOOLS
DefineConsoleType(TypeShapeAssetPtr, S32)
DefineConsoleType(TypeShapeAssetId, String)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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_

View file

@ -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

View file

@ -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_

View file

@ -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

View file

@ -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

View file

@ -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();
}

View file

@ -1635,7 +1635,7 @@ void TSStatic::getUtilizedAssets(Vector<StringTableEntry>* 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"

View file

@ -270,9 +270,9 @@ public:
const Vector<S32>& getLOSDetails() const { return mLOSDetails; }
bool hasAnim() { return mAmbientThread != NULL; }
#ifdef TORQUE_TOOLS
virtual void onInspect(GuiInspector*);
#endif
void updateMaterials();
bool isAnimated() { return mPlayAmbient; }

View file

@ -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<Zone*>(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

View file

@ -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.

View file

@ -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

View file

@ -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_

View file

@ -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

View file

@ -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_

View file

@ -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

View file

@ -870,11 +870,13 @@ void GuiWindowCtrl::onMouseDragged(const GuiEvent &event)
GuiCanvas* guiCanvas = getRoot();
if (guiCanvas)
{
#ifdef TORQUE_TOOLS
GuiMenuBar* menuBar = dynamic_cast<GuiMenuBar*>(guiCanvas->getMenuBar());
if (menuBar)
{
menuBarHeight = menuBar->getHeight();
}
#endif
}
// Build valid snap and window vectors to compare against

View file

@ -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),

View file

@ -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; }

View file

@ -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

View file

@ -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