-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.h
31 lines (26 loc) · 843 Bytes
/
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
//wip separate handling
class RendererBase{
public:
void initVideo(int window_width, int window_height);
void initColors(SDL_Surface* gScreen);
void clearScreen();
void drawMainMenu();
void drawAlleys();
void present(); //for swapping buffers with opengl
void cleanup(SDL_Window* gWindow);
private:
SDL_Window* gWindow = NULL; // Renderer should manage this window
};
class Game{
public:
void run(); // this function should include initSystems and the main loop inside, thus only requiring the function to be called from main.cpp
private:
void initSystems(); // init subsystems like renderer, audio etc.
void cap_framerate(Uint32 starting_tick);
void cleanupSystems(WindowDimensions dims);
};
class Audio{
public:
void initMixer();
void cleanup(Mix_Chunk* bell, Mix_Music* bgm);
};