diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 19:52:11 +0100 | 
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 19:52:11 +0100 | 
| commit | be1e97bc7a494963ab1567492fafcda99e36f683 (patch) | |
| tree | 6b9e34e5e297f55dda44b157d4d33a0bf83bffba /src | |
| parent | 9a95e6cb2c1f1255643d1b8996cd8eeb108c6f8c (diff) | |
`make format`
Diffstat (limited to 'src')
| -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 | ||||
| -rw-r--r-- | src/example/rendering.cpp | 4 | 
7 files changed, 15 insertions, 10 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. 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<Sprite>(make_shared<Texture>("../asset/texture/second.png"), color, FlipSettings{true, true}); +		obj1.add_component<Sprite>( +			make_shared<Texture>("../asset/texture/second.png"), color, +			FlipSettings{true, true});  	}  	/*  |