summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2016-12-20 12:03:00 +0100
committerPaweł Redman <pawel.redman@gmail.com>2016-12-20 12:03:00 +0100
commit30330c305545e1b93acd2ec7b72df7673bde9181 (patch)
tree015f85e24a762a41ee438db826d40ab96d4b4e33 /src/common.h
parent649e8d5f6d502edd235962f6137f3af552db1560 (diff)
Add support for patches.
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 0003d43..b005e2b 100644
--- a/src/common.h
+++ b/src/common.h
@@ -50,6 +50,7 @@ int vstr_cmp(vstr_t *vstr, const char *str);
char *vstr_strdup(vstr_t *vstr);
void vstr_termz(vstr_t *vstr);
float vstr_atof(vstr_t *vstr);
+size_t vstr_atoz(vstr_t *vstr);
// lexer.c
@@ -92,7 +93,14 @@ typedef struct {
} brush_face_t;
typedef struct {
+ size_t xres, yres;
+ float *def; // (xres * yres * 5) floats
+ char *shader;
+} brush_patch_t;
+
+typedef struct {
brush_face_t *faces;
+ brush_patch_t *patch;
elist_header_t list;
} brush_t;
@@ -117,6 +125,7 @@ typedef struct {
// note: num_entities doesn't include the worldspawn
size_t num_entities, num_discarded_entities;
size_t num_brushes, num_discarded_brushes;
+ size_t num_patches, num_discarded_patches;
} map_t;
void map_init(map_t *map);