![]() |
DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
|
|
#include "quakedef.h"
#include "image.h"
#include "r_shadow.h"
#include "polygon.h"
#include "curves.h"
#include "wad.h"
Go to the source code of this file.
Data Structures | |
struct | findnonsolidlocationinfo_t |
struct | objvertex_t |
struct | patchtess_t |
struct | portal_t |
struct | RecursiveHullCheckTraceInfo_t |
Macros | |
#define | DIST_EPSILON (0.03125) |
#define | HULLCHECKSTATE_DONE 2 |
#define | HULLCHECKSTATE_EMPTY 0 |
#define | HULLCHECKSTATE_SOLID 1 |
#define | MAX_PORTALPOINTS 64 |
#define | PATCHTESS_SAME_LODGROUP(a, b) |
#define | PORTAL_DIST_EPSILON (1.0 / 32.0) |
Variables | |
cvar_t | gl_max_lightmapsize |
cvar_t | mod_bsp_portalize = {CF_CLIENT, "mod_bsp_portalize", "0", "enables portal generation from BSP tree (takes a minute or more and GBs of memory when loading a complex map), used by r_drawportals, r_useportalculling, r_shadow_realtime_dlight_portalculling, r_shadow_realtime_world_compileportalculling"} |
cvar_t | mod_noshader_default_offsetmapping = {CF_CLIENT | CF_ARCHIVE, "mod_noshader_default_offsetmapping", "1", "use offsetmapping by default on all surfaces that are not using q3 shader files"} |
cvar_t | mod_obj_orientation = {CF_CLIENT | CF_SERVER, "mod_obj_orientation", "1", "fix orientation of OBJ models to the usual conventions (if zero, use coordinates as is)"} |
cvar_t | mod_q1bsp_polygoncollisions = {CF_CLIENT | CF_SERVER, "mod_q1bsp_polygoncollisions", "0", "disables use of precomputed cliphulls and instead collides with polygons (uses Bounding Interval Hierarchy optimizations)"} |
static texture_t | mod_q1bsp_texture_lava |
static texture_t | mod_q1bsp_texture_sky |
static texture_t | mod_q1bsp_texture_slime |
static texture_t | mod_q1bsp_texture_solid |
static texture_t | mod_q1bsp_texture_water |
cvar_t | mod_q1bsp_traceoutofsolid = {CF_SHARED, "mod_q1bsp_traceoutofsolid", "1", "enables tracebox to move an entity that's stuck in solid brushwork out to empty space, 1 matches FTEQW and QSS and is required by many community maps (items/monsters will be missing otherwise), 0 matches old versions of DP and the original Quake engine (if your map or QC needs 0 it's buggy)"} |
cvar_t | mod_q1bsp_zero_hullsize_cutoff = {CF_CLIENT | CF_SERVER, "mod_q1bsp_zero_hullsize_cutoff", "3", "bboxes with an X dimension smaller than this will use the smallest cliphull (0x0x0) instead of being rounded up to the player cliphull (32x32x56) in Q1BSP, or crouching player (32x32x36) in HLBSP"} |
cvar_t | mod_q2bsp_littransparentsurfaces = {CF_CLIENT, "mod_q2bsp_littransparentsurfaces", "0", "allows lighting on rain in 3v3gloom3 and other cases of transparent surfaces that have lightmaps that were ignored by quake2"} |
cvar_t | mod_q3bsp_curves_collisions = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_collisions", "1", "enables collisions with curves (SLOW)"} |
cvar_t | mod_q3bsp_curves_subdivisions_maxtess = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_maxtess", "1024", "maximum number of subdivisions for collision purposes (prevents curves beyond a certain detail level, limits smoothing)"} |
cvar_t | mod_q3bsp_curves_subdivisions_maxvertices = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_maxvertices", "4225", "maximum vertices allowed per subdivided curve for collision purposes"} |
cvar_t | mod_q3bsp_curves_subdivisions_mintess = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_mintess", "0", "minimum number of subdivisions for collision purposes (values above 0 will smooth curves that don't need it)"} |
cvar_t | mod_q3bsp_curves_subdivisions_tolerance = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_tolerance", "15", "maximum error tolerance on curve subdivision for collision purposes (usually a larger error tolerance than for rendering)"} |
cvar_t | mod_q3bsp_lightgrid_bsp_surfaces = {CF_CLIENT, "mod_q3bsp_lightgrid_bsp_surfaces", "0", "apply lightgrid lighting to bsp models other than the world rather than using their lightmaps (experimental/debug tool)"} |
cvar_t | mod_q3bsp_lightgrid_texture = {CF_CLIENT, "mod_q3bsp_lightgrid_texture", "1", "directly apply the lightgrid as a global texture rather than only reading it at the entity origin"} |
cvar_t | mod_q3bsp_lightgrid_world_surfaces = {CF_CLIENT, "mod_q3bsp_lightgrid_world_surfaces", "0", "apply lightgrid lighting to the world bsp geometry rather than using lightmaps (experimental/debug tool)"} |
cvar_t | mod_q3bsp_lightmapmergepower = {CF_CLIENT | CF_ARCHIVE, "mod_q3bsp_lightmapmergepower", "4", "merges the quake3 128x128 lightmap textures into larger lightmap group textures to speed up rendering, 1 = 256x256, 2 = 512x512, 3 = 1024x1024, 4 = 2048x2048, 5 = 4096x4096, ..."} |
cvar_t | mod_q3bsp_nolightmaps = {CF_CLIENT | CF_ARCHIVE, "mod_q3bsp_nolightmaps", "0", "do not load lightmaps in Q3BSP maps (to save video RAM, but be warned: it looks ugly)"} |
cvar_t | mod_q3bsp_optimizedtraceline = {CF_CLIENT | CF_SERVER, "mod_q3bsp_optimizedtraceline", "1", "whether to use optimized traceline code for line traces (as opposed to tracebox code)"} |
cvar_t | mod_q3bsp_sRGBlightmaps = {CF_CLIENT, "mod_q3bsp_sRGBlightmaps", "0", "treat lightmaps from Q3 maps as sRGB when vid_sRGB is active"} |
cvar_t | mod_q3bsp_tracelineofsight_brushes = {CF_CLIENT | CF_SERVER, "mod_q3bsp_tracelineofsight_brushes", "0", "enables culling of entities behind detail brushes, curves, etc"} |
cvar_t | mod_q3shader_default_offsetmapping = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping", "1", "use offsetmapping by default on all surfaces that are using q3 shader files"} |
cvar_t | mod_q3shader_default_offsetmapping_bias = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping_bias", "0", "default bias used for offsetmapping"} |
cvar_t | mod_q3shader_default_offsetmapping_scale = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping_scale", "1", "default scale used for offsetmapping"} |
cvar_t | mod_q3shader_default_polygonfactor = {CF_CLIENT, "mod_q3shader_default_polygonfactor", "0", "biases depth values of 'polygonoffset' shaders to prevent z-fighting artifacts"} |
cvar_t | mod_q3shader_default_polygonoffset = {CF_CLIENT, "mod_q3shader_default_polygonoffset", "-2", "biases depth values of 'polygonoffset' shaders to prevent z-fighting artifacts"} |
cvar_t | mod_q3shader_default_refractive_index = {CF_CLIENT, "mod_q3shader_default_refractive_index", "1.33", "angle of refraction specified as n to apply when a photon is refracted, example values are: 1.0003 = air, water = 1.333, crown glass = 1.517, flint glass = 1.655, diamond = 2.417"} |
cvar_t | mod_q3shader_force_addalpha = {CF_CLIENT, "mod_q3shader_force_addalpha", "0", "treat GL_ONE GL_ONE (or add) blendfunc as GL_SRC_ALPHA GL_ONE for compatibility with older DarkPlaces releases"} |
cvar_t | mod_q3shader_force_terrain_alphaflag = {CF_CLIENT, "mod_q3shader_force_terrain_alphaflag", "0", "for multilayered terrain shaders force TEXF_ALPHA flag on both layers"} |
cvar_t | mod_recalculatenodeboxes = {CF_CLIENT | CF_SERVER, "mod_recalculatenodeboxes", "1", "enables use of generated node bounding boxes based on BSP tree portal reconstruction, rather than the node boxes supplied by the map compiler"} |
static unsigned char | nobsp_pvs [1] = {1} |
static memexpandablearray_t | portalarray |
static double * | portalpointsbuffer |
static int | portalpointsbufferoffset |
static int | portalpointsbuffersize |
cvar_t | r_nosurftextures = {CF_CLIENT, "r_nosurftextures", "0", "pretends there was no texture lump found in the q1bsp/hlbsp loading (useful for debugging this rare case)"} |
cvar_t | r_novis = {CF_CLIENT, "r_novis", "0", "draws whole level, see also sv_cullentities_pvs 0"} |
cvar_t | r_subdivisions_maxtess = {CF_CLIENT, "r_subdivisions_maxtess", "1024", "maximum number of subdivisions (prevents curves beyond a certain detail level, limits smoothing)"} |
cvar_t | r_subdivisions_maxvertices = {CF_CLIENT, "r_subdivisions_maxvertices", "65536", "maximum vertices allowed per subdivided curve"} |
cvar_t | r_subdivisions_mintess = {CF_CLIENT, "r_subdivisions_mintess", "0", "minimum number of subdivisions (values above 0 will smooth curves that don't need it)"} |
cvar_t | r_subdivisions_tolerance = {CF_CLIENT, "r_subdivisions_tolerance", "4", "maximum error tolerance on curve subdivision for rendering purposes (in other words, the curves will be given as many polygons as necessary to represent curves at this quality)"} |
cvar_t | r_trippy = {CF_CLIENT, "r_trippy", "0", "easter egg"} |
#define DIST_EPSILON (0.03125) |
Definition at line 681 of file model_brush.c.
#define HULLCHECKSTATE_DONE 2 |
Definition at line 685 of file model_brush.c.
Referenced by Mod_Q1BSP_RecursiveHullCheck(), and Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode().
#define HULLCHECKSTATE_EMPTY 0 |
Definition at line 683 of file model_brush.c.
Referenced by Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_RecursiveHullCheckPoint(), and Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode().
#define HULLCHECKSTATE_SOLID 1 |
Definition at line 684 of file model_brush.c.
Referenced by Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_RecursiveHullCheckPoint(), and Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode().
#define MAX_PORTALPOINTS 64 |
Definition at line 3380 of file model_brush.c.
Referenced by Mod_BSP_MakePortals(), and Mod_BSP_RecursiveNodePortals().
Definition at line 5796 of file model_brush.c.
Referenced by Mod_Q3BSP_LoadFaces().
#define PORTAL_DIST_EPSILON (1.0 / 32.0) |
Definition at line 3613 of file model_brush.c.
Referenced by Mod_BSP_RecursiveNodePortals().
Definition at line 3545 of file model_brush.c.
References Host_Error(), portal_t::next, portal_t::nodes, and mnode_t::portals.
Referenced by Mod_BSP_RecursiveNodePortals().
void Collision_ClipTrace_Box | ( | trace_t * | trace, |
const vec3_t | cmins, | ||
const vec3_t | cmaxs, | ||
const vec3_t | start, | ||
const vec3_t | mins, | ||
const vec3_t | maxs, | ||
const vec3_t | end, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask, | ||
int | boxsupercontents, | ||
int | boxq3surfaceflags, | ||
const texture_t * | boxtexture ) |
Definition at line 1053 of file model_brush.c.
References trace_t::allsolid, mclipnode_t::children, hull_t::clipnodes, Collision_TraceLineBrushFloat(), Con_Printf(), CONTENTS_EMPTY, CONTENTS_SOLID, colplanef_t::dist, mplane_t::dist, RecursiveHullCheckTraceInfo_t::dist, colbrushf_t::elements, RecursiveHullCheckTraceInfo_t::end, hull_t::firstclipnode, trace_t::fraction, colbrushf_t::hasaabbplanes, trace_t::hitsupercontentsmask, RecursiveHullCheckTraceInfo_t::hull, i, colbrushf_t::isaabb, hull_t::lastclipnode, colbrushf_t::markframe, colbrushf_t::maxs, maxs, colbrushf_t::mins, mins, Mod_Q1BSP_RecursiveHullCheck(), colplanef_t::normal, mplane_t::normal, NULL, colbrushf_t::numplanes, colbrushf_t::numpoints, colbrushf_t::numtriangles, mclipnode_t::planenum, colbrushf_t::planes, hull_t::planes, colbrushf_t::points, colplanef_t::q3surfaceflags, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, RecursiveHullCheckTraceInfo_t::start, trace_t::startsupercontents, colbrushf_t::supercontents, colplanef_t::texture, RecursiveHullCheckTraceInfo_t::trace, mplane_t::type, VectorCopy, and VectorSubtract.
Referenced by CL_SelectTraceLine(), Collision_ClipLineToGenericEntity(), and Collision_ClipToGenericEntity().
void Collision_ClipTrace_Point | ( | trace_t * | trace, |
const vec3_t | cmins, | ||
const vec3_t | cmaxs, | ||
const vec3_t | start, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask, | ||
int | boxsupercontents, | ||
int | boxq3surfaceflags, | ||
const texture_t * | boxtexture ) |
Definition at line 1161 of file model_brush.c.
References trace_t::allsolid, BoxesOverlap, trace_t::fraction, trace_t::hitsupercontentsmask, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, trace_t::startsolid, and trace_t::startsupercontents.
Referenced by Collision_ClipPointToGenericEntity().
Definition at line 3881 of file model_brush.c.
References buffer, mod(), and Mod_Q1BSP_Load().
Definition at line 80 of file model_brush.c.
References Cvar_RegisterVariable(), Cvar_SetQuick(), dp_strlcpy, GAME_NEXUIZ, gamemode, mod_bsp_portalize, mod_noshader_default_offsetmapping, mod_obj_orientation, mod_q1bsp_polygoncollisions, mod_q1bsp_texture_lava, mod_q1bsp_texture_sky, mod_q1bsp_texture_slime, mod_q1bsp_texture_solid, mod_q1bsp_texture_water, mod_q1bsp_traceoutofsolid, mod_q1bsp_zero_hullsize_cutoff, mod_q2bsp_littransparentsurfaces, mod_q3bsp_curves_collisions, mod_q3bsp_curves_subdivisions_maxtess, mod_q3bsp_curves_subdivisions_maxvertices, mod_q3bsp_curves_subdivisions_mintess, mod_q3bsp_curves_subdivisions_tolerance, mod_q3bsp_lightgrid_bsp_surfaces, mod_q3bsp_lightgrid_texture, mod_q3bsp_lightgrid_world_surfaces, mod_q3bsp_lightmapmergepower, mod_q3bsp_nolightmaps, mod_q3bsp_optimizedtraceline, mod_q3bsp_sRGBlightmaps, mod_q3bsp_tracelineofsight_brushes, mod_q3shader_default_offsetmapping, mod_q3shader_default_offsetmapping_bias, mod_q3shader_default_offsetmapping_scale, mod_q3shader_default_polygonfactor, mod_q3shader_default_polygonoffset, mod_q3shader_default_refractive_index, mod_q3shader_force_addalpha, mod_q3shader_force_terrain_alphaflag, mod_recalculatenodeboxes, texture_t::name, Q3SURFACEFLAG_NODLIGHT, Q3SURFACEFLAG_NOIMPACT, Q3SURFACEFLAG_NOLIGHTMAP, Q3SURFACEFLAG_NOMARKS, Q3SURFACEFLAG_SKY, r_nosurftextures, r_novis, r_subdivisions_maxtess, r_subdivisions_maxvertices, r_subdivisions_mintess, r_subdivisions_tolerance, r_trippy, texture_t::supercontents, SUPERCONTENTS_LAVA, SUPERCONTENTS_NODROP, SUPERCONTENTS_SKY, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, SUPERCONTENTS_WATER, and texture_t::surfaceflags.
Referenced by Mod_Init().
Definition at line 3889 of file model_brush.c.
References buffer, mod(), and Mod_Q1BSP_Load().
|
static |
Definition at line 323 of file model_brush.c.
References BoxesOverlap, BoxOnPlaneSide(), CHECKPVSBIT, mnode_t::children, maxs, mnode_t::maxs, mins, mnode_t::mins, model, and mnode_t::plane.
Referenced by Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
|
static |
Definition at line 252 of file model_brush.c.
References BoxesOverlap, BoxOnPlaneSide(), CHECKPVSBIT, mnode_t::children, maxs, mnode_t::maxs, mins, mnode_t::mins, model, and mnode_t::plane.
Referenced by Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
|
static |
Definition at line 394 of file model_brush.c.
References BoxesOverlap, BoxOnPlaneSide(), mnode_t::children, maxs, mnode_t::maxs, mins, mnode_t::mins, model, and mnode_t::plane.
Referenced by Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
|
static |
Definition at line 1529 of file model_brush.c.
References Con_Printf(), loadmodel, and model_t::name.
Referenced by Mod_Q1BSP_LoadLeafs(), and Mod_Q2BSP_LoadVisibility().
|
static |
Definition at line 3825 of file model_brush.c.
References cvar_t::integer, Mem_AllocType, Mem_Free, Mem_Size(), Mod_BSP_FatPVS_RecursiveBSPNode(), Mod_BSP_GetPVS(), model, r_novis, and r_trippy.
Referenced by Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
|
static |
Definition at line 3797 of file model_brush.c.
References mnode_t::children, i, Mod_BSP_FatPVS_RecursiveBSPNode(), model, mnode_t::plane, and PlaneDiff.
Referenced by Mod_BSP_FatPVS(), and Mod_BSP_FatPVS_RecursiveBSPNode().
Definition at line 3414 of file model_brush.c.
References BoxFromPoints(), model_t::brush, model_t::brushq1, model_brush_t::data_leafs, model_brush_t::data_nodes, model_brush_t::data_portalpoints, model_brush_t::data_portals, mplane_t::dist, hull_t::firstclipnode, mportal_t::here, model_brushq1_t::hulls, i, int(), cvar_t::integer, loadmodel, mleaf_t::maxs, mportal_t::maxs, Mem_Alloc, Mem_ExpandableArray_IndexRange(), Mem_ExpandableArray_RecordAtIndex(), model_t::mempool, mleaf_t::mins, mportal_t::mins, Mod_BSP_RecursiveRecalcNodeBBox(), mod_recalculatenodeboxes, mportal_t::next, portal_t::nodes, mplane_t::normal, NULL, model_brush_t::num_leafs, model_brush_t::num_portalpoints, model_brush_t::num_portals, mportal_t::numpoints, portal_t::numpoints, mportal_t::past, mportal_t::plane, portal_t::plane, PlaneClassify(), mportal_t::points, portal_t::points, portalarray, mleaf_t::portals, mvertex_t::position, VectorCopy, VectorNegate, and VectorSet.
Referenced by Mod_BSP_MakePortals().
|
static |
Definition at line 186 of file model_brush.c.
References BoxesOverlap, BoxOnPlaneSide(), mnode_t::children, maxs, mnode_t::maxs, mins, mnode_t::mins, model, and mnode_t::plane.
Referenced by Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
|
static |
Definition at line 598 of file model_brush.c.
References findnonsolidlocationinfo_t::absmax, findnonsolidlocationinfo_t::absmin, findnonsolidlocationinfo_t::bestdist, findnonsolidlocationinfo_t::center, i, Mod_BSP_FindNonSolidLocation_r(), findnonsolidlocationinfo_t::model, model, findnonsolidlocationinfo_t::nudge, NULL, findnonsolidlocationinfo_t::radius, VectorAdd, VectorClear, and VectorCopy.
Referenced by Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
|
static |
Definition at line 581 of file model_brush.c.
References findnonsolidlocationinfo_t::bestdist, findnonsolidlocationinfo_t::center, mnode_t::children, f, Mod_BSP_FindNonSolidLocation_r(), Mod_BSP_FindNonSolidLocation_r_Leaf(), mnode_t::plane, and PlaneDiff.
Referenced by Mod_BSP_FindNonSolidLocation(), and Mod_BSP_FindNonSolidLocation_r().
|
static |
Definition at line 562 of file model_brush.c.
References model_t::data_surfaces, mleaf_t::firstleafsurface, Mod_BSP_FindNonSolidLocation_r_Triangle(), findnonsolidlocationinfo_t::model, msurface_t::num_triangles, texture_t::supercontents, SUPERCONTENTS_SOLID, and msurface_t::texture.
Referenced by Mod_BSP_FindNonSolidLocation_r().
|
static |
Definition at line 474 of file model_brush.c.
References findnonsolidlocationinfo_t::bestdist, findnonsolidlocationinfo_t::center, CrossProduct, surfmesh_t::data_element3i, surfmesh_t::data_vertex3f, DotProduct, f, i, findnonsolidlocationinfo_t::model, findnonsolidlocationinfo_t::nudge, msurface_t::num_firsttriangle, findnonsolidlocationinfo_t::radius, sqrt(), model_t::surfmesh, VectorCopy, VectorMA, VectorNormalize, VectorScale, and VectorSubtract.
Referenced by Mod_BSP_FindNonSolidLocation_r_Leaf().
Definition at line 3785 of file model_brush.c.
References mnode_t::children, mplane_t::dist, DotProduct, model, mplane_t::normal, NULL, mnode_t::plane, and mplane_t::type.
Referenced by Mod_BSP_FatPVS(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
|
static |
Definition at line 1330 of file model_brush.c.
References Mod_BSP_LightPoint_RecursiveBSPNode(), model, and VectorSet.
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
|
static |
Definition at line 1186 of file model_brush.c.
References texture_t::basematerialflags, mnode_t::children, mplane_t::dist, msurface_lightmapinfo_t::extents, mnode_t::firstsurface, floor(), i, int(), msurface_t::lightmapinfo, MATERIALFLAG_WALL, MAXLIGHTMAPS, Mod_BSP_LightPoint_RecursiveBSPNode(), model, mplane_t::normal, mnode_t::numsurfaces, mnode_t::plane, PLANE_X, PLANE_Y, PLANE_Z, r_refdef, r_refdef_scene_t::rtlightstylevalue, msurface_lightmapinfo_t::samples, scale, r_refdef_t::scene, msurface_lightmapinfo_t::styles, msurface_lightmapinfo_t::texinfo, msurface_t::texture, msurface_lightmapinfo_t::texturemins, mplane_t::type, mtexinfo_t::vecs, VectorMA, w, x, and y.
Referenced by Mod_BSP_LightPoint(), and Mod_BSP_LightPoint_RecursiveBSPNode().
Definition at line 2854 of file model_brush.c.
References model_t::brush, mnode_t::children, mleaf_t::combinedsupercontents, mnode_t::combinedsupercontents, mleaf_t::containscollisionsurfaces, model_brush_t::data_brushes, model_t::data_surfaces, mleaf_t::firstleafbrush, mleaf_t::firstleafsurface, loadmodel, Mod_BSP_LoadNodes_RecursiveSetParent(), msurface_t::num_collisiontriangles, mleaf_t::numleafbrushes, mleaf_t::numleafsurfaces, mnode_t::parent, mnode_t::plane, texture_t::supercontents, and msurface_t::texture.
Referenced by Mod_BSP_LoadNodes_RecursiveSetParent(), Mod_Q1BSP_Load(), Mod_Q1BSP_LoadNodes(), Mod_Q2BSP_Load(), Mod_Q2BSP_LoadNodes(), and Mod_Q3BSP_LoadNodes().
|
static |
Definition at line 2298 of file model_brush.c.
References model_t::brush, model_t::brushq1, count, sizebuf_t::cursize, hullinfo_t::filehulls, mmodel_t::firstface, mmodel_t::headnode, Host_Error(), i, loadmodel, mmodel_t::maxs, Mem_Alloc, model_t::mempool, mmodel_t::mins, MSG_ReadLittleFloat(), MSG_ReadLittleLong(), model_t::name, mmodel_t::numfaces, model_brush_t::numsubmodels, mmodel_t::origin, model_brushq1_t::submodels, and mmodel_t::visleafs.
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
Definition at line 3768 of file model_brush.c.
References model_t::brush, model_t::brushq1, model_brush_t::data_nodes, hull_t::firstclipnode, model_brushq1_t::hulls, loadmodel, MAX_PORTALPOINTS, Mem_Alloc, Mem_ExpandableArray_FreeArray(), Mem_ExpandableArray_NewArray(), Mem_Free, model_t::mempool, Mod_BSP_FinalizePortals(), Mod_BSP_RecursiveNodePortals(), NULL, portalarray, portalpointsbuffer, portalpointsbufferoffset, and portalpointsbuffersize.
Referenced by Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), and Mod_Q3BSP_Load().
Definition at line 151 of file model_brush.c.
References mnode_t::children, mplane_t::dist, DotProduct, model, mplane_t::normal, NULL, mnode_t::plane, and mplane_t::type.
Referenced by Mod_Q1BSP_AmbientSoundLevelsForPoint(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
Definition at line 3617 of file model_brush.c.
References AddPortalToNodes(), portal_t::chain, mnode_t::children, Con_Print(), CON_WARN, mplane_t::dist, Host_Error(), i, loadmodel, MAX_PORTALPOINTS, Mem_ExpandableArray_AllocRecord(), Mem_Realloc, model_t::mempool, Mod_BSP_RecursiveNodePortals(), portal_t::next, portal_t::nodes, mplane_t::normal, NULL, portal_t::numpoints, mnode_t::plane, portal_t::plane, portal_t::points, PolygonD_Divide(), PolygonD_QuadForPlane(), PORTAL_DIST_EPSILON, portalarray, portalpointsbuffer, portalpointsbufferoffset, portalpointsbuffersize, mnode_t::portals, RemovePortalFromNodes(), and VectorNegate.
Referenced by Mod_BSP_MakePortals(), and Mod_BSP_RecursiveNodePortals().
Definition at line 3395 of file model_brush.c.
References mnode_t::children, max, mnode_t::maxs, min, mnode_t::mins, Mod_BSP_RecursiveRecalcNodeBBox(), and mnode_t::plane.
Referenced by Mod_BSP_FinalizePortals(), and Mod_BSP_RecursiveRecalcNodeBBox().
Definition at line 7348 of file model_brush.c.
References Mod_CollisionBIH_TracePoint(), model, NULL, and trace_t::startsupercontents.
Referenced by Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
int Mod_CollisionBIH_PointSuperContents_Mesh | ( | struct model_s * | model, |
int | frame, | ||
const vec3_t | start ) |
Definition at line 7387 of file model_brush.c.
References trace_t::fraction, trace_t::hitsupercontents, trace_t::hitsupercontentsmask, Mod_CollisionBIH_TraceLine(), model, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, and VectorSet.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
void Mod_CollisionBIH_TraceBox | ( | model_t * | model, |
const frameblend_t * | frameblend, | ||
const skeleton_t * | skeleton, | ||
trace_t * | trace, | ||
const vec3_t | start, | ||
const vec3_t | boxmins, | ||
const vec3_t | boxmaxs, | ||
const vec3_t | end, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
Definition at line 7332 of file model_brush.c.
References colboxbrushf_t::brush, Collision_BrushForBox(), Mod_CollisionBIH_TraceBrush(), model, NULL, and VectorAdd.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_MDLMD2MD3_TraceBox(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), Mod_VBSP_Load(), Mod_ZYMOTICMODEL_Load(), and PHYS_NudgeOutOfSolid().
void Mod_CollisionBIH_TraceBrush | ( | model_t * | model, |
const frameblend_t * | frameblend, | ||
const skeleton_t * | skeleton, | ||
trace_t * | trace, | ||
colbrushf_t * | thisbrush_start, | ||
colbrushf_t * | thisbrush_end, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
Definition at line 7092 of file model_brush.c.
References bih_node_t::back, bih_node_t::backmax, BIH_BRUSH, BIH_COLLISIONTRIANGLE, BIH_MAXUNORDEREDCHILDREN, BIH_RENDERTRIANGLE, BIH_SPLITX, BIH_UNORDERED, BoxesOverlap, bih_node_t::children, Collision_TraceBrushBrushFloat(), Collision_TraceBrushTriangleFloat(), f, trace_t::fraction, bih_node_t::front, bih_node_t::frontmin, trace_t::hitsupercontentsmask, cvar_t::integer, bih_leaf_t::itemindex, bih_t::leafs, max, bih_leaf_t::maxs, bih_node_t::maxs, colbrushf_t::maxs, maxs, min, bih_leaf_t::mins, bih_node_t::mins, colbrushf_t::mins, mins, Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint(), mod_q3bsp_curves_collisions, mod_q3bsp_optimizedtraceline, model, bih_t::nodes, bih_t::rootnode, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, texture, bih_leaf_t::textureindex, bih_leaf_t::type, bih_node_t::type, VectorAdd, VectorCompare, VectorCopy, VectorLerp, VectorM, and VectorSubtract.
Referenced by Mod_CollisionBIH_TraceBox(), Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), Mod_VBSP_Load(), and Mod_ZYMOTICMODEL_Load().
void Mod_CollisionBIH_TraceLine | ( | model_t * | model, |
const frameblend_t * | frameblend, | ||
const skeleton_t * | skeleton, | ||
trace_t * | trace, | ||
const vec3_t | start, | ||
const vec3_t | end, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
Definition at line 7082 of file model_brush.c.
References Mod_CollisionBIH_TraceLineShared(), Mod_CollisionBIH_TracePoint(), model, and VectorCompare.
Referenced by Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLineOfSight(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_MDLMD2MD3_TraceLine(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), Mod_VBSP_Load(), and Mod_ZYMOTICMODEL_Load().
void Mod_CollisionBIH_TraceLineAgainstSurfaces | ( | model_t * | model, |
const frameblend_t * | frameblend, | ||
const skeleton_t * | skeleton, | ||
trace_t * | trace, | ||
const vec3_t | start, | ||
const vec3_t | end, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
Definition at line 7406 of file model_brush.c.
References Mod_CollisionBIH_TraceLineShared(), and model.
Referenced by Mod_Q1BSP_Load().
qbool Mod_CollisionBIH_TraceLineOfSight | ( | struct model_s * | model, |
const vec3_t | start, | ||
const vec3_t | end, | ||
const vec3_t | acceptmins, | ||
const vec3_t | acceptmaxs ) |
Definition at line 7355 of file model_brush.c.
References BoxesOverlap, trace_t::endpos, trace_t::fraction, MATERIALFLAGMASK_TRANSLUCENT, Mod_CollisionBIH_TraceLine(), model, NULL, and SUPERCONTENTS_VISBLOCKERMASK.
|
static |
Definition at line 6861 of file model_brush.c.
References bih_node_t::back, bih_node_t::backmax, BIH_BRUSH, BIH_COLLISIONTRIANGLE, BIH_MAXUNORDEREDCHILDREN, BIH_RENDERTRIANGLE, BIH_SPLITX, BIH_UNORDERED, BoxesOverlap, bih_node_t::children, collision_bih_fullrecursion, Collision_TraceLineBrushFloat(), Collision_TraceLineTriangleFloat(), f, trace_t::fraction, bih_node_t::front, bih_node_t::frontmin, trace_t::hitsupercontentsmask, cvar_t::integer, bih_leaf_t::itemindex, bih_t::leafs, max, bih_leaf_t::maxs, bih_node_t::maxs, min, bih_leaf_t::mins, bih_node_t::mins, Mod_CollisionBIH_TracePoint(), mod_q3bsp_curves_collisions, model, bih_t::nodes, bih_t::rootnode, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, texture, bih_leaf_t::textureindex, bih_leaf_t::type, bih_node_t::type, VectorCompare, VectorCopy, and VectorLerp.
Referenced by Mod_CollisionBIH_TraceLine(), and Mod_CollisionBIH_TraceLineAgainstSurfaces().
void Mod_CollisionBIH_TracePoint | ( | model_t * | model, |
const frameblend_t * | frameblend, | ||
const skeleton_t * | skeleton, | ||
trace_t * | trace, | ||
const vec3_t | start, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
Definition at line 6791 of file model_brush.c.
References bih_node_t::back, bih_node_t::backmax, BIH_BRUSH, BIH_COLLISIONTRIANGLE, BIH_MAXUNORDEREDCHILDREN, BIH_RENDERTRIANGLE, BIH_SPLITX, BIH_UNORDERED, BoxesOverlap, bih_node_t::children, Collision_TracePointBrushFloat(), trace_t::fraction, bih_node_t::front, bih_node_t::frontmin, trace_t::hitsupercontentsmask, bih_leaf_t::itemindex, bih_t::leafs, bih_leaf_t::maxs, bih_node_t::maxs, bih_leaf_t::mins, bih_node_t::mins, model, bih_t::nodes, bih_t::rootnode, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, bih_leaf_t::type, and bih_node_t::type.
Referenced by Mod_CollisionBIH_PointSuperContents(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TraceLineShared(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
void Mod_CollisionBIH_TracePoint_Mesh | ( | model_t * | model, |
const frameblend_t * | frameblend, | ||
const skeleton_t * | skeleton, | ||
trace_t * | trace, | ||
const vec3_t | start, | ||
int | hitsupercontentsmask, | ||
int | skipsupercontentsmask, | ||
int | skipmaterialflagsmask ) |
Definition at line 7362 of file model_brush.c.
References trace_t::fraction, trace_t::hitsupercontents, trace_t::hitsupercontentsmask, Mod_CollisionBIH_TraceLine(), model, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, trace_t::startsupercontents, and VectorSet.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), and Mod_ZYMOTICMODEL_Load().
Definition at line 3896 of file model_brush.c.
References buffer, mod(), and Mod_Q1BSP_Load().
Definition at line 7876 of file model_brush.c.
References buffer, Host_Error(), i, LittleLong, mod(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), Q2BSPVERSION, Q3BSPVERSION, Q3BSPVERSION_IG, and Q3BSPVERSION_LIVE.
Definition at line 7412 of file model_brush.c.
References texture_t::basematerialflags, BIH_BRUSH, BIH_Build(), BIH_COLLISIONTRIANGLE, BIH_RENDERTRIANGLE, q3mbrush_t::colbrushf, bih_leaf_t::itemindex, loadmodel, MATERIALFLAG_MESHCOLLISIONS, max, bih_t::maxnodes, bih_leaf_t::maxs, Mem_Alloc, Mem_Free, Mem_Realloc, model_t::mempool, min, bih_leaf_t::mins, model, bih_t::nodes, NULL, msurface_t::num_firstcollisiontriangle, msurface_t::num_firsttriangle, bih_t::numnodes, bih_leaf_t::surfaceindex, msurface_t::texture, q3mbrush_t::texture, bih_leaf_t::textureindex, bih_leaf_t::type, and VectorCopy.
Referenced by Mod_DARKPLACESMODEL_Load(), Mod_IDP0_Load(), Mod_IDP2_Load(), Mod_IDP3_Load(), Mod_INTERQUAKEMODEL_Load(), Mod_OBJ_Load(), Mod_PSKMODEL_Load(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_ZYMOTICMODEL_Load().
Definition at line 8399 of file model_brush.c.
References Host_Error().
Definition at line 8417 of file model_brush.c.
References model_brush_t::AmbientSoundLevelsForPoint, mleaf_t::areaindex, argv(), model_brush_t::BoxTouchingLeafPVS, model_brush_t::BoxTouchingPVS, model_brush_t::BoxTouchingVisibleLeafs, model_t::brush, buffer, mleaf_t::clusterindex, mleaf_t::combinedsupercontents, model_t::CompileShadowMap, Con_DPrintf(), data, surfmesh_t::data_element3i, surfmesh_t::data_element3s, model_brush_t::data_leafs, model_brush_t::data_leafsurfaces, model_brush_t::data_nodes, surfmesh_t::data_normal3f, model_brush_t::data_pvsclusters, model_t::data_surfaces, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, dp_strlcpy, dpsnprintf(), model_t::Draw, model_t::DrawDebug, model_t::DrawDepth, model_t::DrawLight, model_t::DrawPrepass, model_t::DrawShadowMap, fabs(), model_brush_t::FatPVS, model_brush_t::FindBoxClusters, model_brush_t::FindNonSolidLocation, animscene_t::firstframe, mleaf_t::firstleafbrush, mleaf_t::firstleafsurface, animscene_t::framecount, animscene_t::framerate, model_t::GetLightInfo, model_brush_t::GetPVS, i, int(), cvar_t::integer, model_brush_t::LightPoint, loadmodel, animscene_t::loop, max, MAX_QPATH, maxs, mleaf_t::maxs, msurface_t::maxs, Mem_Alloc, Mem_Free, Mem_Realloc, model_t::mempool, min, mins, mleaf_t::mins, msurface_t::mins, mod(), Mod_BuildAliasSkinsFromSkinFiles(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), Mod_BuildVBOs(), Mod_CollisionBIH_PointSuperContents_Mesh(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint_Mesh(), Mod_FindName(), Mod_FreeSkinFiles(), Mod_LoadSkinFiles(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), mod_obj, mod_obj_orientation, Mod_SetDrawSkyAndWater(), Mod_ValidateElements(), model_t::modeldatatypestring, model_t::modelsurfaces_sorted, model_t::name, name, model_brush_t::NativeContentsFromSuperContents, objvertex_t::nextindex, nobsp_pvs, model_t::normalmaxs, model_t::normalmins, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_brush_t::num_leafs, model_brush_t::num_leafsurfaces, model_brush_t::num_nodes, model_brush_t::num_portals, model_brush_t::num_pvsclusterbytes, model_brush_t::num_pvsclusters, model_t::num_surfaces, model_t::num_textures, model_t::num_texturesperskin, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, model_brush_t::num_visleafs, mleaf_t::numleafbrushes, mleaf_t::numleafsurfaces, model_t::numskins, model_brush_t::numsubmodels, model_brush_t::PointInLeaf, model_t::PointSuperContents, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_Mod_GetLightInfo(), r_smoothnormals_areaweighting, model_t::radius, model_t::radius2, model_t::rotatedmaxs, model_t::rotatedmins, model_brush_t::RoundUpToHullSize, model_t::skinscenes, model_t::soundfromcenter, sqrt(), objvertex_t::submodelindex, model_brush_t::submodels, model_brush_t::SuperContentsFromNativeContents, model_brush_t::supportwateralpha, model_t::surfmesh, tempmempool, msurface_t::texture, objvertex_t::textureindex, model_t::TraceBox, model_t::TraceBrush, model_t::TraceLine, model_t::TraceLineAgainstSurfaces, model_brush_t::TraceLineOfSight, model_t::TracePoint, model_t::type, objvertex_t::v, v, Vector2Compare, Vector2Copy, VectorClear, VectorCompare, VectorCopy, VectorLength2, objvertex_t::vn, objvertex_t::vt, model_t::yawmaxs, and model_t::yawmins.
|
static |
Definition at line 167 of file model_brush.c.
References mleaf_t::ambient_sound_level, i, min, Mod_BSP_PointInLeaf(), and model.
Referenced by Mod_Q1BSP_Load().
Definition at line 3264 of file model_brush.c.
References texture_t::basematerialflags, MATERIALFLAG_SKY, msurface_t::maxs, msurface_t::mins, mod(), Mod_Q1BSP_PointSuperContents(), msurface_t::num_firstvertex, texture_t::skynoshadowtexture, SUPERCONTENTS_SOLID, msurface_t::texture, and VectorMAMAM.
Referenced by Mod_Q1BSP_Load().
Definition at line 3087 of file model_brush.c.
References model_t::brush, CHECKPVSBIT, mleaf_t::clusterindex, mleaf_t::contents, CONTENTS_EMPTY, CONTENTS_SLIME, CONTENTS_WATER, model_brush_t::data_leafs, model_brush_t::data_pvsclusters, i, loadmodel, model_brush_t::num_leafs, and model_brush_t::num_pvsclusterbytes.
Referenced by Mod_Q1BSP_Load().
Definition at line 3903 of file model_brush.c.
References model_t::brush, buffer, ca_dedicated, cls, Com_BlockChecksum(), Con_DPrintf(), Con_Printf(), CON_WARN, sizebuf_t::cursize, data, sizebuf_t::data, dp_strlcpy, dpsnprintf(), fabs(), hullinfo_t::filehulls, mmodel_t::firstface, HEADER_LUMPS, mmodel_t::headnode, Host_Error(), hullinfo_t::hullsizes, i, cvar_t::integer, msurface_t::lightmapinfo, LittleLong, loadmodel, LUMP_CLIPNODES, LUMP_EDGES, LUMP_ENTITIES, LUMP_FACES, LUMP_LEAFS, LUMP_LIGHTING, LUMP_MARKSURFACES, LUMP_MODELS, LUMP_NODES, LUMP_PLANES, LUMP_SURFEDGES, LUMP_TEXINFO, LUMP_TEXTURES, LUMP_VERTEXES, LUMP_VISIBILITY, max, MAX_MAP_HULLS, MAXLIGHTMAPS, mmodel_t::maxs, Mem_Alloc, Mem_AllocType, Mem_Free, model_t::mempool, mmodel_t::mins, mod(), mod_brushq1, Mod_BSP_BoxTouchingLeafPVS(), Mod_BSP_BoxTouchingPVS(), Mod_BSP_BoxTouchingVisibleLeafs(), Mod_BSP_FatPVS(), Mod_BSP_FindBoxClusters(), Mod_BSP_FindNonSolidLocation(), Mod_BSP_GetPVS(), Mod_BSP_LightPoint(), Mod_BSP_LoadNodes_RecursiveSetParent(), Mod_BSP_LoadSubmodels(), Mod_BSP_MakePortals(), Mod_BSP_PointInLeaf(), mod_bsp_portalize, Mod_BuildVBOs(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TraceLineAgainstSurfaces(), Mod_FindName(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_Q1BSP_AmbientSoundLevelsForPoint(), Mod_Q1BSP_AssignNoShadowSkySurfaces(), Mod_Q1BSP_CheckWaterAlphaSupport(), Mod_Q1BSP_LoadClipnodes(), Mod_Q1BSP_LoadEdges(), Mod_Q1BSP_LoadEntities(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_LoadLeaffaces(), Mod_Q1BSP_LoadLeafs(), Mod_Q1BSP_LoadLighting(), Mod_Q1BSP_LoadMapBrushes(), Mod_Q1BSP_LoadNodes(), Mod_Q1BSP_LoadPlanes(), Mod_Q1BSP_LoadSurfedges(), Mod_Q1BSP_LoadTexinfo(), Mod_Q1BSP_LoadTextures(), Mod_Q1BSP_LoadVertexes(), Mod_Q1BSP_LoadVisibility(), Mod_Q1BSP_MakeHull0(), Mod_Q1BSP_NativeContentsFromSuperContents(), Mod_Q1BSP_PointSuperContents(), mod_q1bsp_polygoncollisions, Mod_Q1BSP_RoundUpToHullSize(), Mod_Q1BSP_SuperContentsFromNativeContents(), Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), Mod_Q1BSP_TraceLineAgainstSurfaces(), Mod_Q1BSP_TraceLineOfSight(), Mod_Q1BSP_TracePoint(), Mod_SetDrawSkyAndWater(), MSG_InitReadBuffer(), MSG_ReadLittleLong(), model_t::name, name, NULL, model_brush_t::num_leafs, model_brush_t::num_nodes, model_brush_t::num_portals, model_t::num_surfaces, surfmesh_t::num_triangles, surfmesh_t::num_vertices, mmodel_t::numfaces, model_brush_t::numsubmodels, model_brush_lightstyleinfo_t::numsurfaces, offset, r, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_Mod_GetLightInfo(), size, sqrt(), client_static_t::state, model_brush_lightstyleinfo_t::style, msurface_lightmapinfo_t::styles, model_brush_t::submodels, model_brush_t::supportwateralpha, model_brush_lightstyleinfo_t::surfacelist, model_t::surfmesh, model_brush_lightstyleinfo_t::value, VectorClear, VectorCopy, and VectorSet.
Referenced by Mod_2PSB_Load(), Mod_BSP2_Load(), and Mod_HLBSP_Load().
|
static |
Definition at line 3110 of file model_brush.c.
References model_t::brush, model_t::brushq1, mclipnode_t::children, hull_t::clip_maxs, hull_t::clip_mins, hull_t::clip_size, hull_t::clipnodes, model_brushq1_t::clipnodes, count, sizebuf_t::cursize, model_brush_t::data_planes, hull_t::firstclipnode, Host_Error(), model_brushq1_t::hulls, hullinfo_t::hullsizes, i, model_brush_t::isbsp2, hull_t::lastclipnode, loadmodel, MAX_MAP_HULLS, Mem_Alloc, model_t::mempool, MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, model_brush_t::num_planes, model_brushq1_t::numclipnodes, mclipnode_t::planenum, hull_t::planes, and VectorSubtract.
Referenced by Mod_Q1BSP_Load().
Definition at line 2339 of file model_brush.c.
References model_t::brush, model_t::brushq1, Con_Printf(), count, sizebuf_t::cursize, model_brushq1_t::edges, Host_Error(), i, int(), model_brush_t::isbsp2, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, model_brushq1_t::numedges, model_brushq1_t::numvertexes, and medge_t::v.
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
Definition at line 2263 of file model_brush.c.
References model_t::brush, sizebuf_t::cursize, model_brush_t::entities, model_brush_t::ishlbsp, loadmodel, Mem_Alloc, model_t::mempool, Mod_Q1BSP_ParseWadsFromEntityLump(), MSG_ReadBytes(), and NULL.
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
Definition at line 2575 of file model_brush.c.
References bound, BoxFromPoints(), model_t::brush, model_t::brushq1, model_t::brushq3, BuffLittleLong(), BuffLittleShort(), ca_dedicated, ceil(), cl_stainmaps, cls, count, sizebuf_t::cursize, sizebuf_t::data, model_brushq3_t::data_deluxemaps, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_lightmapoffsets, model_brushq3_t::data_lightmaps, surfmesh_t::data_normal3f, model_t::data_surfaces, model_t::data_surfaces_lightmapinfo, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordlightmap2f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, msurface_t::deluxemaptexture, DotProduct, model_brushq1_t::edges, msurface_lightmapinfo_t::extents, model_brushq1_t::firstrender, float, floor(), gl_max_lightmapsize, texture_t::height, Host_Error(), i, int(), cvar_t::integer, model_brush_t::isbsp2, model_brush_t::ishlbsp, model_brush_t::isq2bsp, model_brushq1_t::lightdata, msurface_t::lightmapinfo, msurface_lightmapinfo_t::lightmaporigin, msurface_t::lightmaptexture, model_brushq1_t::lightmapupdateflags, model_t::lit, loadmodel, max, MAXLIGHTMAPS, msurface_t::maxs, viddef_t::maxtexturesize_2d, Mem_Alloc, Mem_Realloc, model_t::mempool, min, msurface_t::mins, Mod_AllocLightmap_Block(), Mod_AllocLightmap_Init(), Mod_AllocLightmap_Reset(), Mod_AllocSurfMesh(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), MSG_ReadByte, MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, texture_t::name, model_brushq1_t::nmaplightdata, msurface_lightmapinfo_t::nmapsamples, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_brushq3_t::num_mergedlightmaps, model_brush_t::num_planes, model_t::num_surfaces, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, model_brushq1_t::numsurfedges, model_brushq1_t::numtexinfo, mvertex_t::position, mtexinfo_t::q1flags, texture_t::q2flags, Q2SURF_SKY, Q2SURF_WARP, R_AllocTexturePool(), R_LoadTexture2D(), r_smoothnormals_areaweighting, r_texture_blanknormalmap, msurface_lightmapinfo_t::samples, msurface_lightmapinfo_t::stainsamples, client_static_t::state, msurface_lightmapinfo_t::styles, model_brushq1_t::surfedges, model_t::surfmesh, TEX_SPECIAL, TEXF_ALLOWUPDATES, TEXF_FORCELINEAR, model_brushq1_t::texinfo, msurface_lightmapinfo_t::texinfo, msurface_t::texture, mtexinfo_t::textureindex, msurface_lightmapinfo_t::texturemins, model_t::texturepool, TEXTYPE_BGRA, medge_t::v, v, va(), mtexinfo_t::vecs, VectorCopy, model_brushq1_t::vertexes, vid, and texture_t::width.
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
Definition at line 3194 of file model_brush.c.
References model_t::brush, sizebuf_t::cursize, model_brush_t::data_leafsurfaces, Host_Error(), i, model_brush_t::isbsp2, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, model_brush_t::num_leafsurfaces, and model_t::num_surfaces.
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
Definition at line 2995 of file model_brush.c.
References mleaf_t::ambient_sound_level, model_t::brush, model_t::brushq1, mleaf_t::clusterindex, Con_Print(), Con_Printf(), mleaf_t::contents, count, sizebuf_t::cursize, model_brushq1_t::data_compressedpvs, model_brush_t::data_leafs, model_brush_t::data_leafsurfaces, model_brush_t::data_pvsclusters, mleaf_t::firstleafsurface, Host_Error(), i, model_brush_t::isbsp2, model_brush_t::isbsp2rmqe, loadmodel, mleaf_t::maxs, Mem_Alloc, model_t::mempool, mleaf_t::mins, Mod_BSP_DecompressVis(), MSG_ReadByte, MSG_ReadLittleFloat(), MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, NULL, model_brushq1_t::num_compressedpvs, model_brush_t::num_leafs, model_brush_t::num_leafsurfaces, model_brush_t::num_pvsclusterbytes, model_brush_t::num_pvsclusters, mleaf_t::numleafsurfaces, model_brushq1_t::submodels, and mmodel_t::visleafs.
Referenced by Mod_Q1BSP_Load().
Definition at line 2111 of file model_brush.c.
References model_t::brush, model_t::brushq1, model_t::brushq3, Con_Print(), Con_Printf(), sizebuf_t::cursize, data, sizebuf_t::data, model_brushq3_t::deluxemapping, model_brushq3_t::deluxemapping_modelspace, developer_loading, dp_strlcat, dp_strlcpy, FS_LoadFile(), FS_StripExtension(), i, cvar_t::integer, model_brush_t::ishlbsp, model_brushq1_t::lightdata, LittleLong, loadmodel, MAX_QPATH, Mem_Alloc, Mem_Free, model_t::mempool, model_t::name, model_brushq1_t::nmaplightdata, NULL, and tempmempool.
Referenced by Mod_Q1BSP_Load().
Definition at line 3284 of file model_brush.c.
References model_t::brush, COM_ParseToken_Simple(), com_token, Con_Printf(), data, DotProduct, FS_LoadFile(), FS_StripExtension(), loadmodel, MAX_QPATH, Mem_Alloc, model_t::mempool, model, model_t::name, NULL, model_brush_t::numsubmodels, strlcat, strlcpy, model_brush_t::submodels, tempmempool, TriangleNormal, and VectorNormalizeDouble.
Referenced by Mod_Q1BSP_Load().
Definition at line 2891 of file model_brush.c.
References model_t::brush, mnode_t::children, Con_Printf(), count, sizebuf_t::cursize, model_brush_t::data_leafs, model_brush_t::data_nodes, model_brush_t::data_planes, mnode_t::firstsurface, Host_Error(), i, model_brush_t::isbsp2, model_brush_t::isbsp2rmqe, loadmodel, mnode_t::maxs, Mem_Alloc, model_t::mempool, mnode_t::mins, Mod_BSP_LoadNodes_RecursiveSetParent(), MSG_ReadLittleFloat(), MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, NULL, model_brush_t::num_leafs, model_brush_t::num_nodes, mnode_t::numsurfaces, and mnode_t::plane.
Referenced by Mod_Q1BSP_Load().
Definition at line 3241 of file model_brush.c.
References model_t::brush, sizebuf_t::cursize, model_brush_t::data_planes, mplane_t::dist, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleFloat(), MSG_ReadLittleLong(), model_t::name, mplane_t::normal, model_brush_t::num_planes, and PlaneClassify().
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
|
static |
Definition at line 1570 of file model_brush.c.
References model_brush_t::alphaskyskinframe, b, model_t::brush, ca_dedicated, cls, CRC_Block(), g, height, i, loadmodel, Mem_Alloc, Mem_Free, NULL, palette_bgra_complete, palette_rgb, r, R_AllocTexturePool(), R_SkinFrame_LoadInternalBGRA(), model_brush_t::solidskyskinframe, src, viddef_t::sRGB3D, client_static_t::state, tempmempool, TEXF_ALPHA, model_t::texturepool, vid, w, width, x, and y.
Referenced by Mod_Q1BSP_LoadTextures().
Definition at line 3226 of file model_brush.c.
References model_t::brushq1, sizebuf_t::cursize, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleLong(), model_t::name, model_brushq1_t::numsurfedges, and model_brushq1_t::surfedges.
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
Definition at line 2377 of file model_brush.c.
References model_t::brushq1, Con_Printf(), count, sizebuf_t::cursize, model_t::data_textures, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleFloat(), MSG_ReadLittleLong(), model_t::name, model_t::num_textures, model_brushq1_t::numtexinfo, mtexinfo_t::q1flags, TEX_SPECIAL, model_brushq1_t::texinfo, mtexinfo_t::textureindex, and mtexinfo_t::vecs.
Referenced by Mod_Q1BSP_Load().
Definition at line 1649 of file model_brush.c.
References texture_t::anim_frames, texture_t::anim_total, texture_t::animated, texture_t::basealpha, texture_t::basematerialflags, model_t::brush, ca_dedicated, cls, Con_DPrintf(), Con_Printf(), CRC_Block(), texture_t::currentframe, texture_t::currentmaterialflags, texture_t::currentskinframe, sizebuf_t::cursize, data, sizebuf_t::data, model_t::data_textures, dp_strlcpy, dpsnprintf(), FS_StripExtension(), GAME_TENEBRAE, gamemode, texture_t::height, i, image_height, image_width, int(), cvar_t::integer, model_brush_t::ishlbsp, loadimagepixelsbgra(), loadmodel, mapname, MATERIALFLAG_ADD, MATERIALFLAG_ALPHA, MATERIALFLAG_ALPHATEST, MATERIALFLAG_BLENDED, MATERIALFLAG_LIGHTBOTHSIDES, MATERIALFLAG_NODRAW, MATERIALFLAG_NOSHADOW, MATERIALFLAG_REFLECTION, MATERIALFLAG_SKY, MATERIALFLAG_WALL, MATERIALFLAG_WATERALPHA, MATERIALFLAG_WATERSCROLL, MATERIALFLAG_WATERSHADER, texture_t::materialshaderpass, max, MAX_QPATH, Mem_Alloc, Mem_Free, model_t::mempool, Mod_CreateShaderPass(), Mod_LoadTextureFromQ3Shader(), Mod_Q1BSP_LoadSplitSky(), mod_q1bsp_texture_lava, mod_q1bsp_texture_sky, mod_q1bsp_texture_slime, mod_q1bsp_texture_solid, mod_q1bsp_texture_water, mod_q3shader_default_refractive_index, MSG_InitReadBuffer(), MSG_ReadByte, MSG_ReadLittleLong(), model_t::name, name, texture_t::name, NULL, model_t::num_textures, model_t::num_texturesperskin, texture_t::offsetbias, texture_t::offsetmapping, OFFSETMAPPING_DEFAULT, texture_t::offsetscale, pixels, r_fullbrights, r_nosurftextures, R_SkinFrame_LoadExternal(), R_SkinFrame_LoadInternalBGRA(), R_SkinFrame_LoadInternalQuake(), R_SkinFrame_LoadMissing(), texture_t::r_water_wateralpha, sizebuf_t::readcount, texture_t::reflectcolor4f, texture_t::reflectfactor, texture_t::reflectmax, texture_t::reflectmin, texture_t::refractcolor4f, texture_t::refractfactor, texture_t::refractive_index, texture_t::shaderpasses, texture_shaderpass_t::skinframes, texture_t::skynoshadowtexture, texture_t::specularpowermod, texture_t::specularscalemod, client_static_t::state, strlen(), texture_t::supercontents, SUPERCONTENTS_SOLID, texture_t::surfaceflags, TEXF_ALPHA, TEXF_COMPRESS, TEXF_ISWORLD, TEXF_MIPMAP, TEXF_PICMIP, texture_t::transparentsort, TRANSPARENTSORT_DISTANCE, va(), cvar_t::value, Vector4Set, W_ConvertWAD3TextureBGRA(), W_GetTextureBGRA(), and texture_t::width.
Referenced by Mod_Q1BSP_Load().
Definition at line 2276 of file model_brush.c.
References model_t::brushq1, count, sizebuf_t::cursize, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleFloat(), model_t::name, model_brushq1_t::numvertexes, mvertex_t::position, and model_brushq1_t::vertexes.
Referenced by Mod_Q1BSP_Load(), and Mod_Q2BSP_Load().
Definition at line 2195 of file model_brush.c.
References model_t::brushq1, sizebuf_t::cursize, model_brushq1_t::data_compressedpvs, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadBytes(), NULL, and model_brushq1_t::num_compressedpvs.
Referenced by Mod_Q1BSP_Load().
Definition at line 3169 of file model_brush.c.
References model_t::brush, model_t::brushq1, mclipnode_t::children, mnode_t::children, hull_t::clipnodes, model_brush_t::data_nodes, model_brush_t::data_planes, hull_t::firstclipnode, model_brushq1_t::hulls, i, hull_t::lastclipnode, loadmodel, Mem_Alloc, model_t::mempool, model_brush_t::num_nodes, mnode_t::plane, mclipnode_t::planenum, and hull_t::planes.
Referenced by Mod_Q1BSP_Load().
Definition at line 650 of file model_brush.c.
References CONTENTS_EMPTY, CONTENTS_LAVA, CONTENTS_SKY, CONTENTS_SLIME, CONTENTS_SOLID, CONTENTS_WATER, SUPERCONTENTS_BODY, SUPERCONTENTS_LAVA, SUPERCONTENTS_SKY, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_Q1BSP_Load(), SV_CheckWater(), SV_CheckWaterTransition(), VM_CL_pointcontents(), and VM_SV_pointcontents().
|
static |
Definition at line 2207 of file model_brush.c.
References model_t::brush, COM_ParseToken_Simple(), com_token, data, dp_strlcpy, dpsnprintf(), i, int(), model_brush_t::ishlbsp, loadmodel, strlen(), value, and W_LoadTextureWadFile().
Referenced by Mod_Q1BSP_LoadEntities().
|
static |
Definition at line 1039 of file model_brush.c.
References mclipnode_t::children, mplane_t::dist, DotProduct, Mod_Q1BSP_SuperContentsFromNativeContents(), model, mplane_t::normal, mclipnode_t::planenum, and mplane_t::type.
Referenced by Mod_Q1BSP_AssignNoShadowSkySurfaces(), and Mod_Q1BSP_Load().
|
static |
Definition at line 687 of file model_brush.c.
References trace_t::allsolid, bound, mclipnode_t::children, hull_t::clipnodes, collision_impactnudge, Con_Print(), mplane_t::dist, plane_t::dist, RecursiveHullCheckTraceInfo_t::dist, DotProduct, RecursiveHullCheckTraceInfo_t::end, trace_t::fraction, trace_t::hitq3surfaceflags, trace_t::hitsupercontents, trace_t::hitsupercontentsmask, trace_t::hittexture, RecursiveHullCheckTraceInfo_t::hull, HULLCHECKSTATE_DONE, HULLCHECKSTATE_EMPTY, HULLCHECKSTATE_SOLID, trace_t::inopen, cvar_t::integer, trace_t::inwater, Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_SuperContentsFromNativeContents(), mod_q1bsp_texture_lava, mod_q1bsp_texture_sky, mod_q1bsp_texture_slime, mod_q1bsp_texture_solid, mod_q1bsp_texture_water, mod_q1bsp_traceoutofsolid, mplane_t::normal, plane_t::normal, trace_t::plane, mclipnode_t::planenum, hull_t::planes, ret, RecursiveHullCheckTraceInfo_t::start, trace_t::startfound, trace_t::startsolid, trace_t::startsupercontents, SUPERCONTENTS_LAVA, SUPERCONTENTS_LIQUIDSMASK, SUPERCONTENTS_SKY, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, RecursiveHullCheckTraceInfo_t::trace, mplane_t::type, cvar_t::value, VectorCopy, VectorMA, and VectorNegate.
Referenced by Collision_ClipTrace_Box(), Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_TraceBox(), and Mod_Q1BSP_TraceLine().
|
static |
Definition at line 846 of file model_brush.c.
References trace_t::allsolid, mclipnode_t::children, hull_t::clipnodes, mplane_t::dist, DotProduct, trace_t::hitsupercontentsmask, RecursiveHullCheckTraceInfo_t::hull, HULLCHECKSTATE_EMPTY, HULLCHECKSTATE_SOLID, trace_t::inopen, trace_t::inwater, Mod_Q1BSP_SuperContentsFromNativeContents(), mplane_t::normal, mclipnode_t::planenum, hull_t::planes, RecursiveHullCheckTraceInfo_t::start, trace_t::startsolid, trace_t::startsupercontents, SUPERCONTENTS_LIQUIDSMASK, RecursiveHullCheckTraceInfo_t::trace, mplane_t::type, and VectorCopy.
Referenced by Mod_Q1BSP_TraceBox(), Mod_Q1BSP_TraceLine(), and Mod_Q1BSP_TracePoint().
|
static |
Definition at line 3848 of file model_brush.c.
References model_t::brush, model_t::brushq1, hull_t::clip_size, model_brushq1_t::hulls, model_brush_t::ishlbsp, mod_q1bsp_zero_hullsize_cutoff, size, cvar_t::value, VectorAdd, VectorCopy, and VectorSubtract.
Referenced by Mod_Q1BSP_Load().
Definition at line 630 of file model_brush.c.
References CONTENTS_EMPTY, CONTENTS_LAVA, CONTENTS_SKY, CONTENTS_SLIME, CONTENTS_SOLID, CONTENTS_WATER, SUPERCONTENTS_LAVA, SUPERCONTENTS_NODROP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_SKY, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_Q1BSP_Load(), Mod_Q1BSP_PointSuperContents(), Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_RecursiveHullCheckPoint(), and Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode().
|
static |
Definition at line 955 of file model_brush.c.
References trace_t::allsolid, hull_t::clip_mins, Con_Print(), Con_Printf(), RecursiveHullCheckTraceInfo_t::dist, RecursiveHullCheckTraceInfo_t::end, hull_t::firstclipnode, trace_t::fraction, trace_t::hitsupercontentsmask, RecursiveHullCheckTraceInfo_t::hull, Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_RecursiveHullCheckPoint(), Mod_Q1BSP_TraceLine(), Mod_Q1BSP_TracePoint(), mod_q1bsp_zero_hullsize_cutoff, model, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, RecursiveHullCheckTraceInfo_t::start, trace_t::startsolid, RecursiveHullCheckTraceInfo_t::trace, cvar_t::value, VectorClear, VectorCompare, VectorCopy, VectorLength2, VectorLerp, VectorMAMAM, and VectorSubtract.
Referenced by Mod_Q1BSP_Load().
|
static |
Definition at line 894 of file model_brush.c.
References trace_t::allsolid, Con_Print(), Con_Printf(), RecursiveHullCheckTraceInfo_t::dist, RecursiveHullCheckTraceInfo_t::end, hull_t::firstclipnode, trace_t::fraction, trace_t::hitsupercontentsmask, RecursiveHullCheckTraceInfo_t::hull, cvar_t::integer, Mod_Q1BSP_RecursiveHullCheck(), Mod_Q1BSP_RecursiveHullCheckPoint(), Mod_Q1BSP_TraceLineAgainstSurfaces(), Mod_Q1BSP_TracePoint(), model, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, RecursiveHullCheckTraceInfo_t::start, trace_t::startsolid, sv_gameplayfix_q1bsptracelinereportstexture, RecursiveHullCheckTraceInfo_t::trace, VectorClear, VectorCompare, VectorCopy, VectorLength2, VectorLerp, and VectorSubtract.
Referenced by Mod_Q1BSP_Load(), Mod_Q1BSP_TraceBox(), and Mod_Q1BSP_TraceLineOfSight().
|
static |
Definition at line 1509 of file model_brush.c.
References trace_t::allsolid, RecursiveHullCheckTraceInfo_t::dist, RecursiveHullCheckTraceInfo_t::end, trace_t::endpos, hull_t::firstclipnode, trace_t::fraction, trace_t::hitsupercontentsmask, RecursiveHullCheckTraceInfo_t::hull, Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode(), model, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, RecursiveHullCheckTraceInfo_t::start, RecursiveHullCheckTraceInfo_t::trace, VectorCopy, VectorMA, and VectorSubtract.
Referenced by Mod_Q1BSP_Load(), and Mod_Q1BSP_TraceLine().
|
static |
Definition at line 1345 of file model_brush.c.
References bound, collision_impactnudge, CrossProduct, texture_t::currentframe, texture_t::currentmaterialflags, plane_t::dist, RecursiveHullCheckTraceInfo_t::dist, DotProduct, RecursiveHullCheckTraceInfo_t::end, mnode_t::firstsurface, trace_t::fraction, trace_t::hitq3surfaceflags, trace_t::hitsupercontents, trace_t::hitsupercontentsmask, trace_t::hittexture, i, model, normal, plane_t::normal, NULL, msurface_t::num_firstvertex, msurface_t::num_vertices, mnode_t::numsurfaces, trace_t::plane, trace_t::skipmaterialflagsmask, trace_t::skipsupercontentsmask, RecursiveHullCheckTraceInfo_t::start, texture_t::supercontents, msurface_t::texture, RecursiveHullCheckTraceInfo_t::trace, v0, v1, cvar_t::value, VectorCopy, and VectorSubtract.
Referenced by Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode().
|
static |
Definition at line 1416 of file model_brush.c.
References trace_t::allsolid, mnode_t::children, mleaf_t::contents, mplane_t::dist, RecursiveHullCheckTraceInfo_t::dist, DotProduct, RecursiveHullCheckTraceInfo_t::end, trace_t::hitsupercontentsmask, trace_t::hittexture, HULLCHECKSTATE_DONE, HULLCHECKSTATE_EMPTY, HULLCHECKSTATE_SOLID, trace_t::inopen, trace_t::inwater, Mod_Q1BSP_SuperContentsFromNativeContents(), Mod_Q1BSP_TraceLineAgainstSurfacesFindTextureOnNode(), Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode(), model, mplane_t::normal, mnode_t::plane, RecursiveHullCheckTraceInfo_t::start, trace_t::startfound, trace_t::startsolid, trace_t::startsupercontents, SUPERCONTENTS_LIQUIDSMASK, RecursiveHullCheckTraceInfo_t::trace, mplane_t::type, and VectorMA.
Referenced by Mod_Q1BSP_TraceLineAgainstSurfaces(), and Mod_Q1BSP_TraceLineAgainstSurfacesRecursiveBSPNode().
|
static |
Definition at line 1179 of file model_brush.c.
References BoxesOverlap, trace_t::endpos, trace_t::fraction, MATERIALFLAGMASK_TRANSLUCENT, Mod_Q1BSP_TraceLine(), model, NULL, and SUPERCONTENTS_VISBLOCKERMASK.
Referenced by Mod_Q1BSP_Load().
|
static |
Definition at line 877 of file model_brush.c.
References trace_t::allsolid, RecursiveHullCheckTraceInfo_t::end, hull_t::firstclipnode, trace_t::fraction, RecursiveHullCheckTraceInfo_t::hull, Mod_Q1BSP_RecursiveHullCheckPoint(), model, RecursiveHullCheckTraceInfo_t::start, RecursiveHullCheckTraceInfo_t::trace, and VectorCopy.
Referenced by Mod_Q1BSP_Load(), Mod_Q1BSP_TraceBox(), and Mod_Q1BSP_TraceLine().
|
static |
Definition at line 4825 of file model_brush.c.
References mnode_t::children, first, mleaf_t::firstleafbrush, i, mod(), Mod_Q2BSP_FindSubmodelBrushRange_r(), mleaf_t::numleafbrushes, and mnode_t::plane.
Referenced by Mod_Q2BSP_FindSubmodelBrushRange_r(), and Mod_Q2BSP_Load().
Definition at line 4845 of file model_brush.c.
References model_t::brush, buffer, ca_dedicated, cls, Com_BlockChecksum(), Con_DPrintf(), Con_Printf(), CON_WARN, sizebuf_t::cursize, data, sizebuf_t::data, dp_strlcpy, dpsnprintf(), fabs(), mmodel_t::firstface, mmodel_t::headnode, Host_Error(), i, cvar_t::integer, msurface_t::lightmapinfo, LittleLong, loadmodel, max, MAXLIGHTMAPS, mmodel_t::maxs, Mem_Alloc, Mem_AllocType, Mem_Free, model_t::mempool, mmodel_t::mins, mod(), mod_brushq2, Mod_BSP_BoxTouchingLeafPVS(), Mod_BSP_BoxTouchingPVS(), Mod_BSP_BoxTouchingVisibleLeafs(), Mod_BSP_FatPVS(), Mod_BSP_FindBoxClusters(), Mod_BSP_FindNonSolidLocation(), Mod_BSP_GetPVS(), Mod_BSP_LightPoint(), Mod_BSP_LoadNodes_RecursiveSetParent(), Mod_BSP_LoadSubmodels(), Mod_BSP_MakePortals(), Mod_BSP_PointInLeaf(), mod_bsp_portalize, Mod_BuildVBOs(), Mod_CollisionBIH_PointSuperContents(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint(), Mod_FindName(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_Q1BSP_LoadEdges(), Mod_Q1BSP_LoadEntities(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_LoadLeaffaces(), Mod_Q1BSP_LoadPlanes(), Mod_Q1BSP_LoadSurfedges(), Mod_Q1BSP_LoadVertexes(), Mod_Q2BSP_FindSubmodelBrushRange_r(), Mod_Q2BSP_LoadAreaPortals(), Mod_Q2BSP_LoadAreas(), Mod_Q2BSP_LoadBrushes(), Mod_Q2BSP_LoadBrushSides(), Mod_Q2BSP_LoadLeafBrushes(), Mod_Q2BSP_LoadLeafs(), Mod_Q2BSP_LoadLighting(), Mod_Q2BSP_LoadNodes(), Mod_Q2BSP_LoadPOP(), Mod_Q2BSP_LoadTexinfo(), Mod_Q2BSP_LoadVisibility(), Mod_Q2BSP_NativeContentsFromSuperContents(), Mod_Q2BSP_SuperContentsFromNativeContents(), Mod_Q3BSP_TraceLineOfSight(), Mod_SetDrawSkyAndWater(), MSG_InitReadBuffer(), MSG_ReadLittleLong(), model_t::name, name, NULL, model_brush_t::num_brushes, model_brush_t::num_leafs, model_brush_t::num_nodes, model_brush_t::num_portals, model_t::num_surfaces, surfmesh_t::num_triangles, surfmesh_t::num_vertices, mmodel_t::numfaces, model_brush_t::numsubmodels, model_brush_lightstyleinfo_t::numsurfaces, offset, Q2BSPMAGIC, Q2BSPVERSION, Q2HEADER_LUMPS, Q2LUMP_AREAPORTALS, Q2LUMP_AREAS, Q2LUMP_BRUSHES, Q2LUMP_BRUSHSIDES, Q2LUMP_EDGES, Q2LUMP_ENTITIES, Q2LUMP_FACES, Q2LUMP_LEAFBRUSHES, Q2LUMP_LEAFFACES, Q2LUMP_LEAFS, Q2LUMP_LIGHTING, Q2LUMP_MODELS, Q2LUMP_NODES, Q2LUMP_PLANES, Q2LUMP_POP, Q2LUMP_SURFEDGES, Q2LUMP_TEXINFO, Q2LUMP_VERTEXES, Q2LUMP_VISIBILITY, r, R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_Mod_GetLightInfo(), size, sqrt(), client_static_t::state, model_brush_lightstyleinfo_t::style, msurface_lightmapinfo_t::styles, model_brush_t::submodels, model_brush_t::supportwateralpha, model_brush_lightstyleinfo_t::surfacelist, model_t::surfmesh, model_brush_lightstyleinfo_t::value, and VectorCopy.
Referenced by Mod_IBSP_Load().
Definition at line 4819 of file model_brush.c.
References sizebuf_t::cursize, and sizebuf_t::readcount.
Referenced by Mod_Q2BSP_Load().
Definition at line 4813 of file model_brush.c.
References sizebuf_t::cursize, and sizebuf_t::readcount.
Referenced by Mod_Q2BSP_Load().
Definition at line 4706 of file model_brush.c.
References model_t::brush, CL_KeepaliveMessage(), q3mbrush_t::colbrushf, Collision_NewBrushFromPlanes(), Con_DPrintf(), count, sizebuf_t::cursize, model_brush_t::data_brushes, model_brush_t::data_brushsides, colplanef_t::dist, dpsnprintf(), q3mbrush_t::firstbrushside, Host_Error(), i, loadmodel, Mem_Alloc, Mem_Free, model_t::mempool, mod_q1bsp_texture_solid, Mod_Q2BSP_SuperContentsFromNativeContents(), MSG_ReadLittleLong(), model_t::name, texture_t::name, colplanef_t::normal, NULL, model_brush_t::num_brushes, model_brush_t::num_brushsides, q3mbrush_t::numbrushsides, colplanef_t::q3surfaceflags, texture_t::supercontents, texture_t::surfaceflags, tempmempool, colplanef_t::texture, q3mbrush_t::texture, and VectorCopy.
Referenced by Mod_Q2BSP_Load().
Definition at line 4671 of file model_brush.c.
References model_t::brush, model_t::brushq1, count, sizebuf_t::cursize, model_brush_t::data_brushsides, model_brush_t::data_planes, model_t::data_textures, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, mod_q1bsp_texture_solid, MSG_ReadLittleShort(), n, model_t::name, model_brush_t::num_brushsides, model_brush_t::num_planes, model_brushq1_t::numtexinfo, q3mbrushside_t::plane, model_brushq1_t::texinfo, and q3mbrushside_t::texture.
Referenced by Mod_Q2BSP_Load().
Definition at line 4652 of file model_brush.c.
References model_t::brush, sizebuf_t::cursize, model_brush_t::data_leafbrushes, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleShort(), model_t::name, model_brush_t::num_brushes, and model_brush_t::num_leafbrushes.
Referenced by Mod_Q2BSP_Load().
Definition at line 4585 of file model_brush.c.
References mleaf_t::ambient_sound_level, mleaf_t::areaindex, model_t::brush, mleaf_t::clusterindex, Con_Print(), Con_Printf(), mleaf_t::contents, count, sizebuf_t::cursize, model_brush_t::data_leafbrushes, model_brush_t::data_leafs, model_brush_t::data_leafsurfaces, mleaf_t::firstleafbrush, mleaf_t::firstleafsurface, Host_Error(), i, loadmodel, mleaf_t::maxs, Mem_Alloc, model_t::mempool, mleaf_t::mins, MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, NULL, model_brush_t::num_leafbrushes, model_brush_t::num_leafs, model_brush_t::num_leafsurfaces, model_brush_t::num_pvsclusters, mleaf_t::numleafbrushes, and mleaf_t::numleafsurfaces.
Referenced by Mod_Q2BSP_Load().
Definition at line 4578 of file model_brush.c.
References model_t::brushq1, sizebuf_t::cursize, model_brushq1_t::lightdata, loadmodel, Mem_Alloc, model_t::mempool, and MSG_ReadBytes().
Referenced by Mod_Q2BSP_Load().
Definition at line 4304 of file model_brush.c.
References model_t::brush, mnode_t::children, Con_Printf(), count, sizebuf_t::cursize, model_brush_t::data_leafs, model_brush_t::data_nodes, model_brush_t::data_planes, mnode_t::firstsurface, Host_Error(), i, loadmodel, mnode_t::maxs, Mem_Alloc, model_t::mempool, mnode_t::mins, Mod_BSP_LoadNodes_RecursiveSetParent(), MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, NULL, model_brush_t::num_leafs, model_brush_t::num_nodes, model_t::num_surfaces, mnode_t::numsurfaces, and mnode_t::plane.
Referenced by Mod_Q2BSP_Load().
Definition at line 4807 of file model_brush.c.
References sizebuf_t::cursize, and sizebuf_t::readcount.
Referenced by Mod_Q2BSP_Load().
Definition at line 4373 of file model_brush.c.
References texture_t::anim_frames, texture_t::anim_total, texture_t::animated, texture_t::basealpha, texture_t::basematerialflags, model_t::brushq1, Con_Printf(), count, texture_t::currentframe, texture_t::currentmaterialflags, texture_t::currentskinframe, sizebuf_t::cursize, model_t::data_textures, dpsnprintf(), FS_LoadFile(), texture_t::height, Host_Error(), i, int(), cvar_t::integer, loadmodel, LoadWAL_GetMetadata(), MATERIALFLAG_ALPHA, MATERIALFLAG_ALPHATEST, MATERIALFLAG_BLENDED, MATERIALFLAG_FULLBRIGHT, MATERIALFLAG_NODRAW, MATERIALFLAG_NOSHADOW, MATERIALFLAG_SKY, MATERIALFLAG_WALL, MATERIALFLAG_WATERSCROLL, MATERIALFLAG_WATERSHADER, texture_t::materialshaderpass, MAX_QPATH, Mem_Alloc, Mem_Free, Mem_Realloc, model_t::mempool, Mod_LoadTextureFromQ3Shader(), mod_q2bsp_littransparentsurfaces, Mod_Q2BSP_SuperContentsFromNativeContents(), MSG_ReadBytes(), MSG_ReadLittleFloat(), MSG_ReadLittleLong(), model_t::name, texture_t::name, NULL, model_t::num_textures, model_t::num_texturesperskin, model_brushq1_t::numtexinfo, q3shaderinfo_layer_tcmod_t::parms, texture_t::q2contents, Q2CONTENTS_AUX, Q2CONTENTS_DETAIL, Q2CONTENTS_LAVA, Q2CONTENTS_MIST, Q2CONTENTS_MONSTERCLIP, Q2CONTENTS_PLAYERCLIP, Q2CONTENTS_SLIME, Q2CONTENTS_SOLID, Q2CONTENTS_TRANSLUCENT, Q2CONTENTS_WATER, Q2CONTENTS_WINDOW, mtexinfo_t::q2flags, texture_t::q2flags, mtexinfo_t::q2nexttexinfo, Q2SURF_ALPHATEST, Q2SURF_FLOWING, Q2SURF_HINT, Q2SURF_LIGHT, Q2SURF_NODRAW, Q2SURF_SKIP, Q2SURF_SKY, Q2SURF_SLICK, Q2SURF_TRANS33, Q2SURF_TRANS66, Q2SURF_WARP, mtexinfo_t::q2texture, mtexinfo_t::q2value, texture_t::q2value, Q3SURFACEFLAG_NODLIGHT, Q3SURFACEFLAG_NOIMPACT, Q3SURFACEFLAG_NOLIGHTMAP, Q3SURFACEFLAG_NOMARKS, Q3SURFACEFLAG_SKY, Q3TCMOD_SCROLL, texture_shaderpass_t::skinframes, texture_t::supercontents, SUPERCONTENTS_NODROP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_SKY, texture_t::surfaceflags, q3shaderinfo_layer_tcmod_t::tcmod, texture_shaderpass_t::tcmods, tempmempool, TEXF_ALPHA, TEXF_COMPRESS, TEXF_ISWORLD, TEXF_MIPMAP, TEXF_PICMIP, model_brushq1_t::texinfo, mtexinfo_t::textureindex, mtexinfo_t::vecs, w, and texture_t::width.
Referenced by Mod_Q2BSP_Load().
Definition at line 4276 of file model_brush.c.
References model_t::brush, model_t::brushq1, count, sizebuf_t::cursize, sizebuf_t::data, model_brushq1_t::data_compressedpvs, model_brush_t::data_pvsclusters, i, loadmodel, Mem_Alloc, model_t::mempool, Mod_BSP_DecompressVis(), MSG_ReadLittleLong(), NULL, model_brushq1_t::num_compressedpvs, model_brush_t::num_pvsclusterbytes, model_brush_t::num_pvsclusters, and sizebuf_t::readcount.
Referenced by Mod_Q2BSP_Load().
Definition at line 4252 of file model_brush.c.
References CONTENTSQ2_DEADMONSTER, CONTENTSQ2_LAVA, CONTENTSQ2_MONSTER, CONTENTSQ2_MONSTERCLIP, CONTENTSQ2_PLAYERCLIP, CONTENTSQ2_SLIME, CONTENTSQ2_SOLID, CONTENTSQ2_TRANSLUCENT, CONTENTSQ2_WATER, SUPERCONTENTS_BODY, SUPERCONTENTS_CORPSE, SUPERCONTENTS_LAVA, SUPERCONTENTS_MONSTERCLIP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_PLAYERCLIP, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_Q2BSP_Load().
Definition at line 4228 of file model_brush.c.
References CONTENTSQ2_DEADMONSTER, CONTENTSQ2_LAVA, CONTENTSQ2_MONSTER, CONTENTSQ2_MONSTERCLIP, CONTENTSQ2_PLAYERCLIP, CONTENTSQ2_SLIME, CONTENTSQ2_SOLID, CONTENTSQ2_TRANSLUCENT, CONTENTSQ2_WATER, SUPERCONTENTS_BODY, SUPERCONTENTS_CORPSE, SUPERCONTENTS_LAVA, SUPERCONTENTS_MONSTERCLIP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_PLAYERCLIP, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_LoadTextureFromQ3Shader(), Mod_Q2BSP_Load(), Mod_Q2BSP_LoadBrushes(), and Mod_Q2BSP_LoadTexinfo().
|
static |
Definition at line 6643 of file model_brush.c.
References a, q3dlightgrid_t::ambientrgb, bound, q3dlightgrid_t::diffusepitch, q3dlightgrid_t::diffusergb, q3dlightgrid_t::diffuseyaw, floor(), i, index, int(), Matrix4x4_Transform(), mod_md3_sin, model, VectorClear, VectorMA, and VectorNormalize.
Referenced by Mod_Q3BSP_Load(), and Mod_VBSP_Load().
Definition at line 7621 of file model_brush.c.
References model_t::brush, model_t::brushq3, buffer, ca_dedicated, CL_KeepaliveMessage(), cls, Com_BlockChecksum(), Con_DPrintf(), model_brush_t::data_nodes, dp_strlcpy, dpsnprintf(), fabs(), lump_t::filelen, lump_t::fileofs, Host_Error(), i, q3dheader_t::ident, cvar_t::integer, model_t::lightmapscale, LittleLong, loadmodel, q3dheader_t::lumps, max, Mem_Alloc, model_t::mempool, min, mod(), mod_base, mod_brushq3, Mod_BSP_BoxTouchingLeafPVS(), Mod_BSP_BoxTouchingPVS(), Mod_BSP_BoxTouchingVisibleLeafs(), Mod_BSP_FatPVS(), Mod_BSP_FindBoxClusters(), Mod_BSP_FindNonSolidLocation(), Mod_BSP_GetPVS(), Mod_BSP_MakePortals(), Mod_BSP_PointInLeaf(), mod_bsp_portalize, Mod_BuildVBOs(), Mod_CollisionBIH_PointSuperContents(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint(), Mod_FindName(), Mod_MakeCollisionBIH(), Mod_MakeSortedSurfaces(), Mod_Q3BSP_LightPoint(), Mod_Q3BSP_LoadBrushes(), Mod_Q3BSP_LoadBrushSides(), Mod_Q3BSP_LoadBrushSides_IG(), Mod_Q3BSP_LoadEffects(), Mod_Q3BSP_LoadEntities(), Mod_Q3BSP_LoadFaces(), Mod_Q3BSP_LoadLeafBrushes(), Mod_Q3BSP_LoadLeafFaces(), Mod_Q3BSP_LoadLeafs(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), Mod_Q3BSP_LoadModels(), Mod_Q3BSP_LoadNodes(), Mod_Q3BSP_LoadPlanes(), Mod_Q3BSP_LoadPVS(), Mod_Q3BSP_LoadTextures(), Mod_Q3BSP_LoadTriangles(), Mod_Q3BSP_LoadVertices(), Mod_Q3BSP_NativeContentsFromSuperContents(), Mod_Q3BSP_RecursiveFindNumLeafs(), mod_q3bsp_sRGBlightmaps, Mod_Q3BSP_SuperContentsFromNativeContents(), Mod_Q3BSP_TraceLineOfSight(), Mod_SetDrawSkyAndWater(), model_t::name, name, NULL, msurface_t::num_firstvertex, model_brush_t::num_leafs, model_brushq3_t::num_models, model_brush_t::num_nodes, model_brush_t::num_portals, model_t::num_surfaces, surfmesh_t::num_triangles, msurface_t::num_vertices, surfmesh_t::num_vertices, model_brush_t::numsubmodels, Q3BSPVERSION, Q3BSPVERSION_IG, Q3BSPVERSION_LIVE, Q3HEADER_LUMPS, Q3HEADER_LUMPS_LIVE, Q3LUMP_BRUSHES, Q3LUMP_BRUSHSIDES, Q3LUMP_EFFECTS, Q3LUMP_ENTITIES, Q3LUMP_FACES, Q3LUMP_LEAFBRUSHES, Q3LUMP_LEAFFACES, Q3LUMP_LEAFS, Q3LUMP_LIGHTGRID, Q3LUMP_LIGHTMAPS, Q3LUMP_MODELS, Q3LUMP_NODES, Q3LUMP_PLANES, Q3LUMP_PVS, Q3LUMP_TEXTURES, Q3LUMP_TRIANGLES, Q3LUMP_VERTICES, R_AllocTexturePool(), R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_Mod_GetLightInfo(), sqrt(), viddef_t::sRGB3D, client_static_t::state, model_brush_t::submodels, model_brush_t::supportwateralpha, model_t::surfmesh, v, VectorCopy, q3dheader_t::version, vid, vid_sRGB, and vid_sRGB_fallback.
Referenced by Mod_IBSP_Load().
Definition at line 5326 of file model_brush.c.
References model_t::brush, CL_KeepaliveMessage(), q3mbrush_t::colbrushf, Collision_NewBrushFromPlanes(), count, model_brush_t::data_brushes, model_brush_t::data_brushsides, model_t::data_textures, colplanef_t::dist, lump_t::filelen, lump_t::fileofs, q3dbrush_t::firstbrushside, q3mbrush_t::firstbrushside, Host_Error(), i, LittleLong, loadmodel, Mem_Alloc, Mem_Free, model_t::mempool, mod_base, n, model_t::name, colplanef_t::normal, NULL, model_brush_t::num_brushes, model_brush_t::num_brushsides, model_t::num_textures, q3dbrush_t::numbrushsides, q3mbrush_t::numbrushsides, colplanef_t::q3surfaceflags, tempmempool, colplanef_t::texture, q3mbrush_t::texture, q3dbrush_t::textureindex, and VectorCopy.
Referenced by Mod_Q3BSP_Load().
Definition at line 5270 of file model_brush.c.
References model_t::brush, count, model_brush_t::data_brushsides, model_brush_t::data_planes, model_t::data_textures, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, Mem_Alloc, model_t::mempool, mod_base, n, model_t::name, model_brush_t::num_brushsides, model_brush_t::num_planes, model_t::num_textures, q3mbrushside_t::plane, q3dbrushside_t::planeindex, q3mbrushside_t::texture, and q3dbrushside_t::textureindex.
Referenced by Mod_Q3BSP_Load().
Definition at line 5298 of file model_brush.c.
References model_t::brush, count, model_brush_t::data_brushsides, model_brush_t::data_planes, model_t::data_textures, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, Mem_Alloc, model_t::mempool, mod_base, n, model_t::name, model_brush_t::num_brushsides, model_brush_t::num_planes, model_t::num_textures, q3mbrushside_t::plane, q3dbrushside_ig_t::planeindex, q3mbrushside_t::texture, and q3dbrushside_ig_t::textureindex.
Referenced by Mod_Q3BSP_Load().
Definition at line 5385 of file model_brush.c.
References model_t::brush, q3deffect_t::brushindex, model_t::brushq3, Con_Printf(), count, model_brushq3_t::data_effects, dp_strlcpy, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, Mem_Alloc, model_t::mempool, mod_base, n, model_t::name, model_brush_t::num_brushes, model_brushq3_t::num_effects, q3deffect_t::shadername, and q3deffect_t::unknown.
Referenced by Mod_Q3BSP_Load().
Definition at line 5151 of file model_brush.c.
References model_t::brush, model_t::brushq3, COM_ParseToken_Simple(), com_token, Con_Printf(), data, model_brushq3_t::deluxemapping, model_brushq3_t::deluxemapping_modelspace, dp_strlcpy, model_brush_t::entities, lump_t::filelen, lump_t::fileofs, loadmodel, MAX_INPUTLINE, Mem_Alloc, model_t::mempool, mod_base, model_t::name, model_brushq3_t::num_lightgrid_cellsize, strlen(), v, value, VectorCopy, and VectorSet.
Referenced by Mod_Q3BSP_Load().
Definition at line 5806 of file model_brush.c.
References bound, model_t::brush, model_t::brushq3, ca_dedicated, cls, Con_DPrintf(), CON_ERROR, Con_Print(), Con_Printf(), CON_WARN, count, model_brush_t::data_collisionelement3i, model_brush_t::data_collisionvertex3f, model_brushq3_t::data_color4f, model_brushq3_t::data_deluxemaps, model_brushq3_t::data_effects, model_brushq3_t::data_element3i, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_lightmapcolor4f, model_brushq3_t::data_lightmaps, model_brushq3_t::data_normal3f, surfmesh_t::data_normal3f, model_t::data_surfaces, surfmesh_t::data_svector3f, model_brushq3_t::data_texcoordlightmap2f, surfmesh_t::data_texcoordlightmap2f, model_brushq3_t::data_texcoordtexture2f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, model_brushq3_t::data_vertex3f, surfmesh_t::data_vertex3f, model_brushq3_t::deluxemapping, msurface_t::deluxemaptexture, developer_extra, msurface_t::effect, q3dface_t::effectindex, lump_t::filelen, lump_t::fileofs, q3dface_t::firstelement, q3dface_t::firstvertex, Host_Error(), i, patchtess_t::info, cvar_t::integer, q3dface_t::lightmapindex, model_brushq3_t::lightmapsize, msurface_t::lightmaptexture, model_t::lit, LittleFloat, LittleLong, loadmodel, patchtess_t::lodgroup, patchinfo_t::lods, max, msurface_t::maxs, q3dface_t::maxs, Mem_Alloc, Mem_Free, model_t::mempool, min, msurface_t::mins, q3dface_t::mins, Mod_AllocSurfMesh(), mod_base, Mod_BuildTextureVectorsFromNormals(), mod_q3bsp_curves_subdivisions_maxtess, mod_q3bsp_curves_subdivisions_maxvertices, mod_q3bsp_curves_subdivisions_mintess, mod_q3bsp_curves_subdivisions_tolerance, Mod_RemoveDegenerateTriangles(), Mod_SnapVertices(), n, model_t::name, texture_t::name, NULL, msurface_t::num_collisiontriangles, msurface_t::num_collisionvertices, model_brushq3_t::num_effects, msurface_t::num_firstcollisiontriangle, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_brushq3_t::num_lightmapmergedwidthheightdeluxepower, model_brushq3_t::num_originallightmaps, model_t::num_surfaces, model_t::num_textures, model_brushq3_t::num_triangles, msurface_t::num_triangles, surfmesh_t::num_triangles, model_brushq3_t::num_vertices, msurface_t::num_vertices, surfmesh_t::num_vertices, q3dface_t::numelements, q3dface_t::numvertices, patchtess_t::originalvertex3f, q3dface_t::patch, PATCH_LOD_COLLISION, PATCH_LOD_VISUAL, q3dface_t::patchsize, PATCHTESS_SAME_LODGROUP, Q3FACETYPE_FLARE, Q3FACETYPE_FLAT, Q3FACETYPE_MESH, Q3FACETYPE_PATCH, Q3PatchAdjustTesselation(), Q3PatchDimForTess(), Q3PatchTesselateFloat(), Q3PatchTesselationOnX(), Q3PatchTesselationOnY(), Q3PatchTriangleElements(), r_smoothnormals_areaweighting, r_subdivisions_maxtess, r_subdivisions_maxvertices, r_subdivisions_mintess, r_subdivisions_tolerance, r_texture_blanknormalmap, R_TextureHeight(), R_TextureWidth(), q3dface_t::specific, client_static_t::state, patchtess_t::surface_id, texture_t::surfaceflags, model_t::surfmesh, tempmempool, msurface_t::texture, q3dface_t::textureindex, q3dface_t::type, type, v, cvar_t::value, VectorClear, VectorCopy, patchinfo_t::xsize, patchinfo_t::xtess, patchinfo_t::ysize, and patchinfo_t::ytess.
Referenced by Mod_Q3BSP_Load().
Definition at line 6299 of file model_brush.c.
References model_t::brush, count, model_brush_t::data_leafbrushes, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, Mem_Alloc, model_t::mempool, mod_base, n, model_t::name, model_brush_t::num_brushes, and model_brush_t::num_leafbrushes.
Referenced by Mod_Q3BSP_Load().
Definition at line 6323 of file model_brush.c.
References model_t::brush, count, model_brush_t::data_leafsurfaces, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, Mem_Alloc, model_t::mempool, mod_base, n, model_t::name, model_brush_t::num_leafsurfaces, and model_t::num_surfaces.
Referenced by Mod_Q3BSP_Load().
Definition at line 6347 of file model_brush.c.
References mleaf_t::areaindex, q3dleaf_t::areaindex, model_t::brush, mleaf_t::clusterindex, q3dleaf_t::clusterindex, count, model_brush_t::data_leafbrushes, model_brush_t::data_leafs, model_brush_t::data_leafsurfaces, lump_t::filelen, lump_t::fileofs, mleaf_t::firstleafbrush, q3dleaf_t::firstleafbrush, q3dleaf_t::firstleafface, mleaf_t::firstleafsurface, Host_Error(), i, LittleLong, loadmodel, mleaf_t::maxs, q3dleaf_t::maxs, Mem_Alloc, model_t::mempool, mleaf_t::mins, q3dleaf_t::mins, mod_base, n, model_t::name, NULL, model_brush_t::num_leafbrushes, model_brush_t::num_leafs, model_brush_t::num_leafsurfaces, mleaf_t::numleafbrushes, q3dleaf_t::numleafbrushes, q3dleaf_t::numleaffaces, mleaf_t::numleafsurfaces, mleaf_t::parent, and mleaf_t::plane.
Referenced by Mod_Q3BSP_Load().
Definition at line 6443 of file model_brush.c.
References q3dlightgrid_t::ambientrgb, model_t::brushq3, ceil(), CON_ERROR, Con_Printf(), CON_WARN, count, model_brushq3_t::data_lightgrid, model_brushq3_t::data_models, q3dlightgrid_t::diffusergb, lump_t::filelen, lump_t::fileofs, floor(), Host_Error(), i, Image_LinearFloatFromsRGB, Image_sRGBFloatFromLinear_Lightmap, int(), cvar_t::integer, model_brushq3_t::lightgridtexture, model_brushq3_t::lightgridtexturesize, model_brushq3_t::lightgridworldtotexturematrix, loadmodel, Matrix4x4_ConcatTranslate(), Matrix4x4_CreateScale3(), Matrix4x4_FromArrayDoubleD3D(), q3dmodel_t::maxs, Mem_Alloc, Mem_Free, model_t::mempool, q3dmodel_t::mins, mod_base, mod_md3_sin, mod_q3bsp_lightgrid_texture, mod_q3bsp_sRGBlightmaps, model_t::name, NULL, model_brushq3_t::num_lightgrid, model_brushq3_t::num_lightgrid_cellsize, model_brushq3_t::num_lightgrid_imaxs, model_brushq3_t::num_lightgrid_imins, model_brushq3_t::num_lightgrid_indexfromworld, model_brushq3_t::num_lightgrid_isize, model_brushq3_t::num_lightgrid_scale, R_LoadTexture3D(), viddef_t::sRGB3D, TEXF_CLAMP, model_t::texturepool, TEXTYPE_RGBA, vid, vid_sRGB, vid_sRGB_fallback, x, y, and z.
Referenced by Mod_Q3BSP_Load().
Definition at line 5516 of file model_brush.c.
References bound, model_t::brushq3, ca_dedicated, CeilPowerOf2(), cls, Con_DPrintf(), Con_Printf(), count, model_brushq3_t::data_deluxemaps, model_brushq3_t::data_lightmaps, model_brushq3_t::deluxemapping, model_brushq3_t::deluxemapping_modelspace, developer_loading, lump_t::filelen, lump_t::fileofs, FS_StripExtension(), gl_texturecompression_q3bspdeluxemaps, gl_texturecompression_q3bsplightmaps, Host_Error(), i, image_height, Image_MakesRGBColorsFromLinear_Lightmap(), image_width, int(), cvar_t::integer, model_brushq3_t::lightmapsize, LittleLong, loadimagepixelsbgra(), loadmodel, mapname, max, MAX_QPATH, viddef_t::maxtexturesize_2d, Mem_Alloc, Mem_Free, model_t::mempool, mod_base, mod_q3bsp_lightmapmergepower, mod_q3bsp_nolightmaps, mod_q3bsp_sRGBlightmaps, model_t::name, NULL, model_brushq3_t::num_lightmapmergedheightpower, model_brushq3_t::num_lightmapmergedwidthheightdeluxepower, model_brushq3_t::num_lightmapmergedwidthpower, model_brushq3_t::num_mergedlightmaps, model_brushq3_t::num_originallightmaps, R_LoadTexture2D(), rgb, size, viddef_t::sRGB3D, client_static_t::state, tempmempool, TEXF_COMPRESS, TEXF_FORCELINEAR, model_t::texturepool, TEXTYPE_BGRA, TEXTYPE_SRGB_BGRA, va(), vid, vid_sRGB, and vid_sRGB_fallback.
Referenced by Mod_Q3BSP_Load().
Definition at line 6262 of file model_brush.c.
References model_t::brush, model_t::brushq3, count, model_brushq3_t::data_models, lump_t::filelen, lump_t::fileofs, q3dmodel_t::firstbrush, q3dmodel_t::firstface, Host_Error(), i, LittleFloat, LittleLong, loadmodel, q3dmodel_t::maxs, Mem_Alloc, model_t::mempool, q3dmodel_t::mins, mod_base, n, model_t::name, model_brush_t::num_brushes, model_brushq3_t::num_models, model_t::num_surfaces, q3dmodel_t::numbrushes, and q3dmodel_t::numfaces.
Referenced by Mod_Q3BSP_Load().
Definition at line 6390 of file model_brush.c.
References model_t::brush, mnode_t::children, q3dnode_t::childrenindex, count, model_brush_t::data_leafs, model_brush_t::data_nodes, model_brush_t::data_planes, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, mnode_t::maxs, q3dnode_t::maxs, Mem_Alloc, model_t::mempool, mnode_t::mins, q3dnode_t::mins, mod_base, Mod_BSP_LoadNodes_RecursiveSetParent(), n, model_t::name, NULL, model_brush_t::num_leafs, model_brush_t::num_nodes, model_brush_t::num_planes, mnode_t::parent, mnode_t::plane, and q3dnode_t::planeindex.
Referenced by Mod_Q3BSP_Load().
Definition at line 5245 of file model_brush.c.
References model_t::brush, count, model_brush_t::data_planes, mplane_t::dist, q3dplane_t::dist, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleFloat, loadmodel, Mem_Alloc, model_t::mempool, mod_base, model_t::name, mplane_t::normal, q3dplane_t::normal, model_brush_t::num_planes, and PlaneClassify().
Referenced by Mod_Q3BSP_Load().
Definition at line 6605 of file model_brush.c.
References model_t::brush, q3dpvs_t::chainlength, mleaf_t::clusterindex, model_brush_t::data_leafs, model_brush_t::data_pvsclusters, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, max, Mem_Alloc, model_t::mempool, mod_base, model_t::name, model_brush_t::num_leafs, model_brush_t::num_pvsclusterbytes, model_brush_t::num_pvsclusters, and q3dpvs_t::numclusters.
Referenced by Mod_Q3BSP_Load().
Definition at line 5218 of file model_brush.c.
References count, model_t::data_textures, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, MATERIALFLAG_WALL, Mem_Alloc, model_t::mempool, mod_base, Mod_LoadTextureFromQ3Shader(), Mod_Q3BSP_SuperContentsFromNativeContents(), model_t::name, q3dtexture_t::name, model_t::num_textures, model_t::num_texturesperskin, texture_t::supercontents, texture_t::surfaceflags, TEXF_COMPRESS, TEXF_ISWORLD, TEXF_MIPMAP, and TEXF_PICMIP.
Referenced by Mod_Q3BSP_Load().
Definition at line 5482 of file model_brush.c.
References model_t::brushq3, Con_Printf(), count, model_brushq3_t::data_element3i, lump_t::filelen, lump_t::fileofs, Host_Error(), i, LittleLong, loadmodel, Mem_Alloc, model_t::mempool, mod_base, model_t::name, model_brushq3_t::num_triangles, and model_brushq3_t::num_vertices.
Referenced by Mod_Q3BSP_Load().
Definition at line 5414 of file model_brush.c.
References model_t::brushq3, q3dvertex_t::color4ub, count, model_brushq3_t::data_color4f, model_brushq3_t::data_normal3f, model_brushq3_t::data_texcoordlightmap2f, model_brushq3_t::data_texcoordtexture2f, model_brushq3_t::data_vertex3f, lump_t::filelen, lump_t::fileofs, Host_Error(), i, Image_LinearFloatFromsRGB, Image_sRGBFloatFromLinear_Lightmap, cvar_t::integer, q3dvertex_t::lightmap2f, model_t::lit, LittleFloat, loadmodel, Mem_Alloc, model_t::mempool, mod_base, mod_q3bsp_sRGBlightmaps, model_t::name, q3dvertex_t::normal3f, model_brushq3_t::num_vertices, q3dvertex_t::origin3f, viddef_t::sRGB3D, q3dvertex_t::texcoord2f, vid, vid_sRGB, and vid_sRGB_fallback.
Referenced by Mod_Q3BSP_Load().
Definition at line 7578 of file model_brush.c.
References CONTENTSQ3_BODY, CONTENTSQ3_BOTCLIP, CONTENTSQ3_CORPSE, CONTENTSQ3_DONOTENTER, CONTENTSQ3_LAVA, CONTENTSQ3_MONSTERCLIP, CONTENTSQ3_NODROP, CONTENTSQ3_PLAYERCLIP, CONTENTSQ3_SLIME, CONTENTSQ3_SOLID, CONTENTSQ3_TRANSLUCENT, CONTENTSQ3_WATER, SUPERCONTENTS_BODY, SUPERCONTENTS_BOTCLIP, SUPERCONTENTS_CORPSE, SUPERCONTENTS_DONOTENTER, SUPERCONTENTS_LAVA, SUPERCONTENTS_MONSTERCLIP, SUPERCONTENTS_NODROP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_PLAYERCLIP, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_Q3BSP_Load(), and Mod_VBSP_Load().
Definition at line 7608 of file model_brush.c.
References model_t::brush, mnode_t::children, model_brush_t::data_leafs, loadmodel, Mod_Q3BSP_RecursiveFindNumLeafs(), model_brush_t::num_leafs, and mnode_t::plane.
Referenced by Mod_Q3BSP_Load(), and Mod_Q3BSP_RecursiveFindNumLeafs().
Definition at line 7548 of file model_brush.c.
References CONTENTSQ3_BODY, CONTENTSQ3_BOTCLIP, CONTENTSQ3_CORPSE, CONTENTSQ3_DONOTENTER, CONTENTSQ3_LAVA, CONTENTSQ3_MONSTERCLIP, CONTENTSQ3_NODROP, CONTENTSQ3_PLAYERCLIP, CONTENTSQ3_SLIME, CONTENTSQ3_SOLID, CONTENTSQ3_TRANSLUCENT, CONTENTSQ3_WATER, SUPERCONTENTS_BODY, SUPERCONTENTS_BOTCLIP, SUPERCONTENTS_CORPSE, SUPERCONTENTS_DONOTENTER, SUPERCONTENTS_LAVA, SUPERCONTENTS_MONSTERCLIP, SUPERCONTENTS_NODROP, SUPERCONTENTS_OPAQUE, SUPERCONTENTS_PLAYERCLIP, SUPERCONTENTS_SLIME, SUPERCONTENTS_SOLID, and SUPERCONTENTS_WATER.
Referenced by Mod_Q3BSP_Load(), Mod_Q3BSP_LoadTextures(), and Mod_VBSP_Load().
|
static |
Definition at line 6772 of file model_brush.c.
References BoxesOverlap, trace_t::endpos, trace_t::fraction, cvar_t::integer, MATERIALFLAGMASK_TRANSLUCENT, mod_q3bsp_tracelineofsight_brushes, Mod_Q3BSP_TraceLineOfSight_RecursiveNodeCheck(), model, NULL, SUPERCONTENTS_VISBLOCKERMASK, and VectorCopy.
Referenced by Mod_Q2BSP_Load(), Mod_Q3BSP_Load(), and Mod_VBSP_Load().
|
static |
Definition at line 6710 of file model_brush.c.
References mnode_t::children, mplane_t::dist, DotProduct, Mod_Q3BSP_TraceLineOfSight_RecursiveNodeCheck(), mplane_t::normal, mnode_t::plane, ret, mplane_t::type, VectorCopy, and VectorLerp.
Referenced by Mod_Q3BSP_TraceLineOfSight(), and Mod_Q3BSP_TraceLineOfSight_RecursiveNodeCheck().
Definition at line 8312 of file model_brush.c.
References buffer, CF_CLIENT, CF_SERVER, sizebuf_t::cursize, Cvar_Get(), cvars_all, sizebuf_t::data, HL2HEADER_LUMPS, HL2LUMP_EDGES, HL2LUMP_ENTITIES, HL2LUMP_FACES, HL2LUMP_PLANES, HL2LUMP_SURFEDGES, HL2LUMP_TEXDATA, HL2LUMP_TEXINFO, HL2LUMP_VERTEXES, Host_Error(), i, cvar_t::integer, mod(), mod_brushhl2, Mod_BSP_BoxTouchingLeafPVS(), Mod_BSP_BoxTouchingPVS(), Mod_BSP_BoxTouchingVisibleLeafs(), Mod_BSP_FatPVS(), Mod_BSP_FindBoxClusters(), Mod_BSP_FindNonSolidLocation(), Mod_BSP_GetPVS(), Mod_BSP_PointInLeaf(), Mod_CollisionBIH_PointSuperContents(), Mod_CollisionBIH_TraceBox(), Mod_CollisionBIH_TraceBrush(), Mod_CollisionBIH_TraceLine(), Mod_CollisionBIH_TracePoint(), Mod_Q3BSP_LightPoint(), Mod_Q3BSP_NativeContentsFromSuperContents(), Mod_Q3BSP_SuperContentsFromNativeContents(), Mod_Q3BSP_TraceLineOfSight(), Mod_VBSP_LoadEdges(), Mod_VBSP_LoadEntities(), Mod_VBSP_LoadFaces(), Mod_VBSP_LoadPlanes(), Mod_VBSP_LoadSurfedges(), Mod_VBSP_LoadTexinfo(), Mod_VBSP_LoadTextures(), Mod_VBSP_LoadVertexes(), MSG_InitReadBuffer(), MSG_ReadLittleLong(), NULL, offset, R_AllocTexturePool(), R_Mod_CompileShadowMap(), R_Mod_Draw(), R_Mod_DrawDebug(), R_Mod_DrawDepth(), R_Mod_DrawLight(), R_Mod_DrawPrepass(), R_Mod_DrawShadowMap(), R_Mod_GetLightInfo(), and size.
Definition at line 7919 of file model_brush.c.
References model_t::brushq1, Con_Printf(), count, sizebuf_t::cursize, model_brushq1_t::edges, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleShort(), model_t::name, model_brushq1_t::numedges, model_brushq1_t::numvertexes, and medge_t::v.
Referenced by Mod_VBSP_Load().
Definition at line 7887 of file model_brush.c.
References model_t::brush, sizebuf_t::cursize, model_brush_t::entities, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadBytes(), and NULL.
Referenced by Mod_VBSP_Load().
Definition at line 8040 of file model_brush.c.
References bound, BoxFromPoints(), model_t::brush, model_t::brushq1, model_t::brushq3, BuffLittleShort(), ca_dedicated, ceil(), cl_stainmaps, cls, count, sizebuf_t::cursize, sizebuf_t::data, model_brushq3_t::data_deluxemaps, surfmesh_t::data_element3i, surfmesh_t::data_element3s, surfmesh_t::data_lightmapoffsets, model_brushq3_t::data_lightmaps, surfmesh_t::data_normal3f, model_t::data_surfaces, model_t::data_surfaces_lightmapinfo, surfmesh_t::data_svector3f, surfmesh_t::data_texcoordlightmap2f, surfmesh_t::data_texcoordtexture2f, model_t::data_textures, surfmesh_t::data_tvector3f, surfmesh_t::data_vertex3f, msurface_t::deluxemaptexture, DotProduct, model_brushq1_t::edges, msurface_lightmapinfo_t::extents, model_brushq1_t::firstrender, float, floor(), gl_max_lightmapsize, texture_t::height, Host_Error(), i, int(), cvar_t::integer, model_brush_t::isq2bsp, model_brushq1_t::lightdata, msurface_t::lightmapinfo, msurface_lightmapinfo_t::lightmaporigin, msurface_t::lightmaptexture, model_brushq1_t::lightmapupdateflags, model_t::lit, loadmodel, max, MAXLIGHTMAPS, msurface_t::maxs, viddef_t::maxtexturesize_2d, Mem_Alloc, Mem_Realloc, model_t::mempool, min, msurface_t::mins, Mod_AllocLightmap_Block(), Mod_AllocLightmap_Init(), Mod_AllocLightmap_Reset(), Mod_AllocSurfMesh(), Mod_BuildNormals(), Mod_BuildTextureVectorsFromNormals(), MSG_ReadByte, MSG_ReadLittleLong(), MSG_ReadLittleShort(), model_t::name, texture_t::name, model_brushq1_t::nmaplightdata, NULL, msurface_t::num_firsttriangle, msurface_t::num_firstvertex, model_brushq3_t::num_mergedlightmaps, model_brush_t::num_planes, model_t::num_surfaces, msurface_t::num_triangles, surfmesh_t::num_triangles, msurface_t::num_vertices, model_brushq1_t::numsurfedges, model_brushq1_t::numtexinfo, mvertex_t::position, mtexinfo_t::q1flags, texture_t::q2flags, Q2SURF_SKY, Q2SURF_WARP, R_AllocTexturePool(), R_LoadTexture2D(), r_smoothnormals_areaweighting, r_texture_blanknormalmap, msurface_lightmapinfo_t::samples, msurface_lightmapinfo_t::stainsamples, client_static_t::state, msurface_lightmapinfo_t::styles, model_brushq1_t::surfedges, model_t::surfmesh, TEX_SPECIAL, TEXF_ALLOWUPDATES, TEXF_FORCELINEAR, model_brushq1_t::texinfo, msurface_lightmapinfo_t::texinfo, msurface_t::texture, mtexinfo_t::textureindex, msurface_lightmapinfo_t::texturemins, model_t::texturepool, TEXTYPE_BGRA, medge_t::v, v, va(), mtexinfo_t::vecs, VectorCopy, model_brushq1_t::vertexes, vid, and texture_t::width.
Referenced by Mod_VBSP_Load().
Definition at line 7969 of file model_brush.c.
References model_t::brush, sizebuf_t::cursize, model_brush_t::data_planes, mplane_t::dist, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleFloat(), MSG_ReadLittleLong(), model_t::name, mplane_t::normal, model_brush_t::num_planes, and PlaneClassify().
Referenced by Mod_VBSP_Load().
Definition at line 7950 of file model_brush.c.
References model_t::brushq1, sizebuf_t::cursize, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleLong(), model_t::name, model_brushq1_t::numsurfedges, and model_brushq1_t::surfedges.
Referenced by Mod_VBSP_Load().
Definition at line 7991 of file model_brush.c.
References model_t::brushq1, Con_Printf(), count, sizebuf_t::cursize, model_t::data_textures, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleFloat(), MSG_ReadLittleLong(), model_t::name, model_t::num_textures, model_brushq1_t::numtexinfo, mtexinfo_t::q1flags, TEX_SPECIAL, model_brushq1_t::texinfo, mtexinfo_t::textureindex, and mtexinfo_t::vecs.
Referenced by Mod_VBSP_Load().
Definition at line 7964 of file model_brush.c.
References Con_Printf(), and CON_WARN.
Referenced by Mod_VBSP_Load().
Definition at line 7897 of file model_brush.c.
References model_t::brushq1, count, sizebuf_t::cursize, Host_Error(), i, loadmodel, Mem_Alloc, model_t::mempool, MSG_ReadLittleFloat(), model_t::name, model_brushq1_t::numvertexes, mvertex_t::position, and model_brushq1_t::vertexes.
Referenced by Mod_VBSP_Load().
Definition at line 3569 of file model_brush.c.
References Host_Error(), i, portal_t::next, portal_t::nodes, NULL, and mnode_t::portals.
Referenced by Mod_BSP_RecursiveNodePortals().
|
extern |
Definition at line 28 of file gl_textures.c.
Referenced by Mod_Q1BSP_LoadFaces(), Mod_VBSP_LoadFaces(), and R_Textures_Init().
cvar_t mod_bsp_portalize = {CF_CLIENT, "mod_bsp_portalize", "0", "enables portal generation from BSP tree (takes a minute or more and GBs of memory when loading a complex map), used by r_drawportals, r_useportalculling, r_shadow_realtime_dlight_portalculling, r_shadow_realtime_world_compileportalculling"} |
Definition at line 67 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Q1BSP_Load(), Mod_Q2BSP_Load(), and Mod_Q3BSP_Load().
cvar_t mod_noshader_default_offsetmapping = {CF_CLIENT | CF_ARCHIVE, "mod_noshader_default_offsetmapping", "1", "use offsetmapping by default on all surfaces that are not using q3 shader files"} |
Definition at line 51 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_LoadCustomMaterial(), and Mod_LoadTextureFromQ3Shader().
cvar_t mod_obj_orientation = {CF_CLIENT | CF_SERVER, "mod_obj_orientation", "1", "fix orientation of OBJ models to the usual conventions (if zero, use coordinates as is)"} |
Definition at line 70 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Decompile_OBJ(), and Mod_OBJ_Load().
cvar_t mod_q1bsp_polygoncollisions = {CF_CLIENT | CF_SERVER, "mod_q1bsp_polygoncollisions", "0", "disables use of precomputed cliphulls and instead collides with polygons (uses Bounding Interval Hierarchy optimizations)"} |
|
static |
Definition at line 74 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Q1BSP_LoadTextures(), and Mod_Q1BSP_RecursiveHullCheck().
|
static |
Definition at line 73 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Q1BSP_LoadTextures(), and Mod_Q1BSP_RecursiveHullCheck().
|
static |
Definition at line 75 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Q1BSP_LoadTextures(), and Mod_Q1BSP_RecursiveHullCheck().
|
static |
Definition at line 72 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Q1BSP_LoadTextures(), Mod_Q1BSP_RecursiveHullCheck(), Mod_Q2BSP_LoadBrushes(), and Mod_Q2BSP_LoadBrushSides().
|
static |
Definition at line 76 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Q1BSP_LoadTextures(), and Mod_Q1BSP_RecursiveHullCheck().
cvar_t mod_q1bsp_traceoutofsolid = {CF_SHARED, "mod_q1bsp_traceoutofsolid", "1", "enables tracebox to move an entity that's stuck in solid brushwork out to empty space, 1 matches FTEQW and QSS and is required by many community maps (items/monsters will be missing otherwise), 0 matches old versions of DP and the original Quake engine (if your map or QC needs 0 it's buggy)"} |
Definition at line 64 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q1BSP_RecursiveHullCheck().
cvar_t mod_q1bsp_zero_hullsize_cutoff = {CF_CLIENT | CF_SERVER, "mod_q1bsp_zero_hullsize_cutoff", "3", "bboxes with an X dimension smaller than this will use the smallest cliphull (0x0x0) instead of being rounded up to the player cliphull (32x32x56) in Q1BSP, or crouching player (32x32x36) in HLBSP"} |
Definition at line 65 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Q1BSP_RoundUpToHullSize(), and Mod_Q1BSP_TraceBox().
cvar_t mod_q2bsp_littransparentsurfaces = {CF_CLIENT, "mod_q2bsp_littransparentsurfaces", "0", "allows lighting on rain in 3v3gloom3 and other cases of transparent surfaces that have lightmaps that were ignored by quake2"} |
Definition at line 61 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q2BSP_LoadTexinfo().
cvar_t mod_q3bsp_curves_collisions = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_collisions", "1", "enables collisions with curves (SLOW)"} |
Definition at line 42 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_CollisionBIH_TraceBrush(), and Mod_CollisionBIH_TraceLineShared().
cvar_t mod_q3bsp_curves_subdivisions_maxtess = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_maxtess", "1024", "maximum number of subdivisions for collision purposes (prevents curves beyond a certain detail level, limits smoothing)"} |
Definition at line 40 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadFaces().
cvar_t mod_q3bsp_curves_subdivisions_maxvertices = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_maxvertices", "4225", "maximum vertices allowed per subdivided curve for collision purposes"} |
Definition at line 41 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadFaces().
cvar_t mod_q3bsp_curves_subdivisions_mintess = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_mintess", "0", "minimum number of subdivisions for collision purposes (values above 0 will smooth curves that don't need it)"} |
Definition at line 39 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadFaces().
cvar_t mod_q3bsp_curves_subdivisions_tolerance = {CF_CLIENT | CF_SERVER, "mod_q3bsp_curves_subdivisions_tolerance", "15", "maximum error tolerance on curve subdivision for collision purposes (usually a larger error tolerance than for rendering)"} |
Definition at line 38 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadFaces().
cvar_t mod_q3bsp_lightgrid_bsp_surfaces = {CF_CLIENT, "mod_q3bsp_lightgrid_bsp_surfaces", "0", "apply lightgrid lighting to bsp models other than the world rather than using their lightmaps (experimental/debug tool)"} |
Definition at line 50 of file model_brush.c.
Referenced by CL_UpdateEntityShading_Entity(), and Mod_BrushInit().
cvar_t mod_q3bsp_lightgrid_texture = {CF_CLIENT, "mod_q3bsp_lightgrid_texture", "1", "directly apply the lightgrid as a global texture rather than only reading it at the entity origin"} |
Definition at line 48 of file model_brush.c.
Referenced by CL_UpdateEntityShading_Entity(), Mod_BrushInit(), and Mod_Q3BSP_LoadLightGrid().
cvar_t mod_q3bsp_lightgrid_world_surfaces = {CF_CLIENT, "mod_q3bsp_lightgrid_world_surfaces", "0", "apply lightgrid lighting to the world bsp geometry rather than using lightmaps (experimental/debug tool)"} |
Definition at line 49 of file model_brush.c.
Referenced by CL_UpdateEntityShading_Entity(), and Mod_BrushInit().
cvar_t mod_q3bsp_lightmapmergepower = {CF_CLIENT | CF_ARCHIVE, "mod_q3bsp_lightmapmergepower", "4", "merges the quake3 128x128 lightmap textures into larger lightmap group textures to speed up rendering, 1 = 256x256, 2 = 512x512, 3 = 1024x1024, 4 = 2048x2048, 5 = 4096x4096, ..."} |
Definition at line 44 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadLightmaps().
cvar_t mod_q3bsp_nolightmaps = {CF_CLIENT | CF_ARCHIVE, "mod_q3bsp_nolightmaps", "0", "do not load lightmaps in Q3BSP maps (to save video RAM, but be warned: it looks ugly)"} |
Definition at line 45 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_GenerateLightmaps(), and Mod_Q3BSP_LoadLightmaps().
cvar_t mod_q3bsp_optimizedtraceline = {CF_CLIENT | CF_SERVER, "mod_q3bsp_optimizedtraceline", "1", "whether to use optimized traceline code for line traces (as opposed to tracebox code)"} |
Definition at line 43 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_CollisionBIH_TraceBrush().
cvar_t mod_q3bsp_sRGBlightmaps = {CF_CLIENT, "mod_q3bsp_sRGBlightmaps", "0", "treat lightmaps from Q3 maps as sRGB when vid_sRGB is active"} |
Definition at line 47 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_Q3BSP_Load(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), and Mod_Q3BSP_LoadVertices().
cvar_t mod_q3bsp_tracelineofsight_brushes = {CF_CLIENT | CF_SERVER, "mod_q3bsp_tracelineofsight_brushes", "0", "enables culling of entities behind detail brushes, curves, etc"} |
Definition at line 46 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_TraceLineOfSight().
cvar_t mod_q3shader_default_offsetmapping = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping", "1", "use offsetmapping by default on all surfaces that are using q3 shader files"} |
Definition at line 52 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
cvar_t mod_q3shader_default_offsetmapping_bias = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping_bias", "0", "default bias used for offsetmapping"} |
Definition at line 54 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
cvar_t mod_q3shader_default_offsetmapping_scale = {CF_CLIENT | CF_ARCHIVE, "mod_q3shader_default_offsetmapping_scale", "1", "default scale used for offsetmapping"} |
Definition at line 53 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
cvar_t mod_q3shader_default_polygonfactor = {CF_CLIENT, "mod_q3shader_default_polygonfactor", "0", "biases depth values of 'polygonoffset' shaders to prevent z-fighting artifacts"} |
Definition at line 55 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
cvar_t mod_q3shader_default_polygonoffset = {CF_CLIENT, "mod_q3shader_default_polygonoffset", "-2", "biases depth values of 'polygonoffset' shaders to prevent z-fighting artifacts"} |
Definition at line 56 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
cvar_t mod_q3shader_default_refractive_index = {CF_CLIENT, "mod_q3shader_default_refractive_index", "1.33", "angle of refraction specified as n to apply when a photon is refracted, example values are: 1.0003 = air, water = 1.333, crown glass = 1.517, flint glass = 1.655, diamond = 2.417"} |
Definition at line 57 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_LoadTextureFromQ3Shader(), and Mod_Q1BSP_LoadTextures().
cvar_t mod_q3shader_force_addalpha = {CF_CLIENT, "mod_q3shader_force_addalpha", "0", "treat GL_ONE GL_ONE (or add) blendfunc as GL_SRC_ALPHA GL_ONE for compatibility with older DarkPlaces releases"} |
Definition at line 58 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
cvar_t mod_q3shader_force_terrain_alphaflag = {CF_CLIENT, "mod_q3shader_force_terrain_alphaflag", "0", "for multilayered terrain shaders force TEXF_ALPHA flag on both layers"} |
Definition at line 59 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_LoadQ3Shaders().
cvar_t mod_recalculatenodeboxes = {CF_CLIENT | CF_SERVER, "mod_recalculatenodeboxes", "1", "enables use of generated node bounding boxes based on BSP tree portal reconstruction, rather than the node boxes supplied by the map compiler"} |
Definition at line 68 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_BSP_FinalizePortals().
|
static |
|
static |
Definition at line 3393 of file model_brush.c.
Referenced by Mod_BSP_FinalizePortals(), Mod_BSP_MakePortals(), and Mod_BSP_RecursiveNodePortals().
|
static |
Definition at line 3614 of file model_brush.c.
Referenced by Mod_BSP_MakePortals(), and Mod_BSP_RecursiveNodePortals().
|
static |
Definition at line 3615 of file model_brush.c.
Referenced by Mod_BSP_MakePortals(), and Mod_BSP_RecursiveNodePortals().
|
static |
Definition at line 3616 of file model_brush.c.
Referenced by Mod_BSP_MakePortals(), and Mod_BSP_RecursiveNodePortals().
cvar_t r_nosurftextures = {CF_CLIENT, "r_nosurftextures", "0", "pretends there was no texture lump found in the q1bsp/hlbsp loading (useful for debugging this rare case)"} |
Definition at line 32 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q1BSP_LoadTextures().
cvar_t r_novis = {CF_CLIENT, "r_novis", "0", "draws whole level, see also sv_cullentities_pvs 0"} |
Definition at line 31 of file model_brush.c.
Referenced by Mod_BrushInit(), Mod_BSP_FatPVS(), R_GetCurrentTexture(), R_View_UpdateEntityVisible(), R_View_WorldVisibility(), and SV_MarkWriteEntityStateToClient().
cvar_t r_subdivisions_maxtess = {CF_CLIENT, "r_subdivisions_maxtess", "1024", "maximum number of subdivisions (prevents curves beyond a certain detail level, limits smoothing)"} |
Definition at line 36 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadFaces().
cvar_t r_subdivisions_maxvertices = {CF_CLIENT, "r_subdivisions_maxvertices", "65536", "maximum vertices allowed per subdivided curve"} |
Definition at line 37 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadFaces().
cvar_t r_subdivisions_mintess = {CF_CLIENT, "r_subdivisions_mintess", "0", "minimum number of subdivisions (values above 0 will smooth curves that don't need it)"} |
Definition at line 35 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadFaces().
cvar_t r_subdivisions_tolerance = {CF_CLIENT, "r_subdivisions_tolerance", "4", "maximum error tolerance on curve subdivision for rendering purposes (in other words, the curves will be given as many polygons as necessary to represent curves at this quality)"} |
Definition at line 34 of file model_brush.c.
Referenced by Mod_BrushInit(), and Mod_Q3BSP_LoadFaces().
Definition at line 29 of file model_brush.c.
Referenced by _R_CullBox(), Mod_BrushInit(), Mod_BSP_FatPVS(), R_DrawTextureSurfaceList_Sky(), R_GetCurrentTexture(), R_RenderView(), R_SetupShader_DepthOrShadow(), R_SetupShader_Generic(), R_SetupShader_Surface(), R_Shadow_ComputeShadowCasterCullingPlanes(), R_Shadow_ScissorForBBox(), R_View_WorldVisibility_CullSurfaces(), SV_MarkWriteEntityStateToClient(), and V_MakeViewIsometric().