Browse Source

Final Linux compliance changes(renames, tweaks for gcc compliance, etc)

Areloch 9 years ago
parent
commit
510b726f6f
25 changed files with 47 additions and 46 deletions
  1. 2 2
      Engine/source/T3D/components/animation/animationComponent.cpp
  2. 1 1
      Engine/source/T3D/components/animation/animationComponent_ScriptBinding.h
  3. 1 1
      Engine/source/T3D/components/camera/cameraComponent.cpp
  4. 1 1
      Engine/source/T3D/components/camera/cameraComponent_ScriptBinding.h
  5. 1 1
      Engine/source/T3D/components/camera/cameraOrbiterComponent.cpp
  6. 1 1
      Engine/source/T3D/components/camera/cameraOrbiterComponent.h
  7. 1 1
      Engine/source/T3D/components/collision/collisionComponent.cpp
  8. 1 1
      Engine/source/T3D/components/collision/collisionComponent_ScriptBinding.h
  9. 2 2
      Engine/source/T3D/components/collision/collisionInterfaces.cpp
  10. 3 3
      Engine/source/T3D/components/collision/collisionInterfaces.h
  11. 1 1
      Engine/source/T3D/components/game/stateMachine.h
  12. 1 1
      Engine/source/T3D/components/game/stateMachineComponent.cpp
  13. 3 2
      Engine/source/T3D/components/game/triggerComponent.cpp
  14. 1 1
      Engine/source/T3D/components/physics/physicsComponentInterface.h
  15. 1 1
      Engine/source/T3D/components/physics/playerControllerComponent.cpp
  16. 1 1
      Engine/source/T3D/components/physics/playerControllerComponent.h
  17. 2 2
      Engine/source/T3D/components/physics/rigidBodyComponent.cpp
  18. 1 1
      Engine/source/T3D/components/physics/rigidBodyComponent.h
  19. 4 2
      Engine/source/T3D/components/render/meshComponent.cpp
  20. 1 1
      Engine/source/T3D/components/render/meshComponent.h
  21. 1 1
      Engine/source/T3D/components/render/meshComponent_ScriptBinding.h
  22. 4 4
      Engine/source/T3D/components/render/renderComponentInterface.h
  23. 2 6
      Engine/source/T3D/entity.h
  24. 1 1
      Engine/source/gui/editor/inspector/mountingGroup.cpp
  25. 9 7
      Tools/CMake/torque3d.cmake

+ 2 - 2
Engine/source/T3D/components/animation/animationComponent.cpp

@@ -20,9 +20,9 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-#include "T3D/components/animation/animationcomponent.h"
+#include "T3D/components/animation/animationComponent.h"
 #include "T3D/components/animation/animationComponent_ScriptBinding.h"
-#include "T3D/components/render/meshcomponent.h"
+#include "T3D/components/render/meshComponent.h"
 
 #include "platform/platform.h"
 #include "console/consoleTypes.h"

+ 1 - 1
Engine/source/T3D/components/animation/animationComponent_ScriptBinding.h

@@ -21,7 +21,7 @@
 //-----------------------------------------------------------------------------
 
 #include "console/engineAPI.h"
