aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-25 11:48:39 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-25 11:48:39 +0100
commit48015cd425b26eb68eb07f4e4b1adf71e81e11b1 (patch)
tree95725bd476cf92c5749e27c44c5134902dedfc66 /src/crepe/facade/SDLContext.h
parentea7d7ec301968f3a542de93f487f9501b70c0cd4 (diff)
make format
Diffstat (limited to 'src/crepe/facade/SDLContext.h')
-rw-r--r--src/crepe/facade/SDLContext.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h
index 1b881d1..7ec11fd 100644
--- a/src/crepe/facade/SDLContext.h
+++ b/src/crepe/facade/SDLContext.h
@@ -6,15 +6,15 @@
#include <SDL2/SDL_video.h>
#include <cmath>
#include <functional>
-#include <utility>
#include <memory>
#include <string>
+#include <utility>
-#include "../api/Sprite.h"
+#include "../api/Event.h"
#include "../api/KeyCodes.h"
+#include "../api/Sprite.h"
#include "../api/Transform.h"
#include "../api/Vector2.h"
-#include "../api/Event.h"
#include "api/Camera.h"
#include "types.h"
@@ -36,7 +36,7 @@ class InputSystem;
class SDLContext {
public:
- enum Event{
+ enum Event {
NONE = 0,
MOUSEDOWN,
MOUSEUP,
@@ -52,9 +52,9 @@ public:
Keycode key = Keycode::NONE;
bool key_repeat = false;
MouseButton mouse_button = MouseButton::NONE;
- std::pair<int,int> mouse_position = {-1,-1};
+ std::pair<int, int> mouse_position = {-1, -1};
int wheel_delta = -1;
- std::pair<int,int> rel_mouse_move = {-1,-1};
+ std::pair<int, int> rel_mouse_move = {-1, -1};
};
/**
* \brief Gets the singleton instance of SDLContext.
@@ -75,11 +75,12 @@ private:
* \param running Reference to a boolean flag that controls the main loop.
*/
std::vector<SDLContext::EventData> get_events();
-
+
Keycode get_key();
Keycode get_mouse();
Keycode sdl_to_keycode(SDL_Keycode sdlKey);
MouseButton sdl_to_mousebutton(Uint8 sdl_button);
+
private:
//! Will only use get_ticks
friend class AnimatorSystem;
@@ -197,5 +198,4 @@ private:
SDL_Rect viewport = {0, 0, 640, 480};
};
-
} // namespace crepe