-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgame.hpp
52 lines (44 loc) · 1.26 KB
/
game.hpp
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
#include <SDL.h>
#include <SDL_image.h>
#include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <time.h>
#include <SDL_mixer.h>
#include "Objects.hpp"
#include "drawing.hpp"
#include "platform.hpp"
class Game
{
public:
bool init();
bool loadMedia();
void close();
SDL_Texture *loadTexture(std::string path);
void run();
// void updateState();
void changeMusic(const std::string& musicPath);
void LoadMusic(const std::string& musicPath);
private:
// Screen dimension constants
const int SCREEN_WIDTH = 1000;
const int SCREEN_HEIGHT = 600;
int frameCounter;
// The window we'll be rendering to
SDL_Window *gWindow = NULL;
Objects obj;
// Current displayed texture
SDL_Texture *gTexture = NULL;
SDL_Texture *mainMenuImage = NULL;
SDL_Texture *GameoverImage = NULL;
// enum that contain the states of the game
// till now implemented initial and game states
enum GameState
{
MENU,
PLAY,
FINAL
};
GameState currentState; //enum object
};