-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEngine.h
More file actions
76 lines (61 loc) · 1.52 KB
/
Engine.h
File metadata and controls
76 lines (61 loc) · 1.52 KB
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
#pragma once
#include "3DEngine.h"
#include "OBJLoader.h"
#include "GL/GL.h"
#include "GL/GLU.h"
#include "SOIL.h"
#include <map>
class Engine : public C3DEngine
{
public:
Engine(void);
static C3DEngine *GetInstance(void) {return(g_pRendererInstance);}
//--- Application setup/shutdown
void Setup(HWND hWnd);
//virtual void Shutdown(void);
//--- Update/render
void Update(float fDT, Camera camera);
void Render(unsigned int u32Width, unsigned int u32Height, Camera camera, Castle *castle, bool texON, bool readyForRedraw);
void updateCamera();
void InitKeyConf();
//--- Events notifications
//virtual void MouseWheel(float fIncrement) {}
void MouseMove(POINT Pos);
//virtual void LButtonDown(POINT Pos) {}
//virtual void LButtonUp(POINT Pos) {}
//virtual void RButtonDown(POINT Pos);
//virtual void RButtonUp(POINT Pos);
void KeyDown(int s32VirtualKey);
//void KeyUp(int s32VirtualKey);
//other
void DrawObject(SCENE *scene);
void DrawCastle(char **table, int width, int height);
void DrawExampleCastle();
void DrawGround();
void initTextures();
private:
std::map<WPARAM, bool> keystates;
std::map<std::string, WPARAM> keyconf;
float translationMatrix[3];
float RotationAngle;
bool rotate;
POINT oldPos;
float horizontal;
float vertical;
Camera * camera;
GLuint grass;
GLuint stone;
GLdouble eyeX;
GLdouble eyeY;
GLdouble eyeZ;
GLdouble lookX;
GLdouble lookY;
GLdouble lookZ;
protected:
static Engine *g_pRendererInstance;
SCENE *tower;
SCENE *wall;
SCENE *door;
SCENE *ground;
SCENE *scene;
};