blob: 3225d396765d7f0a00902a6fd2f59ea1d9432b4f (
plain)
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
|
#ifndef GAME_H
#define GAME_H
#include "tomcat/renderer/camera.h"
#include "player.h"
#include "tomcat/terrain.h"
#include "tomcat/math/vector.h"
#include "tomcat/math/matrix4x4.h"
#include "tomcat/input.h"
#include "tomcat/util/util.h"
#include "tomcat/util/util_time.h"
#include "tomcat/renderer/renderer_types.h"
#include "tomcat/renderer/window.h"
typedef enum
{
MENU,
RUNNING,
EXIT
}GameState;
#define NUM_ENTITIES 1
#define WINDOW_WIDTH 1024
#define WINDOW_HEIGHT 768
#define WINDOW_ASPECT_RATIO (float)WINDOW_WIDTH / (float)WINDOW_HEIGHT
typedef struct _Game
{
GameState gameState;
Shader *shaderProgram, *terrainProgram, *skyboxProgram, *particlesProgram;
Entity ents[NUM_ENTITIES];
Texture *normalMap[2];
Texture *defaultNormalMap;
Terrain *terrain;
Skybox sky;
Player player;
Camera *camera;
Window *window;
ParticleSystem *s;
} Game;
extern void LoadResources(Game *game);
extern void Draw(Game *game);
extern void ProcessInput(Game *game);
extern void CleanUp(Game *game);
#endif // GAME_H
|