-
Notifications
You must be signed in to change notification settings - Fork 8
/
Game.h
78 lines (59 loc) · 2.04 KB
/
Game.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
// +------------------------------------------------------------+
// | University Racer |
// | Projekt do PGR a GMU, FIT VUT v Brne, 2011 |
// +------------------------------------------------------------+
// | Autori: Tomáš Kimer, xkimer00@stud.fit.vutbr.cz |
// | Tomáš Sychra, xsychr03@stud.fit.vutbr.cz |
// | David Šabata, xsabat01@stud.fit.vutbr.cz |
// +------------------------------------------------------------+
#ifndef GAME_H
#define GAME_H
#include <algorithm>
#include <ostream>
#include <sstream>
#include <vector>
#include "Debug.h"
#include "BaseApp.h"
#include "Scene.h"
#include "Gui.h"
#include "Debug.h"
#include "Physics.h"
#include "ShadowVolumes.h"
class Game : public BaseApp
{
public:
Game();
~Game();
void onInit();
void onWindowRedraw(const GameTime & gameTime);
void onWindowResized(int w, int h);
// vykresli usecky
void drawLines(std::vector<PhysicsDebugDraw::LINE> & lines);
void handleActiveKeys(const GameTime & gameTime);
void onKeyDown(SDLKey key, Uint16 mod);
void onMouseMove(unsigned x, unsigned y, int xrel, int yrel, Uint8 buttons);
// vraci statistiku - pocet vrcholu, facu,...
std::string statsString();
protected:
Scene* scene;
Gui* gui;
ModelContainer* container;
Physics *physics;
ShadowVolumes* shadowVolumes;
// handle retezce ukazujici cas
unsigned int guiTime, guiCheckpoint;
bool mouseCaptured;
// indexy polozek v kreslici fronte
unsigned int carQueueItem, wheelQueueItem[PhysicsCar::WHEEL_COUNT];
// pomocna promenna pro moznost kreslit wireframe (TAB)
bool drawWireframe;
// pomocna promenna pro moznost zapnuti kamery ktera nasleduje auto (F)
bool followCamera;
// pole priznaku rozsvicenych a zhasnutych svetel (moznost prepinani klavesami 1-9)
std::vector<bool> enabledLights;
// kreslit stiny? (F6)
bool drawShadows;
// zobrazujeme napovedu? (F1)
bool showHelp;
};
#endif