aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/body.cpp10
-rw-r--r--src/inputmanager.cpp10
-rw-r--r--src/particlebody.cpp5
-rw-r--r--src/spritebatch.cpp5
-rw-r--r--src/window.cpp5
5 files changed, 28 insertions, 7 deletions
diff --git a/src/body.cpp b/src/body.cpp
index 96d01c22..036059a3 100644
--- a/src/body.cpp
+++ b/src/body.cpp
@@ -15,9 +15,15 @@ namespace yage
const double Body::GRAVITY = -9.81;
-double Body::xPosition() const { return position_[0]; }
+double Body::xPosition() const
+{
+ return position_[0];
+}
-double Body::yPosition() const { return position_[1]; }
+double Body::yPosition() const
+{
+ return position_[1];
+}
Body::Body(Vector2d position, double mass, Vector2d velocity, bool gravity)
: position_(std::move(position)), mass_(mass),
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp
index cbb9d2df..1595dba0 100644
--- a/src/inputmanager.cpp
+++ b/src/inputmanager.cpp
@@ -11,9 +11,15 @@
namespace yage
{
-void InputManager::keyPressed(unsigned key) { key_map_[key] = true; }
+void InputManager::keyPressed(unsigned key)
+{
+ key_map_[key] = true;
+}
-void InputManager::keyReleased(unsigned key) { key_map_[key] = false; }
+void InputManager::keyReleased(unsigned key)
+{
+ key_map_[key] = false;
+}
bool InputManager::isKeyPressed(unsigned key) const
{
diff --git a/src/particlebody.cpp b/src/particlebody.cpp
index 20682368..3eea4183 100644
--- a/src/particlebody.cpp
+++ b/src/particlebody.cpp
@@ -20,7 +20,10 @@ ParticleBody::ParticleBody(const Vector2d &position, double mass,
{
}
-void ParticleBody::applyForce(const Vector2d &force) { force_ += force; }
+void ParticleBody::applyForce(const Vector2d &force)
+{
+ force_ += force;
+}
void ParticleBody::update()
{
diff --git a/src/spritebatch.cpp b/src/spritebatch.cpp
index efca0b8d..4d4f1b19 100644
--- a/src/spritebatch.cpp
+++ b/src/spritebatch.cpp
@@ -43,7 +43,10 @@ SpriteBatch::~SpriteBatch()
}
}
-void SpriteBatch::init() { createVertexArray(); }
+void SpriteBatch::init()
+{
+ createVertexArray();
+}
void SpriteBatch::begin()
{
diff --git a/src/window.cpp b/src/window.cpp
index 14671bf9..6eca459d 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -18,7 +18,10 @@ namespace yage
Window::Window() = default;
-Window::~Window() { SDL_DestroyWindow(window_); }
+Window::~Window()
+{
+ SDL_DestroyWindow(window_);
+}
void Window::create(const std::string &window_name, int width, int height,
unsigned flags)