Change HTML4 entities to HTML5
< to < > to > & to &
This commit is contained in:
parent
56a4baa60e
commit
b8e7ce7165
105 changed files with 1117 additions and 1117 deletions
58
65-03.html
58
65-03.html
|
|
@ -49,7 +49,7 @@ int ClipToPlane(polygon_t *pin, plane_t *pplane, polygon_t *pout)
|
|||
pinvert = pin->verts;
|
||||
poutvert = pout->verts;
|
||||
|
||||
curdot = DotProduct(pinvert, &pplane->normal);
|
||||
curdot = DotProduct(pinvert, &pplane->normal);
|
||||
curin = (curdot >= pplane->distance);
|
||||
|
||||
for (i=0 ; i<pin->numverts ; i++)
|
||||
|
|
@ -60,7 +60,7 @@ int ClipToPlane(polygon_t *pin, plane_t *pplane, polygon_t *pout)
|
|||
if (curin)
|
||||
*poutvert++ = *pinvert;
|
||||
|
||||
nextdot = DotProduct(&pin->verts[nextvert], &pplane->normal);
|
||||
nextdot = DotProduct(&pin->verts[nextvert], &pplane->normal);
|
||||
nextin = (nextdot >= pplane->distance);
|
||||
|
||||
// Add a clipped vertex if one end of the current edge is
|
||||
|
|
@ -150,7 +150,7 @@ void ZSortObjects(void)
|
|||
convexobject_t *pobject;
|
||||
point_t dist;
|
||||
|
||||
objecthead.pnext = &objecthead;
|
||||
objecthead.pnext = &objecthead;
|
||||
for (i=0 ; i<numobjects ; i++)
|
||||
{
|
||||
for (j=0 ; j<3 ; j++)
|
||||
|
|
@ -158,14 +158,14 @@ void ZSortObjects(void)
|
|||
objects[i].vdist = sqrt(dist.v[0] * dist.v[0] +
|
||||
dist.v[1] * dist.v[1] +
|
||||
dist.v[2] * dist.v[2]);
|
||||
pobject = &objecthead;
|
||||
pobject = &objecthead;
|
||||
vdist = objects[i].vdist;
|
||||
// Viewspace-distance-sort this object into the others.
|
||||
// Guaranteed to terminate because of sentinel
|
||||
while (vdist < pobject->pnext->vdist)
|
||||
pobject = pobject->pnext;
|
||||
objects[i].pnext = pobject->pnext;
|
||||
pobject->pnext = &objects[i];
|
||||
pobject->pnext = &objects[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -179,9 +179,9 @@ void UpdateViewPos()
|
|||
// Move in the view direction, across the x-y plane, as if
|
||||
// walking. This approach moves slower when looking up or
|
||||
// down at more of an angle
|
||||
motionvec.v[0] = DotProduct(&vpn, &xaxis);
|
||||
motionvec.v[0] = DotProduct(&vpn, &xaxis);
|
||||
motionvec.v[1] = 0.0;
|
||||
motionvec.v[2] = DotProduct(&vpn, &zaxis);
|
||||
motionvec.v[2] = DotProduct(&vpn, &zaxis);
|
||||
for (i=0 ; i<3 ; i++)
|
||||
{
|
||||
currentpos.v[i] += motionvec.v[i] * currentspeed;
|
||||
|
|
@ -255,9 +255,9 @@ void TransformPoint(point_t *pin, point_t *pout)
|
|||
for (i=0 ; i<3 ; i++)
|
||||
tvert.v[i] = pin->v[i] - currentpos.v[i];
|
||||
// Rotate into the view orientation
|
||||
pout->v[0] = DotProduct(&tvert, &vright);
|
||||
pout->v[1] = DotProduct(&tvert, &vup);
|
||||
pout->v[2] = DotProduct(&tvert, &vpn);
|
||||
pout->v[0] = DotProduct(&tvert, &vright);
|
||||
pout->v[1] = DotProduct(&tvert, &vup);
|
||||
pout->v[2] = DotProduct(&tvert, &vpn);
|
||||
}
|
||||
|
||||
// Transform a polygon from worldspace to viewspace.
|
||||
|
|
@ -266,7 +266,7 @@ void TransformPolygon(polygon_t *pinpoly, polygon_t *poutpoly)
|
|||
int i;
|
||||
|
||||
for (i=0 ; i<pinpoly->numverts ; i++)
|
||||
TransformPoint(&pinpoly->verts[i], &poutpoly->verts[i]);
|
||||
TransformPoint(&pinpoly->verts[i], &poutpoly->verts[i]);
|
||||
poutpoly->color = pinpoly->color;
|
||||
poutpoly->numverts = pinpoly->numverts;
|
||||
}
|
||||
|
|
@ -284,8 +284,8 @@ int PolyFacesViewer(polygon_t *ppoly)
|
|||
edge1.v[i] = ppoly->verts[0].v[i] - ppoly->verts[1].v[i];
|
||||
edge2.v[i] = ppoly->verts[2].v[i] - ppoly->verts[1].v[i];
|
||||
}
|
||||
CrossProduct(&edge1, &edge2, &normal);
|
||||
if (DotProduct(&viewvec, &normal) > 0)
|
||||
CrossProduct(&edge1, &edge2, &normal);
|
||||
if (DotProduct(&viewvec, &normal) > 0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
|
@ -296,8 +296,8 @@ void SetWorldspaceClipPlane(point_t *normal, plane_t *plane)
|
|||
{
|
||||
|
||||
// Rotate the plane normal into worldspace
|
||||
BackRotateVector(normal, &plane->normal);
|
||||
plane->distance = DotProduct(&currentpos, &plane->normal) +
|
||||
BackRotateVector(normal, &plane->normal);
|
||||
plane->distance = DotProduct(&currentpos, &plane->normal) +
|
||||
CLIP_PLANE_EPSILON;
|
||||
}
|
||||
|
||||
|
|
@ -314,10 +314,10 @@ void SetUpFrustum(void)
|
|||
normal.v[0] = s;
|
||||
normal.v[1] = 0;
|
||||
normal.v[2] = c;
|
||||
SetWorldspaceClipPlane(&normal, &frustumplanes[0]);
|
||||
SetWorldspaceClipPlane(&normal, &frustumplanes[0]);
|
||||
// Right clip plane
|
||||
normal.v[0] = -s;
|
||||
SetWorldspaceClipPlane(&normal, &frustumplanes[1]);
|
||||
SetWorldspaceClipPlane(&normal, &frustumplanes[1]);
|
||||
angle = atan(2.0 / fieldofview * maxscale / yscreenscale);
|
||||
s = sin(angle);
|
||||
c = cos(angle);
|
||||
|
|
@ -325,10 +325,10 @@ void SetUpFrustum(void)
|
|||
normal.v[0] = 0;
|
||||
normal.v[1] = s;
|
||||
normal.v[2] = c;
|
||||
SetWorldspaceClipPlane(&normal, &frustumplanes[2]);
|
||||
SetWorldspaceClipPlane(&normal, &frustumplanes[2]);
|
||||
// Top clip plane
|
||||
normal.v[1] = -s;
|
||||
SetWorldspaceClipPlane(&normal, &frustumplanes[3]);
|
||||
SetWorldspaceClipPlane(&normal, &frustumplanes[3]);
|
||||
}
|
||||
|
||||
// Clip a polygon to the frustum.
|
||||
|
|
@ -342,14 +342,14 @@ int ClipToFrustum(polygon_t *pin, polygon_t *pout)
|
|||
for (i=0 ; i<(NUM_FRUSTUM_PLANES-1); i++)
|
||||
{
|
||||
if (!ClipToPlane(ppoly,
|
||||
&frustumplanes[i],
|
||||
&tpoly[curpoly]))
|
||||
&frustumplanes[i],
|
||||
&tpoly[curpoly]))
|
||||
return 0;
|
||||
ppoly = &tpoly[curpoly];
|
||||
ppoly = &tpoly[curpoly];
|
||||
curpoly ^= 1;
|
||||
}
|
||||
return ClipToPlane(ppoly,
|
||||
&frustumplanes[NUM_FRUSTUM_PLANES-1],
|
||||
&frustumplanes[NUM_FRUSTUM_PLANES-1],
|
||||
pout);
|
||||
}
|
||||
|
||||
|
|
@ -370,7 +370,7 @@ void UpdateWorld()
|
|||
ZSortObjects();
|
||||
// Draw all visible faces in all objects
|
||||
pobject = objecthead.pnext;
|
||||
while (pobject != &objecthead)
|
||||
while (pobject != &objecthead)
|
||||
{
|
||||
ppoly = pobject->ppoly;
|
||||
for (i=0 ; i<pobject->numpolys ; i++)
|
||||
|
|
@ -384,13 +384,13 @@ void UpdateWorld()
|
|||
tpoly0.verts[j].v[k] = ppoly->verts[j].v[k] +
|
||||
pobject->center.v[k];
|
||||
}
|
||||
if (PolyFacesViewer(&tpoly0))
|
||||
if (PolyFacesViewer(&tpoly0))
|
||||
{
|
||||
if (ClipToFrustum(&tpoly0, &tpoly1))
|
||||
if (ClipToFrustum(&tpoly0, &tpoly1))
|
||||
{
|
||||
TransformPolygon (&tpoly1, &tpoly2);
|
||||
ProjectPolygon (&tpoly2, &screenpoly);
|
||||
FillPolygon2D (&screenpoly);
|
||||
TransformPolygon (&tpoly1, &tpoly2);
|
||||
ProjectPolygon (&tpoly2, &screenpoly);
|
||||
FillPolygon2D (&screenpoly);
|
||||
}
|
||||
}
|
||||
ppoly++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue