FTEQW
Documentation of the FTE engine source tree.
|
Typedefs | |
typedef struct md3Frame_s | md3Frame_t |
typedef struct zymlump_s | zymlump_t |
typedef struct zymtype1header_s | zymtype1header_t |
typedef struct zymbone_s | zymbone_t |
typedef struct zymscene_s | zymscene_t |
typedef struct zymvertex_s | zymvertex_t |
typedef struct pskchunk_s | pskchunk_t |
typedef struct pskpnts_s | pskpnts_t |
typedef struct pskvtxw_s | pskvtxw_t |
typedef struct pskface_s | pskface_t |
typedef struct pskmatt_s | pskmatt_t |
typedef struct pskpose_s | pskpose_t |
typedef struct pskboneinfo_s | pskboneinfo_t |
typedef struct pskrawweights_s | pskrawweights_t |
typedef struct pskaniminfo_s | pskaniminfo_t |
typedef struct pskanimkeys_s | pskanimkeys_t |
Functions | |
qboolean | Mod_DoCRC (model_t *mod, char *buffer, int buffersize) |
void QDECL | Mod_AccumulateTextureVectors (vecV_t *const vc, vec2_t *const tc, vec3_t *nv, vec3_t *sv, vec3_t *tv, const index_t *idx, int numidx, qboolean calcnorms) |
void | Mod_AccumulateMeshTextureVectors (mesh_t *m) |
void QDECL | Mod_NormaliseTextureVectors (vec3_t *n, vec3_t *s, vec3_t *t, int v, qboolean calcnorms) |
void QDECL | Alias_ForceConvertBoneData (skeltype_t sourcetype, const float *sourcedata, size_t bonecount, galiasbone_t *bones, skeltype_t desttype, float *destbuffer, size_t destbonecount) |
void | R_LightArraysByte_BGR (const entity_t *entity, vecV_t *coords, byte_vec4_t *colours, int vertcount, vec3_t *normals, qboolean usecolourmod) |
void | R_LightArrays (const entity_t *entity, vecV_t *coords, avec4_t *colours, int vertcount, vec3_t *normals, float scale, qboolean colormod) |
void | Alias_FlushCache (void) |
void | Alias_Shutdown (void) |
qboolean | Alias_GAliasBuildMesh (mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, int surfnum, entity_t *e, qboolean usebones) |
if (meshcache.bonegroup !=inf->shares_bones) | |
if (!e->framestate.g[FS_REG].lerpweight[0] &&!e->framestate.g[FS_REG].lerpweight[1] &&!e->framestate.g[FS_REG].lerpweight[2] &&!e->framestate.g[FS_REG].lerpweight[3]) Con_Printf("Entity with no lerp info\n") | |
if (vbop) | |
else | if (inf->numbones) |
if (e->framestate.g[FS_REG].lerpweight[2]||e->framestate.g[FS_REG].lerpweight[3]) Con_ThrottlePrintf(&printtimer | |
Alias_GAliasBuildMesh (%s) | |
VectorAdd (p1, r_refdef.pvsorigin, edge1) | |
VectorAdd (p2, r_refdef.pvsorigin, edge2) | |
VectorAdd (p3, r_refdef.pvsorigin, edge3) | |
CLQ1_DrawLine (lineshader, edge1, edge2, 0, 1, 0, 1) | |
CLQ1_DrawLine (lineshader, edge2, edge3, 0, 1, 0, 1) | |
CLQ1_DrawLine (lineshader, edge3, edge1, 0, 1, 0, 1) | |
VectorSubtract (p1, p2, edge1) | |
VectorSubtract (p3, p2, edge2) | |
CrossProduct (edge1, edge2, normal) | |
VectorNormalize (normal) | |
if (!normal[0] &&!normal[1] &&!normal[2]) continue | |
if (diststart< planedist) continue | |
if (distend, planedist) | |
if (frac >=trace->truefraction) continue | |
for (j=0;j< 3;j++) | |
CrossProduct (edge1, normal, edgenormal) | |
VectorNormalize (edgenormal) | |
if (DotProduct(impactpoint, edgenormal) > DotProduct(p2, edgenormal) -PlaneNearest(edgenormal, mins, maxs)+DIST_EPSILON) continue | |
CrossProduct (normal, edge2, edgenormal) | |
if (DotProduct(impactpoint, edgenormal) > DotProduct(p3, edgenormal) -PlaneNearest(edgenormal, mins, maxs)+DIST_EPSILON) continue | |
VectorSubtract (p1, p3, edge3) | |
CrossProduct (normal, edge3, edgenormal) | |
if (DotProduct(impactpoint, edgenormal) > DotProduct(p1, edgenormal) -PlaneNearest(edgenormal, mins, maxs)+DIST_EPSILON) continue | |
VectorCopy (normal, trace->plane.normal) | |
qboolean | Mod_Mesh_EdictInFatPVS (struct model_s *model, const struct pvscache_s *edict, const qbyte *pvs, const int *areas) |
void | Mod_Mesh_FindTouchedLeafs (struct model_s *model, struct pvscache_s *ent, const vec3_t cullmins, const vec3_t cullmaxs) |
void | Mod_DestroyMesh (galiasinfo_t *galias) |
void | Mod_LoadAliasShaders (model_t *mod) |
int | Mod_GetNumBones (model_t *model, qboolean allowtags) |
int | Mod_GetBoneRelations (model_t *model, int firstbone, int lastbone, framestate_t *fstate, float *result) |
galiasbone_t * | Mod_GetBoneInfo (model_t *model, int *numbones) |
int | Mod_GetBoneParent (model_t *model, int bonenum) |
const char * | Mod_GetBoneName (model_t *model, int bonenum) |
qboolean | Mod_GetTag (model_t *model, int tagnum, framestate_t *fstate, float *result) |
int | Mod_TagNumForName (model_t *model, const char *name, int firsttag) |
int | Mod_FrameNumForName (model_t *model, int surfaceidx, const char *name) |
int | Mod_FrameNumForAction (model_t *model, int surfaceidx, int actionid) |
qboolean | Mod_GetModelEvent (model_t *model, int animation, int eventidx, float *timestamp, int *eventcode, char **eventdata) |
int | Mod_SkinNumForName (model_t *model, int surfaceidx, const char *name) |
const char * | Mod_FrameNameForNum (model_t *model, int surfaceidx, int num) |
qboolean | Mod_FrameInfoForNum (model_t *model, int surfaceidx, int num, char **name, int *numframes, float *duration, qboolean *loop, int *act) |
shader_t * | Mod_ShaderForSkin (model_t *model, int surfaceidx, int num, float time, texnums_t **out_texnums) |
const char * | Mod_SkinNameForNum (model_t *model, int surfaceidx, int num) |
const char * | Mod_SurfaceNameForNum (model_t *model, int num) |
float | Mod_GetFrameDuration (model_t *model, int surfaceidx, int frameno) |
int | Mod_GetFrameCount (struct model_s *model) |
Variables | |
qboolean | r_loadbumpmapping |
cvar_t | r_noframegrouplerp |
cvar_t | r_lerpmuzzlehack = CVARF ("r_lerpmuzzlehack", "1", CVAR_ARCHIVE) |
cvar_t | mod_h2holey_bugged = CVARD ("mod_h2holey_bugged", "0", "Hexen2's holey-model flag uses index 0 as transparent (and additionally 255 in gl, due to a bug). GLQuake engines tend to have bugs that use ONLY index 255, resulting in a significant compatibility issue that can be resolved only with this shitty cvar hack.") |
cvar_t | mod_halftexel = CVARD ("mod_halftexel", "1", "Offset texture coords by a half-texel, for compatibility with glquake and the majority of engine forks.") |
cvar_t | mod_nomipmap = CVARD ("mod_nomipmap", "0", "Disables the use of mipmaps on quake1 mdls, consistent with its original software renderer.") |
cvar_t | mod_obj_orientation = CVARD("mod_obj_orientation", "1", "Controls how the model's axis are interpreted.\n0: x=forward, z=up (Quake)\n1: x=forward, y=up\n2: z=forward, y=up") |
cvar_t | mod_md5_singleanimation = CVARD("mod_md5_singleanimation", "1", "When loading an md5mesh file, also attempt to load an .md5anim file, and unpack it into individual poses. Use 0 for mods that will be precaching their own md5anims for use with skeletal objects.") |
cvar_t | r_meshpitch = CVARCD ("r_meshpitch", "1", r_meshpitch_callback, "Specifies the direction of the pitch angle on mesh models formats, also affects gamecode, so do not change from its default.") |
cvar_t | r_meshroll = CVARCD ("r_meshroll", "1", r_meshpitch_callback, "Specifies the direction of the roll angle on mesh models formats, also affects gamecode, so do not change from its default.") |
cvar_t | dpcompat_skinfiles = CVARD ("dpcompat_skinfiles", "0", "When set, uses a nodraw shader for any unmentioned surfaces.") |
cvar_t | gl_part_flame |
cvar_t | r_fullbrightSkins |
cvar_t | r_fb_models |
cvar_t | r_noaliasshadows |
cvar_t | r_skin_overlays |
cvar_t | mod_md3flags |
struct { | |
int numcoords | |
vecV_t * coords | |
int numnorm | |
vec3_t * norm | |
int bonegroup | |
int vertgroup | |
entity_t * ent | |
boneidx_t * bonemap | |
float gpubones [MAX_BONES *12] | |
float boneposebuffer1 [MAX_BONES *12] | |
float boneposebuffer2 [MAX_BONES *12] | |
skeltype_t bonecachetype | |
const float * usebonepose | |
int bonecount | |
qboolean usebones | |
vecV_t * acoords1 | |
vecV_t * acoords2 | |
vec3_t * anorm | |
vec3_t * anorms | |
vec3_t * anormt | |
float lerp | |
vbo_t vbo | |
vbo_t * vbop | |
} | meshcache |
else | |
mesh | trneighbors = inf->ofs_trineighbours |
mesh | normals_array = meshcache.norm |
mesh | snormals_array = meshcache.norm+meshcache.numnorm |
mesh | tnormals_array = meshcache.norm+meshcache.numnorm*2 |
mesh | xyz_array = meshcache.coords |
return | false |
float | lerpcutoff |
galiasanimation_t * | g1 |
galiasanimation_t * | g2 |
int | frame1 |
int | frame2 |
float | fg1time |
n | |
extend = PlaneNearest(normal, mins, maxs) | |
planedist = DotProduct(p1, normal)-extend | |
diststart = DotProduct(start, normal) | |
distend = DotProduct(end, normal) | |
frac = (diststart - planedist) / (diststart-distend) | |
trace | truefraction = frac |
trace | endpos [0] = start[0] + frac*(end[0] - start[0]) |
trace plane | dist = planedist |
trace | triangle_id = 1+i/3 |
impacted = true | |
float | r_avertexnormals [NUMVERTEXNORMALS][3] |
vec3_t | bytedirs [Q2NUMVERTEXNORMALS] |
cvar_t | dpcompat_psa_ungroup |
typedef struct md3Frame_s md3Frame_t |
typedef struct pskaniminfo_s pskaniminfo_t |
typedef struct pskanimkeys_s pskanimkeys_t |
typedef struct pskboneinfo_s pskboneinfo_t |
typedef struct pskchunk_s pskchunk_t |
typedef struct pskface_s pskface_t |
typedef struct pskmatt_s pskmatt_t |
typedef struct pskpnts_s pskpnts_t |
typedef struct pskpose_s pskpose_t |
typedef struct pskrawweights_s pskrawweights_t |
typedef struct pskvtxw_s pskvtxw_t |
typedef struct zymbone_s zymbone_t |
typedef struct zymlump_s zymlump_t |
typedef struct zymscene_s zymscene_t |
typedef struct zymtype1header_s zymtype1header_t |
typedef struct zymvertex_s zymvertex_t |
void QDECL Alias_ForceConvertBoneData | ( | skeltype_t | sourcetype, |
const float * | sourcedata, | ||
size_t | bonecount, | ||
galiasbone_t * | bones, | ||
skeltype_t | desttype, | ||
float * | destbuffer, | ||
size_t | destbonecount | ||
) |
Alias_GAliasBuildMesh | ( | % | s | ) |
qboolean Alias_GAliasBuildMesh | ( | mesh_t * | mesh, |
vbo_t ** | vbop, | ||
galiasinfo_t * | inf, | ||
int | surfnum, | ||
entity_t * | e, | ||
qboolean | usebones | ||
) |
CLQ1_DrawLine | ( | lineshader | , |
edge1 | , | ||
edge2 | , | ||
0 | , | ||
1 | , | ||
0 | , | ||
1 | |||
) |
CLQ1_DrawLine | ( | lineshader | , |
edge2 | , | ||
edge3 | , | ||
0 | , | ||
1 | , | ||
0 | , | ||
1 | |||
) |
CLQ1_DrawLine | ( | lineshader | , |
edge3 | , | ||
edge1 | , | ||
0 | , | ||
1 | , | ||
0 | , | ||
1 | |||
) |
CrossProduct | ( | edge1 | , |
edge2 | , | ||
normal | |||
) |
CrossProduct | ( | edge1 | , |
normal | , | ||
edgenormal | |||
) |
CrossProduct | ( | normal | , |
edge2 | , | ||
edgenormal | |||
) |
CrossProduct | ( | normal | , |
edge3 | , | ||
edgenormal | |||
) |
for | ( | ) |
if | ( | !e->framestate.g.lerpweight &&!e->framestate.g.lerpweight &&!e->framestate.g.lerpweight &&!e->framestate.g. | lerpweight[FS_REG][0][FS_REG][1][FS_REG][2][FS_REG][3] | ) |
if | ( | !normal &&!normal &&! | normal[0][1][2] | ) |
if | ( | ) |
if | ( | DotProduct(impactpoint, edgenormal) | , |
DotProduct(p1, edgenormal) -PlaneNearest(edgenormal, mins, maxs)+ | DIST_EPSILON | ||
) |
if | ( | DotProduct(impactpoint, edgenormal) | , |
DotProduct(p2, edgenormal) -PlaneNearest(edgenormal, mins, maxs)+ | DIST_EPSILON | ||
) |
if | ( | DotProduct(impactpoint, edgenormal) | , |
DotProduct(p3, edgenormal) -PlaneNearest(edgenormal, mins, maxs)+ | DIST_EPSILON | ||
) |
if | ( | frac >=trace-> | truefraction | ) |
else if | ( | inf-> | numbones | ) |
if | ( | meshcache.bonegroup ! | = inf->shares_bones | ) |
if | ( | vbop | ) |
void QDECL Mod_AccumulateTextureVectors | ( | vecV_t *const | vc, |
vec2_t *const | tc, | ||
vec3_t * | nv, | ||
vec3_t * | sv, | ||
vec3_t * | tv, | ||
const index_t * | idx, | ||
int | numidx, | ||
qboolean | calcnorms | ||
) |
void Mod_DestroyMesh | ( | galiasinfo_t * | galias | ) |
qboolean Mod_FrameInfoForNum | ( | model_t * | model, |
int | surfaceidx, | ||
int | num, | ||
char ** | name, | ||
int * | numframes, | ||
float * | duration, | ||
qboolean * | loop, | ||
int * | act | ||
) |
galiasbone_t * Mod_GetBoneInfo | ( | model_t * | model, |
int * | numbones | ||
) |
int Mod_GetBoneRelations | ( | model_t * | model, |
int | firstbone, | ||
int | lastbone, | ||
framestate_t * | fstate, | ||
float * | result | ||
) |
qboolean Mod_GetModelEvent | ( | model_t * | model, |
int | animation, | ||
int | eventidx, | ||
float * | timestamp, | ||
int * | eventcode, | ||
char ** | eventdata | ||
) |
qboolean Mod_GetTag | ( | model_t * | model, |
int | tagnum, | ||
framestate_t * | fstate, | ||
float * | result | ||
) |
qboolean Mod_Mesh_EdictInFatPVS | ( | struct model_s * | model, |
const struct pvscache_s * | edict, | ||
const qbyte * | pvs, | ||
const int * | areas | ||
) |
void Mod_Mesh_FindTouchedLeafs | ( | struct model_s * | model, |
struct pvscache_s * | ent, | ||
const vec3_t | cullmins, | ||
const vec3_t | cullmaxs | ||
) |
void QDECL Mod_NormaliseTextureVectors | ( | vec3_t * | n, |
vec3_t * | s, | ||
vec3_t * | t, | ||
int | v, | ||
qboolean | calcnorms | ||
) |
shader_t * Mod_ShaderForSkin | ( | model_t * | model, |
int | surfaceidx, | ||
int | num, | ||
float | time, | ||
texnums_t ** | out_texnums | ||
) |
void R_LightArrays | ( | const entity_t * | entity, |
vecV_t * | coords, | ||
avec4_t * | colours, | ||
int | vertcount, | ||
vec3_t * | normals, | ||
float | scale, | ||
qboolean | colormod | ||
) |
void R_LightArraysByte_BGR | ( | const entity_t * | entity, |
vecV_t * | coords, | ||
byte_vec4_t * | colours, | ||
int | vertcount, | ||
vec3_t * | normals, | ||
qboolean | usecolourmod | ||
) |
VectorAdd | ( | p1 | , |
r_refdef. | pvsorigin, | ||
edge1 | |||
) |
VectorAdd | ( | p2 | , |
r_refdef. | pvsorigin, | ||
edge2 | |||
) |
VectorAdd | ( | p3 | , |
r_refdef. | pvsorigin, | ||
edge3 | |||
) |
VectorCopy | ( | normal | , |
trace->plane. | normal | ||
) |
VectorNormalize | ( | edgenormal | ) |
VectorNormalize | ( | normal | ) |
VectorSubtract | ( | p1 | , |
p2 | , | ||
edge1 | |||
) |
VectorSubtract | ( | p1 | , |
p3 | , | ||
edge3 | |||
) |
VectorSubtract | ( | p3 | , |
p2 | , | ||
edge2 | |||
) |
vecV_t* acoords1 |
vecV_t* acoords2 |
vec3_t* anorm |
vec3_t* anorms |
vec3_t* anormt |
meshcache bonecachetype = -1 |
int bonecount |
meshcache bonegroup = inf->shares_bones |
boneidx_t* bonemap |
float boneposebuffer1[MAX_BONES *12] |
float boneposebuffer2[MAX_BONES *12] |
|
extern |
vecV_t* coords |
trace plane dist = planedist |
distend = DotProduct(end, normal) |
diststart = DotProduct(start, normal) |
|
extern |
cvar_t dpcompat_skinfiles = CVARD ("dpcompat_skinfiles", "0", "When set, uses a nodraw shader for any unmentioned surfaces.") |
return false |
float fg1time |
int frame1 |
int frame2 |
galiasanimation_t * g2 |
|
extern |
float gpubones[MAX_BONES *12] |
float lerp |
float lerpcutoff |
struct { ... } meshcache |
cvar_t mod_h2holey_bugged = CVARD ("mod_h2holey_bugged", "0", "Hexen2's holey-model flag uses index 0 as transparent (and additionally 255 in gl, due to a bug). GLQuake engines tend to have bugs that use ONLY index 255, resulting in a significant compatibility issue that can be resolved only with this shitty cvar hack.") |
cvar_t mod_halftexel = CVARD ("mod_halftexel", "1", "Offset texture coords by a half-texel, for compatibility with glquake and the majority of engine forks.") |
|
extern |
cvar_t mod_md5_singleanimation = CVARD("mod_md5_singleanimation", "1", "When loading an md5mesh file, also attempt to load an .md5anim file, and unpack it into individual poses. Use 0 for mods that will be precaching their own md5anims for use with skeletal objects.") |
cvar_t mod_nomipmap = CVARD ("mod_nomipmap", "0", "Disables the use of mipmaps on quake1 mdls, consistent with its original software renderer.") |
cvar_t mod_obj_orientation = CVARD("mod_obj_orientation", "1", "Controls how the model's axis are interpreted.\n0: x=forward, z=up (Quake)\n1: x=forward, y=up\n2: z=forward, y=up") |
n |
vec3_t* norm |
mesh normals_array = meshcache.norm |
int numcoords |
int numnorm |
planedist = DotProduct(p1, normal)-extend |
|
extern |
cvar_t r_fb_models |
cvar_t r_fullbrightSkins |
cvar_t r_lerpmuzzlehack = CVARF ("r_lerpmuzzlehack", "1", CVAR_ARCHIVE) |
qboolean r_loadbumpmapping |
cvar_t r_meshpitch = CVARCD ("r_meshpitch", "1", r_meshpitch_callback, "Specifies the direction of the pitch angle on mesh models formats, also affects gamecode, so do not change from its default.") |
cvar_t r_meshroll = CVARCD ("r_meshroll", "1", r_meshpitch_callback, "Specifies the direction of the roll angle on mesh models formats, also affects gamecode, so do not change from its default.") |
|
extern |
|
extern |
|
extern |
mesh snormals_array = meshcache.norm+meshcache.numnorm |
mesh tnormals_array = meshcache.norm+meshcache.numnorm*2 |
trace triangle_id = 1+i/3 |
mesh trneighbors = inf->ofs_trineighbours |
trace truefraction = frac |
const float* usebonepose |
qboolean usebones |
vbo_t vbo |
* vbop = NULL |
meshcache vertgroup = inf->shares_verts |
mesh xyz_array = meshcache.coords |