+ struct svbspmesh_s *next;
+ int numverts, maxverts;
+ int numtriangles, maxtriangles;
+ float *verts;
+ int *elements;
+}
+svbspmesh_t;
+
+typedef struct mlight_s
+{
+ // location of light
+ vec3_t origin;
+ // distance attenuation scale (smaller is a larger light)
+ float falloff;
+ // color and brightness combined
+ vec3_t light;
+ // brightness bias, used for limiting radius without a hard edge
+ float subtract;
+ // spotlight direction
+ vec3_t spotdir;
+ // cosine of spotlight cone angle (or 0 if not a spotlight)
+ float spotcone;
+ // distance bias (larger value is softer and darker)
+ float distbias;
+ // light style controlling this light
+ int style;
+ // maximum extent of the light for shading purposes
+ float lightradius;
+ // maximum extent of the light for culling purposes
+ float cullradius;
+ float cullradius2;
+ /*
+ // surfaces this shines on
+ int numsurfaces;
+ msurface_t **surfaces;
+ // lit area
+ vec3_t mins, maxs;
+ // precomputed shadow volume meshs
+ //svbspmesh_t *shadowvolume;
+ //vec3_t shadowvolumemins, shadowvolumemaxs;
+ shadowmesh_t *shadowvolume;
+ */
+}
+mlight_t;
+
+extern rtexture_t *r_notexture;
+extern texture_t r_notexture_mip;
+
+struct model_s;
+void Mod_LoadBrushModelQ1orHL (struct model_s *mod, void *buffer);
+void Mod_LoadBrushModelIBSP (struct model_s *mod, void *buffer);
+void Mod_BrushInit(void);
+
+void Mod_FindNonSolidLocation(vec3_t in, vec3_t out, struct model_s *mod, vec_t radius);
+mleaf_t *Mod_PointInLeaf (const float *p, struct model_s *model);
+int Mod_PointContents (const float *p, struct model_s *model);
+qbyte *Mod_LeafPVS (mleaf_t *leaf, struct model_s *model);
+void Mod_BuildPVSTextureChains(struct model_s *model);
+
+// Q2 bsp stuff
+
+#define Q2BSPVERSION 38
+
+// leaffaces, leafbrushes, planes, and verts are still bounded by
+// 16 bit short limits
+
+//=============================================================================
+
+#define Q2LUMP_ENTITIES 0
+#define Q2LUMP_PLANES 1
+#define Q2LUMP_VERTEXES 2
+#define Q2LUMP_VISIBILITY 3
+#define Q2LUMP_NODES 4
+#define Q2LUMP_TEXINFO 5
+#define Q2LUMP_FACES 6
+#define Q2LUMP_LIGHTING 7
+#define Q2LUMP_LEAFS 8
+#define Q2LUMP_LEAFFACES 9
+#define Q2LUMP_LEAFBRUSHES 10
+#define Q2LUMP_EDGES 11
+#define Q2LUMP_SURFEDGES 12
+#define Q2LUMP_MODELS 13
+#define Q2LUMP_BRUSHES 14
+#define Q2LUMP_BRUSHSIDES 15
+#define Q2LUMP_POP 16
+#define Q2LUMP_AREAS 17
+#define Q2LUMP_AREAPORTALS 18
+#define Q2HEADER_LUMPS 19
+
+typedef struct
+{
+ int ident;
+ int version;
+ lump_t lumps[HEADER_LUMPS];
+} q2dheader_t;