summaryrefslogtreecommitdiff
path: root/state_mainstate/include
diff options
context:
space:
mode:
author0undefined <oscar@nelin.dk>2026-03-27 20:28:26 +0000
committer0undefined <oscar@nelin.dk>2026-03-27 20:28:26 +0000
commit4fddc39bcbc5fdd62b19a06ecf51ab4b057bd14c (patch)
tree05e223050b6565f820b893a867398c5d9a3006e2 /state_mainstate/include
parent25a214149344ee8f2109525207a20ff156512a2b (diff)
Add player & simple controlsHEADmaster
Also add object renderbuffer/texture for mouse-object selection.
Diffstat (limited to 'state_mainstate/include')
-rw-r--r--state_mainstate/include/states/mainstate.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/state_mainstate/include/states/mainstate.h b/state_mainstate/include/states/mainstate.h
index 2baa4f2..df6fead 100644
--- a/state_mainstate/include/states/mainstate.h
+++ b/state_mainstate/include/states/mainstate.h
@@ -20,6 +20,18 @@ struct assimp_mesh {
f32* normals;
};
+struct object_physics {
+ vec3 pos;
+ vec3 vel;
+ vec3 acc;
+};
+
+struct entity_info {
+ struct object_physics p;
+ // i16 health
+ // .. etc
+};
+
typedef struct mainstate_state {
/* Resources */
Shader shaders[10];
@@ -28,7 +40,7 @@ typedef struct mainstate_state {
RenderObject objects[10];
u32 world[WORLD_SIZE * CHUNK_SIZE];
i_ctx input_ctx;
- binding_t input_bindings[10];
+ binding_t input_bindings[14];
vec3 cam_dir;
f32 cam_dir_dt;
vec3 cam_pos;
@@ -38,6 +50,7 @@ typedef struct mainstate_state {
f64 fov;
Resources resources;
f64 height;
+ struct entity_info player;
} mainstate_state;
#endif