diff --git a/include/blt/window/window.h b/include/blt/window/window.h index bf09d67..9199fe1 100644 --- a/include/blt/window/window.h +++ b/include/blt/window/window.h @@ -19,16 +19,10 @@ namespace blt { -class window; - -#define WINDOW_MAP BLT_MAP_FUNC - -extern WINDOW_MAP activeWindows; - class window { protected: bool m_windowOpen = true; - int m_width, m_height; + int m_width = 800, m_height = 600; std::vector> renderFunctions{}; std::vector> keyListeners{}; @@ -37,20 +31,15 @@ class window { KEY_MAP keysDown{}; KEY_MAP mouseDown{}; public: - window() { - activeWindows.insert({this, this}); - } + window() = default; window(int width, int height) { - activeWindows.insert({this, this}); m_width = width; m_height = height; } virtual void createWindow() = 0; virtual void startMainLoop() = 0; virtual void destroyWindow() = 0; - virtual ~window() { - activeWindows.insert({this, nullptr}); - }; + virtual ~window() = 0; virtual inline bool setResizeable(bool resizeEnabled) = 0; virtual inline bool setWindowSize(int width, int height) = 0; diff --git a/src/blt/window/window.cpp b/src/blt/window/window.cpp index 14c0517..433ed58 100644 --- a/src/blt/window/window.cpp +++ b/src/blt/window/window.cpp @@ -6,5 +6,5 @@ #include namespace blt { - WINDOW_MAP activeWindows; + } \ No newline at end of file