Merge remote-tracking branch 'origin/master' into FMOD
Conflicts: src/GameWorld.cpp src/Systems/SoundSystem.h vs11/Returngeance/Returngeance.vcxproj.filters
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
#include <boost/any.hpp>
|
||||
|
||||
#include "Entity.h"
|
||||
#include "World.h"
|
||||
#include "EventBroker.h"
|
||||
|
||||
// A slower wrapper class for EntityID to make
|
||||
// creation of pre-defined entity hierarchies easier
|
||||
class EntityGroup
|
||||
{
|
||||
public:
|
||||
EntityGroup(World* world, EntityID parent = 0)
|
||||
: World(world)
|
||||
, EventBroker(world->EventBroker())
|
||||
{
|
||||
m_ID = World->CreateEntity(parent);
|
||||
Initialize();
|
||||
World->CommitEntity(m_ID);
|
||||
}
|
||||
|
||||
~EntityGroup()
|
||||
{
|
||||
World->RemoveEntity(m_ID);
|
||||
}
|
||||
|
||||
virtual void Initialize() { }
|
||||
|
||||
template <class T>
|
||||
std::shared_ptr<T> AddComponent(std::string componentType)
|
||||
{
|
||||
return World->AddComponent<T>(m_ID, componentType);
|
||||
}
|
||||
std::shared_ptr<Component> AddComponent(std::string componentType)
|
||||
{
|
||||
return World->AddComponent(m_ID, componentType);
|
||||
}
|
||||
|
||||
operator EntityID () const { return m_ID; }
|
||||
|
||||
private:
|
||||
EntityID m_ID;
|
||||
::World* World;
|
||||
std::shared_ptr<::EventBroker> EventBroker;
|
||||
};
|
||||
@@ -60,7 +60,7 @@
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -111,6 +111,7 @@
|
||||
<ClCompile Include="..\..\src\Sound.cpp" />
|
||||
<ClCompile Include="..\..\src\Systems\DebugSystem.cpp" />
|
||||
<ClCompile Include="..\..\src\Systems\FreeSteeringSystem.cpp" />
|
||||
<ClCompile Include="..\..\src\Systems\HelicopterSteeringSystem.cpp" />
|
||||
<ClCompile Include="..\..\src\Systems\InputSystem.cpp" />
|
||||
<ClCompile Include="..\..\src\Systems\ParticleSystem.cpp" />
|
||||
<ClCompile Include="..\..\src\Systems\PhysicsSystem.cpp" />
|
||||
@@ -131,6 +132,8 @@
|
||||
<ClInclude Include="..\..\src\Components\DirectionalLight.h" />
|
||||
<ClInclude Include="..\..\src\Components\ExtendedMeshShape.h" />
|
||||
<ClInclude Include="..\..\src\Components\FreeSteering.h" />
|
||||
<ClInclude Include="..\..\src\Components\Health.h" />
|
||||
<ClInclude Include="..\..\src\Components\HelicopterSteering.h" />
|
||||
<ClInclude Include="..\..\src\Components\HingeConstraint.h" />
|
||||
<ClInclude Include="..\..\src\Components\Input.h" />
|
||||
<ClInclude Include="..\..\src\Components\Listener.h" />
|
||||
@@ -139,6 +142,7 @@
|
||||
<ClInclude Include="..\..\src\Components\Particle.h" />
|
||||
<ClInclude Include="..\..\src\Components\ParticleEmitter.h" />
|
||||
<ClInclude Include="..\..\src\Components\Physics.h" />
|
||||
<ClInclude Include="..\..\src\Components\Player.h" />
|
||||
<ClInclude Include="..\..\src\Components\PointLight.h" />
|
||||
<ClInclude Include="..\..\src\Components\SoundEmitter.h" />
|
||||
<ClInclude Include="..\..\src\Components\SphereShape.h" />
|
||||
@@ -148,11 +152,14 @@
|
||||
<ClInclude Include="..\..\src\Components\TowerSteering.h" />
|
||||
<ClInclude Include="..\..\src\Components\Transform.h" />
|
||||
<ClInclude Include="..\..\src\Components\Vehicle.h" />
|
||||
<ClInclude Include="..\..\src\Components\Viewport.h" />
|
||||
<ClInclude Include="..\..\src\Components\Wheel.h" />
|
||||
<ClInclude Include="..\..\src\Components\WheelPair.h" />
|
||||
<ClInclude Include="..\..\src\CubemapTexture.h" />
|
||||
<ClInclude Include="..\..\src\Engine.h" />
|
||||
<ClInclude Include="..\..\src\Entity.h" />
|
||||
<ClInclude Include="..\..\src\Events\ApplyForce.h" />
|
||||
<ClInclude Include="..\..\src\Events\ApplyPointImpulse.h" />
|
||||
<ClInclude Include="..\..\src\Events\BindGamepadAxis.h" />
|
||||
<ClInclude Include="..\..\src\Events\BindGamepadButton.h" />
|
||||
<ClInclude Include="..\..\src\Events\BindKey.h" />
|
||||
@@ -189,6 +196,7 @@
|
||||
<ClInclude Include="..\..\src\System.h" />
|
||||
<ClInclude Include="..\..\src\Systems\DebugSystem.h" />
|
||||
<ClInclude Include="..\..\src\Systems\FreeSteeringSystem.h" />
|
||||
<ClInclude Include="..\..\src\Systems\HelicopterSteeringSystem.h" />
|
||||
<ClInclude Include="..\..\src\Systems\InputSystem.h" />
|
||||
<ClInclude Include="..\..\src\Systems\ParticleSystem.h" />
|
||||
<ClInclude Include="..\..\src\Systems\PhysicsSystem.h" />
|
||||
@@ -197,7 +205,6 @@
|
||||
<ClInclude Include="..\..\src\Systems\TankSteeringSystem.h" />
|
||||
<ClInclude Include="..\..\src\Systems\TransformSystem.h" />
|
||||
<ClInclude Include="..\..\src\Texture.h" />
|
||||
<ClInclude Include="..\..\src\Util\defferedUtil.h" />
|
||||
<ClInclude Include="..\..\src\Util\GLError.h" />
|
||||
<ClInclude Include="..\..\src\Util\Rectangle.h" />
|
||||
<ClInclude Include="..\..\src\Util\Logging.h" />
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<ClCompile Include="..\..\src\Systems\TankSteeringSystem.cpp">
|
||||
<Filter>Physics\Systems</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Systems\HelicopterSteeringSystem.cpp">
|
||||
<Filter>Gameplay\Vehicles\Helicopter\Systems</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Util">
|
||||
@@ -137,6 +140,24 @@
|
||||
<Filter Include="Physics\Events">
|
||||
<UniqueIdentifier>{42ae084f-ade8-402c-87ba-f03f6b846bc8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Gameplay">
|
||||
<UniqueIdentifier>{5b992473-73e6-485e-8f13-17e0801fb2ca}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Gameplay\Vehicles">
|
||||
<UniqueIdentifier>{8a78be3a-a3c5-4054-a2f1-1456f3fcbab0}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Gameplay\Vehicles\Helicopter">
|
||||
<UniqueIdentifier>{8ccc0abe-5bdd-4656-ab11-5708a39c71ae}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Gameplay\Vehicles\Helicopter\Components">
|
||||
<UniqueIdentifier>{b2416d05-a49e-4fef-a5c4-cd03d8cc2efd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Gameplay\Vehicles\Helicopter\Systems">
|
||||
<UniqueIdentifier>{b34c0c95-a887-4cf4-af24-cf7c1f459aa8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Gameplay\Components">
|
||||
<UniqueIdentifier>{cb06b441-90b8-46ed-b347-4190dac7185b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\World.h" />
|
||||
@@ -352,10 +373,30 @@
|
||||
<ClInclude Include="..\..\src\Events\BindGamepadButton.h">
|
||||
<Filter>Input\Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Util\defferedUtil.h" />
|
||||
<ClInclude Include="..\..\src\Components\Viewport.h">
|
||||
<Filter>Physics\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Components\Health.h">
|
||||
<Filter>Physics\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Events\LockMouse.h">
|
||||
<Filter>Input\Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Components\HelicopterSteering.h">
|
||||
<Filter>Gameplay\Vehicles\Helicopter\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Systems\HelicopterSteeringSystem.h">
|
||||
<Filter>Gameplay\Vehicles\Helicopter\Systems</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Events\ApplyForce.h">
|
||||
<Filter>Physics\Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Events\ApplyPointImpulse.h">
|
||||
<Filter>Physics\Events</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Components\Player.h">
|
||||
<Filter>Gameplay\Components</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Components\Listener.h">
|
||||
<Filter>Audio\Components</Filter>
|
||||
</ClInclude>
|
||||
|
||||
Reference in New Issue
Block a user