From da3df061699203eccc9a0c98becaee3ce8050a4f Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Mon, 5 Feb 2018 11:51:24 -0500 Subject: Whitespace changes --- src/systems/controlling.cpp | 12 ++++++------ src/systems/controlling.h | 6 +++--- src/systems/pondering.cpp | 6 +++--- src/systems/pondering.h | 2 +- src/systems/rendering.h | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'src/systems') diff --git a/src/systems/controlling.cpp b/src/systems/controlling.cpp index b1e73ad..456da3b 100644 --- a/src/systems/controlling.cpp +++ b/src/systems/controlling.cpp @@ -14,12 +14,12 @@ void ControllingSystem::tick(double dt) { int key = actions.front().first; int action = actions.front().second; - + auto entities = game.getEntityManager().getEntitiesWithComponents(); for (auto entity : entities) { auto& controllable = game.getEntityManager().getComponent(entity); - + if (action == GLFW_PRESS) { if (key == controllable.getLeftKey()) @@ -33,7 +33,7 @@ void ControllingSystem::tick(double dt) } else if (key == controllable.getRightKey()) { controllable.setHoldingRight(true); - + if (!controllable.isFrozen()) { walkRight(entity); @@ -56,7 +56,7 @@ void ControllingSystem::tick(double dt) if (key == controllable.getLeftKey()) { controllable.setHoldingLeft(false); - + if (!controllable.isFrozen()) { if (controllable.isHoldingRight()) @@ -69,7 +69,7 @@ void ControllingSystem::tick(double dt) } else if (key == controllable.getRightKey()) { controllable.setHoldingRight(false); - + if (!controllable.isFrozen()) { if (controllable.isHoldingRight()) @@ -94,7 +94,7 @@ void ControllingSystem::tick(double dt) } } } - + actions.pop(); } } diff --git a/src/systems/controlling.h b/src/systems/controlling.h index 61f86eb..30210b3 100644 --- a/src/systems/controlling.h +++ b/src/systems/controlling.h @@ -8,10 +8,10 @@ class ControllingSystem : public System { public: ControllingSystem(Game& game) : System(game) {} - + void tick(double dt); void input(int key, int action); - + private: void walkLeft(int entity); void walkRight(int entity); @@ -19,7 +19,7 @@ class ControllingSystem : public System { void jump(int entity); void stopJumping(int entity); void drop(int entity, bool start); - + std::queue> actions; }; diff --git a/src/systems/pondering.cpp b/src/systems/pondering.cpp index 96775d0..50a8bc8 100644 --- a/src/systems/pondering.cpp +++ b/src/systems/pondering.cpp @@ -6,16 +6,16 @@ void PonderingSystem::tick(double dt) { auto entities = game.getEntityManager().getEntitiesWithComponents(); - + for (auto entity : entities) { auto& transformable = game.getEntityManager().getComponent(entity); auto& ponderable = game.getEntityManager().getComponent(entity); - + // Accelerate ponderable.setVelocityX(ponderable.getVelocityX() + ponderable.getAccelX() * dt); ponderable.setVelocityY(ponderable.getVelocityY() + ponderable.getAccelY() * dt); - + // Move transformable.setX(transformable.getX() + ponderable.getVelocityX() * dt); transformable.setY(transformable.getY() + ponderable.getVelocityY() * dt); diff --git a/src/systems/pondering.h b/src/systems/pondering.h index ad01a22..3fe5473 100644 --- a/src/systems/pondering.h +++ b/src/systems/pondering.h @@ -7,7 +7,7 @@ class PonderingSystem : public System { public: PonderingSystem(Game& game) : System(game) {} - + void tick(double dt); }; diff --git a/src/systems/rendering.h b/src/systems/rendering.h index 9b6e27e..cec72e2 100644 --- a/src/systems/rendering.h +++ b/src/systems/rendering.h @@ -9,9 +9,9 @@ class RenderingSystem : public System { public: RenderingSystem(Game& game) : System(game) {} - + void tick(double dt); - + private: Texture texture {GAME_WIDTH, GAME_HEIGHT}; }; -- cgit 1.4.1