20 lines
359 B
C
20 lines
359 B
C
|
#ifndef CHIP8_DISPLAY_H
|
||
|
#define CHIP8_DISPLAY_H
|
||
|
|
||
|
#define STATE_ON 1
|
||
|
#define STATE_OFF 0
|
||
|
|
||
|
#include <SDL2/SDL.h>
|
||
|
#include "chip8.h"
|
||
|
|
||
|
class Display {
|
||
|
private:
|
||
|
bool flagRedraw = false;
|
||
|
bool display[64 * 32] = {};
|
||
|
public:
|
||
|
void draw(SDL_Renderer*, const Chip8&);
|
||
|
[[nodiscard]] bool needsRedraw() const;
|
||
|
void clear();
|
||
|
};
|
||
|
#endif //CHIP8_DISPLAY_H
|