mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2024-12-08 00:17:40 +00:00
render: pass currententity down to R_RenderPoly
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
parent
ab23ab9ad8
commit
ac32c7c3f2
@ -537,7 +537,7 @@ R_RecursiveWorldNode(mnode_t *node, int clipflags)
|
|||||||
numbtofpolys++;
|
numbtofpolys++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
R_RenderPoly(surf, clipflags);
|
R_RenderPoly(currententity, surf, clipflags);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
R_RenderFace(currententity, surf, clipflags);
|
R_RenderFace(currententity, surf, clipflags);
|
||||||
@ -558,7 +558,7 @@ R_RecursiveWorldNode(mnode_t *node, int clipflags)
|
|||||||
numbtofpolys++;
|
numbtofpolys++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
R_RenderPoly(surf, clipflags);
|
R_RenderPoly(currententity, surf, clipflags);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
R_RenderFace(currententity, surf, clipflags);
|
R_RenderFace(currententity, surf, clipflags);
|
||||||
@ -602,7 +602,7 @@ R_RenderWorld(void)
|
|||||||
// in that order
|
// in that order
|
||||||
if (r_worldpolysbacktofront) {
|
if (r_worldpolysbacktofront) {
|
||||||
for (i = numbtofpolys - 1; i >= 0; i--) {
|
for (i = numbtofpolys - 1; i >= 0; i--) {
|
||||||
R_RenderPoly(btofpolys[i].psurf, btofpolys[i].clipflags);
|
R_RenderPoly(currententity, btofpolys[i].psurf, btofpolys[i].clipflags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -633,7 +633,7 @@ R_RenderPoly
|
|||||||
================
|
================
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
R_RenderPoly(msurface_t *fa, int clipflags)
|
R_RenderPoly(entity_t *e, msurface_t *fa, int clipflags)
|
||||||
{
|
{
|
||||||
int i, lindex, lnumverts, s_axis, t_axis;
|
int i, lindex, lnumverts, s_axis, t_axis;
|
||||||
float dist, lastdist, lzi, scale, u, v, frac;
|
float dist, lastdist, lzi, scale, u, v, frac;
|
||||||
@ -664,12 +664,12 @@ R_RenderPoly(msurface_t *fa, int clipflags)
|
|||||||
|
|
||||||
// reconstruct the polygon
|
// reconstruct the polygon
|
||||||
// FIXME: these should be precalculated and loaded off disk
|
// FIXME: these should be precalculated and loaded off disk
|
||||||
pedges = currententity->model->edges;
|
pedges = e->model->edges;
|
||||||
lnumverts = fa->numedges;
|
lnumverts = fa->numedges;
|
||||||
vertpage = 0;
|
vertpage = 0;
|
||||||
|
|
||||||
for (i = 0; i < lnumverts; i++) {
|
for (i = 0; i < lnumverts; i++) {
|
||||||
lindex = currententity->model->surfedges[fa->firstedge + i];
|
lindex = e->model->surfedges[fa->firstedge + i];
|
||||||
|
|
||||||
if (lindex > 0) {
|
if (lindex > 0) {
|
||||||
r_pedge = &pedges[lindex];
|
r_pedge = &pedges[lindex];
|
||||||
@ -825,7 +825,7 @@ R_ZDrawSubmodelPolys(model_t *pmodel)
|
|||||||
if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
|
if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
|
||||||
(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON))) {
|
(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON))) {
|
||||||
// FIXME: use bounding-box-based frustum clipping info?
|
// FIXME: use bounding-box-based frustum clipping info?
|
||||||
R_RenderPoly(psurf, 15);
|
R_RenderPoly(currententity, psurf, 15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ R_DrawCulledPolys(void)
|
|||||||
|
|
||||||
if (!(s->flags & SURF_DRAWBACKGROUND)) {
|
if (!(s->flags & SURF_DRAWBACKGROUND)) {
|
||||||
pface = (msurface_t *)s->data;
|
pface = (msurface_t *)s->data;
|
||||||
R_RenderPoly(pface, 15);
|
R_RenderPoly(currententity, pface, 15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -103,7 +103,7 @@ R_DrawCulledPolys(void)
|
|||||||
|
|
||||||
if (!(s->flags & SURF_DRAWBACKGROUND)) {
|
if (!(s->flags & SURF_DRAWBACKGROUND)) {
|
||||||
pface = (msurface_t *)s->data;
|
pface = (msurface_t *)s->data;
|
||||||
R_RenderPoly(pface, 15);
|
R_RenderPoly(currententity, pface, 15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ extern qboolean insubmodel;
|
|||||||
|
|
||||||
void R_DrawSprite(void);
|
void R_DrawSprite(void);
|
||||||
void R_RenderFace(entity_t *e, msurface_t *fa, int clipflags);
|
void R_RenderFace(entity_t *e, msurface_t *fa, int clipflags);
|
||||||
void R_RenderPoly(msurface_t *fa, int clipflags);
|
void R_RenderPoly(entity_t *e, msurface_t *fa, int clipflags);
|
||||||
void R_RenderBmodelFace(entity_t *e, bedge_t *pedges, msurface_t *psurf);
|
void R_RenderBmodelFace(entity_t *e, bedge_t *pedges, msurface_t *psurf);
|
||||||
void R_TransformPlane(mplane_t *p, float *normal, float *dist);
|
void R_TransformPlane(mplane_t *p, float *normal, float *dist);
|
||||||
void R_TransformFrustum(void);
|
void R_TransformFrustum(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user