]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - model_shared.h
made the static light built message a dprint
[xonotic/darkplaces.git] / model_shared.h
index 0aafccca4610ad0a5f12d88783159e6a66ff4383..86339635a98bb74e9fa1a843f867ff7c82518257 100644 (file)
@@ -165,6 +165,15 @@ typedef struct model_brush_s
        // number of submodels in this map (just used by server to know how many
        // submodels to load)
        int numsubmodels;
+
+       // pvs
+       int num_pvsclusters;
+       int num_pvsclusterbytes;
+       unsigned char *data_pvsclusters;
+       // example
+       //pvschain = model->brush.data_pvsclusters + mycluster * model->brush.num_pvsclusterbytes;
+       //if (pvschain[thatcluster >> 3] & (1 << (thatcluster & 7)))
+
        // common functions
        int (*SuperContentsFromNativeContents)(struct model_s *model, int nativecontents);
        int (*NativeContentsFromSuperContents)(struct model_s *model, int supercontents);
@@ -192,10 +201,10 @@ typedef struct model_brushq1_s
        mplane_t                *planes;
 
        // number of actual leafs (including 0 which is solid)
-       int                             numleafs;
+       int                             num_leafs;
        // visible leafs, not counting 0 (solid)
-       int                             visleafs;
-       mleaf_t                 *leafs;
+       int                             num_visleafs;
+       mleaf_t                 *data_leafs;
 
        int                             numvertexes;
        mvertex_t               *vertexes;
@@ -232,7 +241,6 @@ typedef struct model_brushq1_s
 
        int                             num_compressedpvs;
        qbyte                   *data_compressedpvs;
-       qbyte                   *data_decompressedpvs;
 
        int                             num_lightdata;
        qbyte                   *lightdata;
@@ -514,14 +522,6 @@ typedef struct model_brushq3_s
        int num_lightgrid_dimensions[3];
        // transform modelspace coordinates to lightgrid index
        matrix4x4_t num_lightgrid_indexfromworld;
-
-       // pvs
-       int num_pvsclusters;
-       int num_pvschainlength;
-       unsigned char *data_pvschains;
-       // example
-       //pvschain = model->brushq3.data_pvschains + mycluster * model->brushq3.num_pvschainlength;
-       //if (pvschain[thatcluster >> 3] & (1 << (thatcluster & 7)))
 }
 model_brushq3_t;
 
@@ -576,7 +576,7 @@ typedef struct model_s
        // draw a shadow volume for the model based on light source
        void(*DrawShadowVolume)(struct entity_render_s *ent, vec3_t relativelightorigin, float lightradius);
        // draw the lighting on a model (through stencil)
-       void(*DrawLight)(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativeeyeorigin, float lightradius, float *lightcolor, const matrix4x4_t *matrix_modeltofilter, const matrix4x4_t *matrix_modeltoattenuationxyz, const matrix4x4_t *matrix_modeltoattenuationz, rtexture_t *lightcubemap);
+       void(*DrawLight)(struct entity_render_s *ent, vec3_t relativelightorigin, vec3_t relativeeyeorigin, float lightradius, float *lightcolor, const matrix4x4_t *matrix_modeltolight, const matrix4x4_t *matrix_modeltoattenuationxyz, const matrix4x4_t *matrix_modeltoattenuationz, rtexture_t *lightcubemap);
        // trace a box against this model
        void (*TraceBox)(struct model_s *model, int frame, struct trace_s *trace, const vec3_t boxstartmins, const vec3_t boxstartmaxs, const vec3_t boxendmins, const vec3_t boxendmaxs, int hitsupercontentsmask);
        // fields belonging to each type of model