From 635934fc038d034a1ae632a91609413a4181f106 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Wed, 28 May 2014 15:53:17 +1000 Subject: Some more in world object structure stuff and fixes. --- src/extantz/extantz.h | 7 ++++--- src/libraries/love.h | 28 ++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/extantz/extantz.h b/src/extantz/extantz.h index 8452261..57fb273 100644 --- a/src/extantz/extantz.h +++ b/src/extantz/extantz.h @@ -167,9 +167,10 @@ typedef struct _extantzStuffs { Stuffs stuffs; Evas_3D_Node *mesh_node; // Multiple Evas_3D_Mesh's can be in one Evas_3D_Node - Eina_Inarray *mesh; // Evas_3D_Mesh - Eina_Inarray *materials; // Evas_3D_Material - Eina_Inarray *textures; // Evas_3D_Texture + // Can't use in arrays here, can't find the element sizes of incomplete types. + Eina_Array *mesh; // Evas_3D_Mesh + Eina_Array *materials; // Evas_3D_Material + Eina_Array *textures; // Evas_3D_Texture } ExtantzStuffs; // Elm GL view related data here. diff --git a/src/libraries/love.h b/src/libraries/love.h index cf23f3c..c7f243f 100644 --- a/src/libraries/love.h +++ b/src/libraries/love.h @@ -107,11 +107,23 @@ typedef struct _vec2 } vec2; +typedef enum +{ + TT_NORMAL = -1 +} TextureType; + +typedef enum +{ + MT_CUBE, + MT_SPHERE +} MeshType; + + typedef struct _material { - int face; - //type? - char texture[PATH_MAX]; + int face; + TextureType type; + char texture[PATH_MAX]; //colour //alpha //other stuff @@ -120,16 +132,16 @@ typedef struct _material typedef struct _mesh { char fileName[PATH_MAX]; - //type + MeshType type; vec3 pos; vec4 rot; - Eina_Inarray materials; // Material - Eina_Inarray parts; // Mesh + Eina_Inarray *materials; // Material + Eina_Inarray *parts; // Mesh } Mesh; typedef struct _stuffs { - char UUID[32], *name, *description, owner[32]; + char UUID[45], *name, *description, owner[45]; //type union { @@ -144,7 +156,7 @@ typedef struct _stuffs typedef struct _loveStuffs { Stuffs stuffs; - Eina_Inarray contents; // Stuffs + Eina_Inarray *contents; // Stuffs } LoveStuffs; -- cgit v1.1