diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2023-10-21 15:59:54 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2023-10-21 21:57:47 +0530 |
commit | 6f5020bb6c198e475982e207179605b314b1afbe (patch) | |
tree | d1350c1f423c56ed034ec5e66ba46ac8c4b20833 /src/platform.hpp | |
parent | 6b9606398e8f466dc3f0aa60596a3a574f7af57e (diff) |
Initial code
Diffstat (limited to 'src/platform.hpp')
-rw-r--r-- | src/platform.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/platform.hpp b/src/platform.hpp new file mode 100644 index 0000000..55b91df --- /dev/null +++ b/src/platform.hpp @@ -0,0 +1,24 @@ +#ifndef PLATFORM_HPP_ +#define PLATFORM_HPP_ + +#include <cstdint> +#include <SDL.h> + +class Platform { + public: + Platform( + const char* title, int windowWidth, int windowHeight, int textureWidth, int textureHeight + ); + ~Platform(); + + public: + void Update(const void* buffer, int pitch); + bool ProcessInput(uint8_t* keys); + + private: + SDL_Window* window {}; + SDL_Renderer* renderer {}; + SDL_Texture* texture {}; +}; + +#endif |