-#include "T3D/components/animation/animationcomponent.h"
+#include "T3D/components/animation/animationComponent.h"
 
 DefineEngineMethod(AnimationComponent, playThread, bool, (S32 slot, const char* name, bool transition, F32 transitionTime), (-1, "", true, 0.5),
    "@brief Start a new animation thread, or restart one that has been paused or "

+ 1 - 1
Engine/source/T3D/components/camera/cameraComponent.cpp

@@ -20,7 +20,7 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-#include "T3D/components/camera/cameracomponent.h"
+#include "T3D/components/camera/cameraComponent.h"
 #include "T3D/components/camera/cameraComponent_ScriptBinding.h"
 #include "platform/platform.h"
 #include "console/consoleTypes.h"

+ 1 - 1
Engine/source/T3D/components/camera/cameraComponent_ScriptBinding.h

@@ -21,7 +21,7 @@
 //-----------------------------------------------------------------------------
 
 #include "console/engineAPI.h"
-#include "T3D/components/camera/cameracomponent.h"
+#include "T3D/components/camera/cameraComponent.h"
 
 //Basically, this only exists for backwards compatibility for parts of the editors
 ConsoleMethod(CameraComponent, getMode, const char*, 2, 2, "() - We get the first behavior of the requested type on our owner object.\n"

+ 1 - 1
Engine/source/T3D/components/camera/cameraOrbiterComponent.cpp

@@ -20,7 +20,7 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-#include "T3D/components/camera/cameraOrbitercomponent.h"
+#include "T3D/components/camera/cameraOrbiterComponent.h"
 #include "core/util/safeDelete.h"
 #include "console/consoleTypes.h"
 #include "console/consoleObject.h"

+ 1 - 1
Engine/source/T3D/components/camera/cameraOrbiterComponent.h

@@ -27,7 +27,7 @@
 #include "T3D/components/component.h"
 #endif
 #ifndef CAMERA_COMPONENT_H
-#include "T3D/components/camera/cameracomponent.h"
+#include "T3D/components/camera/cameraComponent.h"
 #endif
 
 //////////////////////////////////////////////////////////////////////////

+ 1 - 1
Engine/source/T3D/components/collision/collisionComponent.cpp

@@ -20,7 +20,7 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-#include "T3D/components/collision/collisioncomponent.h"
+#include "T3D/components/collision/collisionComponent.h"
 #include "T3D/components/collision/collisionComponent_ScriptBinding.h"
 #include "T3D/components/physics/physicsBehavior.h"
 #include "console/consoleTypes.h"

+ 1 - 1
Engine/source/T3D/components/collision/collisionComponent_ScriptBinding.h

@@ -21,7 +21,7 @@
 //-----------------------------------------------------------------------------
 
 #include "console/engineAPI.h"
-#include "T3D/components/collision/collisioncomponent.h"
+#include "T3D/components/collision/collisionComponent.h"
 #include "materials/baseMatInstance.h"
 
 DefineConsoleMethod(CollisionComponent, getNumberOfContacts, S32, (), ,

+ 2 - 2
Engine/source/T3D/components/collision/collisionInterfaces.cpp

@@ -126,7 +126,7 @@ void CollisionInterface::handleCollisionNotifyList()
    mCollisionNotifyList.clear();
 }
 
-Chunker<CollisionInterface::CollisionTimeout> sTimeoutChunker;
+Chunker<CollisionInterface::CollisionTimeout> sCollisionTimeoutChunker;
 CollisionInterface::CollisionTimeout* CollisionInterface::sFreeTimeoutList = 0;
 
 void CollisionInterface::queueCollision( SceneObject *obj, const VectorF &vec)
@@ -174,7 +174,7 @@ void CollisionInterface::queueCollision( SceneObject *obj, const VectorF &vec)
    }
    else
    {
-      ptr = sTimeoutChunker.alloc();
+      ptr = sCollisionTimeoutChunker.alloc();
    }
 
    ptr->object = obj;

+ 3 - 3
Engine/source/T3D/components/collision/collisionInterfaces.h

@@ -82,8 +82,8 @@ public:
       VectorF vector;
    };
 
-   Signal< void( SceneObject* ) > CollisionInterface::onCollisionSignal;
-   Signal< void( SceneObject* ) > CollisionInterface::onContactSignal;
+   Signal< void( SceneObject* ) > onCollisionSignal;
+   Signal< void( SceneObject* ) > onContactSignal;
 
 protected:
    CollisionTimeout* mTimeoutList;
@@ -149,7 +149,7 @@ public:
 
    virtual PhysicsCollision* getCollisionData() = 0;
 
-   Signal< void(PhysicsCollision* collision) > CollisionInterface::onCollisionChanged;
+   Signal< void(PhysicsCollision* collision) > onCollisionChanged;
 };
 
 class BuildConvexInterface //: public Interface<CollisionInterface>

+ 1 - 1
Engine/source/T3D/components/game/stateMachine.h

@@ -160,7 +160,7 @@ public:
          return mFields[index];
    }
 
-   Signal< void(StateMachine*, S32 stateIdx) > StateMachine::onStateChanged;
+   Signal< void(StateMachine*, S32 stateIdx) > onStateChanged;
 
    //
    inline bool readStateName(State* state, SimXMLDocument* reader)

+ 1 - 1
Engine/source/T3D/components/game/stateMachineComponent.cpp

@@ -20,7 +20,7 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-#include "T3D/components/game/StateMachinecomponent.h"
+#include "T3D/components/game/stateMachineComponent.h"
 
 #include "platform/platform.h"
 #include "console/consoleTypes.h"

+ 3 - 2
Engine/source/T3D/components/game/triggerComponent.cpp

@@ -3,7 +3,7 @@
 // Copyright (C) GarageGames.com, Inc.
 //-----------------------------------------------------------------------------
 #include "console/consoleTypes.h"
-#include "T3D/components/game/Triggercomponent.h"
+#include "T3D/components/game/triggerComponent.h"
 #include "core/util/safeDelete.h"
 #include "console/consoleTypes.h"
 #include "console/consoleObject.h"
@@ -234,7 +234,8 @@ bool TriggerComponent::testObject(SceneObject* enter)
                //anywho, build our list and then we'll check intersections
                ClippedPolyList myList;
 
-               myList.setTransform(&(mOwner->getTransform()), mOwner->getScale());
+               MatrixF ownerTransform = mOwner->getTransform();
+               myList.setTransform(&ownerTransform, mOwner->getScale());
                myList.setObject(mOwner);
 
                myCI->buildPolyList(PLC_Collision, &myList, enterBox, sphere);

