summaryrefslogtreecommitdiff
path: root/src/game/world
diff options
context:
space:
mode:
authoraura <nw@moneybot.cc>2026-03-16 15:40:03 +0100
committeraura <nw@moneybot.cc>2026-03-16 15:40:03 +0100
commit991352b0d2767e6bd1a46f554db4ac9d208c13ad (patch)
treeec89dcc1bf6e5ad21474ee91a8b9d0f8301c7f1c /src/game/world
parente59a032fb9afac6496acf3fba51a2a329bd0f992 (diff)
finish prop rewrite
Diffstat (limited to 'src/game/world')
-rw-r--r--src/game/world/map.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/game/world/map.h b/src/game/world/map.h
index 8e6444e..21bfa1f 100644
--- a/src/game/world/map.h
+++ b/src/game/world/map.h
@@ -17,10 +17,11 @@ struct SURF_PROPS : public EOBJECT {
};
struct MAP_VERTEX : public EOBJECT {
- EPROP( VEC3, pos, {}, "position" );
- EPROP( VEC3, normal, {}, "normal" );
- EPROP( VEC2, uv, {}, "uv" );
- EPROP( CLR, clr, {}, "color" );
+ EPROP( VEC3, pos, {}, "position" );
+ EPROP_RANGED_STEP( VEC2, uv, {}, "uv", 0.f, 1.f, 0.025f );
+ EPROP( CLR, clr, {}, "color" );
+
+ EPROP_RO( VEC3, normal, {}, "normal" );
};
enum MapPolygonType_t {
@@ -42,8 +43,8 @@ struct MAP_POLYGON : public EOBJECT {
EPROP( MAP_PROPREF, propid, {}, "prop id" );
EPROP( LIST<MAP_VERTEX>, vertices, {}, "vertices" );
- VEC3 mins;
- VEC3 maxs;
+ EPROP_RO( VEC3, mins, {}, "mins" );
+ EPROP_RO( VEC3, maxs, {}, "maxs" );
U8 type;
};
@@ -53,8 +54,8 @@ struct MAP_WALL : public EOBJECT {
EPROP( VEC3, start, {}, "start pos" );
EPROP( VEC3, end, {}, "end pos" );
- EPROP( VEC2, uvstart, {}, "uv start offset" );
- EPROP( VEC2, uvend, {}, "uv end offset" );
+ EPROP_RANGED_STEP( VEC2, uvstart, {}, "uv start offset", 0.f, 1.f, 0.025f );
+ EPROP_RANGED_STEP( VEC2, uvend, {}, "uv end offset", 0.f, 1.f, 0.025f );
};
struct MAP_TEXTURE_ENTRY {
@@ -64,10 +65,10 @@ struct MAP_TEXTURE_ENTRY {
};
struct MAP_SPRITE : public EOBJECT {
- EPROP( GL_TEX2D*, tex, {}, "texture" );
- EPROP( VEC3, pos, {}, "position" );
- EPROP( VEC2, size, {}, "size" );
- EPROP( CLR, clr, {}, "color" );
+ EPROP( GL_TEX2D*, tex, {}, "texture" );
+ EPROP( VEC3, pos, {}, "position" );
+ EPROP_RANGED( VEC2, size, {}, "size", 0.25f, INFINITY );
+ EPROP( CLR, clr, {}, "color" );
};
struct MAP_ENTITY : public EOBJECT {
@@ -84,21 +85,22 @@ struct MAP_SKYBOX : public EOBJECT {
};
struct WORLD_MAP : public EOBJECT {
+ EPROP_RO( STR, name, {}, "name" );
+ EPROP( VEC3, startpos, {}, "spawn position" );
+ EPROP( F32, startang, {}, "spawn angle" );
+
EPROP( LIST<MAP_WALL> , walls, {}, "walls" );
EPROP( LIST<MAP_POLYGON>, polygons, {}, "polygons" );
EPROP( LIST<MAP_SPRITE> , sprites, {}, "sprites" );
EPROP( LIST<MAP_ENTITY> , entities, {}, "entities" );
EPROP( LIST<SURF_PROPS> , props, {}, "surface properties" );
+
EPROP( MAP_SKYBOX, skybox, {}, "skybox" );
F32 w;
F32 h;
- VEC3 mins;
- VEC3 maxs;
- EPROP( STR, name, {}, "name" );
-
- EPROP( VEC3, startpos, {}, "spawn position" );
- EPROP( F32, startang, {}, "spawn angle" );
+ EPROP_RO( VEC3, mins, {}, "mins" );
+ EPROP_RO( VEC3, maxs, {}, "maxs" );
struct BSP* bsp{};