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;
576 for (surfnum = 0; surfnum<
count; surfnum++, in++, out++)
612 for (
i = 0;
i<2;
i++)
667 for (
i=0 ;
i<
count ;
i++, in++, out++)
669 for (
j=0 ;
j<3 ;
j++)
682 for (
j=0 ;
j<2 ;
j++)
716 for (
i=0 ;
i<
count ;
i++, in++, out++)
718 for (
j=0 ;
j<3 ;
j++)
828 for (
i=0 ;
i<
count ;
i++, in++, out++)
831 for (
j=0 ;
j<3 ;
j++)
932 dmdl_t *pinmodel, *pheader;
936 int *pincmd, *poutcmd;
991 for (
j=0 ;
j<3 ;
j++)
1008 memcpy (poutframe->
name, pinframe->
name,
sizeof(poutframe->
name));
1009 for (
j=0 ;
j<3 ;
j++)
1025 pincmd = (
int *) ((
byte *)pinmodel + pheader->
ofs_glcmds);
1026 poutcmd = (
int *) ((
byte *)pheader + pheader->
ofs_glcmds);
1113 Com_sprintf (fullname,
sizeof(fullname),
"maps/%s.bsp", model);
1206 memset (mod, 0,
sizeof(*mod));
float RadiusFromBounds(vec3_t mins, vec3_t maxs)
byte styles[MAXLIGHTMAPS]
void * Hunk_Begin(int maxsize)
void Mod_LoadNodes(lump_t *l)
short LittleShort(short l)
struct model_s * R_RegisterModel(char *name)
void Vk_BeginBuildingLightmaps(model_t *m)
mleaf_t * Mod_PointInLeaf(vec3_t p, model_t *model)
void Hunk_Free(void *base)
void Mod_LoadVertexes(lump_t *l)
void Vk_SubdivideSurface(msurface_t *fa)
void Mod_LoadAliasModel(model_t *mod, void *buffer)
int(* FS_LoadFile)(char *name, void **buf)
cvar_t *(* Cvar_Get)(char *name, char *value, int flags)
void Mod_Modellist_f(void)
#define MAX_MAP_SURFEDGES
msurface_t ** firstmarksurface
msurface_t ** marksurfaces
struct mnode_s * children[2]
int registration_sequence
void Mod_LoadFaces(lump_t *l)
void(* FS_FreeFile)(void *buf)
model_t mod_known[MAX_MOD_KNOWN]
void Vk_FreeUnusedImages(void)
int registration_sequence
void(* Con_Printf)(int print_level, char *str,...)
float LittleFloat(float l)
void Mod_LoadSubmodels(lump_t *l)
void Mod_SetParent(mnode_t *node, mnode_t *parent)
void Mod_LoadMarksurfaces(lump_t *l)
vec_t VectorLength(vec3_t v)
void(* Sys_Error)(int err_level, char *str,...)
void R_EndRegistration(void)
int registration_sequence
image_t * Vk_FindImage(char *name, imagetype_t type, qvksampler_t *samplerType)
void Mod_LoadLeafs(lump_t *l)
byte mod_novis[MAX_MAP_LEAFS/8]
void CalcSurfaceExtents(msurface_t *s)
byte * Mod_ClusterPVS(int cluster, model_t *model)
byte * Mod_DecompressVis(byte *in, model_t *model)
void Vk_CreateSurfaceLightmap(msurface_t *surf)
void Mod_LoadVisibility(lump_t *l)
void Mod_LoadEdges(lump_t *l)
void Mod_LoadBrushModel(model_t *mod, void *buffer)
image_t * skins[MAX_MD2SKINS]
void Mod_LoadTexinfo(lump_t *l)
unsigned short firstsurface
model_t * Mod_ForName(char *name, qboolean crash)
void Mod_LoadSpriteModel(model_t *mod, void *buffer)
void R_BeginRegistration(char *model)
void Vk_BuildPolygonFromSurface(msurface_t *fa)
void Mod_LoadSurfedges(lump_t *l)
void Mod_LoadLighting(lump_t *l)
unsigned short numsurfaces
void * Hunk_Alloc(int size)
void Com_sprintf(char *dest, int size, char *fmt,...)
void Mod_LoadPlanes(lump_t *l)
void Mod_Free(model_t *mod)
void Vk_EndBuildingLightmaps(void)
model_t mod_inline[MAX_MOD_KNOWN]