+ 1 - 1
Engine/source/T3D/components/physics/physicsComponentInterface.h

@@ -43,7 +43,7 @@ public:
 
    F32 getMass() { return mMass; }
 
-   Signal< void(VectorF normal, Vector<SceneObject*> overlappedObjects) > PhysicsComponentInterface::onPhysicsCollision;
+   Signal< void(VectorF normal, Vector<SceneObject*> overlappedObjects) > onPhysicsCollision;
 };
 
 #endif

+ 1 - 1
Engine/source/T3D/components/physics/playerControllerComponent.cpp

@@ -20,7 +20,7 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-#include "T3D/components/physics/playerControllercomponent.h"
+#include "T3D/components/physics/playerControllerComponent.h"
 #include "platform/platform.h"
 #include "console/consoleTypes.h"
 #include "core/util/safeDelete.h"

+ 1 - 1
Engine/source/T3D/components/physics/playerControllerComponent.h

@@ -203,7 +203,7 @@ public:
    //This is a weird artifact of the PhysicsReps. We want the collision component to be privvy to any events that happen
    //so when the physics components do a findContact test during their update, they'll have a signal collision components
    //can be listening to to update themselves with that info
-   Signal< void(SceneObject*) > PlayerControllerComponent::onContactSignal;
+   Signal< void(SceneObject*) > onContactSignal;
 
    //
    DECLARE_CALLBACK(void, updateMove, (PlayerControllerComponent* obj));

+ 2 - 2
Engine/source/T3D/components/physics/rigidBodyComponent.cpp

@@ -20,7 +20,7 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-#include "T3D/components/physics/rigidBodycomponent.h"
+#include "T3D/components/physics/rigidBodyComponent.h"
 #include "core/util/safeDelete.h"
 #include "console/consoleTypes.h"
 #include "console/consoleObject.h"
@@ -31,7 +31,7 @@
 #include "T3D/physics/physicsPlugin.h"
 #include "T3D/physics/physicsWorld.h"
 #include "T3D/physics/physicsCollision.h"
-#include "T3D/components/collision/collisioncomponent.h"
+#include "T3D/components/collision/collisionComponent.h"
 
 bool RigidBodyComponent::smNoCorrections = false;
 bool RigidBodyComponent::smNoSmoothing = false;

+ 1 - 1
Engine/source/T3D/components/physics/rigidBodyComponent.h

@@ -30,7 +30,7 @@
 #include "T3D/physics/physicsCommon.h"
 #endif
 #ifndef COLLISION_COMPONENT_H
-#include "T3D/components/collision/collisioncomponent.h"
+#include "T3D/components/collision/collisionComponent.h"
 #endif
 #ifndef PHYSICS_COMPONENT_INTERFACE_H
 #include "T3D/components/physics/physicsComponentInterface.h"

+ 4 - 2
Engine/source/T3D/components/render/meshComponent.cpp

@@ -21,7 +21,7 @@
 //-----------------------------------------------------------------------------
 #include "platform/platform.h"
 #include "console/consoleTypes.h"
-#include "T3D/components/render/meshcomponent.h"
+#include "T3D/components/render/meshComponent.h"
 #include "core/util/safeDelete.h"
 #include "core/resourceManager.h"
 #include "core/stream/fileStream.h"
@@ -222,7 +222,9 @@ U32 MeshComponent::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
       for(U32 i=0; i < mChangingMaterials.size(); i++)
       {
          stream->writeInt(mChangingMaterials[i].slot, 16);
-         con->packNetStringHandleU(stream, NetStringHandle(mChangingMaterials[i].matName));
+
+         NetStringHandle matNameStr = mChangingMaterials[i].matName.c_str();
+         con->packNetStringHandleU(stream, matNameStr);
       }
 
       mChangingMaterials.clear();

+ 1 - 1
Engine/source/T3D/components/render/meshComponent.h

@@ -153,7 +153,7 @@ public:
    virtual TSShape* getShape() { if (mMeshAsset)  return mMeshAsset->getShape(); else return NULL; }
    virtual TSShapeInstance* getShapeInstance() { return mShapeInstance; }
 
-   Resource<TSShape> getShapeResource() { if (mMeshAsset)  return mMeshAsset->getShapeResource(); else return NULL; }
+   Resource<TSShape> getShapeResource() { return mMeshAsset->getShapeResource(); }
 
    void _onResourceChanged(const Torque::Path &path);
 

+ 1 - 1
Engine/source/T3D/components/render/meshComponent_ScriptBinding.h

@@ -21,7 +21,7 @@
 //-----------------------------------------------------------------------------
 
 #include "console/engineAPI.h"
