-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.h
61 lines (40 loc) · 1.32 KB
/
game.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// Created by pazuzu on 14/04/19.
//
#ifndef CHIP8_GAME_H
#define CHIP8_GAME_H
#include "chip8.h"
#include "debugger.h"
#include <SFML/Graphics.hpp>
#define LIGHT_YELLOW sf::Color(252, 202, 0)
#define DARK_YELLOW sf::Color(176, 91, 0)
#define YELLOW_BG sf::Color(59, 36, 11)
#define LIGHT_GB sf::Color(97, 125, 106)
#define DARK_GB sf::Color(23, 23, 23)
#define GB_BG sf::Color(39, 51, 43)
#define LIGHT sf::Color(36, 36, 36)
#define DARK sf::Color(240, 240, 240)
#define LIGHT_BG sf::Color(24, 24, 24)
class Game {
private:
Chip8 *chip8;
sf::RenderWindow *window;
sf::RectangleShape *wRect, *bRect;
Debugger *debugger;
void handleChip8Input(sf::Event event);
public:
Game()
{
chip8 = new Chip8();
window = new sf::RenderWindow(sf::VideoMode(680, 640), "CHIP8");
// window->setFramerateLimit(60);
wRect = new sf::RectangleShape(sf::Vector2f(10, 10));
bRect = new sf::RectangleShape(sf::Vector2f(10, 10));
wRect->setFillColor(sf::Color(LIGHT_YELLOW));
bRect->setFillColor(sf::Color(DARK_YELLOW));
}
void loadGame();
void run();
void updateScreen();
};
#endif //CHIP8_GAME_H