diff options
Diffstat (limited to 'src/crepe')
| -rw-r--r-- | src/crepe/api/BoxCollider.cpp | 4 | ||||
| -rw-r--r-- | src/crepe/api/BoxCollider.h | 2 | ||||
| -rw-r--r-- | src/crepe/api/Camera.h | 2 | ||||
| -rw-r--r-- | src/crepe/api/Rigidbody.h | 4 | ||||
| -rw-r--r-- | src/crepe/api/Scene.h | 2 | 
5 files changed, 7 insertions, 7 deletions
| diff --git a/src/crepe/api/BoxCollider.cpp b/src/crepe/api/BoxCollider.cpp index c097a24..a893d41 100644 --- a/src/crepe/api/BoxCollider.cpp +++ b/src/crepe/api/BoxCollider.cpp @@ -4,7 +4,7 @@  using namespace crepe; -BoxCollider::BoxCollider(game_object_id_t game_object_id, const vec2 & offset, -						 const vec2 & dimensions) +BoxCollider::BoxCollider(game_object_id_t game_object_id, const vec2 & dimensions, +						 const vec2 & offset)  	: Collider(game_object_id, offset),  	  dimensions(dimensions) {} diff --git a/src/crepe/api/BoxCollider.h b/src/crepe/api/BoxCollider.h index 1ac4d46..3835e2c 100644 --- a/src/crepe/api/BoxCollider.h +++ b/src/crepe/api/BoxCollider.h @@ -13,7 +13,7 @@ namespace crepe {   */  class BoxCollider : public Collider {  public: -	BoxCollider(game_object_id_t game_object_id, const vec2 & offset, const vec2 & dimensions); +	BoxCollider(game_object_id_t game_object_id, const vec2 & dimensions, const vec2 & offset = { 0, 0 });  	//! Width and height of the box collider  	vec2 dimensions; diff --git a/src/crepe/api/Camera.h b/src/crepe/api/Camera.h index 48f2ff2..2fea9f3 100644 --- a/src/crepe/api/Camera.h +++ b/src/crepe/api/Camera.h @@ -47,7 +47,7 @@ public:  	~Camera(); // dbg_trace only  public: -	Camera::Data data; +	Data data;  	//! viewport is the area of the world visible through the camera (in world units)  	const vec2 viewport_size; diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h index b08c8db..b2bfc0d 100644 --- a/src/crepe/api/Rigidbody.h +++ b/src/crepe/api/Rigidbody.h @@ -61,7 +61,7 @@ public:  		* gravity force, allowing for fine-grained control over how the object responds to gravity.  		*  		*/ -		float gravity_scale = 0; +		float gravity_scale = 1.0;  		//! Defines the type of the physics body, which determines how the physics system interacts with the object.  		BodyType body_type = BodyType::DYNAMIC; @@ -139,7 +139,7 @@ public:  		 * Each element represents a layer ID, and the GameObject will only detect  		 * collisions with other GameObjects that belong to these layers.  		 */ -		std::set<int> collision_layers; +		std::set<int> collision_layers = {0};  	};  public: diff --git a/src/crepe/api/Scene.h b/src/crepe/api/Scene.h index dcca9d4..5c34b36 100644 --- a/src/crepe/api/Scene.h +++ b/src/crepe/api/Scene.h @@ -39,7 +39,7 @@ public:  	 * \brief Get the scene's name  	 * \return The scene's name  	 */ -	virtual std::string get_name() const = 0; +	virtual std::string get_name() const { return ""; };  	// TODO: Late references should ALWAYS be private! This is currently kept as-is so unit tests  	// keep passing, but this reference should not be directly accessible by the user!!! |