blob: f29c7b9c6d0c60543f269f8eb0f972f1d2dde3d6 (
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
|
#ifndef STATE_TITLESCREEN_H
#define STATE_TITLESCREEN_H
#include <stdbool.h>
#include <engine/core/types.h>
#include <engine/rendering/rendering.h>
#include <engine/resources.h>
#include <engine/ctrl/input.h>
//#include <engine/state.h>
//#include <engine/engine.h>
//#include <engine/ui.h>
//#include <engine/input.h>
#include <cglm/cglm.h>
#define WORLD_HEIGHT 32
#define WORLD_WIDTH 32
#define WORLD_LENGTH 32
#define WORLD_SIZE (WORLD_HEIGHT * WORLD_LENGTH * WORLD_WIDTH)
typedef struct mainstate_state {
/* Resources */
Shader shaders[10];
RenderBatch terrain;
RenderObject objects[10];
u8 world[WORLD_HEIGHT * WORLD_WIDTH * WORLD_LENGTH];
i_ctx input_ctx;
binding_t input_bindings[10];
vec3 cam_dir;
f32 cam_dir_dt;
vec3 cam_pos;
vec3 cam_speed;
vec3 cam_acc;
Camera c;
f64 fov;
Resources resources;
f64 height;
} mainstate_state;
#endif
|