diff options
Diffstat (limited to 'src/crepe')
-rw-r--r-- | src/crepe/Particle.cpp | 4 | ||||
-rw-r--r-- | src/crepe/Particle.h | 4 | ||||
-rw-r--r-- | src/crepe/api/AssetManager.h | 3 | ||||
-rw-r--r-- | src/crepe/api/ParticleEmitter.cpp | 6 | ||||
-rw-r--r-- | src/crepe/facade/SDLContext.cpp | 2 | ||||
-rw-r--r-- | src/crepe/system/ParticleSystem.h | 2 |
6 files changed, 12 insertions, 9 deletions
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 <typename T> - std::shared_ptr<T> cache(const std::string & file_path, bool reload = false); + std::shared_ptr<T> 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<SDL_Surface, std::function<void(SDL_Surface *)>> 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. |