From 32837712fedf4557ff44df7d5b8ddbd40c5f7990 Mon Sep 17 00:00:00 2001 From: kotorifan Date: Fri, 23 Jan 2026 15:15:48 +0100 Subject: Stupid problems with the old git repo. New one, unfortunately. --- src/SDL_stuff.hpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/SDL_stuff.hpp (limited to 'src/SDL_stuff.hpp') diff --git a/src/SDL_stuff.hpp b/src/SDL_stuff.hpp new file mode 100644 index 0000000..b7ddf92 --- /dev/null +++ b/src/SDL_stuff.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include +#include + +#include "Common.hpp" + +namespace DMG01 +{ + class Generic_SDL_Window + { + public: + SDL_Window* window; + SDL_Renderer* renderer; + SDL_Event event; + TTF_Font* font; + SDL_Surface* surface; + SDL_Texture* texture; + SDL_Rect rectangle; + Generic_SDL_Window(const uint32_t win_x, const uint32_t win_y); + ~Generic_SDL_Window(); + void create_window(); + void update_text(const char* message); + bool check_polling_event(); + void render_text(); + private: + uint32_t win_x; + uint32_t win_y; + const SDL_Color red = {255, 0, 0, 0}; + const SDL_Color black = {0, 0, 0, 255}; + const SDL_Color white = {255, 255, 255, 255}; + }; +} -- cgit v1.3