-#include "T3D/components/render/meshcomponent.h"
+#include "T3D/components/render/meshComponent.h"
 #include "scene/sceneObject.h"
 #include "math/mTransform.h"
 

+ 4 - 4
Engine/source/T3D/components/render/renderComponentInterface.h

@@ -24,10 +24,10 @@
 #define RENDER_COMPONENT_INTERFACE_H
 
 #ifndef _TSSHAPE_H_
-#include "ts/TSShape.h"
+#include "ts/tsShape.h"
 #endif
 #ifndef _TSSHAPEINSTANCE_H_
-#include "ts/TSShapeInstance.h"
+#include "ts/tsShapeInstance.h"
 #endif
 #ifndef CORE_INTERFACES_H
 #include "T3D/components/coreInterfaces.h"
@@ -40,7 +40,7 @@ public:
 
    virtual TSShape* getShape() = 0;
 
-   Signal< void(RenderComponentInterface*) > RenderComponentInterface::onShapeChanged;
+   Signal< void(RenderComponentInterface*) > onShapeChanged;
 
    virtual TSShapeInstance* getShapeInstance() = 0;
 
@@ -50,7 +50,7 @@ public:
 
    virtual void setNodeTransforms(Vector<MatrixF> transforms) = 0;
 
-   Signal< void(RenderComponentInterface*) > RenderComponentInterface::onShapeInstanceChanged;
+   Signal< void(RenderComponentInterface*) > onShapeInstanceChanged;
 };
 
 class CastRayRenderedInterface// : public Interface<CastRayRenderedInterface>

+ 2 - 6
Engine/source/T3D/entity.h

@@ -32,13 +32,12 @@
 #ifndef COMPONENT_H
 #include "T3D/components/component.h"
 #endif
-#ifndef MROTATION_H
-#include "math/mRotation.h"
-#endif
 #ifndef _CONTAINERQUERY_H_
 #include "T3D/containerQuery.h"
 #endif
 
+class Component;
+
 //**************************************************************************
 // Entity
 //**************************************************************************
@@ -272,9 +271,6 @@ Vector<T*> Entity::getComponents()
    // Loop through our child objects.
    for (U32 i = 0; i < mComponents.size(); i++)
    {
-      if (!mComponents[i]->isEnabled())
-         continue;
-
       curObj = dynamic_cast<T*>(mComponents[i]);
 
       // Add this child object if appropriate.

+ 1 - 1
Engine/source/gui/editor/inspector/mountingGroup.cpp

@@ -77,7 +77,7 @@ GuiControl* GuiInspectorMountingGroup::buildMenuCtrl()
    //GuiInspectorTypeMenuBase::_registerEditControl( retCtrl );
 
 	char szName[512];
-   dSprintf( szName, 512, "IE_%s_%d_%s_Field", retCtrl->getClassName(), mParentInspector->getInspectObject()->getId(), mCaption);
+   dSprintf( szName, 512, "IE_%s_%d_%s_Field", retCtrl->getClassName(), mParentInspector->getInspectObject()->getId(), mCaption.c_str());
 
    // Register the object
    retCtrl->registerObject( szName );

+ 9 - 7
Tools/CMake/torque3d.cmake

@@ -35,6 +35,8 @@ if(UNIX)
 	# for asm files
 	SET (CMAKE_ASM_NASM_OBJECT_FORMAT "elf")
 	ENABLE_LANGUAGE (ASM_NASM)
+    
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 endif()
 
 # TODO: fmod support
@@ -257,7 +259,7 @@ addPath("${srcDir}/gui/3d")
 addPath("${srcDir}/postFx")
 
 if(NOT TORQUE_EXPERIMENTAL_EC) 
-   set(BLACKLIST "Entity.cpp;Entity.h" )
+   set(BLACKLIST "entity.cpp;entity.h" )
 endif()
 addPath("${srcDir}/T3D")
 set(BLACKLIST "" )
@@ -274,12 +276,12 @@ addPath("${srcDir}/T3D/turret")
 
 if( TORQUE_EXPERIMENTAL_EC )
 	addPath("${srcDir}/T3D/components/")
-	addPath("${srcDir}/T3D/components/Animation")
-	addPath("${srcDir}/T3D/components/Camera")
-	addPath("${srcDir}/T3D/components/Collision")
-	addPath("${srcDir}/T3D/components/Game")
-	addPath("${srcDir}/T3D/components/Physics")
-	addPath("${srcDir}/T3D/components/Render")
+	addPath("${srcDir}/T3D/components/animation")
+	addPath("${srcDir}/T3D/components/camera")
+	addPath("${srcDir}/T3D/components/collision")
+	addPath("${srcDir}/T3D/components/game")
+	addPath("${srcDir}/T3D/components/physics")
+	addPath("${srcDir}/T3D/components/render")
 endif()
 
 addPath("${srcDir}/main/")