icculus quake2 doxygen
1.0 dev
|
|
Go to the documentation of this file.
37 #define MAX_MOD_KNOWN 256
141 memset (mod->
name, 0,
sizeof(mod->
name));
194 if (!model || !model->
nodes)
230 memcpy (out, in, row);
257 }
while (out - decompressed < row);
270 if (cluster == -1 || !model->
vis)
308 for (
i=0 ;
i<size ;
i++, in+=3)
310 if (in[0] > in[1] && in[0] > in[2])
312 else if (in[1] > in[0] && in[1] > in[2])
394 memset( out, 0, (
count + 6) *
sizeof( *out ) );
400 for (
i=0 ;
i<
count ;
i++, in++, out++)
428 for (
i=0 ;
i<
count ;
i++, in++, out++)
430 for (
j=0 ;
j<3 ;
j++)
462 for (
i=0 ;
i<
count ;
i++, in++, out++)
492 for (
i=0 ;
i<
count ;
i++, in++, out++)
494 for (
j=0 ;
j<8 ;
j++)
498 len1 = (len1 + len2)/2;
501 else if (len1 < 0.49)
503 else if (len1 < 0.99)
508 if (len1 + len2 < 0.001)
511 out->
mipadjust = 1 / floor( (len1+len2)/2 + 0.1 );
544 for (step = out->
next ; step && step != out ; step=step->
next)
558 float mins[2], maxs[2], val;
562 int bmins[2], bmaxs[2];
564 mins[0] = mins[1] = 999999;
565 maxs[0] = maxs[1] = -99999;
577 for (
j=0 ;
j<2 ;
j++)
579 val =
v->position[0] * tex->
vecs[
j][0] +
580 v->position[1] * tex->
vecs[
j][1] +
581 v->position[2] * tex->
vecs[
j][2] +
590 for (
i=0 ;
i<2 ;
i++)
592 bmins[
i] = floor(mins[
i]/16);
593 bmaxs[
i] = ceil(maxs[
i]/16);
626 for ( surfnum=0 ; surfnum<
count ; surfnum++, in++, out++)
668 for (
i=0 ;
i<2 ;
i++)
682 for (
i=0 ;
i<2 ;
i++)
729 for (
i=0 ;
i<
count ;
i++, in++, out++)
731 for (
j=0 ;
j<3 ;
j++)
744 for (
j=0 ;
j<2 ;
j++)
777 for (
i=0 ;
i<
count ;
i++, in++, out++)
779 for (
j=0 ;
j<3 ;
j++)
870 for (
i=0 ;
i<
count ;
i++, in++, out++)
873 for (
j=0 ;
j<3 ;
j++)
975 dmdl_t *pinmodel, *pheader;
979 int *pincmd, *poutcmd;
1005 if (pheader->
num_st <= 0)
1034 for (
j=0 ;
j<3 ;
j++)
1051 memcpy (poutframe->
name, pinframe->
name,
sizeof(poutframe->
name));
1052 for (
j=0 ;
j<3 ;
j++)
1068 pincmd = (
int *) ((
byte *)pinmodel + pheader->
ofs_glcmds);
1069 poutcmd = (
int *) ((
byte *)pheader + pheader->
ofs_glcmds);
1146 Com_sprintf (fullname,
sizeof(fullname),
"maps/%s.bsp", model);
1220 memset (mod, 0,
sizeof(*mod));
1242 memset (mod, 0,
sizeof(*mod));
void Mod_LoadSurfedges(lump_t *l)
model_t * Mod_LoadModel(model_t *mod, qboolean crash)
void Mod_LoadTexinfo(lump_t *l)
byte styles[MAXLIGHTMAPS]
void Mod_LoadSpriteModel(model_t *mod, void *buffer)
void * Hunk_Begin(int maxsize)
void Mod_LoadVertexes(lump_t *l)
short LittleShort(short l)
model_t mod_known[MAX_MOD_KNOWN]
void Mod_LoadMarksurfaces(lump_t *l)
void Hunk_Free(void *base)
byte * Mod_DecompressVis(byte *in, model_t *model)
mleaf_t * Mod_PointInLeaf(vec3_t p, model_t *model)
void Mod_LoadLighting(lump_t *l)
int(* FS_LoadFile)(char *name, void **buf)
cvar_t *(* Cvar_Get)(char *name, char *value, int flags)
image_t * R_FindImage(char *name, imagetype_t type)
image_t * r_notexture_mip
msurface_t ** firstmarksurface
byte mod_novis[MAX_MAP_LEAFS/8]
void Mod_LoadLeafs(lump_t *l)
msurface_t ** marksurfaces
struct mnode_s * children[2]
int registration_sequence
void(* FS_FreeFile)(void *buf)
void Mod_LoadBrushModel(model_t *mod, void *buffer)
void R_FreeUnusedImages(void)
void R_NumberLeafs(mnode_t *node)
int registration_sequence
void(* Con_Printf)(int print_level, char *str,...)
struct model_s * R_RegisterModel(char *name)
void Mod_LoadSubmodels(lump_t *l)
void Mod_LoadEdges(lump_t *l)
float LittleFloat(float l)
void Mod_LoadPlanes(lump_t *l)
model_t * Mod_ForName(char *name, qboolean crash)
vec_t VectorLength(vec3_t v)
int r_leaftovis[MAX_MAP_LEAFS]
void(* Sys_Error)(int err_level, char *str,...)
int r_vistoleaf[MAX_MAP_LEAFS]
void Mod_LoadFaces(lump_t *l)
model_t mod_inline[MAX_MOD_KNOWN]
image_t * skins[MAX_MD2SKINS]
void CalcSurfaceExtents(msurface_t *s)
void Mod_LoadNodes(lump_t *l)
unsigned short firstsurface
void Com_PageInMemory(byte *buffer, int size)
void Mod_LoadVisibility(lump_t *l)
void R_EndRegistration(void)
int registration_sequence
void Mod_SetParent(mnode_t *node, mnode_t *parent)
void Mod_Free(model_t *mod)
void Mod_LoadAliasModel(model_t *mod, void *buffer)
unsigned short numsurfaces
void R_BeginRegistration(char *model)
void Mod_Modellist_f(void)
byte * Mod_ClusterPVS(int cluster, model_t *model)
void * Hunk_Alloc(int size)
void Com_sprintf(char *dest, int size, char *fmt,...)