Go to the documentation of this file.
34 #define MAX_MOD_KNOWN 512
54 if (!model || !model->
nodes)
114 }
while (out - decompressed < row);
126 if (cluster == -1 || !model->
vis)
232 memset (mod->
name, 0,
sizeof(mod->
name));
348 for (
i=0 ;
i<
count ;
i++, in++, out++)
366 for (
i=0 ;
i<3 ;
i++)
368 corner[
i] = fabs(mins[
i]) > fabs(maxs[
i]) ? fabs(mins[
i]) : fabs(maxs[
i]);
395 for (
i=0 ;
i<
count ;
i++, in++, out++)
397 for (
j=0 ;
j<3 ;
j++)
430 for (
i=0 ;
i<
count ;
i++, in++, out++)
459 for (
i=0 ;
i<
count ;
i++, in++, out++)
461 for (
j=0 ;
j<4 ;
j++)
488 for (step = out->
next ; step && step != out ; step=step->
next)
502 float mins[2], maxs[2], val;
506 int bmins[2], bmaxs[2];
508 mins[0] = mins[1] = 999999;
509 maxs[0] = maxs[1] = -99999;
513 for (
i=0 ;
i<
s->numedges ;
i++)
521 for (
j=0 ;
j<2 ;
j++)
523 val =
v->position[0] * tex->
vecs[
j][0] +
524 v->position[1] * tex->
vecs[
j][1] +
525 v->position[2] * tex->
vecs[
j][2] +
534 for (
i=0 ;
i<2 ;
i++)
536 bmins[
i] = floor(mins[
i]/16);
537 bmaxs[
i] = ceil(maxs[
i]/16);
539 s->texturemins[
i] = bmins[
i] * 16;
540 s->extents[
i] = (bmaxs[
i] - bmins[
i]) * 16;
579 for ( surfnum=0 ; surfnum<
count ; surfnum++, in++, out++)
615 for (
i=0 ;
i<2 ;
i++)
670 for (
i=0 ;
i<
count ;
i++, in++, out++)
672 for (
j=0 ;
j<3 ;
j++)
685 for (
j=0 ;
j<2 ;
j++)
719 for (
i=0 ;
i<
count ;
i++, in++, out++)
721 for (
j=0 ;
j<3 ;
j++)
831 for (
i=0 ;
i<
count ;
i++, in++, out++)
834 for (
j=0 ;
j<3 ;
j++)
935 dmdl_t *pinmodel, *pheader;
939 int *pincmd, *poutcmd;
994 for (
j=0 ;
j<3 ;
j++)
1011 memcpy (poutframe->
name, pinframe->
name,
sizeof(poutframe->
name));
1012 for (
j=0 ;
j<3 ;
j++)
1028 pincmd = (
int *) ((
byte *)pinmodel + pheader->
ofs_glcmds);
1029 poutcmd = (
int *) ((
byte *)pheader + pheader->
ofs_glcmds);
1116 Com_sprintf (fullname,
sizeof(fullname),
"maps/%s.bsp", model);
1209 memset (mod, 0,
sizeof(*mod));
void Mod_LoadNodes(lump_t *l)
byte styles[MAXLIGHTMAPS]
void * Hunk_Begin(int maxsize)
short LittleShort(short l)
void Mod_LoadLeafs(lump_t *l)
void R_BeginRegistration(char *model)
struct model_s * R_RegisterModel(char *name)
void Hunk_Free(void *base)
void Mod_LoadVisibility(lump_t *l)
int(* FS_LoadFile)(char *name, void **buf)
cvar_t *(* Cvar_Get)(char *name, char *value, int flags)
void Mod_Modellist_f(void)
void GL_FreeUnusedImages(void)
#define MAX_MAP_SURFEDGES
void Mod_LoadEdges(lump_t *l)
msurface_t ** firstmarksurface
byte * Mod_DecompressVis(byte *in, model_t *model)
msurface_t ** marksurfaces
struct mnode_s * children[2]
void GL_CreateSurfaceLightmap(msurface_t *surf)
model_t * Mod_LoadModel(model_t *mod, qboolean crash)
int registration_sequence
void Mod_LoadVertexes(lump_t *l)
model_t mod_inline[MAX_MOD_KNOWN]
void Mod_LoadTexinfo(lump_t *l)
void(* FS_FreeFile)(void *buf)
void Mod_LoadSpriteModel(model_t *mod, void *buffer)
void Mod_LoadSurfedges(lump_t *l)
mleaf_t * Mod_PointInLeaf(vec3_t p, model_t *model)
void R_EndRegistration(void)
int registration_sequence
void(* Con_Printf)(int print_level, char *str,...)
image_t * GL_FindImage(char *name, imagetype_t type)
float LittleFloat(float l)
void Mod_LoadLighting(lump_t *l)
float RadiusFromBounds(vec3_t mins, vec3_t maxs)
vec_t VectorLength(vec3_t v)
void GL_BuildPolygonFromSurface(msurface_t *fa)
void GL_EndBuildingLightmaps(void)
void(* Sys_Error)(int err_level, char *str,...)
void Mod_SetParent(mnode_t *node, mnode_t *parent)
void GL_SubdivideSurface(msurface_t *fa)
void CalcSurfaceExtents(msurface_t *s)
image_t * skins[MAX_MD2SKINS]
model_t * Mod_ForName(char *name, qboolean crash)
unsigned short firstsurface
void GL_BeginBuildingLightmaps(model_t *m)
byte * Mod_ClusterPVS(int cluster, model_t *model)
void Mod_Free(model_t *mod)
int registration_sequence
void Mod_LoadFaces(lump_t *l)
byte mod_novis[MAX_MAP_LEAFS/8]
void Mod_LoadAliasModel(model_t *mod, void *buffer)
unsigned short numsurfaces
void Mod_LoadSubmodels(lump_t *l)
void Mod_LoadBrushModel(model_t *mod, void *buffer)
void Mod_LoadPlanes(lump_t *l)
void * Hunk_Alloc(int size)
void Com_sprintf(char *dest, int size, char *fmt,...)
model_t mod_known[MAX_MOD_KNOWN]
void Mod_LoadMarksurfaces(lump_t *l)