-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsimpengine.h
More file actions
67 lines (54 loc) · 1.53 KB
/
Copy pathsimpengine.h
File metadata and controls
67 lines (54 loc) · 1.53 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
/**************************************************************************************/
/** \file simpengine.h
\brief Contains the SimpEngine class
\author Kevin Hawkins
\date 3/29/2001
***************************************************************************************/
#ifndef __SIMPENGINE
#define __SIMPENGINE
#include <windows.h>
#include <SDL/SDL.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include "engine.h"
#include "object.h"
#include "camera.h"
#include "terrain.h"
#include "world.h"
#include "font.h"
#include <iostream>
using namespace std;
/**************************************************************************************/
/** \class CSimpEngine
\brief The SimpEngine class is the main interface for SimpEngine.
Derived from CEngine, tt provides the camera and world objects.
***************************************************************************************/
class CSimpEngine : public CEngine
{
private:
CCamera *gameCamera;
CWorld *gameWorld;
protected:
CCamera *OnGetCamera() { return gameCamera; }
CWorld *OnGetWorld() { return gameWorld; }
void OnPrepare();
void OnMouseDownL(float x, float y);
void OnMouseMove(int deltaX, int deltaY);
void OnMouseMove(int x, int y, int centerX, int centerY);
void OnKeyDown(SDLKey nVirtKey);
public:
CSimpEngine()
{
gameCamera = new CCamera;
gameWorld = new CWorld;
}
CSimpEngine(const char *szName, bool fscreen, int w, int h, int b);
~CSimpEngine()
{
delete gameWorld;
delete gameCamera;
gameWorld = NULL;
gameCamera = NULL;
}
};
#endif