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:
@@ -2,6 +2,7 @@
|
||||
#define Components_Camera_h__
|
||||
|
||||
#include "Component.h"
|
||||
#include "Entity.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
@@ -13,7 +14,6 @@ struct Camera : Component
|
||||
, NearClip(0.1f)
|
||||
, FarClip(100.f) { }
|
||||
|
||||
std::string Viewport;
|
||||
float FOV;
|
||||
float NearClip;
|
||||
float FarClip;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef Components_Health_h__
|
||||
#define Components_Health_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Health : Component
|
||||
{
|
||||
Health()
|
||||
: health(1.0f){ }
|
||||
|
||||
float health;
|
||||
|
||||
virtual Health* Clone() const override { return new Health(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // Components_Health_h__
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef HelicopterSteering_h__
|
||||
#define HelicopterSteering_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct HelicopterSteering : Component
|
||||
{
|
||||
HelicopterSteering* Clone() const override { return new HelicopterSteering(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // HelicopterSteering_h__
|
||||
+8
-10
@@ -1,10 +1,6 @@
|
||||
#ifndef Components_Input_h__
|
||||
#define Components_Input_h__
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
@@ -12,12 +8,14 @@ namespace Components
|
||||
|
||||
struct Input : Component
|
||||
{
|
||||
std::array<int, GLFW_KEY_LAST+1> KeyState;
|
||||
std::array<int, GLFW_KEY_LAST+1> LastKeyState;
|
||||
std::array<int, GLFW_MOUSE_BUTTON_LAST+1> MouseState;
|
||||
std::array<int, GLFW_MOUSE_BUTTON_LAST+1> LastMouseState;
|
||||
float dX, dY;
|
||||
float WheelDelta;
|
||||
/*Input()
|
||||
: Keyboard(false)
|
||||
, Mouse(false)
|
||||
, GamepadID(0) { }
|
||||
|
||||
bool Keyboard;
|
||||
bool Mouse;
|
||||
int GamepadID;*/
|
||||
|
||||
virtual Input* Clone() const override { return new Input(*this); }
|
||||
};
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#ifndef Player_h__
|
||||
#define Player_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Player : Component
|
||||
{
|
||||
Player()
|
||||
: ID(0) { }
|
||||
|
||||
int ID;
|
||||
|
||||
virtual Player* Clone() const override { return new Player(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // Player_h__
|
||||
@@ -7,6 +7,9 @@ namespace Components
|
||||
{
|
||||
struct TankSteering : Component
|
||||
{
|
||||
EntityID Player;
|
||||
EntityID Turret;
|
||||
EntityID Barrel;
|
||||
TankSteering* Clone() const override { return new TankSteering(*this); }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ struct TowerSteering : Component
|
||||
{
|
||||
TowerSteering()
|
||||
: TurnSpeed(1.f), Axis(glm::vec3(0,1,0)){ }
|
||||
|
||||
float TurnSpeed;
|
||||
glm::vec3 Axis;
|
||||
virtual TowerSteering* Clone() const override { return new TowerSteering(*this); }
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef Components_Viewport_h__
|
||||
#define Components_Viewport_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Viewport : Component
|
||||
{
|
||||
Viewport()
|
||||
: Left(0.f)
|
||||
, Top(0.f)
|
||||
, Right(1.f)
|
||||
, Bottom(1.f)
|
||||
, Camera(0) { }
|
||||
|
||||
float Left;
|
||||
float Top;
|
||||
float Right;
|
||||
float Bottom;
|
||||
|
||||
EntityID Camera;
|
||||
|
||||
virtual Viewport* Clone() const override { return new Viewport(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
#endif // Components_Viewport_h__
|
||||
@@ -14,7 +14,7 @@ struct Wheel : Component
|
||||
|
||||
Wheel()
|
||||
: AxleID(0), Radius(0), Width(0), Mass(0), Steering(false), DownDirection(glm::vec3(0, -1, 0)), Friction(1.5f), SlipAngle(0.0f),
|
||||
MaxBreakingTorque(1500.0f), ConnectedToHandbrake(false), SuspensionStrength(50.0f), TorqueRatio(0.25f) { }
|
||||
MaxBreakingTorque(50000.f), ConnectedToHandbrake(false), SuspensionStrength(50.0f), TorqueRatio(0.25f) { }
|
||||
|
||||
// The Hardpoint MUST be positioned INSIDE the chassis.
|
||||
glm::vec3 Hardpoint;
|
||||
|
||||
Reference in New Issue
Block a user