summaryrefslogtreecommitdiff
path: root/src/game/world
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/world')
-rw-r--r--src/game/world/map.h25
1 files changed, 10 insertions, 15 deletions
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 <string.h>
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<MAP_VERTEX> 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<struct OBJECT_PROP*> 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<MAP_WALL> walls;
LIST<MAP_POLYGON> polygons;
LIST<MAP_SPRITE> sprites;
@@ -98,7 +93,7 @@ struct WORLD_MAP {
struct BSP* bsp{};
- LIST<MAP_TEXTURE_ENTRY*> textures;
+ EPROP( LIST<MAP_TEXTURE_ENTRY*>, textures, {}, "textures" );
};
extern WORLD_MAP* map_from_file( struct GAME_DATA* game, const char* filename );