diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-12 18:26:59 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-12 18:26:59 +0100 |
commit | d9130d78738b6cb1bdc4e7ec65362b0ef46b1035 (patch) | |
tree | 00235d096540f315f45767d9dd3b8ec1f4ea3bee /src | |
parent | 792cc2ac28eabd892cfeae57e6b98d1c20b00f57 (diff) |
`make format`
Diffstat (limited to 'src')
-rw-r--r-- | src/crepe/ValueBroker.hpp | 3 | ||||
-rw-r--r-- | src/crepe/api/Animator.cpp | 5 | ||||
-rw-r--r-- | src/crepe/api/Camera.cpp | 3 | ||||
-rw-r--r-- | src/crepe/api/CircleCollider.h | 3 | ||||
-rw-r--r-- | src/crepe/api/Metadata.cpp | 4 | ||||
-rw-r--r-- | src/crepe/api/ParticleEmitter.cpp | 11 | ||||
-rw-r--r-- | src/crepe/api/Rigidbody.cpp | 3 | ||||
-rw-r--r-- | src/crepe/api/Sprite.cpp | 5 | ||||
-rw-r--r-- | src/crepe/api/Transform.cpp | 5 |
9 files changed, 31 insertions, 11 deletions
diff --git a/src/crepe/ValueBroker.hpp b/src/crepe/ValueBroker.hpp index 927142f..5c3bed9 100644 --- a/src/crepe/ValueBroker.hpp +++ b/src/crepe/ValueBroker.hpp @@ -6,7 +6,8 @@ namespace crepe { template <typename T> ValueBroker<T>::ValueBroker(const setter_t & setter, const getter_t & getter) - : setter(setter), getter(getter) {} + : setter(setter), + getter(getter) {} template <typename T> const T & ValueBroker<T>::get() { diff --git a/src/crepe/api/Animator.cpp b/src/crepe/api/Animator.cpp index 8b396af..58fee2a 100644 --- a/src/crepe/api/Animator.cpp +++ b/src/crepe/api/Animator.cpp @@ -10,7 +10,10 @@ using namespace crepe; Animator::Animator(uint32_t id, Sprite & ss, int row, int col, int col_animator) - : Component(id), spritesheet(ss), row(row), col(col) { + : Component(id), + spritesheet(ss), + row(row), + col(col) { dbg_trace(); animator_rect = spritesheet.sprite_rect; diff --git a/src/crepe/api/Camera.cpp b/src/crepe/api/Camera.cpp index 820a6a8..6355a03 100644 --- a/src/crepe/api/Camera.cpp +++ b/src/crepe/api/Camera.cpp @@ -10,7 +10,8 @@ using namespace crepe; Camera::Camera(uint32_t id, const Color & bg_color) - : Component(id), bg_color(bg_color) { + : Component(id), + bg_color(bg_color) { dbg_trace(); } diff --git a/src/crepe/api/CircleCollider.h b/src/crepe/api/CircleCollider.h index caa7e43..e77a592 100644 --- a/src/crepe/api/CircleCollider.h +++ b/src/crepe/api/CircleCollider.h @@ -6,7 +6,8 @@ namespace crepe { class CircleCollider : public Collider { public: CircleCollider(game_object_id_t game_object_id, int radius) - : Collider(game_object_id), radius(radius) {} + : Collider(game_object_id), + radius(radius) {} int radius; }; diff --git a/src/crepe/api/Metadata.cpp b/src/crepe/api/Metadata.cpp index 76f11d7..d421de5 100644 --- a/src/crepe/api/Metadata.cpp +++ b/src/crepe/api/Metadata.cpp @@ -4,4 +4,6 @@ using namespace crepe; using namespace std; Metadata::Metadata(game_object_id_t id, const string & name, const string & tag) - : Component(id), name(name), tag(tag) {} + : Component(id), + name(name), + tag(tag) {} diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp index 3b2e2f2..0bc2197 100644 --- a/src/crepe/api/ParticleEmitter.cpp +++ b/src/crepe/api/ParticleEmitter.cpp @@ -11,9 +11,14 @@ ParticleEmitter::ParticleEmitter(game_object_id_t id, uint32_t max_particles, uint32_t speed_offset, uint32_t angle, uint32_t angleOffset, float begin_lifespan, float end_lifespan) - : Component(id), max_particles(max_particles), emission_rate(emission_rate), - speed(speed), speed_offset(speed_offset), position{0, 0}, - begin_lifespan(begin_lifespan), end_lifespan(end_lifespan) { + : Component(id), + max_particles(max_particles), + emission_rate(emission_rate), + speed(speed), + speed_offset(speed_offset), + position{0, 0}, + begin_lifespan(begin_lifespan), + end_lifespan(end_lifespan) { std::srand( static_cast<uint32_t>(std::time(nullptr))); // initialize random seed std::cout << "Create emitter" << std::endl; diff --git a/src/crepe/api/Rigidbody.cpp b/src/crepe/api/Rigidbody.cpp index cbf1325..3bf1c5b 100644 --- a/src/crepe/api/Rigidbody.cpp +++ b/src/crepe/api/Rigidbody.cpp @@ -3,7 +3,8 @@ using namespace crepe; crepe::Rigidbody::Rigidbody(uint32_t game_object_id, const Data & data) - : Component(game_object_id), data(data) {} + : Component(game_object_id), + data(data) {} void crepe::Rigidbody::add_force_linear(const Vector2 & force) { this->data.linear_velocity += force; diff --git a/src/crepe/api/Sprite.cpp b/src/crepe/api/Sprite.cpp index f9cd761..6f0433f 100644 --- a/src/crepe/api/Sprite.cpp +++ b/src/crepe/api/Sprite.cpp @@ -12,7 +12,10 @@ using namespace crepe; Sprite::Sprite(game_object_id_t id, const shared_ptr<Texture> image, const Color & color, const FlipSettings & flip) - : Component(id), color(color), flip(flip), sprite_image(image) { + : Component(id), + color(color), + flip(flip), + sprite_image(image) { dbg_trace(); this->sprite_rect.w = sprite_image->get_width(); diff --git a/src/crepe/api/Transform.cpp b/src/crepe/api/Transform.cpp index a244bc5..e401120 100644 --- a/src/crepe/api/Transform.cpp +++ b/src/crepe/api/Transform.cpp @@ -6,6 +6,9 @@ using namespace crepe; Transform::Transform(game_object_id_t id, const Vector2 & point, double rotation, double scale) - : Component(id), position(point), rotation(rotation), scale(scale) { + : Component(id), + position(point), + rotation(rotation), + scale(scale) { dbg_trace(); } |