From: divverent Date: Mon, 21 Apr 2008 19:16:59 +0000 (+0000) Subject: globally rename model_t to dp_model_t for OpenSolaris. Sorry, guys who now have svn... X-Git-Tag: xonotic-v0.1.0preview~2269 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=7a96ec58916ceea50684acf4c00eaef551199fef globally rename model_t to dp_model_t for OpenSolaris. Sorry, guys who now have svn conflicts, but otherwise it just won't compile on OpenSolaris... git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8260 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_collision.c b/cl_collision.c index f7a838ec..1aedfe74 100644 --- a/cl_collision.c +++ b/cl_collision.c @@ -87,7 +87,7 @@ void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius) cl.worldmodel->brush.FindNonSolidLocation(cl.worldmodel, in, out, radius); } -model_t *CL_GetModelByIndex(int modelindex) +dp_model_t *CL_GetModelByIndex(int modelindex) { if(!modelindex) return NULL; @@ -105,7 +105,7 @@ model_t *CL_GetModelByIndex(int modelindex) return NULL; } -model_t *CL_GetModelFromEdict(prvm_edict_t *ed) +dp_model_t *CL_GetModelFromEdict(prvm_edict_t *ed) { if (!ed || ed->priv.server->free) return NULL; @@ -126,7 +126,7 @@ void CL_LinkEdict(prvm_edict_t *ent) if (ent->fields.client->solid == SOLID_BSP) { - model_t *model = CL_GetModelByIndex( (int)ent->fields.client->modelindex ); + dp_model_t *model = CL_GetModelByIndex( (int)ent->fields.client->modelindex ); if (model == NULL) { Con_Printf("edict %i: SOLID_BSP with invalid modelindex!\n", PRVM_NUM_FOR_EDICT(ent)); @@ -226,7 +226,7 @@ trace_t CL_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const // matrices to transform into/out of other entity's space matrix4x4_t matrix, imatrix; // model of other entity - model_t *model; + dp_model_t *model; // list of entities to test for collisions int numtouchedicts; prvm_edict_t *touchedicts[MAX_EDICTS]; diff --git a/cl_collision.h b/cl_collision.h index 05176032..cf523f8f 100644 --- a/cl_collision.h +++ b/cl_collision.h @@ -5,8 +5,8 @@ float CL_SelectTraceLine(const vec3_t start, const vec3_t end, vec3_t impact, vec3_t normal, int *hitent, entity_render_t *ignoreent); void CL_FindNonSolidLocation(const vec3_t in, vec3_t out, vec_t radius); -model_t *CL_GetModelByIndex(int modelindex); -model_t *CL_GetModelFromEdict(prvm_edict_t *ed); +dp_model_t *CL_GetModelByIndex(int modelindex); +dp_model_t *CL_GetModelFromEdict(prvm_edict_t *ed); void CL_LinkEdict(prvm_edict_t *ent); int CL_GenericHitSuperContentsMask(const prvm_edict_t *edict); diff --git a/cl_main.c b/cl_main.c index d6e8ed12..81d3b9ce 100644 --- a/cl_main.c +++ b/cl_main.c @@ -513,7 +513,7 @@ void CL_UpdateRenderEntity(entity_render_t *ent) { vec3_t org; vec_t scale; - model_t *model = ent->model; + dp_model_t *model = ent->model; // update the inverse matrix for the renderer Matrix4x4_Invert_Simple(&ent->inversematrix, &ent->matrix); // update the animation blend state @@ -864,7 +864,7 @@ void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit, qboolean interpolat int j, k, l, frame; float origin[3], angles[3], delta[3], lerp, d; entity_t *t; - model_t *model; + dp_model_t *model; //entity_persistent_t *p = &e->persistent; //entity_render_t *r = &e->render; // skip inactive entities and world diff --git a/cl_parse.c b/cl_parse.c index e002e600..bbef89ce 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -1636,7 +1636,7 @@ void CL_ParseServerInfo (void) void CL_ValidateState(entity_state_t *s) { - model_t *model; + dp_model_t *model; if (!s->active) return; @@ -1976,7 +1976,7 @@ void CL_ParseEffect2 (void) CL_Effect(org, modelindex, startframe, framecount, framerate); } -void CL_NewBeam (int ent, vec3_t start, vec3_t end, model_t *m, int lightning) +void CL_NewBeam (int ent, vec3_t start, vec3_t end, dp_model_t *m, int lightning) { int i; beam_t *b = NULL; @@ -2015,7 +2015,7 @@ void CL_NewBeam (int ent, vec3_t start, vec3_t end, model_t *m, int lightning) Con_Print("beam list overflow!\n"); } -void CL_ParseBeam (model_t *m, int lightning) +void CL_ParseBeam (dp_model_t *m, int lightning) { int ent; vec3_t start, end; @@ -3562,7 +3562,7 @@ void CL_ParseServerMessage(void) { if (i >= 1 && i < MAX_MODELS) { - model_t *model = Mod_ForName(s, false, false, i == 1); + dp_model_t *model = Mod_ForName(s, false, false, i == 1); if (!model) Con_DPrintf("svc_precache: Mod_ForName(\"%s\") failed\n", s); cl.model_precache[i] = model; diff --git a/client.h b/client.h index 7a96a475..6e73a042 100644 --- a/client.h +++ b/client.h @@ -247,7 +247,7 @@ typedef struct entity_render_s float scale; // NULL = no model - model_t *model; + dp_model_t *model; // number of the entity represents, or 0 for non-network entities int entitynumber; // literal colormap colors for renderer, if both are 0 0 0 it is not colormapped @@ -671,7 +671,7 @@ typedef struct decal_s // fields not used by rendering: (36 bytes in 32bit, 40 bytes in 64bit) float time2; // used for decal fade unsigned int owner; // decal stuck to this entity - model_t *ownermodel; // model the decal is stuck to (used to make sure the entity is still alive) + dp_model_t *ownermodel; // model the decal is stuck to (used to make sure the entity is still alive) vec3_t relativeorigin; // decal at this location in entity's coordinate space vec3_t relativenormal; // decal oriented this way relative to entity's coordinate space } @@ -879,10 +879,10 @@ typedef struct client_state_s int gametype; // models and sounds used by engine code (particularly cl_parse.c) - model_t *model_bolt; - model_t *model_bolt2; - model_t *model_bolt3; - model_t *model_beam; + dp_model_t *model_bolt; + dp_model_t *model_bolt2; + dp_model_t *model_bolt3; + dp_model_t *model_beam; sfx_t *sfx_wizhit; sfx_t *sfx_knighthit; sfx_t *sfx_tink1; @@ -1181,7 +1181,7 @@ void CL_ValidateState(entity_state_t *s); void CL_MoveLerpEntityStates(entity_t *ent); void CL_LerpUpdate(entity_t *e); void CL_ParseTEnt (void); -void CL_NewBeam (int ent, vec3_t start, vec3_t end, model_t *m, int lightning); +void CL_NewBeam (int ent, vec3_t start, vec3_t end, dp_model_t *m, int lightning); void CL_RelinkBeams (void); void CL_Beam_CalculatePositions (const beam_t *b, vec3_t start, vec3_t end); void CL_ClientMovement_Replay(void); @@ -1459,7 +1459,7 @@ typedef struct r_refdef_scene_s { entity_render_t *worldentity; // same as worldentity->model - model_t *worldmodel; + dp_model_t *worldmodel; // renderable entities (excluding world) entity_render_t **entities; diff --git a/clvm_cmds.c b/clvm_cmds.c index b14caee9..cd35395f 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -77,7 +77,7 @@ void VM_CL_setmodel (void) { prvm_edict_t *e; const char *m; - model_t *mod; + dp_model_t *mod; int i; VM_SAFEPARMCOUNT(2, VM_CL_setmodel); @@ -363,7 +363,7 @@ void VM_CL_precache_model (void) { const char *name; int i; - model_t *m; + dp_model_t *m; VM_SAFEPARMCOUNT(1, VM_CL_precache_model); @@ -384,7 +384,7 @@ void VM_CL_precache_model (void) { if (!cl.csqc_model_precache[i]) { - cl.csqc_model_precache[i] = (model_t*)m; + cl.csqc_model_precache[i] = (dp_model_t*)m; PRVM_G_FLOAT(OFS_RETURN) = -(i+1); return; } @@ -1043,7 +1043,7 @@ static void VM_CL_setmodelindex (void) //#334 string(float mdlindex) modelnameforindex (EXT_CSQC) static void VM_CL_modelnameforindex (void) { - model_t *model; + dp_model_t *model; VM_SAFEPARMCOUNT(1, VM_CL_modelnameforindex); @@ -1808,9 +1808,9 @@ static void VM_CL_te_flamejet (void) //==================================================================== //DP_QC_GETSURFACE -extern void clippointtosurface(model_t *model, msurface_t *surface, vec3_t p, vec3_t out); +extern void clippointtosurface(dp_model_t *model, msurface_t *surface, vec3_t p, vec3_t out); -static msurface_t *cl_getsurface(model_t *model, int surfacenum) +static msurface_t *cl_getsurface(dp_model_t *model, int surfacenum) { if (surfacenum < 0 || surfacenum >= model->nummodelsurfaces) return NULL; @@ -1820,7 +1820,7 @@ static msurface_t *cl_getsurface(model_t *model, int surfacenum) // #434 float(entity e, float s) getsurfacenumpoints static void VM_CL_getsurfacenumpoints(void) { - model_t *model; + dp_model_t *model; msurface_t *surface; VM_SAFEPARMCOUNT(2, VM_CL_getsurfacenumpoints); // return 0 if no such surface @@ -1838,7 +1838,7 @@ static void VM_CL_getsurfacenumpoints(void) static void VM_CL_getsurfacepoint(void) { prvm_edict_t *ed; - model_t *model; + dp_model_t *model; msurface_t *surface; int pointnum; VM_SAFEPARMCOUNT(3, VM_CL_getsurfacenumpoints); @@ -1865,7 +1865,7 @@ static void VM_CL_getsurfacepoint(void) static void VM_CL_getsurfacepointattribute(void) { prvm_edict_t *ed; - model_t *model; + dp_model_t *model; msurface_t *surface; int pointnum; int attributetype; @@ -1931,7 +1931,7 @@ static void VM_CL_getsurfacepointattribute(void) // #436 vector(entity e, float s) getsurfacenormal static void VM_CL_getsurfacenormal(void) { - model_t *model; + dp_model_t *model; msurface_t *surface; vec3_t normal; VM_SAFEPARMCOUNT(2, VM_CL_getsurfacenormal); @@ -1950,7 +1950,7 @@ static void VM_CL_getsurfacenormal(void) // #437 string(entity e, float s) getsurfacetexture static void VM_CL_getsurfacetexture(void) { - model_t *model; + dp_model_t *model; msurface_t *surface; VM_SAFEPARMCOUNT(2, VM_CL_getsurfacetexture); PRVM_G_INT(OFS_RETURN) = OFS_NULL; @@ -1966,7 +1966,7 @@ static void VM_CL_getsurfacenearpoint(void) vec3_t clipped, p; vec_t dist, bestdist; prvm_edict_t *ed; - model_t *model = NULL; + dp_model_t *model = NULL; msurface_t *surface; vec_t *point; VM_SAFEPARMCOUNT(2, VM_CL_getsurfacenearpoint); @@ -2009,7 +2009,7 @@ static void VM_CL_getsurfacenearpoint(void) static void VM_CL_getsurfaceclippedpoint(void) { prvm_edict_t *ed; - model_t *model; + dp_model_t *model; msurface_t *surface; vec3_t p, out; VM_SAFEPARMCOUNT(3, VM_CL_getsurfaceclippedpoint); @@ -2032,7 +2032,7 @@ void VM_CL_setattachment (void) const char *tagname; prvm_eval_t *v; int modelindex; - model_t *model; + dp_model_t *model; VM_SAFEPARMCOUNT(3, VM_CL_setattachment); e = PRVM_G_EDICT(OFS_PARM0); @@ -2080,7 +2080,7 @@ void VM_CL_setattachment (void) int CL_GetTagIndex (prvm_edict_t *e, const char *tagname) { - model_t *model = CL_GetModelFromEdict(e); + dp_model_t *model = CL_GetModelFromEdict(e); if (model) return Mod_Alias_GetTagIndexForName(model, (int)e->fields.client->skin, tagname); else @@ -2103,7 +2103,7 @@ int CL_GetTagMatrix (matrix4x4_t *out, prvm_edict_t *ent, int tagindex) int reqframe, attachloop; matrix4x4_t entitymatrix, tagmatrix, attachmatrix; prvm_edict_t *attachent; - model_t *model; + dp_model_t *model; float scale; *out = identitymatrix; // warnings and errors return identical matrix diff --git a/collision.c b/collision.c index fbe340f0..73a1bd0a 100644 --- a/collision.c +++ b/collision.c @@ -1465,7 +1465,7 @@ void Collision_BoundingBoxOfBrushTraceSegment(const colbrushf_t *start, const co //=========================================== -void Collision_ClipToGenericEntity(trace_t *trace, model_t *model, int frame, const vec3_t bodymins, const vec3_t bodymaxs, int bodysupercontents, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontentsmask) +void Collision_ClipToGenericEntity(trace_t *trace, dp_model_t *model, int frame, const vec3_t bodymins, const vec3_t bodymaxs, int bodysupercontents, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontentsmask) { float tempnormal[3], starttransformed[3], endtransformed[3]; @@ -1495,7 +1495,7 @@ void Collision_ClipToGenericEntity(trace_t *trace, model_t *model, int frame, co } } -void Collision_ClipToWorld(trace_t *trace, model_t *model, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontents) +void Collision_ClipToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontents) { memset(trace, 0, sizeof(*trace)); trace->fraction = trace->realfraction = 1; diff --git a/collision.h b/collision.h index f67c81d1..ee4e1564 100644 --- a/collision.h +++ b/collision.h @@ -130,9 +130,9 @@ void Collision_TraceLineTriangleFloat(trace_t *trace, const vec3_t linestart, co // entities, only colliding with SOLID_BSP entities (doors, lifts) // // passedict is excluded from clipping checks -void Collision_ClipToGenericEntity(trace_t *trace, model_t *model, int frame, const vec3_t bodymins, const vec3_t bodymaxs, int bodysupercontents, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontentsmask); +void Collision_ClipToGenericEntity(trace_t *trace, dp_model_t *model, int frame, const vec3_t bodymins, const vec3_t bodymaxs, int bodysupercontents, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontentsmask); // like above but does not do a transform and does nothing if model is NULL -void Collision_ClipToWorld(trace_t *trace, model_t *model, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontents); +void Collision_ClipToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontents); // combines data from two traces: // merges contents flags, startsolid, allsolid, inwater // updates fraction, endpos, plane and surface info if new fraction is shorter diff --git a/common.h b/common.h index b5e6fc0f..9c20eb10 100644 --- a/common.h +++ b/common.h @@ -38,7 +38,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifdef SUNOS #include // Needed for FNDELAY -# define model_t dp_model_t // Workaround conflict with /usr/include/sys/model.h #endif //============================================================================ diff --git a/csprogs.c b/csprogs.c index 0e26d2e8..cfc47d6e 100644 --- a/csprogs.c +++ b/csprogs.c @@ -130,7 +130,7 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed) float scale; prvm_eval_t *val; entity_render_t *entrender; - model_t *model; + dp_model_t *model; matrix4x4_t tagmatrix, matrix2; model = CL_GetModelFromEdict(ed); diff --git a/gl_rmain.c b/gl_rmain.c index 2ce371f1..aff2a60b 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -4400,7 +4400,7 @@ static float R_EvaluateQ3WaveFunc(q3wavefunc_t func, const float *parms) void R_UpdateTextureInfo(const entity_render_t *ent, texture_t *t) { int i; - model_t *model = ent->model; + dp_model_t *model = ent->model; float f; float tcmat[12]; q3shaderinfo_layer_tcmod_t *tcmod; @@ -4717,7 +4717,7 @@ void R_Mesh_ResizeArrays(int newvertices) void RSurf_ActiveWorldEntity(void) { - model_t *model = r_refdef.scene.worldmodel; + dp_model_t *model = r_refdef.scene.worldmodel; if (rsurface.array_size < model->surfmesh.num_vertices) R_Mesh_ResizeArrays(model->surfmesh.num_vertices); rsurface.matrix = identitymatrix; @@ -4786,7 +4786,7 @@ void RSurf_ActiveWorldEntity(void) void RSurf_ActiveModelEntity(const entity_render_t *ent, qboolean wantnormals, qboolean wanttangents) { - model_t *model = ent->model; + dp_model_t *model = ent->model; if (rsurface.array_size < model->surfmesh.num_vertices) R_Mesh_ResizeArrays(model->surfmesh.num_vertices); rsurface.matrix = ent->matrix; @@ -6453,7 +6453,7 @@ void R_DrawDebugModel(entity_render_t *ent) const int *elements; q3mbrush_t *brush; msurface_t *surface; - model_t *model = ent->model; + dp_model_t *model = ent->model; vec3_t v; flagsmask = MATERIALFLAG_SKY | MATERIALFLAG_WALL; @@ -6583,7 +6583,7 @@ void R_DrawWorldSurfaces(qboolean skysurfaces, qboolean writedepth, qboolean dep int i, j, endj, f, flagsmask; msurface_t *surface; texture_t *t; - model_t *model = r_refdef.scene.worldmodel; + dp_model_t *model = r_refdef.scene.worldmodel; const int maxsurfacelist = 1024; int numsurfacelist = 0; msurface_t *surfacelist[1024]; @@ -6665,7 +6665,7 @@ void R_DrawModelSurfaces(entity_render_t *ent, qboolean skysurfaces, qboolean wr int i, j, f, flagsmask; msurface_t *surface, *endsurface; texture_t *t; - model_t *model = ent->model; + dp_model_t *model = ent->model; const int maxsurfacelist = 1024; int numsurfacelist = 0; msurface_t *surfacelist[1024]; diff --git a/gl_rsurf.c b/gl_rsurf.c index 23e6f3af..707741ab 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -43,7 +43,7 @@ void R_BuildLightMap (const entity_render_t *ent, msurface_t *surface) int smax, tmax, i, size, size3, maps, l; int *bl, scale; unsigned char *lightmap, *out, *stain; - model_t *model = ent->model; + dp_model_t *model = ent->model; int *intblocklights; unsigned char *templight; @@ -162,7 +162,7 @@ void R_BuildLightMap (const entity_render_t *ent, msurface_t *surface) } } -void R_StainNode (mnode_t *node, model_t *model, const vec3_t origin, float radius, const float fcolor[8]) +void R_StainNode (mnode_t *node, dp_model_t *model, const vec3_t origin, float radius, const float fcolor[8]) { float ndist, a, ratio, maxdist, maxdist2, maxdist3, invradius, sdtable[256], td, dist2; msurface_t *surface, *endsurface; @@ -289,7 +289,7 @@ void R_Stain (const vec3_t origin, float radius, int cr1, int cg1, int cb1, int int n; float fcolor[8]; entity_render_t *ent; - model_t *model; + dp_model_t *model; vec3_t org; if (r_refdef.scene.worldmodel == NULL || !r_refdef.scene.worldmodel->brush.data_nodes || !r_refdef.scene.worldmodel->brushq1.lightdata) return; @@ -370,7 +370,7 @@ void R_DrawPortals(void) int i, leafnum; mportal_t *portal; float center[3], f; - model_t *model = r_refdef.scene.worldmodel; + dp_model_t *model = r_refdef.scene.worldmodel; if (model == NULL) return; for (leafnum = 0;leafnum < r_refdef.scene.worldmodel->brush.num_leafs;leafnum++) @@ -400,7 +400,7 @@ void R_View_WorldVisibility(qboolean forcenovis) int i, j, *mark; mleaf_t *leaf; mleaf_t *viewleaf; - model_t *model = r_refdef.scene.worldmodel; + dp_model_t *model = r_refdef.scene.worldmodel; if (!model) return; @@ -545,7 +545,7 @@ void R_Q1BSP_DrawSky(entity_render_t *ent) void R_Q1BSP_DrawAddWaterPlanes(entity_render_t *ent) { - model_t *model = ent->model; + dp_model_t *model = ent->model; if (model == NULL) return; if (ent == r_refdef.scene.worldentity) @@ -556,7 +556,7 @@ void R_Q1BSP_DrawAddWaterPlanes(entity_render_t *ent) void R_Q1BSP_Draw(entity_render_t *ent) { - model_t *model = ent->model; + dp_model_t *model = ent->model; if (model == NULL) return; if (ent == r_refdef.scene.worldentity) @@ -567,7 +567,7 @@ void R_Q1BSP_Draw(entity_render_t *ent) void R_Q1BSP_DrawDepth(entity_render_t *ent) { - model_t *model = ent->model; + dp_model_t *model = ent->model; if (model == NULL) return; GL_ColorMask(0,0,0,0); @@ -598,7 +598,7 @@ void R_Q1BSP_DrawDebug(entity_render_t *ent) typedef struct r_q1bsp_getlightinfo_s { - model_t *model; + dp_model_t *model; vec3_t relativelightorigin; float lightradius; int *outleaflist; @@ -958,7 +958,7 @@ void R_Q1BSP_GetLightInfo(entity_render_t *ent, vec3_t relativelightorigin, floa void R_Q1BSP_CompileShadowVolume(entity_render_t *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int numsurfaces, const int *surfacelist) { - model_t *model = ent->model; + dp_model_t *model = ent->model; msurface_t *surface; int surfacelistindex; float projectdistance = relativelightdirection ? lightradius : lightradius + model->radius*2 + r_shadow_projectdistance.value; @@ -979,7 +979,7 @@ extern cvar_t r_polygonoffset_submodel_factor; extern cvar_t r_polygonoffset_submodel_offset; void R_Q1BSP_DrawShadowVolume(entity_render_t *ent, vec3_t relativelightorigin, vec3_t relativelightdirection, float lightradius, int modelnumsurfaces, const int *modelsurfacelist, const vec3_t lightmins, const vec3_t lightmaxs) { - model_t *model = ent->model; + dp_model_t *model = ent->model; msurface_t *surface; int modelsurfacelistindex; float projectdistance = relativelightdirection ? lightradius : lightradius + model->radius*2 + r_shadow_projectdistance.value; @@ -1057,7 +1057,7 @@ static void R_Q1BSP_DrawLight_TransparentCallback(const entity_render_t *ent, co void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surfacelist, const unsigned char *trispvs) { - model_t *model = ent->model; + dp_model_t *model = ent->model; msurface_t *surface; int i, k, kend, l, m, mend, endsurface, batchnumsurfaces, batchnumtriangles, batchfirstvertex, batchlastvertex, batchfirsttriangle; qboolean usebufferobject, culltriangles; @@ -1177,7 +1177,7 @@ void R_Q1BSP_DrawLight(entity_render_t *ent, int numsurfaces, const int *surface //Made by [515] void R_ReplaceWorldTexture (void) { - model_t *m; + dp_model_t *m; texture_t *t; int i; const char *r, *newt; @@ -1227,7 +1227,7 @@ void R_ReplaceWorldTexture (void) //Made by [515] void R_ListWorldTextures (void) { - model_t *m; + dp_model_t *m; texture_t *t; int i; if (!r_refdef.scene.worldmodel) diff --git a/host_cmd.c b/host_cmd.c index 5e4b1476..5a8db28a 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -1812,7 +1812,7 @@ Host_Viewmodel_f void Host_Viewmodel_f (void) { prvm_edict_t *e; - model_t *m; + dp_model_t *m; if (!sv.active) return; @@ -1843,7 +1843,7 @@ void Host_Viewframe_f (void) { prvm_edict_t *e; int f; - model_t *m; + dp_model_t *m; if (!sv.active) return; @@ -1863,7 +1863,7 @@ void Host_Viewframe_f (void) } -void PrintFrameName (model_t *m, int frame) +void PrintFrameName (dp_model_t *m, int frame) { if (m->animscenes) Con_Printf("frame %i: %s\n", frame, m->animscenes[frame].name); @@ -1879,7 +1879,7 @@ Host_Viewnext_f void Host_Viewnext_f (void) { prvm_edict_t *e; - model_t *m; + dp_model_t *m; if (!sv.active) return; @@ -1906,7 +1906,7 @@ Host_Viewprev_f void Host_Viewprev_f (void) { prvm_edict_t *e; - model_t *m; + dp_model_t *m; if (!sv.active) return; diff --git a/model_alias.c b/model_alias.c index 77b580ef..960de7ae 100644 --- a/model_alias.c +++ b/model_alias.c @@ -44,7 +44,7 @@ void Mod_AliasInit (void) mod_md3_sin[i] = sin(i * M_PI * 2.0f / 256.0); } -void Mod_Skeletal_AnimateVertices(const model_t *model, const frameblend_t *frameblend, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f) +void Mod_Skeletal_AnimateVertices(const dp_model_t *model, const frameblend_t *frameblend, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f) { #define MAX_BONES 256 // vertex weighted skeletal @@ -213,7 +213,7 @@ void Mod_Skeletal_AnimateVertices(const model_t *model, const frameblend_t *fram } } -void Mod_MD3_AnimateVertices(const model_t *model, const frameblend_t *frameblend, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f) +void Mod_MD3_AnimateVertices(const dp_model_t *model, const frameblend_t *frameblend, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f) { // vertex morph int i, numblends, blendnum; @@ -299,7 +299,7 @@ void Mod_MD3_AnimateVertices(const model_t *model, const frameblend_t *frameblen } } -void Mod_MDL_AnimateVertices(const model_t *model, const frameblend_t *frameblend, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f) +void Mod_MDL_AnimateVertices(const dp_model_t *model, const frameblend_t *frameblend, float *vertex3f, float *normal3f, float *svector3f, float *tvector3f) { // vertex morph int i, numblends, blendnum; @@ -393,7 +393,7 @@ void Mod_MDL_AnimateVertices(const model_t *model, const frameblend_t *frameblen } } -int Mod_Alias_GetTagMatrix(const model_t *model, int poseframe, int tagindex, matrix4x4_t *outmatrix) +int Mod_Alias_GetTagMatrix(const dp_model_t *model, int poseframe, int tagindex, matrix4x4_t *outmatrix) { const float *boneframe; float tempbonematrix[12], bonematrix[12]; @@ -425,7 +425,7 @@ int Mod_Alias_GetTagMatrix(const model_t *model, int poseframe, int tagindex, ma return 0; } -int Mod_Alias_GetTagIndexForName(const model_t *model, unsigned int skin, const char *tagname) +int Mod_Alias_GetTagIndexForName(const dp_model_t *model, unsigned int skin, const char *tagname) { int i; if(skin >= (unsigned int)model->numskins) @@ -567,7 +567,7 @@ static void Mod_Alias_MorphMesh_CompileFrames(void) } } -static void Mod_MDLMD2MD3_TraceBox(model_t *model, int frame, trace_t *trace, const vec3_t start, const vec3_t boxmins, const vec3_t boxmaxs, const vec3_t end, int hitsupercontentsmask) +static void Mod_MDLMD2MD3_TraceBox(dp_model_t *model, int frame, trace_t *trace, const vec3_t start, const vec3_t boxmins, const vec3_t boxmaxs, const vec3_t end, int hitsupercontentsmask) { int i; float segmentmins[3], segmentmaxs[3]; @@ -776,7 +776,7 @@ static void Mod_BuildAliasSkinsFromSkinFiles(texture_t *skin, skinfile_t *skinfi #define BOUNDI(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%d exceeds %d - %d)", loadmodel->name, VALUE, MIN, MAX); #define BOUNDF(VALUE,MIN,MAX) if (VALUE < MIN || VALUE >= MAX) Host_Error("model %s has an invalid ##VALUE (%f exceeds %f - %f)", loadmodel->name, VALUE, MIN, MAX); -void Mod_IDP0_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_IDP0_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i, j, version, totalskins, skinwidth, skinheight, groupframes, groupskins, numverts; float scales, scalet, interval; @@ -1105,7 +1105,7 @@ void Mod_IDP0_Load(model_t *mod, void *buffer, void *bufferend) loadmodel->surfmesh.isanimated = loadmodel->numframes > 1 || loadmodel->animscenes[0].framecount > 1; } -void Mod_IDP2_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_IDP2_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i, j, hashindex, numxyz, numst, xyz, st, skinwidth, skinheight, *vertremap, version, end; float iskinwidth, iskinheight; @@ -1350,7 +1350,7 @@ void Mod_IDP2_Load(model_t *mod, void *buffer, void *bufferend) loadmodel->surfmesh.isanimated = loadmodel->numframes > 1 || loadmodel->animscenes[0].framecount > 1; } -void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_IDP3_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i, j, k, version, meshvertices, meshtriangles; unsigned char *data; @@ -1517,7 +1517,7 @@ void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend) || (loadmodel->animscenes && loadmodel->animscenes[0].framecount > 1); } -void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_ZYMOTICMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend) { zymtype1header_t *pinmodel, *pheader; unsigned char *pbase; @@ -1837,7 +1837,7 @@ void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend) loadmodel->surfmesh.isanimated = loadmodel->numframes > 1 || loadmodel->animscenes[0].framecount > 1; } -void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_DARKPLACESMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend) { dpmheader_t *pheader; dpmframe_t *frame; @@ -2140,7 +2140,7 @@ void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend) // no idea why PSK/PSA files contain weird quaternions but they do... #define PSKQUATNEGATIONS -void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_PSKMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i, j, index, version, recordsize, numrecords, meshvertices, meshtriangles; int numpnts, numvtxw, numfaces, nummatts, numbones, numrawweights, numanimbones, numanims, numanimkeys; diff --git a/model_brush.c b/model_brush.c index dbf98b02..b06bceb3 100644 --- a/model_brush.c +++ b/model_brush.c @@ -96,7 +96,7 @@ void Mod_BrushInit(void) mod_q1bsp_texture_water.supercontents = SUPERCONTENTS_WATER; } -static mleaf_t *Mod_Q1BSP_PointInLeaf(model_t *model, const vec3_t p) +static mleaf_t *Mod_Q1BSP_PointInLeaf(dp_model_t *model, const vec3_t p) { mnode_t *node; @@ -112,7 +112,7 @@ static mleaf_t *Mod_Q1BSP_PointInLeaf(model_t *model, const vec3_t p) return (mleaf_t *)node; } -static void Mod_Q1BSP_AmbientSoundLevelsForPoint(model_t *model, const vec3_t p, unsigned char *out, int outsize) +static void Mod_Q1BSP_AmbientSoundLevelsForPoint(dp_model_t *model, const vec3_t p, unsigned char *out, int outsize) { int i; mleaf_t *leaf; @@ -131,7 +131,7 @@ static void Mod_Q1BSP_AmbientSoundLevelsForPoint(model_t *model, const vec3_t p, memset(out, 0, outsize); } -static int Mod_Q1BSP_FindBoxClusters(model_t *model, const vec3_t mins, const vec3_t maxs, int maxclusters, int *clusterlist) +static int Mod_Q1BSP_FindBoxClusters(dp_model_t *model, const vec3_t mins, const vec3_t maxs, int maxclusters, int *clusterlist) { int numclusters = 0; int nodestackindex = 0; @@ -197,7 +197,7 @@ static int Mod_Q1BSP_FindBoxClusters(model_t *model, const vec3_t mins, const ve return numclusters; } -static int Mod_Q1BSP_BoxTouchingPVS(model_t *model, const unsigned char *pvs, const vec3_t mins, const vec3_t maxs) +static int Mod_Q1BSP_BoxTouchingPVS(dp_model_t *model, const unsigned char *pvs, const vec3_t mins, const vec3_t maxs) { int nodestackindex = 0; mnode_t *node, *nodestack[1024]; @@ -268,7 +268,7 @@ static int Mod_Q1BSP_BoxTouchingPVS(model_t *model, const unsigned char *pvs, co return false; } -static int Mod_Q1BSP_BoxTouchingLeafPVS(model_t *model, const unsigned char *pvs, const vec3_t mins, const vec3_t maxs) +static int Mod_Q1BSP_BoxTouchingLeafPVS(dp_model_t *model, const unsigned char *pvs, const vec3_t mins, const vec3_t maxs) { int nodestackindex = 0; mnode_t *node, *nodestack[1024]; @@ -339,7 +339,7 @@ static int Mod_Q1BSP_BoxTouchingLeafPVS(model_t *model, const unsigned char *pvs return false; } -static int Mod_Q1BSP_BoxTouchingVisibleLeafs(model_t *model, const unsigned char *visibleleafs, const vec3_t mins, const vec3_t maxs) +static int Mod_Q1BSP_BoxTouchingVisibleLeafs(dp_model_t *model, const unsigned char *visibleleafs, const vec3_t mins, const vec3_t maxs) { int nodestackindex = 0; mnode_t *node, *nodestack[1024]; @@ -414,7 +414,7 @@ typedef struct findnonsolidlocationinfo_s vec_t radius; vec3_t nudge; vec_t bestdist; - model_t *model; + dp_model_t *model; } findnonsolidlocationinfo_t; @@ -533,7 +533,7 @@ static void Mod_Q1BSP_FindNonSolidLocation_r(findnonsolidlocationinfo_t *info, m } } -static void Mod_Q1BSP_FindNonSolidLocation(model_t *model, const vec3_t in, vec3_t out, float radius) +static void Mod_Q1BSP_FindNonSolidLocation(dp_model_t *model, const vec3_t in, vec3_t out, float radius) { int i; findnonsolidlocationinfo_t info; @@ -557,7 +557,7 @@ static void Mod_Q1BSP_FindNonSolidLocation(model_t *model, const vec3_t in, vec3 VectorCopy(info.center, out); } -int Mod_Q1BSP_SuperContentsFromNativeContents(model_t *model, int nativecontents) +int Mod_Q1BSP_SuperContentsFromNativeContents(dp_model_t *model, int nativecontents) { switch(nativecontents) { @@ -577,7 +577,7 @@ int Mod_Q1BSP_SuperContentsFromNativeContents(model_t *model, int nativecontents return 0; } -int Mod_Q1BSP_NativeContentsFromSuperContents(model_t *model, int supercontents) +int Mod_Q1BSP_NativeContentsFromSuperContents(dp_model_t *model, int supercontents) { if (supercontents & (SUPERCONTENTS_SOLID | SUPERCONTENTS_BODY)) return CONTENTS_SOLID; @@ -1071,7 +1071,7 @@ static qboolean Mod_Q1BSP_TraceLineOfSight(struct model_s *model, const vec3_t s return Mod_Q1BSP_TraceLineOfSight_RecursiveNodeCheck(model->brush.data_nodes, tracestart, traceend) != 2; } -static int Mod_Q1BSP_LightPoint_RecursiveBSPNode(model_t *model, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal, const mnode_t *node, float x, float y, float startz, float endz) +static int Mod_Q1BSP_LightPoint_RecursiveBSPNode(dp_model_t *model, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal, const mnode_t *node, float x, float y, float startz, float endz) { int side; float front, back; @@ -1190,7 +1190,7 @@ loc0: } } -void Mod_Q1BSP_LightPoint(model_t *model, const vec3_t p, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal) +void Mod_Q1BSP_LightPoint(dp_model_t *model, const vec3_t p, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal) { // pretend lighting is coming down from above (due to lack of a lightgrid to know primary lighting direction) VectorSet(diffusenormal, 0, 0, 1); @@ -3284,7 +3284,7 @@ static void Mod_Q1BSP_MakePortals(void) //Returns PVS data for a given point //(note: can return NULL) -static unsigned char *Mod_Q1BSP_GetPVS(model_t *model, const vec3_t p) +static unsigned char *Mod_Q1BSP_GetPVS(dp_model_t *model, const vec3_t p) { mnode_t *node; node = model->brush.data_nodes; @@ -3296,7 +3296,7 @@ static unsigned char *Mod_Q1BSP_GetPVS(model_t *model, const vec3_t p) return NULL; } -static void Mod_Q1BSP_FatPVS_RecursiveBSPNode(model_t *model, const vec3_t org, vec_t radius, unsigned char *pvsbuffer, int pvsbytes, mnode_t *node) +static void Mod_Q1BSP_FatPVS_RecursiveBSPNode(dp_model_t *model, const vec3_t org, vec_t radius, unsigned char *pvsbuffer, int pvsbytes, mnode_t *node) { while (node->plane) { @@ -3324,7 +3324,7 @@ static void Mod_Q1BSP_FatPVS_RecursiveBSPNode(model_t *model, const vec3_t org, //Calculates a PVS that is the inclusive or of all leafs within radius pixels //of the given point. -static int Mod_Q1BSP_FatPVS(model_t *model, const vec3_t org, vec_t radius, unsigned char *pvsbuffer, int pvsbufferlength, qboolean merge) +static int Mod_Q1BSP_FatPVS(dp_model_t *model, const vec3_t org, vec_t radius, unsigned char *pvsbuffer, int pvsbufferlength, qboolean merge) { int bytes = model->brush.num_pvsclusterbytes; bytes = min(bytes, pvsbufferlength); @@ -3339,7 +3339,7 @@ static int Mod_Q1BSP_FatPVS(model_t *model, const vec3_t org, vec_t radius, unsi return bytes; } -static void Mod_Q1BSP_RoundUpToHullSize(model_t *cmodel, const vec3_t inmins, const vec3_t inmaxs, vec3_t outmins, vec3_t outmaxs) +static void Mod_Q1BSP_RoundUpToHullSize(dp_model_t *cmodel, const vec3_t inmins, const vec3_t inmaxs, vec3_t outmins, vec3_t outmaxs) { vec3_t size; const hull_t *hull; @@ -3372,7 +3372,7 @@ static void Mod_Q1BSP_RoundUpToHullSize(model_t *cmodel, const vec3_t inmins, co VectorAdd(inmins, hull->clip_size, outmaxs); } -void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i, j, k; dheader_t *header; @@ -3511,7 +3511,7 @@ void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend) Mod_BuildTriangleNeighbors(loadmodel->brush.shadowmesh->neighbor3i, loadmodel->brush.shadowmesh->element3i, loadmodel->brush.shadowmesh->numtriangles); if (loadmodel->brush.numsubmodels) - loadmodel->brush.submodels = (model_t **)Mem_Alloc(loadmodel->mempool, loadmodel->brush.numsubmodels * sizeof(model_t *)); + loadmodel->brush.submodels = (dp_model_t **)Mem_Alloc(loadmodel->mempool, loadmodel->brush.numsubmodels * sizeof(dp_model_t *)); // LordHavoc: to clear the fog around the original quake submodel code, I // will explain: @@ -4091,7 +4091,7 @@ static void Mod_Q2BSP_LoadModels(lump_t *l) */ } -void static Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend) +void static Mod_Q2BSP_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i; q2dheader_t *header; @@ -4150,8 +4150,8 @@ void static Mod_Q2BSP_Load(model_t *mod, void *buffer, void *bufferend) Mod_Q2BSP_LoadModels(&header->lumps[Q2LUMP_MODELS]); } -static int Mod_Q3BSP_SuperContentsFromNativeContents(model_t *model, int nativecontents); -static int Mod_Q3BSP_NativeContentsFromSuperContents(model_t *model, int supercontents); +static int Mod_Q3BSP_SuperContentsFromNativeContents(dp_model_t *model, int nativecontents); +static int Mod_Q3BSP_NativeContentsFromSuperContents(dp_model_t *model, int supercontents); static void Mod_Q3BSP_LoadEntities(lump_t *l) { @@ -5185,7 +5185,7 @@ static void Mod_Q3BSP_LoadPVS(lump_t *l) memcpy(loadmodel->brush.data_pvsclusters, (unsigned char *)(in + 1), totalchains); } -static void Mod_Q3BSP_LightPoint(model_t *model, const vec3_t p, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal) +static void Mod_Q3BSP_LightPoint(dp_model_t *model, const vec3_t p, vec3_t ambientcolor, vec3_t diffusecolor, vec3_t diffusenormal) { int i, j, k, index[3]; float transformed[3], blend1, blend2, blend, stylescale; @@ -5250,7 +5250,7 @@ static void Mod_Q3BSP_LightPoint(model_t *model, const vec3_t p, vec3_t ambientc //Con_Printf("result: ambient %f %f %f diffuse %f %f %f diffusenormal %f %f %f\n", ambientcolor[0], ambientcolor[1], ambientcolor[2], diffusecolor[0], diffusecolor[1], diffusecolor[2], diffusenormal[0], diffusenormal[1], diffusenormal[2]); } -static void Mod_Q3BSP_TracePoint_RecursiveBSPNode(trace_t *trace, model_t *model, mnode_t *node, const vec3_t point, int markframe) +static void Mod_Q3BSP_TracePoint_RecursiveBSPNode(trace_t *trace, dp_model_t *model, mnode_t *node, const vec3_t point, int markframe) { int i; mleaf_t *leaf; @@ -5272,7 +5272,7 @@ static void Mod_Q3BSP_TracePoint_RecursiveBSPNode(trace_t *trace, model_t *model // can't do point traces on curves (they have no thickness) } -static void Mod_Q3BSP_TraceLine_RecursiveBSPNode(trace_t *trace, model_t *model, mnode_t *node, const vec3_t start, const vec3_t end, vec_t startfrac, vec_t endfrac, const vec3_t linestart, const vec3_t lineend, int markframe, const vec3_t segmentmins, const vec3_t segmentmaxs) +static void Mod_Q3BSP_TraceLine_RecursiveBSPNode(trace_t *trace, dp_model_t *model, mnode_t *node, const vec3_t start, const vec3_t end, vec_t startfrac, vec_t endfrac, const vec3_t linestart, const vec3_t lineend, int markframe, const vec3_t segmentmins, const vec3_t segmentmaxs) { int i, startside, endside; float dist1, dist2, midfrac, mid[3], nodesegmentmins[3], nodesegmentmaxs[3]; @@ -5359,7 +5359,7 @@ static void Mod_Q3BSP_TraceLine_RecursiveBSPNode(trace_t *trace, model_t *model, } } -static void Mod_Q3BSP_TraceBrush_RecursiveBSPNode(trace_t *trace, model_t *model, mnode_t *node, const colbrushf_t *thisbrush_start, const colbrushf_t *thisbrush_end, int markframe, const vec3_t segmentmins, const vec3_t segmentmaxs) +static void Mod_Q3BSP_TraceBrush_RecursiveBSPNode(trace_t *trace, dp_model_t *model, mnode_t *node, const colbrushf_t *thisbrush_start, const colbrushf_t *thisbrush_end, int markframe, const vec3_t segmentmins, const vec3_t segmentmaxs) { int i; int sides; @@ -5440,7 +5440,7 @@ static void Mod_Q3BSP_TraceBrush_RecursiveBSPNode(trace_t *trace, model_t *model } } -static void Mod_Q3BSP_TraceBox(model_t *model, int frame, trace_t *trace, const vec3_t start, const vec3_t boxmins, const vec3_t boxmaxs, const vec3_t end, int hitsupercontentsmask) +static void Mod_Q3BSP_TraceBox(dp_model_t *model, int frame, trace_t *trace, const vec3_t start, const vec3_t boxmins, const vec3_t boxmaxs, const vec3_t end, int hitsupercontentsmask) { int i; float segmentmins[3], segmentmaxs[3]; @@ -5552,7 +5552,7 @@ static int Mod_Q3BSP_PointSuperContents(struct model_s *model, int frame, const return supercontents; } -static int Mod_Q3BSP_SuperContentsFromNativeContents(model_t *model, int nativecontents) +static int Mod_Q3BSP_SuperContentsFromNativeContents(dp_model_t *model, int nativecontents) { int supercontents = 0; if (nativecontents & CONTENTSQ3_SOLID) @@ -5578,7 +5578,7 @@ static int Mod_Q3BSP_SuperContentsFromNativeContents(model_t *model, int nativec return supercontents; } -static int Mod_Q3BSP_NativeContentsFromSuperContents(model_t *model, int supercontents) +static int Mod_Q3BSP_NativeContentsFromSuperContents(dp_model_t *model, int supercontents) { int nativecontents = 0; if (supercontents & SUPERCONTENTS_SOLID) @@ -5617,7 +5617,7 @@ void Mod_Q3BSP_RecursiveFindNumLeafs(mnode_t *node) loadmodel->brush.num_leafs = numleafs; } -void Mod_Q3BSP_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_Q3BSP_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i, j, numshadowmeshtriangles; q3dheader_t *header; @@ -5826,7 +5826,7 @@ void Mod_Q3BSP_Load(model_t *mod, void *buffer, void *bufferend) } } -void Mod_IBSP_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_IBSP_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i = LittleLong(((int *)buffer)[1]); if (i == Q3BSPVERSION) @@ -5837,12 +5837,12 @@ void Mod_IBSP_Load(model_t *mod, void *buffer, void *bufferend) Host_Error("Mod_IBSP_Load: unknown/unsupported version %i", i); } -void Mod_MAP_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_MAP_Load(dp_model_t *mod, void *buffer, void *bufferend) { Host_Error("Mod_MAP_Load: not yet implemented"); } -qboolean Mod_CanSeeBox_Trace(int numsamples, float t, model_t *model, vec3_t eye, vec3_t minsX, vec3_t maxsX) +qboolean Mod_CanSeeBox_Trace(int numsamples, float t, dp_model_t *model, vec3_t eye, vec3_t minsX, vec3_t maxsX) { // we already have done PVS culling at this point... // so we don't need to do it again. diff --git a/model_shared.c b/model_shared.c index 3ebd38d5..1c01c497 100644 --- a/model_shared.c +++ b/model_shared.c @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. cvar_t r_mipskins = {CVAR_SAVE, "r_mipskins", "0", "mipmaps model skins so they render faster in the distance and do not display noise artifacts, can cause discoloration of skins if they contain undesirable border colors"}; -model_t *loadmodel; +dp_model_t *loadmodel; static mempool_t *mod_mempool; static memexpandablearray_t models; @@ -52,7 +52,7 @@ static void mod_start(void) { int i; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; // parse the Q3 shader files Mod_LoadQ3Shaders(); @@ -67,7 +67,7 @@ static void mod_shutdown(void) { int i; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; for (i = 0;i < nummodels;i++) if ((mod = Mem_ExpandableArray_RecordAtIndex(&models, i)) && (mod->loaded || mod->mempool)) @@ -81,7 +81,7 @@ static void mod_newmap(void) msurface_t *surface; int i, j, k, surfacenum, ssize, tsize; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; R_SkinFrame_PrepareForPurge(); for (i = 0;i < nummodels;i++) @@ -131,7 +131,7 @@ static void Mod_BuildVBOs(void); void Mod_Init (void) { mod_mempool = Mem_AllocPool("modelinfo", 0, NULL); - Mem_ExpandableArray_NewArray(&models, mod_mempool, sizeof(model_t), 16); + Mem_ExpandableArray_NewArray(&models, mod_mempool, sizeof(dp_model_t), 16); Mod_BrushInit(); Mod_AliasInit(); @@ -147,7 +147,7 @@ void Mod_RenderInit(void) R_RegisterModule("Models", mod_start, mod_shutdown, mod_newmap); } -void Mod_UnloadModel (model_t *mod) +void Mod_UnloadModel (dp_model_t *mod) { char name[MAX_QPATH]; qboolean isworldmodel; @@ -169,7 +169,7 @@ void Mod_UnloadModel (model_t *mod) R_FreeTexturePool(&mod->texturepool); Mem_FreePool(&mod->mempool); // clear the struct to make it available - memset(mod, 0, sizeof(model_t)); + memset(mod, 0, sizeof(dp_model_t)); // restore the fields we want to preserve strlcpy(mod->name, name, sizeof(mod->name)); mod->isworldmodel = isworldmodel; @@ -184,7 +184,7 @@ Mod_LoadModel Loads a model ================== */ -model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean checkdisk, qboolean isworldmodel) +dp_model_t *Mod_LoadModel(dp_model_t *mod, qboolean crash, qboolean checkdisk, qboolean isworldmodel) { int num; unsigned int crc; @@ -306,7 +306,7 @@ void Mod_ClearUsed(void) { int i; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; for (i = 0;i < nummodels;i++) if ((mod = Mem_ExpandableArray_RecordAtIndex(&models, i)) && mod->name[0]) mod->used = false; @@ -316,7 +316,7 @@ void Mod_PurgeUnused(void) { int i; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; for (i = 0;i < nummodels;i++) { if ((mod = Mem_ExpandableArray_RecordAtIndex(&models, i)) && mod->name[0] && !mod->used) @@ -328,11 +328,11 @@ void Mod_PurgeUnused(void) } // only used during loading! -void Mod_RemoveStaleWorldModels(model_t *skip) +void Mod_RemoveStaleWorldModels(dp_model_t *skip) { int i; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; for (i = 0;i < nummodels;i++) { if ((mod = Mem_ExpandableArray_RecordAtIndex(&models, i)) && mod->isworldmodel && mod->loaded && skip != mod) @@ -350,11 +350,11 @@ Mod_FindName ================== */ -model_t *Mod_FindName(const char *name) +dp_model_t *Mod_FindName(const char *name) { int i; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; if (!name[0]) Host_Error ("Mod_ForName: NULL name"); @@ -384,9 +384,9 @@ Mod_ForName Loads in a model for the given name ================== */ -model_t *Mod_ForName(const char *name, qboolean crash, qboolean checkdisk, qboolean isworldmodel) +dp_model_t *Mod_ForName(const char *name, qboolean crash, qboolean checkdisk, qboolean isworldmodel) { - model_t *model; + dp_model_t *model; model = Mod_FindName(name); if (model->name[0] != '*' && (!model->loaded || checkdisk)) Mod_LoadModel(model, crash, checkdisk, isworldmodel); @@ -404,7 +404,7 @@ void Mod_Reload(void) { int i; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; for (i = 0;i < nummodels;i++) if ((mod = Mem_ExpandableArray_RecordAtIndex(&models, i)) && mod->name[0] && mod->name[0] != '*' && mod->used) Mod_LoadModel(mod, true, true, mod->isworldmodel); @@ -424,7 +424,7 @@ static void Mod_Print(void) { int i; int nummodels = Mem_ExpandableArray_IndexRange(&models); - model_t *mod; + dp_model_t *mod; Con_Print("Loaded models:\n"); for (i = 0;i < nummodels;i++) diff --git a/model_shared.h b/model_shared.h index 598598e8..1f171ca3 100644 --- a/model_shared.h +++ b/model_shared.h @@ -878,12 +878,12 @@ typedef struct model_s // flags this model for offseting sounds to the model center (used by brush models) int soundfromcenter; } -model_t; +dp_model_t; //============================================================================ // model loading -extern model_t *loadmodel; +extern dp_model_t *loadmodel; extern unsigned char *mod_base; // sky/water subdivision //extern cvar_t gl_subdivide_size; @@ -892,16 +892,16 @@ extern cvar_t r_fullbrights; void Mod_Init (void); void Mod_Reload (void); -model_t *Mod_LoadModel(model_t *mod, qboolean crash, qboolean checkdisk, qboolean isworldmodel); -model_t *Mod_FindName (const char *name); -model_t *Mod_ForName (const char *name, qboolean crash, qboolean checkdisk, qboolean isworldmodel); -void Mod_UnloadModel (model_t *mod); +dp_model_t *Mod_LoadModel(dp_model_t *mod, qboolean crash, qboolean checkdisk, qboolean isworldmodel); +dp_model_t *Mod_FindName (const char *name); +dp_model_t *Mod_ForName (const char *name, qboolean crash, qboolean checkdisk, qboolean isworldmodel); +void Mod_UnloadModel (dp_model_t *mod); void Mod_ClearUsed(void); void Mod_PurgeUnused(void); -void Mod_RemoveStaleWorldModels(model_t *skip); // only used during loading! +void Mod_RemoveStaleWorldModels(dp_model_t *skip); // only used during loading! -extern model_t *loadmodel; +extern dp_model_t *loadmodel; extern char loadname[32]; // for hunk tags int Mod_BuildVertexRemapTableFromElements(int numelements, const int *elements, int numvertices, int *remapvertices); @@ -972,27 +972,27 @@ void R_Q1BSP_DrawLight(struct entity_render_s *ent, int numsurfaces, const int * // alias models struct frameblend_s; void Mod_AliasInit(void); -int Mod_Alias_GetTagMatrix(const model_t *model, int poseframe, int tagindex, matrix4x4_t *outmatrix); -int Mod_Alias_GetTagIndexForName(const model_t *model, unsigned int skin, const char *tagname); +int Mod_Alias_GetTagMatrix(const dp_model_t *model, int poseframe, int tagindex, matrix4x4_t *outmatrix); +int Mod_Alias_GetTagIndexForName(const dp_model_t *model, unsigned int skin, const char *tagname); // sprite models void Mod_SpriteInit(void); // loaders -void Mod_Q1BSP_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_IBSP_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_MAP_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_IDP0_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_IDP2_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_IDP3_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_ZYMOTICMODEL_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_DARKPLACESMODEL_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_PSKMODEL_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_IDSP_Load(model_t *mod, void *buffer, void *bufferend); -void Mod_IDS2_Load(model_t *mod, void *buffer, void *bufferend); +void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_IBSP_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_MAP_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_IDP0_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_IDP2_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_IDP3_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_ZYMOTICMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_DARKPLACESMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_PSKMODEL_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_IDSP_Load(dp_model_t *mod, void *buffer, void *bufferend); +void Mod_IDS2_Load(dp_model_t *mod, void *buffer, void *bufferend); // utility -qboolean Mod_CanSeeBox_Trace(int numsamples, float t, model_t *model, vec3_t eye, vec3_t minsX, vec3_t maxsX); +qboolean Mod_CanSeeBox_Trace(int numsamples, float t, dp_model_t *model, vec3_t eye, vec3_t minsX, vec3_t maxsX); #endif // MODEL_SHARED_H diff --git a/model_sprite.c b/model_sprite.c index 2cdb741a..9fa62fdb 100644 --- a/model_sprite.c +++ b/model_sprite.c @@ -233,7 +233,7 @@ static void Mod_Sprite_SharedSetup(const unsigned char *datapointer, int version } extern void R_Model_Sprite_Draw(entity_render_t *ent); -void Mod_IDSP_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_IDSP_Load(dp_model_t *mod, void *buffer, void *bufferend) { int version; const unsigned char *datapointer; @@ -343,7 +343,7 @@ void Mod_IDSP_Load(model_t *mod, void *buffer, void *bufferend) } -void Mod_IDS2_Load(model_t *mod, void *buffer, void *bufferend) +void Mod_IDS2_Load(dp_model_t *mod, void *buffer, void *bufferend) { int i, version, fullbright; const dsprite2_t *pinqsprite; diff --git a/portals.c b/portals.c index 2f7fa32e..8e2b579c 100644 --- a/portals.c +++ b/portals.c @@ -127,7 +127,7 @@ loc0: goto loc0; } -int Portal_CheckPolygon(model_t *model, vec3_t eye, float *polypoints, int numpoints) +int Portal_CheckPolygon(dp_model_t *model, vec3_t eye, float *polypoints, int numpoints) { int i, prev, returnvalue; mleaf_t *eyeleaf; @@ -204,7 +204,7 @@ int Portal_CheckPolygon(model_t *model, vec3_t eye, float *polypoints, int numpo }\ } -int Portal_CheckBox(model_t *model, vec3_t eye, vec3_t a, vec3_t b) +int Portal_CheckBox(dp_model_t *model, vec3_t eye, vec3_t a, vec3_t b) { if (eye[0] >= (a[0] - 1.0f) && eye[0] < (b[0] + 1.0f) && eye[1] >= (a[1] - 1.0f) && eye[1] < (b[1] + 1.0f) @@ -277,7 +277,7 @@ typedef struct portalrecursioninfo_s unsigned char *leafpvs; unsigned char *shadowtrispvs; unsigned char *lighttrispvs; - model_t *model; + dp_model_t *model; vec3_t eye; float *updateleafsmins; float *updateleafsmaxs; @@ -411,7 +411,7 @@ static void Portal_RecursiveFindLeafForFlow(portalrecursioninfo_t *info, mnode_t } } -void Portal_Visibility(model_t *model, const vec3_t eye, int *leaflist, unsigned char *leafpvs, int *numleafspointer, int *surfacelist, unsigned char *surfacepvs, int *numsurfacespointer, const mplane_t *frustumplanes, int numfrustumplanes, int exact, const float *boxmins, const float *boxmaxs, float *updateleafsmins, float *updateleafsmaxs, unsigned char *shadowtrispvs, unsigned char *lighttrispvs) +void Portal_Visibility(dp_model_t *model, const vec3_t eye, int *leaflist, unsigned char *leafpvs, int *numleafspointer, int *surfacelist, unsigned char *surfacepvs, int *numsurfacespointer, const mplane_t *frustumplanes, int numfrustumplanes, int exact, const float *boxmins, const float *boxmaxs, float *updateleafsmins, float *updateleafsmaxs, unsigned char *shadowtrispvs, unsigned char *lighttrispvs) { int i; portalrecursioninfo_t info; diff --git a/portals.h b/portals.h index 29f625ae..5843c0a5 100644 --- a/portals.h +++ b/portals.h @@ -2,9 +2,9 @@ #ifndef PORTALS_H #define PORTALS_H -int Portal_CheckPolygon(model_t *model, vec3_t eye, float *polypoints, int numpoints); -int Portal_CheckBox(model_t *model, vec3_t eye, vec3_t a, vec3_t b); -void Portal_Visibility(model_t *model, const vec3_t eye, int *leaflist, unsigned char *leafpvs, int *numleafspointer, int *surfacelist, unsigned char *surfacepvs, int *numsurfacespointer, const mplane_t *frustumplanes, int numfrustumplanes, int exact, const float *boxmins, const float *boxmaxs, float *updateleafsmins, float *updateleafsmaxs, unsigned char *shadowtrispvs, unsigned char *lighttrispvs); +int Portal_CheckPolygon(dp_model_t *model, vec3_t eye, float *polypoints, int numpoints); +int Portal_CheckBox(dp_model_t *model, vec3_t eye, vec3_t a, vec3_t b); +void Portal_Visibility(dp_model_t *model, const vec3_t eye, int *leaflist, unsigned char *leafpvs, int *numleafspointer, int *surfacelist, unsigned char *surfacepvs, int *numsurfacespointer, const mplane_t *frustumplanes, int numfrustumplanes, int exact, const float *boxmins, const float *boxmaxs, float *updateleafsmins, float *updateleafsmaxs, unsigned char *shadowtrispvs, unsigned char *lighttrispvs); #endif diff --git a/r_lerpanim.c b/r_lerpanim.c index 7fc8b096..646033e1 100644 --- a/r_lerpanim.c +++ b/r_lerpanim.c @@ -10,7 +10,7 @@ void R_LerpAnimation(entity_render_t *r) double sublerp, lerp, d; animscene_t *scene; frameblend_t *blend; - model_t *model = r->model; + dp_model_t *model = r->model; blend = r->frameblend; blend[0].frame = blend[1].frame = blend[2].frame = blend[3].frame = 0; diff --git a/r_shadow.c b/r_shadow.c index 2ff6dd64..e3de2afb 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -2442,7 +2442,7 @@ void R_RTLight_Compile(rtlight_t *rtlight) int numsurfaces, numleafs, numleafpvsbytes, numshadowtrispvsbytes, numlighttrispvsbytes; int lighttris, shadowtris, shadowmeshes, shadowmeshtris; entity_render_t *ent = r_refdef.scene.worldentity; - model_t *model = r_refdef.scene.worldmodel; + dp_model_t *model = r_refdef.scene.worldmodel; unsigned char *data; // compile the light @@ -2827,7 +2827,7 @@ void R_Shadow_DrawWorldLight(int numsurfaces, int *surfacelist, const unsigned c void R_Shadow_DrawEntityLight(entity_render_t *ent) { - model_t *model = ent->model; + dp_model_t *model = ent->model; if (!model->DrawLight) return; @@ -2951,7 +2951,7 @@ void R_DrawRTLight(rtlight_t *rtlight, qboolean visible) { for (i = 0;i < r_refdef.scene.numentities;i++) { - model_t *model; + dp_model_t *model; entity_render_t *ent = r_refdef.scene.entities[i]; vec3_t org; if (!BoxesOverlap(ent->mins, ent->maxs, rsurface.rtlight_cullmins, rsurface.rtlight_cullmaxs)) diff --git a/r_sprites.c b/r_sprites.c index e1a8b180..f2976587 100644 --- a/r_sprites.c +++ b/r_sprites.c @@ -202,7 +202,7 @@ void R_RotateSprite(const mspriteframe_t *frame, vec3_t origin, vec3_t left, vec void R_Model_Sprite_Draw_TransparentCallback(const entity_render_t *ent, const rtlight_t *rtlight, int numsurfaces, int *surfacelist) { int i; - model_t *model = ent->model; + dp_model_t *model = ent->model; vec3_t left, up, org, mforward, mleft, mup, middle; float scale, dx, dy, hud_vs_screen; int edge = 0; diff --git a/sv_main.c b/sv_main.c index 853d57d9..f6cc5e39 100644 --- a/sv_main.c +++ b/sv_main.c @@ -930,7 +930,7 @@ static qboolean SV_PrepareEntityForSending (prvm_edict_t *ent, entity_state_t *c unsigned int customizeentityforclient; float f; vec3_t cullmins, cullmaxs; - model_t *model; + dp_model_t *model; prvm_eval_t *val; // this 2 billion unit check is actually to detect NAN origins @@ -1188,7 +1188,7 @@ void SV_PrepareEntitiesForSending(void) void SV_MarkWriteEntityStateToClient(entity_state_t *s) { int isbmodel; - model_t *model; + dp_model_t *model; prvm_edict_t *ed; if (sv.sententitiesconsideration[s->number] == sv.sententitiesmark) return; @@ -2480,7 +2480,7 @@ void SV_SpawnServer (const char *server) prvm_edict_t *ent; int i; char *entities; - model_t *worldmodel; + dp_model_t *worldmodel; char modelname[sizeof(sv.modelname)]; Con_DPrintf("SpawnServer: %s\n", server); diff --git a/sv_phys.c b/sv_phys.c index 70369c9b..39cb72ad 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -107,7 +107,7 @@ trace_t SV_Move(const vec3_t start, const vec3_t mins, const vec3_t maxs, const // matrices to transform into/out of other entity's space matrix4x4_t matrix, imatrix; // model of other entity - model_t *model; + dp_model_t *model; // list of entities to test for collisions int numtouchedicts; prvm_edict_t *touchedicts[MAX_EDICTS]; @@ -264,7 +264,7 @@ int SV_PointSuperContents(const vec3_t point) // matrices to transform into/out of other entity's space matrix4x4_t matrix, imatrix; // model of other entity - model_t *model; + dp_model_t *model; unsigned int modelindex; int frame; // list of entities to test for collisions @@ -378,7 +378,7 @@ SV_LinkEdict */ void SV_LinkEdict (prvm_edict_t *ent, qboolean touch_triggers) { - model_t *model; + dp_model_t *model; vec3_t mins, maxs; if (ent == prog->edicts) @@ -1062,7 +1062,7 @@ void SV_PushMove (prvm_edict_t *pusher, float movetime) int num_moved; int numcheckentities; static prvm_edict_t *checkentities[MAX_EDICTS]; - model_t *pushermodel; + dp_model_t *pushermodel; trace_t trace; matrix4x4_t pusherfinalmatrix, pusherfinalimatrix; unsigned short moved_edicts[MAX_EDICTS]; diff --git a/svvm_cmds.c b/svvm_cmds.c index 6f800eb3..28108f88 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -252,7 +252,7 @@ static vec3_t quakemins = {-16, -16, -16}, quakemaxs = {16, 16, 16}; static void VM_SV_setmodel (void) { prvm_edict_t *e; - model_t *mod; + dp_model_t *mod; int i; VM_SAFEPARMCOUNT(2, VM_setmodel); @@ -2104,7 +2104,7 @@ static void VM_SV_te_flamejet (void) SV_FlushBroadcastMessages(); } -void clippointtosurface(model_t *model, msurface_t *surface, vec3_t p, vec3_t out) +void clippointtosurface(dp_model_t *model, msurface_t *surface, vec3_t p, vec3_t out) { int i, j, k; float *v[3], facenormal[3], edgenormal[3], sidenormal[3], temp[3], offsetdist, dist, bestdist; @@ -2140,7 +2140,7 @@ void clippointtosurface(model_t *model, msurface_t *surface, vec3_t p, vec3_t ou } } -static model_t *getmodel(prvm_edict_t *ed) +static dp_model_t *getmodel(prvm_edict_t *ed) { int modelindex; if (!ed || ed->priv.server->free) @@ -2151,7 +2151,7 @@ static model_t *getmodel(prvm_edict_t *ed) return sv.models[modelindex]; } -static msurface_t *getsurface(model_t *model, int surfacenum) +static msurface_t *getsurface(dp_model_t *model, int surfacenum) { if (surfacenum < 0 || surfacenum >= model->nummodelsurfaces) return NULL; @@ -2162,7 +2162,7 @@ static msurface_t *getsurface(model_t *model, int surfacenum) //PF_getsurfacenumpoints, // #434 float(entity e, float s) getsurfacenumpoints = #434; static void VM_SV_getsurfacenumpoints(void) { - model_t *model; + dp_model_t *model; msurface_t *surface; VM_SAFEPARMCOUNT(2, VM_SV_getsurfacenumpoints); // return 0 if no such surface @@ -2179,7 +2179,7 @@ static void VM_SV_getsurfacenumpoints(void) static void VM_SV_getsurfacepoint(void) { prvm_edict_t *ed; - model_t *model; + dp_model_t *model; msurface_t *surface; int pointnum; VM_SAFEPARMCOUNT(3, VM_SV_getsurfacepoint); @@ -2205,7 +2205,7 @@ static void VM_SV_getsurfacepoint(void) static void VM_SV_getsurfacepointattribute(void) { prvm_edict_t *ed; - model_t *model; + dp_model_t *model; msurface_t *surface; int pointnum; int attributetype; @@ -2270,7 +2270,7 @@ static void VM_SV_getsurfacepointattribute(void) //PF_getsurfacenormal, // #436 vector(entity e, float s) getsurfacenormal = #436; static void VM_SV_getsurfacenormal(void) { - model_t *model; + dp_model_t *model; msurface_t *surface; vec3_t normal; VM_SAFEPARMCOUNT(2, VM_SV_getsurfacenormal); @@ -2288,7 +2288,7 @@ static void VM_SV_getsurfacenormal(void) //PF_getsurfacetexture, // #437 string(entity e, float s) getsurfacetexture = #437; static void VM_SV_getsurfacetexture(void) { - model_t *model; + dp_model_t *model; msurface_t *surface; VM_SAFEPARMCOUNT(2, VM_SV_getsurfacetexture); PRVM_G_INT(OFS_RETURN) = OFS_NULL; @@ -2303,7 +2303,7 @@ static void VM_SV_getsurfacenearpoint(void) vec3_t clipped, p; vec_t dist, bestdist; prvm_edict_t *ed; - model_t *model; + dp_model_t *model; msurface_t *surface; vec_t *point; VM_SAFEPARMCOUNT(2, VM_SV_getsurfacenearpoint); @@ -2349,7 +2349,7 @@ static void VM_SV_getsurfacenearpoint(void) static void VM_SV_getsurfaceclippedpoint(void) { prvm_edict_t *ed; - model_t *model; + dp_model_t *model; msurface_t *surface; vec3_t p, out; VM_SAFEPARMCOUNT(3, VM_SV_te_getsurfaceclippedpoint); @@ -2394,7 +2394,7 @@ static void VM_SV_setattachment (void) const char *tagname = PRVM_G_STRING(OFS_PARM2); prvm_eval_t *v; int modelindex; - model_t *model; + dp_model_t *model; VM_SAFEPARMCOUNT(3, VM_SV_setattachment); if (e == prog->edicts) @@ -2438,7 +2438,7 @@ static void VM_SV_setattachment (void) int SV_GetTagIndex (prvm_edict_t *e, const char *tagname) { int i; - model_t *model; + dp_model_t *model; i = (int)e->fields.server->modelindex; if (i < 1 || i >= MAX_MODELS) @@ -2463,7 +2463,7 @@ int SV_GetEntityLocalTagMatrix(prvm_edict_t *ent, int tagindex, matrix4x4_t *out { int modelindex; int frame; - model_t *model; + dp_model_t *model; if (tagindex >= 0 && (modelindex = (int)ent->fields.server->modelindex) >= 1 && modelindex < MAX_MODELS && (model = sv.models[(int)ent->fields.server->modelindex]) @@ -2495,7 +2495,7 @@ int SV_GetTagMatrix (matrix4x4_t *out, prvm_edict_t *ent, int tagindex) prvm_eval_t *val; int modelindex, attachloop; matrix4x4_t entitymatrix, tagmatrix, attachmatrix; - model_t *model; + dp_model_t *model; *out = identitymatrix; // warnings and errors return identical matrix @@ -2727,7 +2727,7 @@ void VM_SV_serverkey(void) static void VM_SV_setmodelindex (void) { prvm_edict_t *e; - model_t *mod; + dp_model_t *mod; int i; VM_SAFEPARMCOUNT(2, VM_SV_setmodelindex);