From 3a3b64bedc47a0795358c6be7062160f52f2fc3b Mon Sep 17 00:00:00 2001 From: DrNuget Date: Sat, 10 Jan 2026 06:41:13 +0200 Subject: added FPS camera movement and probably some other changes --- src/engine/M_object.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/engine/M_object.h') diff --git a/src/engine/M_object.h b/src/engine/M_object.h index ca87f0a..96bd0fe 100644 --- a/src/engine/M_object.h +++ b/src/engine/M_object.h @@ -9,9 +9,13 @@ #include #include -//#include "M_game.h" #include "M_shader.h" +enum { + M_OBJECT_CUBE, + M_OBJECT_CUSTOM +}; + //Temporary type for storing M_Object rotation information, //will get replaced in later revisions. typedef struct { @@ -26,12 +30,19 @@ typedef struct { unsigned int VAO, VBO, EBO; } M_ViewModel; +typedef struct { + unsigned short type; + M_ViewModel *model; +} M_ObjectInfo; + //Type meant for handling 3D models in a scene, //stores additional information like a model's position, size and rotation. typedef struct { M_ViewModel *model; M_ShaderProgram *shader; + unsigned short type; + vec3 pos, size; M_Rotation rotation; @@ -49,7 +60,7 @@ void M_killViewModel(M_ViewModel *model); M_ViewModel M_loadViewModel(const char* filename); //Creates a M_Object -void M_createObject(M_Object *obj, M_ViewModel *model); +void M_createObject(M_Object *obj, M_ObjectInfo object_info); //Functions for moving, scaling and rotating M_Object -- cgit v1.2.3