From 9a95e6cb2c1f1255643d1b8996cd8eeb108c6f8c Mon Sep 17 00:00:00 2001 From: JAROWMR Date: Wed, 13 Nov 2024 19:24:32 +0100 Subject: fixed issues --- src/crepe/api/ParticleEmitter.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/crepe/api/ParticleEmitter.cpp') diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp index 7032f9e..43d2e69 100644 --- a/src/crepe/api/ParticleEmitter.cpp +++ b/src/crepe/api/ParticleEmitter.cpp @@ -1,5 +1,4 @@ #include "ParticleEmitter.h" -#include "Particle.h" using namespace crepe; -- cgit v1.2.3 From be1e97bc7a494963ab1567492fafcda99e36f683 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 13 Nov 2024 19:52:11 +0100 Subject: `make format` --- src/crepe/Particle.cpp | 4 ++-- src/crepe/Particle.h | 4 ++-- src/crepe/api/AssetManager.h | 3 ++- src/crepe/api/ParticleEmitter.cpp | 6 ++++-- src/crepe/facade/SDLContext.cpp | 2 +- src/crepe/system/ParticleSystem.h | 2 +- src/example/rendering.cpp | 4 +++- 7 files changed, 15 insertions(+), 10 deletions(-) (limited to 'src/crepe/api/ParticleEmitter.cpp') diff --git a/src/crepe/Particle.cpp b/src/crepe/Particle.cpp index 1c3c138..582edf4 100644 --- a/src/crepe/Particle.cpp +++ b/src/crepe/Particle.cpp @@ -2,8 +2,8 @@ using namespace crepe; -void Particle::reset(uint32_t lifespan, const Vector2& position,const Vector2& velocity, - double angle) { +void Particle::reset(uint32_t lifespan, const Vector2 & position, + const Vector2 & velocity, double angle) { // Initialize the particle state this->time_in_life = 0; this->lifespan = lifespan; diff --git a/src/crepe/Particle.h b/src/crepe/Particle.h index 8782382..3eaebc3 100644 --- a/src/crepe/Particle.h +++ b/src/crepe/Particle.h @@ -43,8 +43,8 @@ public: * \param velocity The initial velocity of the particle. * \param angle The angle of the particle's trajectory or orientation. */ - void reset(uint32_t lifespan, const Vector2& position,const Vector2& velocity, - double angle); + void reset(uint32_t lifespan, const Vector2 & position, + const Vector2 & velocity, double angle); /** * \brief Updates the particle's state. * diff --git a/src/crepe/api/AssetManager.h b/src/crepe/api/AssetManager.h index dbfaef3..86a9902 100644 --- a/src/crepe/api/AssetManager.h +++ b/src/crepe/api/AssetManager.h @@ -56,7 +56,8 @@ public: * cache. */ template - std::shared_ptr cache(const std::string & file_path, bool reload = false); + std::shared_ptr cache(const std::string & file_path, + bool reload = false); }; } // namespace crepe diff --git a/src/crepe/api/ParticleEmitter.cpp b/src/crepe/api/ParticleEmitter.cpp index 43d2e69..35f960d 100644 --- a/src/crepe/api/ParticleEmitter.cpp +++ b/src/crepe/api/ParticleEmitter.cpp @@ -2,8 +2,10 @@ using namespace crepe; -ParticleEmitter::ParticleEmitter(game_object_id_t game_object_id, const Data & data) - : Component(game_object_id), data(data) { +ParticleEmitter::ParticleEmitter(game_object_id_t game_object_id, + const Data & data) + : Component(game_object_id), + data(data) { for (size_t i = 0; i < this->data.max_particles; i++) { this->data.particles.emplace_back(); } diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index 46230b4..236bf8c 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -159,7 +159,7 @@ SDLContext::texture_from_path(const std::string & path) { SDL_Surface * tmp = IMG_Load(path.c_str()); if (tmp == nullptr) { - tmp = IMG_Load("../asset/texture/ERROR.png"); + tmp = IMG_Load("../asset/texture/ERROR.png"); } std::unique_ptr> diff --git a/src/crepe/system/ParticleSystem.h b/src/crepe/system/ParticleSystem.h index 664394e..d7ca148 100644 --- a/src/crepe/system/ParticleSystem.h +++ b/src/crepe/system/ParticleSystem.h @@ -10,7 +10,7 @@ class Transform; /** * \brief ParticleSystem class responsible for managing particle emission, updates, and bounds checking. */ -class ParticleSystem : public System{ +class ParticleSystem : public System { public: /** * \brief Updates all particle emitters by emitting particles, updating particle states, and checking bounds. diff --git a/src/example/rendering.cpp b/src/example/rendering.cpp index e02f6a3..827ad07 100644 --- a/src/example/rendering.cpp +++ b/src/example/rendering.cpp @@ -34,7 +34,9 @@ int main() { } { Color color(0, 0, 0, 0); - obj1.add_component(make_shared("../asset/texture/second.png"), color, FlipSettings{true, true}); + obj1.add_component( + make_shared("../asset/texture/second.png"), color, + FlipSettings{true, true}); } /* -- cgit v1.2.3