aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/BoxCollider.cpp7
-rw-r--r--src/crepe/api/BoxCollider.h6
-rw-r--r--src/crepe/api/CircleCollider.cpp6
-rw-r--r--src/crepe/api/CircleCollider.h3
-rw-r--r--src/crepe/api/Event.h4
-rw-r--r--src/crepe/api/LoopManager.cpp3
-rw-r--r--src/crepe/api/Rigidbody.cpp4
-rw-r--r--src/crepe/api/Rigidbody.h4
8 files changed, 19 insertions, 18 deletions
diff --git a/src/crepe/api/BoxCollider.cpp b/src/crepe/api/BoxCollider.cpp
index f94ced7..c097a24 100644
--- a/src/crepe/api/BoxCollider.cpp
+++ b/src/crepe/api/BoxCollider.cpp
@@ -1,7 +1,10 @@
#include "BoxCollider.h"
-#include "../Collider.h"
+#include "../Collider.h"
using namespace crepe;
-BoxCollider::BoxCollider(game_object_id_t game_object_id,const vec2& offset, const vec2& dimensions) : Collider(game_object_id,offset), dimensions(dimensions) {}
+BoxCollider::BoxCollider(game_object_id_t game_object_id, const vec2 & offset,
+ const vec2 & dimensions)
+ : Collider(game_object_id, offset),
+ dimensions(dimensions) {}
diff --git a/src/crepe/api/BoxCollider.h b/src/crepe/api/BoxCollider.h
index 1f5f1c1..89e43d8 100644
--- a/src/crepe/api/BoxCollider.h
+++ b/src/crepe/api/BoxCollider.h
@@ -1,7 +1,7 @@
#pragma once
-#include "Vector2.h"
#include "../Collider.h"
+#include "Vector2.h"
#include "types.h"
namespace crepe {
@@ -13,9 +13,9 @@ 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 & offset, const vec2 & dimensions);
- //! Width and height of the box collider
+ //! Width and height of the box collider
vec2 dimensions;
};
diff --git a/src/crepe/api/CircleCollider.cpp b/src/crepe/api/CircleCollider.cpp
index 473734e..a4271e9 100644
--- a/src/crepe/api/CircleCollider.cpp
+++ b/src/crepe/api/CircleCollider.cpp
@@ -2,5 +2,7 @@
using namespace crepe;
-
-CircleCollider::CircleCollider(game_object_id_t game_object_id,const vec2& offset, float radius) : Collider(game_object_id,offset), radius(radius) {}
+CircleCollider::CircleCollider(game_object_id_t game_object_id, const vec2 & offset,
+ float radius)
+ : Collider(game_object_id, offset),
+ radius(radius) {}
diff --git a/src/crepe/api/CircleCollider.h b/src/crepe/api/CircleCollider.h
index bbcc330..ebd1cb2 100644
--- a/src/crepe/api/CircleCollider.h
+++ b/src/crepe/api/CircleCollider.h
@@ -13,8 +13,7 @@ namespace crepe {
*/
class CircleCollider : public Collider {
public:
-
- CircleCollider(game_object_id_t game_object_id,const vec2& offset, float radius);
+ CircleCollider(game_object_id_t game_object_id, const vec2 & offset, float radius);
//! Radius of the circle collider.
float radius;
diff --git a/src/crepe/api/Event.h b/src/crepe/api/Event.h
index 259acba..152bc2c 100644
--- a/src/crepe/api/Event.h
+++ b/src/crepe/api/Event.h
@@ -98,8 +98,8 @@ public:
class CollisionEvent : public Event {
public:
crepe::CollisionSystem::CollisionInfo info;
- CollisionEvent(const crepe::CollisionSystem::CollisionInfo& collisionInfo)
- : info(collisionInfo) {}
+ CollisionEvent(const crepe::CollisionSystem::CollisionInfo & collisionInfo)
+ : info(collisionInfo) {}
};
/**
diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp
index feb1338..d4819ea 100644
--- a/src/crepe/api/LoopManager.cpp
+++ b/src/crepe/api/LoopManager.cpp
@@ -1,13 +1,12 @@
#include "../facade/SDLContext.h"
+#include "../system/PhysicsSystem.h"
#include "../system/AnimatorSystem.h"
#include "../system/CollisionSystem.h"
#include "../system/ParticleSystem.h"
#include "../system/PhysicsSystem.h"
#include "../system/RenderSystem.h"
#include "../system/ScriptSystem.h"
-#include "..//system/PhysicsSystem.h"
-#include "../system/CollisionSystem.h"
#include "LoopManager.h"
#include "LoopTimer.h"
diff --git a/src/crepe/api/Rigidbody.cpp b/src/crepe/api/Rigidbody.cpp
index c4b1d6f..8213afb 100644
--- a/src/crepe/api/Rigidbody.cpp
+++ b/src/crepe/api/Rigidbody.cpp
@@ -10,6 +10,4 @@ void crepe::Rigidbody::add_force_linear(const vec2 & force) {
this->data.linear_velocity += force;
}
-void crepe::Rigidbody::add_force_angular(float force) {
- this->data.angular_velocity += force;
-}
+void crepe::Rigidbody::add_force_angular(float force) { this->data.angular_velocity += force; }
diff --git a/src/crepe/api/Rigidbody.h b/src/crepe/api/Rigidbody.h
index 431e000..756cc28 100644
--- a/src/crepe/api/Rigidbody.h
+++ b/src/crepe/api/Rigidbody.h
@@ -78,9 +78,9 @@ public:
//! Linear velocity of the object (speed and direction).
vec2 linear_velocity;
//! Maximum linear velocity of the object. This limits the object's speed.
- vec2 max_linear_velocity = {INFINITY ,INFINITY};
+ vec2 max_linear_velocity = {INFINITY, INFINITY};
//! Linear velocity coefficient. This scales the object's velocity for adjustment or damping.
- vec2 linear_velocity_coefficient = {1,1};
+ vec2 linear_velocity_coefficient = {1, 1};
//! \}
/**