Added screen base class
This commit is contained in:
parent
65e5993ee4
commit
bc2876d1b5
3 changed files with 38 additions and 1 deletions
19
include/Screen.hpp
Normal file
19
include/Screen.hpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
struct SDL_Renderer;
|
||||
struct SDL_Texture;
|
||||
struct SDL_Rect { int x, y, w, h };
|
||||
|
||||
class Screen
|
||||
{
|
||||
public:
|
||||
Screen(SDL_Renderer* renderer, int x, int y, int w, int h);
|
||||
~Screen();
|
||||
|
||||
virtual void Update() = 0;
|
||||
virtual void Render(SDL_Renderer* renderer) = 0;
|
||||
|
||||
protected:
|
||||
SDL_Rect screenSpace;
|
||||
SDL_Texture* texture;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue