summaryrefslogtreecommitdiff
path: root/ui/window.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-01-02 20:28:24 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-01-02 20:28:24 +0000
commit4bf6b8dad9923d6f3687e8ced72a4eda6a56220d (patch)
treea3110d4f7dafae89ace66c5812a77330da53160a /ui/window.h
parentReplace include guard macros with pragma once (diff)
downloadilt-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.h6
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;