2023-09-09 17:57:57 +00:00
|
|
|
#ifndef CHIP8_DISPLAY_H
|
|
|
|
#define CHIP8_DISPLAY_H
|
|
|
|
|
|
|
|
#define STATE_ON 1
|
|
|
|
#define STATE_OFF 0
|
|
|
|
|
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
|
|
|
|
class Display {
|
|
|
|
private:
|
|
|
|
bool flagRedraw = false;
|
|
|
|
bool display[64 * 32] = {};
|
|
|
|
public:
|
2023-09-09 18:20:10 +00:00
|
|
|
void draw(SDL_Renderer*);
|
2023-09-09 17:57:57 +00:00
|
|
|
[[nodiscard]] bool needsRedraw() const;
|
|
|
|
void clear();
|
|
|
|
};
|
|
|
|
#endif //CHIP8_DISPLAY_H
|