From ca091e358a8b02423ba304bfca055712b3a70881 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 21 Jan 2019 04:48:02 +0100 Subject: Add basic window wrapper --- include/input.hpp | 0 include/video.hpp | 29 +++++++++++++++++++++++++++++ include/wrapsdl.hpp | 6 ------ include/wrapsdl2.hpp | 9 +++++++++ 4 files changed, 38 insertions(+), 6 deletions(-) create mode 100644 include/input.hpp create mode 100644 include/video.hpp delete mode 100644 include/wrapsdl.hpp create mode 100644 include/wrapsdl2.hpp (limited to 'include') diff --git a/include/input.hpp b/include/input.hpp new file mode 100644 index 0000000..e69de29 diff --git a/include/video.hpp b/include/video.hpp new file mode 100644 index 0000000..1b6e022 --- /dev/null +++ b/include/video.hpp @@ -0,0 +1,29 @@ +#pragma once + +#include + +class SDL_Window; +class SDL_Surface; + +namespace wrapsdl2 { + class window { + public: + window() = delete; + window(const window& other) = delete; + + window(const std::string& title, std::size_t width, std::size_t height); + ~window(); + + // manipulation + void show(); + void hide(); + void raise(); + + // rendering + void update(); + + private: + SDL_Window *m_window; + SDL_Surface *m_surface; + }; +} \ No newline at end of file diff --git a/include/wrapsdl.hpp b/include/wrapsdl.hpp deleted file mode 100644 index 9b9a72c..0000000 --- a/include/wrapsdl.hpp +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -namespace wrapsdl { - bool initialize(void); - void quit(void); -} \ No newline at end of file diff --git a/include/wrapsdl2.hpp b/include/wrapsdl2.hpp new file mode 100644 index 0000000..993a704 --- /dev/null +++ b/include/wrapsdl2.hpp @@ -0,0 +1,9 @@ +#pragma once + +namespace wrapsdl2 { + bool initialize(void); + void quit(void); + + // tool functions + void delay() +} \ No newline at end of file -- cgit v1.2.1