-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainGame.h
96 lines (68 loc) · 1.53 KB
/
mainGame.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
87
88
89
90
91
92
93
94
95
96
#pragma once
#include <windows.h>
#include <gl/GL.h>
#include <gl/GLU.h>
#include "GL\freeglut.h"
#include "GLUTCallbacks.h"
#include "imgui.h"
#include "imgui_impl_glut.h"
#include "imgui_impl_opengl2.h"
#ifndef _Texture2D
#include "Texture2D.h"
#endif
#ifndef _Cube
#include "Cube.h"
#endif
#ifndef _Pyramid
#include "pyramid.h"
#endif
#ifndef _MeshLoader
#include "MeshLoader.h"
#endif
#ifndef _SceneObject
#include "SceneObject.h"
#endif
#ifndef _hStructs
#include "Structures.h"
#endif
#ifndef _hhighScores
#include "highScores.h"
#endif
#include <vector>
#define REFRESHRATE 16
class mainGame
{
public:
mainGame(int argc, char* argv[]);
void Display();
void Update();
void Keyboard(unsigned char key, int x, int y);
void releaseKeyboard(unsigned char key, int x, int y);
~mainGame(void);
void InitObjects();
void InitLighting();
void InitGL(int argc, char* argv[]);
void mouseButton(int button, int state, int x, int y);
void mouseMove(int x, int y);
void computePos(float deltaMove);
void KeepCursorInBounds();
void ShowMenu();
void timerCheck();
bool timerEnded;
private:
float rotation;
Camera* curCamera;
Vector3 cameraPos = Vector3(0.0f, 0.0f, 0.0f);
float angle = 0.0f;
float lx = 0.0f, ly = 0.0f, lz = -1.0f;
float x = 0.0f, y = 0.0f, z = 5.0f;
float deltaAngle = 0.0f;
float deltaMove = 0;
int xOrigin = -1;
int yOrigin = -1;
std::vector<SceneObject*> objects;
Vector4* _lightPosition;
lighting* _lightData;
bool shouldGetPixel;
int objectToShootID = 0;
};