diff options
| author | kotorifan <kotorifan05@gmail.com> | 2026-01-23 15:15:48 +0100 |
|---|---|---|
| committer | kotorifan <kotorifan05@gmail.com> | 2026-02-04 09:02:16 +0100 |
| commit | 32837712fedf4557ff44df7d5b8ddbd40c5f7990 (patch) | |
| tree | 671d2b82f45d5e6de70ac5d15f59ea94b884d4b6 /src/SDL_stuff.hpp | |
| download | gameboy-32837712fedf4557ff44df7d5b8ddbd40c5f7990.tar.gz | |
Stupid problems with the old git repo. New one, unfortunately.
Diffstat (limited to 'src/SDL_stuff.hpp')
| -rw-r--r-- | src/SDL_stuff.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
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 <SDL2/SDL.h> +#include <SDL2/SDL_ttf.h> + +#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}; + }; +} |
