Compilation changes

Few compile time attempts to speed things up

Swap include guards for pramga once
Change compile options in the cmakeLists for source
generate a pch

small tweaks
This commit is contained in:
marauder2k7 2026-05-21 23:55:35 +01:00
parent 0df3bea9ca
commit 68e762130d
1016 changed files with 2848 additions and 5532 deletions

View file

@ -19,6 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _TSMESHINTRINSICS_ARCH_H_
#define _TSMESHINTRINSICS_ARCH_H_

View file

@ -19,13 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _ASSIMP_APPMATERIAL_H_
#define _ASSIMP_APPMATERIAL_H_
#ifndef _APPMATERIAL_H_
#include "ts/loader/appMaterial.h"
#endif
#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
#ifdef new

View file

@ -19,19 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _ASSIMP_APPMESH_H_
#define _ASSIMP_APPMESH_H_
#ifndef _APPMESH_H_
#include "ts/loader/appMesh.h"
#endif
#ifndef _TSSHAPELOADER_H_
#include "ts/loader/tsShapeLoader.h"
#endif
#ifndef _ASSIMP_APPNODE_H_
#include "ts/assimp/assimpAppNode.h"
#endif
class AssimpAppMesh : public AppMesh
{

View file

@ -19,20 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _ASSIMP_APPNODE_H_
#define _ASSIMP_APPNODE_H_
#include "core/util/tDictionary.h"
#ifndef _TDICTIONARY_H_
#include "core/tDictionary.h"
#endif
#ifndef _APPNODE_H_
#include "ts/loader/appNode.h"
#endif
#ifndef _COLLADA_EXTENSIONS_H_
#include "ts/collada/colladaExtensions.h"
#endif
#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
#ifdef new

View file

@ -1,22 +1,15 @@
#pragma once
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _TSSHAPE_H_
#include "ts/tsShape.h"
#endif
#ifndef _APPNODE_H_
#include "ts/loader/appNode.h"
#endif
#ifndef _APPMESH_H_
#include "ts/loader/appMesh.h"
#endif
#ifndef _APPSEQUENCE_H_
#include "ts/loader/appSequence.h"
#endif
#if !defined(TORQUE_DISABLE_MEMORY_MANAGER)
#ifdef new

View file

@ -19,18 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _ASSIMP_SHAPELOADER_H_
#define _ASSIMP_SHAPELOADER_H_
#ifndef _TSSHAPELOADER_H_
#include "ts/loader/tsShapeLoader.h"
#endif
#ifndef _ASSIMP_APPNODE_H_
#include "ts/assimp/assimpAppNode.h"
#endif
#include <assimp/Importer.hpp>
#include <assimp/texture.h>

View file

@ -19,16 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _COLLADA_APP_MATERIAL_H_
#define _COLLADA_APP_MATERIAL_H_
#ifndef _APPMATERIAL_H_
#include "ts/loader/appMaterial.h"
#endif
#ifndef _COLLADA_EXTENSIONS_H_
#include "ts/collada/colladaExtensions.h"
#endif
class Material;

View file

@ -19,25 +19,18 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _COLLADA_APPMESH_H_
#define _COLLADA_APPMESH_H_
#ifndef _TDICTIONARY_H_
#include "core/util/tDictionary.h"
#endif
#ifndef _APPMESH_H_
#include "ts/loader/appMesh.h"
#endif
#ifndef _TSSHAPELOADER_H_
#include "ts/loader/tsShapeLoader.h"
#endif
#ifndef _COLLADA_APPNODE_H_
#include "ts/collada/colladaAppNode.h"
#endif
#ifndef _COLLADA_EXTENSIONS_H_
#include "ts/collada/colladaExtensions.h"
#endif
//-----------------------------------------------------------------------------
// Torque unifies the vert position, normal and UV values, so that a single index

View file

@ -19,19 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _COLLADA_APPNODE_H_
#define _COLLADA_APPNODE_H_
#ifndef _TDICTIONARY_H_
#include "core/util/tDictionary.h"
#endif
#ifndef _APPNODE_H_
#include "ts/loader/appNode.h"
#endif
#ifndef _COLLADA_EXTENSIONS_H_
#include "ts/collada/colladaExtensions.h"
#endif
class ColladaAppNode : public AppNode
{

View file

@ -19,13 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _COLLADA_APPSEQUENCE_H_
#define _COLLADA_APPSEQUENCE_H_
#ifndef _APPSEQUENCE_H_
#include "ts/loader/appSequence.h"
#endif
class domAnimation_clip;
class ColladaExtension_animation_clip;

View file

@ -19,16 +19,13 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _COLLADA_EXTENSIONS_H_
#define _COLLADA_EXTENSIONS_H_
#ifndef _TSSHAPE_LOADER_H_
#include "ts/loader/tsShapeLoader.h"
#endif
#ifndef _COLLADA_UTILS_H_
#include "ts/collada/colladaUtils.h"
#endif
//-----------------------------------------------------------------------------
// Collada allows custom data to be included with many elements using the <extra>

View file

@ -19,13 +19,11 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _COLLADA_SHAPELOADER_H_
#define _COLLADA_SHAPELOADER_H_
#ifndef _TSSHAPELOADER_H_
#include "ts/loader/tsShapeLoader.h"
#endif
class domCOLLADA;
class domAnimation;

View file

@ -19,40 +19,27 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#ifndef _COLLADA_UTILS_H_
#define _COLLADA_UTILS_H_
#pragma once
#ifdef _MSC_VER
#pragma warning(disable : 4786) // disable warning about long debug symbol names
#pragma warning(disable : 4355) // disable "'this' : used in base member initializer list" warnings
#endif
#ifndef _MMATRIX_H_
#include "math/mMatrix.h"
#endif
#ifndef _MQUAT_H_
#include "math/mQuat.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _TSSHAPE_LOADER_H_
#include "ts/loader/tsShapeLoader.h"
#endif
#ifndef _OPTIMIZEDPOLYLIST_H_
#include "collision/optimizedPolyList.h"
#endif
#ifndef TINYXML2_INCLUDED
#include "tinyxml2.h"
#endif
#ifndef _CONSOLE_H_
#include "console/console.h"
#endif
#ifndef _TSSHAPEINSTANCE_H_
#include "ts/tsShapeInstance.h"
#endif
#include "platform/tmm_off.h"
@ -982,5 +969,3 @@ typedef AnimatedElement<bool> AnimatedBool;
typedef AnimatedElement<S32> AnimatedInt;
typedef AnimatedElement<const char*> AnimatedString;
typedef AnimatedElementList<domListOfFloats> AnimatedFloatList;
#endif // _COLLADA_UTILS_H_

View file

@ -19,13 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _INSTANCINGMATHOOK_H_
#define _INSTANCINGMATHOOK_H_
#ifndef _MATINSTANCEHOOK_H_
#include "materials/matInstanceHook.h"
#endif
class BaseMatInstance;

View file

@ -19,6 +19,8 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _APPMATERIAL_H_
#define _APPMATERIAL_H_

View file

@ -19,22 +19,18 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _APPMESH_H_
#define _APPMESH_H_
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _APPMATERIAL_H_
#include "ts/loader/appMaterial.h"
#endif
#ifndef _APPSEQUENCE_H_
#include "ts/loader/appSequence.h"
#endif
class AppNode;

View file

@ -19,19 +19,16 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _APPNODE_H_
#define _APPNODE_H_
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _APPMESH_H_
#include "ts/loader/appMesh.h"
#endif
class AppNode
{

View file

@ -19,19 +19,16 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _APPSEQUENCE_H_
#define _APPSEQUENCE_H_
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _TSSHAPE_H_
#include "ts/tsShape.h"
#endif
class AppSequence
{

View file

@ -19,28 +19,21 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _TSSHAPE_LOADER_H_
#define _TSSHAPE_LOADER_H_
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _TSSHAPE_H_
#include "ts/tsShape.h"
#endif
#ifndef _APPNODE_H_
#include "ts/loader/appNode.h"
#endif
#ifndef _APPMESH_H_
#include "ts/loader/appMesh.h"
#endif
#ifndef _APPSEQUENCE_H_
#include "ts/loader/appSequence.h"
#endif
class TSShapeLoader
{

View file

@ -19,13 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSDECAL_H_
#define _TSDECAL_H_
#ifndef _TSMESH_H_
#include "ts/tsMesh.h"
#endif
/// Decals! The lovely detailing thingies, e.g. bullet hole marks.
/// DEPRECATED: This class is here for compatibility with old files only.

View file

@ -19,17 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSINTEGERSET_H_
#define _TSINTEGERSET_H_
#ifndef _PLATFORM_H_
#include "platform/platform.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#include "core/util/tVector.h"
#if defined(TORQUE_MAX_LIB)
#define MAX_TS_SET_DWORDS 32

View file

@ -19,35 +19,27 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSLASTDETAIL_H_
#define _TSLASTDETAIL_H_
#ifndef _MATHTYPES_H_
#include "math/mathTypes.h"
#endif
#ifndef _MPOINT3_H_
#include "math/mPoint3.h"
#endif
#ifndef _MMATRIX_H_
#include "math/mMatrix.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef __RESOURCE_H__
#include "core/resource.h"
#endif
#ifndef _TSRENDERDATA_H_
#include "ts/tsRenderState.h"
#endif
#ifndef _GFXVERTEXFORMAT_H_
#include "gfx/gfxVertexFormat.h"
#endif
#ifndef _SIM_H_
#include "console/simObject.h"
#endif
#include "gfx/gfxVertexFormat.h"
#include "console/simObject.h"
class TSShape;
class TSRenderState;

View file

@ -19,17 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSMATERIALLIST_H_
#define _TSMATERIALLIST_H_
#ifndef _MATERIALLIST_H_
#include "materials/materialList.h"
#endif
#ifndef _PATH_H_
#include "core/util/path.h"
#endif
#include "core/util/path.h"
/// Specialized material list for 3space objects.
class TSMaterialList : public MaterialList

View file

@ -19,31 +19,24 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSMESH_H_
#define _TSMESH_H_
#ifndef _STREAM_H_
#include "core/stream/stream.h"
#endif
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
#ifndef _TVECTOR_H_
#include "core/util/tVector.h"
#endif
#ifndef _ABSTRACTPOLYLIST_H_
#include "collision/abstractPolyList.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _GFXPRIMITIVEBUFFER_H_
#include "gfx/gfxPrimitiveBuffer.h"
#endif
#ifndef _TSPARSEARRAY_H_
#include "core/tSparseArray.h"
#endif
#include "core/util/safeDelete.h"

View file

@ -19,6 +19,8 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSMESHINTRINSICS_H_
#define _TSMESHINTRINSICS_H_

View file

@ -19,13 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSPARTINSTANCE_H_
#define _TSPARTINSTANCE_H_
#ifndef _TSSHAPEINSTANCE_H_
#include "ts/tsShapeInstance.h"
#endif
class TSPartInstance
{

View file

@ -19,21 +19,16 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSRENDERDATA_H_
#define _TSRENDERDATA_H_
#ifndef _MMATRIX_H_
#include "math/mMatrix.h"
#endif
#ifndef _GFXDEVICE_H_
#include "gfx/gfxDevice.h"
#endif
#ifndef _BASEMATINSTANCE_H_
#include "materials/baseMatInstance.h"
#endif
class SceneRenderState;
class GFXCubemap;

View file

@ -19,23 +19,15 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#ifndef _TSSHAPE_H_
#define _TSSHAPE_H_
#ifndef _TSMESH_H_
#include "ts/tsMesh.h"
#endif
#ifndef _TSINTEGERSET_H_
#include "ts/tsIntegerSet.h"
#endif
#ifndef _TSTRANSFORM_H_
#include "ts/tsTransform.h"
#endif
#ifndef _TSSHAPEALLOC_H_
#include "ts/tsShapeAlloc.h"
#endif
#include "ts/tsIntegerSet.h"
#include "ts/tsTransform.h"
#include "ts/tsShapeAlloc.h"
#define DTS_EXPORTER_CURRENT_VERSION 124
@ -765,5 +757,3 @@ inline const TSShape::ObjectState & TSShape::getObjectState(const Sequence & seq
{
return objectStates[seq.baseObjectState + objectNum*seq.numKeyframes + keyframeNum];
}
#endif

View file

@ -19,16 +19,14 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSSHAPEALLOC_H_
#define _TSSHAPEALLOC_H_
#ifndef _PLATFORM_H_
#include "platform/platform.h"
#endif
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
/// Alloc structure used in the reading/writing of shapes.
///

View file

@ -19,6 +19,8 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSSHAPECONSTRUCT_H_
#define _TSSHAPECONSTRUCT_H_
@ -26,21 +28,14 @@
#ifndef __RESOURCE_H__
#include "core/resource.h"
#endif
#ifndef _MTRANSFORM_H_
#include "math/mTransform.h"
#endif
#ifndef _TSSHAPE_H_
#include "ts/tsShape.h"
#endif
#ifndef _SIMBASE_H_
#include "console/simBase.h"
#endif
#ifndef _COLLADA_UTILS_H_
#include "ts/collada/colladaUtils.h"
#endif
#ifndef _ENGINEAPI_H_
#include "console/engineAPI.h"
#endif
#include "T3D/assets/ShapeAsset.h"
#include "T3D/assets/ShapeAnimationAsset.h"

View file

@ -24,6 +24,8 @@
// Arcane-FX for MIT Licensed Open Source version of Torque 3D from GarageGames
// Copyright (C) 2015 Faust Logic, Inc.
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
#pragma once
#pragma once
#ifndef _TSSHAPEINSTANCE_H_
#define _TSSHAPEINSTANCE_H_
@ -31,24 +33,17 @@
#ifndef __RESOURCE_H__
#include "core/resource.h"
#endif
#ifndef _TSSHAPE_H_
#include "ts/tsShape.h"
#endif
#ifndef _TSINTEGERSET_H_
#include "ts/tsIntegerSet.h"
#endif
#ifndef _CONSOLE_H_
#include "console/console.h"
#endif
#ifndef _GBITMAP_H_
#include "gfx/bitmap/gBitmap.h"
#endif
#ifndef _TSRENDERDATA_H_
#include "ts/tsRenderState.h"
#endif
#ifndef _TSMATERIALLIST_H_
#include "ts/tsMaterialList.h"
#endif
class RenderItem;
class TSThread;

View file

@ -19,13 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSSORTEDMESH_H_
#define _TSSORTEDMESH_H_
#ifndef _TSMESH_H_
#include "ts/tsMesh.h"
#endif
/// TSSortedMesh is for meshes that need sorting (obviously). Such meshes
/// are usually partially or completely composed of translucent/parent polygons.

View file

@ -19,13 +19,12 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#pragma once
#pragma once
#ifndef _TSTRANSFORM_H_
#define _TSTRANSFORM_H_
#ifndef _MMATH_H_
#include "math/mMath.h"
#endif
class Stream;