-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgpu.h
32 lines (27 loc) · 906 Bytes
/
gpu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef GPU_H_INCLUDED
#define GPU_H_INCLUDED
#include <SFML/Graphics.hpp>
#include <string>
class Gpu
{
public:
Gpu(std::string filename);
unsigned char draw(unsigned char x, unsigned char y, unsigned char height, std::vector<unsigned char> sprite);
unsigned char SChipDraw(unsigned char x, unsigned char y, std::vector<unsigned short> sprite);
bool isOpen();
void clear();
unsigned char waitEvent(sf::Event *event);
unsigned short pollEvent(sf::Event *event);
void scrollDown(unsigned char n);
void scrollLeft();
void scrollRight();
void setIsExtended(bool isExtended);
void closeWindow();
bool getIsExtended();
private:
bool isExtended;
unsigned char gfx[128][64];
sf::RectangleShape pixels[128][64];
sf::RenderWindow window;
};
#endif // GPU_H_INCLUDED