diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-03-21 02:19:32 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-03-21 02:19:32 +0100 |
| commit | 166c06083212a5657fcaf03328bf530f9eb8b0d8 (patch) | |
| tree | 0f8539f2bf0647412e6988550a34e89423e0e49d /include | |
| download | mario_sokoban-166c06083212a5657fcaf03328bf530f9eb8b0d8.tar.gz mario_sokoban-166c06083212a5657fcaf03328bf530f9eb8b0d8.tar.bz2 mario_sokoban-166c06083212a5657fcaf03328bf530f9eb8b0d8.zip | |
Initial commit
Diffstat (limited to 'include')
| -rw-r--r-- | include/game.hpp | 11 | ||||
| -rw-r--r-- | include/graphics.hpp | 32 |
2 files changed, 43 insertions, 0 deletions
diff --git a/include/game.hpp b/include/game.hpp new file mode 100644 index 0000000..017d21b --- /dev/null +++ b/include/game.hpp @@ -0,0 +1,11 @@ +#ifndef GAME_HPP +# define GAME_HPP + +class Game +{ +public: + Game(); + +}; + +#endif diff --git a/include/graphics.hpp b/include/graphics.hpp new file mode 100644 index 0000000..ef0c813 --- /dev/null +++ b/include/graphics.hpp @@ -0,0 +1,32 @@ +#ifndef GRAPHICS_HPP +# define GRAPHICS_HPP + +#include <iostream> +#include <string> +#include <SDL2/SDL.h> +#include "game.hpp" + +class Graphics +{ + public: + Graphics(Game &game, std::string title, int width, int height); + ~Graphics(); + + void update(); + bool isRunning() const; + + private: + bool m_running; + Game &m_game; + std::string m_title; + int m_width; + int m_height; + SDL_Renderer *m_renderer; + SDL_Window *m_window; + + void drawGame(); + void handleEvent(); + void error() const; +}; + +#endif |
