diff --git a/Engine/source/T3D/components/animation/animationComponent.cpp b/Engine/source/T3D/components/animation/animationComponent.cpp index 5c17a2369..4c009f599 100644 --- a/Engine/source/T3D/components/animation/animationComponent.cpp +++ b/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" diff --git a/Engine/source/T3D/components/animation/animationComponent_ScriptBinding.h b/Engine/source/T3D/components/animation/animationComponent_ScriptBinding.h index 366cbb6ba..2d26c5da1 100644 --- a/Engine/source/T3D/components/animation/animationComponent_ScriptBinding.h +++ b/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 " diff --git a/Engine/source/T3D/components/camera/cameraComponent.cpp b/Engine/source/T3D/components/camera/cameraComponent.cpp index c42fb96ad..60c62fb3a 100644 --- a/Engine/source/T3D/components/camera/cameraComponent.cpp +++ b/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" diff --git a/Engine/source/T3D/components/camera/cameraComponent_ScriptBinding.h b/Engine/source/T3D/components/camera/cameraComponent_ScriptBinding.h index caa6a38e7..2c3f1dbef 100644 --- a/Engine/source/T3D/components/camera/cameraComponent_ScriptBinding.h +++ b/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" diff --git a/Engine/source/T3D/components/camera/cameraOrbiterComponent.cpp b/Engine/source/T3D/components/camera/cameraOrbiterComponent.cpp index af91347ab..dbc7cde69 100644 --- a/Engine/source/T3D/components/camera/cameraOrbiterComponent.cpp +++ b/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" diff --git a/Engine/source/T3D/components/camera/cameraOrbiterComponent.h b/Engine/source/T3D/components/camera/cameraOrbiterComponent.h index b4b495a1d..8fb584a3e 100644 --- a/Engine/source/T3D/components/camera/cameraOrbiterComponent.h +++ b/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 ////////////////////////////////////////////////////////////////////////// diff --git a/Engine/source/T3D/components/collision/collisionComponent.cpp b/Engine/source/T3D/components/collision/collisionComponent.cpp index 0698b4b39..e680665dc 100644 --- a/Engine/source/T3D/components/collision/collisionComponent.cpp +++ b/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" diff --git a/Engine/source/T3D/components/collision/collisionComponent_ScriptBinding.h b/Engine/source/T3D/components/collision/collisionComponent_ScriptBinding.h index 3d7bf6bb3..3b8e83d11 100644 --- a/Engine/source/T3D/components/collision/collisionComponent_ScriptBinding.h +++ b/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, (), , diff --git a/Engine/source/T3D/components/collision/collisionInterfaces.cpp b/Engine/source/T3D/components/collision/collisionInterfaces.cpp index 9ddf01a40..c45dbde48 100644 --- a/Engine/source/T3D/components/collision/collisionInterfaces.cpp +++ b/Engine/source/T3D/components/collision/collisionInterfaces.cpp @@ -126,7 +126,7 @@ void CollisionInterface::handleCollisionNotifyList() mCollisionNotifyList.clear(); } -Chunker sTimeoutChunker; +Chunker 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; diff --git a/Engine/source/T3D/components/collision/collisionInterfaces.h b/Engine/source/T3D/components/collision/collisionInterfaces.h index 675230e07..6592d6015 100644 --- a/Engine/source/T3D/components/collision/collisionInterfaces.h +++ b/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 diff --git a/Engine/source/T3D/components/game/stateMachine.h b/Engine/source/T3D/components/game/stateMachine.h index 8bf7b15fb..9ccc540e8 100644 --- a/Engine/source/T3D/components/game/stateMachine.h +++ b/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) diff --git a/Engine/source/T3D/components/game/stateMachineComponent.cpp b/Engine/source/T3D/components/game/stateMachineComponent.cpp index 572f845e9..991d41ce1 100644 --- a/Engine/source/T3D/components/game/stateMachineComponent.cpp +++ b/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" diff --git a/Engine/source/T3D/components/game/triggerComponent.cpp b/Engine/source/T3D/components/game/triggerComponent.cpp index a9697af50..290fab437 100644 --- a/Engine/source/T3D/components/game/triggerComponent.cpp +++ b/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); diff --git a/Engine/source/T3D/components/physics/physicsComponentInterface.h b/Engine/source/T3D/components/physics/physicsComponentInterface.h index 3d233a222..57f00b8d4 100644 --- a/Engine/source/T3D/components/physics/physicsComponentInterface.h +++ b/Engine/source/T3D/components/physics/physicsComponentInterface.h @@ -43,7 +43,7 @@ public: F32 getMass() { return mMass; } - Signal< void(VectorF normal, Vector overlappedObjects) > PhysicsComponentInterface::onPhysicsCollision; + Signal< void(VectorF normal, Vector overlappedObjects) > onPhysicsCollision; }; #endif \ No newline at end of file diff --git a/Engine/source/T3D/components/physics/playerControllerComponent.cpp b/Engine/source/T3D/components/physics/playerControllerComponent.cpp index 53283ac34..77db8dd1f 100644 --- a/Engine/source/T3D/components/physics/playerControllerComponent.cpp +++ b/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" diff --git a/Engine/source/T3D/components/physics/playerControllerComponent.h b/Engine/source/T3D/components/physics/playerControllerComponent.h index d38410888..49d4c175c 100644 --- a/Engine/source/T3D/components/physics/playerControllerComponent.h +++ b/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)); diff --git a/Engine/source/T3D/components/physics/rigidBodyComponent.cpp b/Engine/source/T3D/components/physics/rigidBodyComponent.cpp index bdabafe3c..21e9ecdbe 100644 --- a/Engine/source/T3D/components/physics/rigidBodyComponent.cpp +++ b/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; diff --git a/Engine/source/T3D/components/physics/rigidBodyComponent.h b/Engine/source/T3D/components/physics/rigidBodyComponent.h index 3c9aea61d..4bbe1f927 100644 --- a/Engine/source/T3D/components/physics/rigidBodyComponent.h +++ b/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" diff --git a/Engine/source/T3D/components/render/meshComponent.cpp b/Engine/source/T3D/components/render/meshComponent.cpp index e84c43ace..fdb005adf 100644 --- a/Engine/source/T3D/components/render/meshComponent.cpp +++ b/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(); diff --git a/Engine/source/T3D/components/render/meshComponent.h b/Engine/source/T3D/components/render/meshComponent.h index 8aa02a64d..6adc2633e 100644 --- a/Engine/source/T3D/components/render/meshComponent.h +++ b/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 getShapeResource() { if (mMeshAsset) return mMeshAsset->getShapeResource(); else return NULL; } + Resource getShapeResource() { return mMeshAsset->getShapeResource(); } void _onResourceChanged(const Torque::Path &path); diff --git a/Engine/source/T3D/components/render/meshComponent_ScriptBinding.h b/Engine/source/T3D/components/render/meshComponent_ScriptBinding.h index 8181b3e7d..5a19b8f08 100644 --- a/Engine/source/T3D/components/render/meshComponent_ScriptBinding.h +++ b/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" diff --git a/Engine/source/T3D/components/render/renderComponentInterface.h b/Engine/source/T3D/components/render/renderComponentInterface.h index 6948f3866..ff51098f2 100644 --- a/Engine/source/T3D/components/render/renderComponentInterface.h +++ b/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 transforms) = 0; - Signal< void(RenderComponentInterface*) > RenderComponentInterface::onShapeInstanceChanged; + Signal< void(RenderComponentInterface*) > onShapeInstanceChanged; }; class CastRayRenderedInterface// : public Interface diff --git a/Engine/source/T3D/entity.h b/Engine/source/T3D/entity.h index faaaea4cf..52818f6f9 100644 --- a/Engine/source/T3D/entity.h +++ b/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 Entity::getComponents() // Loop through our child objects. for (U32 i = 0; i < mComponents.size(); i++) { - if (!mComponents[i]->isEnabled()) - continue; - curObj = dynamic_cast(mComponents[i]); // Add this child object if appropriate. diff --git a/Engine/source/gui/editor/inspector/mountingGroup.cpp b/Engine/source/gui/editor/inspector/mountingGroup.cpp index bce47f66a..7afa53105 100644 --- a/Engine/source/gui/editor/inspector/mountingGroup.cpp +++ b/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 ); diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake index fc7e2a920..63a8c9ca9 100644 --- a/Tools/CMake/torque3d.cmake +++ b/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/")