-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.hpp
39 lines (32 loc) · 781 Bytes
/
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
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_mixer.h>
#include <stdio.h>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <time.h>
#include "Drawing.hpp"
using namespace std;
class Game{
//Screen dimension constants
const int SCREEN_WIDTH = 1500;
const int SCREEN_HEIGHT = 810;
string img = "./assets/smthng.gif";
Mix_Music* gMusic = NULL;
//The window we'll be rendering to
SDL_Window* gWindow = NULL;
//Current displayed texture
SDL_Texture* gTexture = NULL;
int mWidth = 0;
int mHeight = 0;
public:
bool init();
bool loadMedia();
void close();
SDL_Texture* loadTexture( std::string path );
void run();
void render(int x, int y);
int getWidth();
int getHeight();
};