From cb7af3f4cac90f95926477b4001f9f80037568d5 Mon Sep 17 00:00:00 2001 From: Jun Zhang Date: Sun, 30 Jan 2022 12:30:02 +0800 Subject: refactor: adjust the project infra. (#1) * refactor: adjust the project infra. This patch adds cmake build system to the project, and adjust infrastructure stuff. Signed-off-by: Jun Zhang * fix: remove compiler flags that only exist in GCC. Signed-off-by: Jun Zhang --- window.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 window.h (limited to 'window.h') diff --git a/window.h b/window.h deleted file mode 100644 index bdd1e91..0000000 --- a/window.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include - -class Bitmap; - -struct SDL_Window; -struct SDL_Renderer; -struct SDL_Texture; - -class Window { -public: - Window(const char* title, int width, int height, int scale); - ~Window(); - - void update(); - void draw(Bitmap&); - - bool shouldClose() { return !m_isRunning; } - - void onMouseDown(std::function callback) { m_mouseDown = callback; } - void onMouseUp(std::function callback) { m_mouseUp = callback; } - void onMouseMove(std::function callback) { m_mouseMove = callback; } -private: - bool m_isRunning; - - int m_width, m_height, m_scale; - - SDL_Window* m_window; - SDL_Renderer* m_renderer; - SDL_Texture* m_texture; - - std::function m_mouseDown; - std::function m_mouseUp; - std::function m_mouseMove; -}; \ No newline at end of file -- cgit v1.2.3