-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gameboy.h
37 lines (31 loc) · 965 Bytes
/
Gameboy.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
#pragma once
#ifndef GAMEBOY_H
#define GAMEBOY_H
#include <SDL2/SDL.h> /* All SDL App's need this */
#include <SDL2/SDL_opengl.h>
#include "Emulator.h"
class Gameboy{
private:
static Gameboy* GameboyInstancePtr;
static Emulator* EmulatorInstancePtr;
//Constructor when creating the Gameboy
Gameboy();
public:
static SDL_Window* gWindow;
//Used to prevent copying
Gameboy(const Gameboy &_GameboyInstancePtr) = delete;
//Used when deleting the gameboy instance
~Gameboy();
static Gameboy* createGameBoyInstance();
static Gameboy* getGameBoyInstance();
void startGameboySimulation();
void renderGame();
void checkFPS();
bool initSDL();
bool initGL();
void handleInput(SDL_Event &event);
void setKeyPressed(int keyPressed);
void setKeyReleased(int keyReleased);
void renderGameboy();
};
#endif