From d42d218a3685c030a7370d30f2de5495ea526d99 Mon Sep 17 00:00:00 2001 From: aura Date: Fri, 13 Mar 2026 05:03:12 +0100 Subject: wip on props --- src/game/world/map.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'src/game/world/map.h') diff --git a/src/game/world/map.h b/src/game/world/map.h index f3f56f8..2b8a7a5 100644 --- a/src/game/world/map.h +++ b/src/game/world/map.h @@ -4,19 +4,21 @@ #include "../../util/vector.h" #include "../../util/color.h" #include "../../util/fnv.h" +#include "../../editor/properties.h" #include enum MapPropId_t { MAPPROP_SKYBOX = -1, + MAPPROP_CLIPBRUSH = -2, }; -struct SURF_PROPS { +struct SURF_PROPS : public EOBJECT { struct GL_TEX2D* tex; CLR clr; }; -struct MAP_VERTEX { +struct MAP_VERTEX : public EOBJECT { VEC3 pos; VEC3 normal; VEC2 uv; @@ -28,14 +30,7 @@ enum MapPolygonType_t { MPT_CEILING }; -struct MAP_POLYGON { - MAP_POLYGON& operator=( const MAP_POLYGON& other ) { - memcpy( this, &other, sizeof(*this) ); - vertices = other.vertices; - - return *this; - } - +struct MAP_POLYGON : public EOBJECT { LIST vertices; VEC3 mins; @@ -44,7 +39,7 @@ struct MAP_POLYGON { I32 propid; }; -struct MAP_WALL { +struct MAP_WALL : public EOBJECT { VEC3 start; VEC3 end; @@ -60,7 +55,7 @@ struct MAP_TEXTURE_ENTRY { FNV1A hash; }; -struct MAP_SPRITE { +struct MAP_SPRITE : public EOBJECT { VEC3 pos; VEC2 size; CLR clr; @@ -73,13 +68,13 @@ struct MAP_ENTITY { LIST props; }; -struct MAP_SKYBOX { +struct MAP_SKYBOX : public EOBJECT { SURF_PROPS props; MAP_WALL walls[4]; MAP_POLYGON polygons[2]; }; -struct WORLD_MAP { +struct WORLD_MAP : public EOBJECT { LIST walls; LIST polygons; LIST sprites; @@ -98,7 +93,7 @@ struct WORLD_MAP { struct BSP* bsp{}; - LIST textures; + EPROP( LIST, textures, {}, "textures" ); }; extern WORLD_MAP* map_from_file( struct GAME_DATA* game, const char* filename ); -- cgit v1.2.3