diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-01-02 20:28:24 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-01-02 20:28:24 +0000 |
commit | 4bf6b8dad9923d6f3687e8ced72a4eda6a56220d (patch) | |
tree | a3110d4f7dafae89ace66c5812a77330da53160a /ui/window.h | |
parent | Replace include guard macros with pragma once (diff) | |
download | ilt-4bf6b8dad9923d6f3687e8ced72a4eda6a56220d.tar.bz2 ilt-4bf6b8dad9923d6f3687e8ced72a4eda6a56220d.tar.xz ilt-4bf6b8dad9923d6f3687e8ced72a4eda6a56220d.zip |
No need to pass GameState around, it has a global pointer
Diffstat (limited to 'ui/window.h')
-rw-r--r-- | ui/window.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ui/window.h b/ui/window.h index 49cdf45..b6ade60 100644 --- a/ui/window.h +++ b/ui/window.h @@ -10,8 +10,6 @@ #include <special_members.hpp>
#include <string>
-class GameState;
-
class Window {
public:
Window(size_t width, size_t height, const std::string & title);
@@ -21,7 +19,7 @@ public: NO_MOVE(Window);
virtual void tick(TickDuration elapsed) = 0;
- void refresh(const GameState *) const;
+ void refresh() const;
bool handleInput(const SDL_Event & e);
void clear(float r, float g, float b, float a) const;
@@ -29,7 +27,7 @@ public: protected:
[[nodiscard]] SDL_GLContext glContext() const;
- virtual void render(const GameState *) const;
+ virtual void render() const;
using SDL_WindowPtr = wrapped_ptrt<SDL_Window, SDL_CreateWindow, SDL_DestroyWindow>;
SDL_WindowPtr m_window;
|