-
Notifications
You must be signed in to change notification settings - Fork 1
/
Session.h
86 lines (70 loc) · 1.85 KB
/
Session.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef __Session__
#define __Session__
#include "includes.h"
#include "Window.h"
#include "Camera.h"
#include "World.h"
#include "Clicks.h"
#include "Sound.h"
#include "Minigame.h"
#include "Program.h"
#include "ParticleTexture.h"
#include "FontEngine.h"
#include "Object.h"
#define GAME 2
#define MAX_PUNS 11
class Session {
public:
Session();
virtual ~Session();
void run();
Camera* getCamera();
Window* getWindow();
Clicks* getClicks();
Minigame* getMinigame() { return minigame; }
void enterMinigame();
void leaveMinigame();
void mouseClick(glm::vec3 direction, glm::vec4 point);
void mouseMove(double xpos, double ypos, int width, int height);
int getGameState() { return game_state; };
void toggleDrawWorld();
bool gameStarted() { return game_start; }
bool gameEnded() { return minigame->getGameOver(); }
void startMinigame();
private:
Window* window;
Camera* camera;
Clicks* clicks;
Sound* sound;
World* world;
Minigame* minigame;
bool game_start;
float startTime;
float xInc;
int punLine;
//GLuint ShadeProg;
GLint h_aPos;
GLint h_aNor;
GLint h_uP;
GLint h_uV;
GLint h_uM;
GLint h_uView;
GLint h_uAClr, h_uDClr, h_uSClr, h_uS;
GLint h_aTexCoord, h_uTexUnit;
// OpenGL handle to texture data
ParticleTexture texture;
GLint h_texture0;
/** INITIALIZING **/
bool installShaders(Program* prog);
void initGL();
void initFBO();
// Text bluh bluh I'm tired
string getLine();
/** MAIN GAME LOOP **/
void step();
/** MISC **/
void createMinigame(char* type);
};
// contains all shaders mapped to key defined in includes.h
extern map<string, Program*> shaders;
#endif