From 2e3d5d7aac3234b579469c51a5f6c912a9a25130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Sat, 12 Mar 2016 14:15:27 +0100 Subject: [PATCH] Correction du style de code --- ball.cpp | 11 +++++------ ball.hpp | 2 +- block.cpp | 13 +++++-------- block.hpp | 2 +- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/ball.cpp b/ball.cpp index 8abcc56..ad053a6 100644 --- a/ball.cpp +++ b/ball.cpp @@ -1,13 +1,12 @@ #include "ball.hpp" void Ball::draw(sf::RenderWindow& window) { - - //chargement de la texture de test - if (!texture.loadFromFile("./Images/texture_test.jpeg")) - { - //erreur + // chargement de la texture de test + if (!texture.loadFromFile("./Images/texture_test.jpeg")) { + // erreur } - shape.setTexture(&texture); + + shape.setTexture(&texture); shape.setPosition(position); window.draw(shape); diff --git a/ball.hpp b/ball.hpp index 5abb121..6f11565 100644 --- a/ball.hpp +++ b/ball.hpp @@ -8,7 +8,7 @@ class Ball : public PhysicsObject { protected: - sf::Texture texture; + sf::Texture texture; sf::CircleShape shape; /** diff --git a/block.cpp b/block.cpp index 142771a..d3f335a 100644 --- a/block.cpp +++ b/block.cpp @@ -1,13 +1,12 @@ #include "block.hpp" void Block::draw(sf::RenderWindow& window) { - - //chargement de la texture de test - if (!texture.loadFromFile("./Images/texture_test.jpeg")) - { - //erreur + // chargement de la texture de test + if (!texture.loadFromFile("./Images/texture_test.jpeg")) { + // erreur } - shape.setTexture(&texture); + + shape.setTexture(&texture); if (charge > 0) { shape.setFillColor(sf::Color(0, 0, 255)); @@ -19,8 +18,6 @@ void Block::draw(sf::RenderWindow& window) { shape.setPosition(position); window.draw(shape); - - } void Block::update(State state) { diff --git a/block.hpp b/block.hpp index 35a5de2..f052f62 100644 --- a/block.hpp +++ b/block.hpp @@ -8,7 +8,7 @@ class Block : public Object { protected: - sf::Texture texture; + sf::Texture texture; sf::RectangleShape shape; public: