blob: 922dd59f5ae48111f689615b170082b10fa5363c (
plain)
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
|
#ifndef COMMON_H
#define COMMON_H
///THIS FILE IS USED FOR VARIABLES THAT WILL BE ACCESED BY MULTIPLE CLASSES/FILES
#include <iostream>
#include <vector>
#include <cstdlib>
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <SDL2/SDL_opengl.h>
typedef struct { float x; float y; } vec2;
enum _TYPE {STRUCTURET = -1, PLAYERT = 0, NPCT = 1};
#include <entities.h>
#define SCREEN_WIDTH 1280
#define SCREEN_HEIGHT 720
//#define FULLSCREEN
#define HLINE 3
#define initRand(s) srand(s)
#define getRand() rand()
template<typename T, size_t N>
int eAmt(T (&)[N]){return N;}
//SDL VARIABLES
extern SDL_Window *window;
extern SDL_Surface *renderSurface;
extern SDL_GLContext mainGLContext;
extern bool gameRunning;
#endif // COMMON_H
|