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
94
52-04.html
94
52-04.html
|
|
@ -46,26 +46,26 @@
|
|||
|
||||
void RotateAndMovePObject(PObject * ObjectToMove)
|
||||
{
|
||||
if (--ObjectToMove->RDelayCount == 0) { /* rotate */
|
||||
ObjectToMove->RDelayCount = ObjectToMove->RDelayCountBase;
|
||||
if (ObjectToMove->Rotate.RotateX != 0.0)
|
||||
AppendRotationX(ObjectToMove->XformToWorld,
|
||||
ObjectToMove->Rotate.RotateX);
|
||||
if (ObjectToMove->Rotate.RotateY != 0.0)
|
||||
AppendRotationY(ObjectToMove->XformToWorld,
|
||||
ObjectToMove->Rotate.RotateY);
|
||||
if (ObjectToMove->Rotate.RotateZ != 0.0)
|
||||
AppendRotationZ(ObjectToMove->XformToWorld,
|
||||
ObjectToMove->Rotate.RotateZ);
|
||||
ObjectToMove->RecalcXform = 1;
|
||||
if (--ObjectToMove->RDelayCount == 0) { /* rotate */
|
||||
ObjectToMove->RDelayCount = ObjectToMove->RDelayCountBase;
|
||||
if (ObjectToMove->Rotate.RotateX != 0.0)
|
||||
AppendRotationX(ObjectToMove->XformToWorld,
|
||||
ObjectToMove->Rotate.RotateX);
|
||||
if (ObjectToMove->Rotate.RotateY != 0.0)
|
||||
AppendRotationY(ObjectToMove->XformToWorld,
|
||||
ObjectToMove->Rotate.RotateY);
|
||||
if (ObjectToMove->Rotate.RotateZ != 0.0)
|
||||
AppendRotationZ(ObjectToMove->XformToWorld,
|
||||
ObjectToMove->Rotate.RotateZ);
|
||||
ObjectToMove->RecalcXform = 1;
|
||||
}
|
||||
/* Move in Z, checking for bouncing and stopping */
|
||||
if (--ObjectToMove->MDelayCount == 0) {
|
||||
ObjectToMove->MDelayCount = ObjectToMove->MDelayCountBase;
|
||||
ObjectToMove->XformToWorld[2][3] += ObjectToMove->Move.MoveZ;
|
||||
if (ObjectToMove->XformToWorld[2][3]>ObjectToMove->Move.MaxZ)
|
||||
ObjectToMove->Move.MoveZ = 0; /* stop if close enough */
|
||||
ObjectToMove->RecalcXform = 1;
|
||||
if (--ObjectToMove->MDelayCount == 0) {
|
||||
ObjectToMove->MDelayCount = ObjectToMove->MDelayCountBase;
|
||||
ObjectToMove->XformToWorld[2][3] += ObjectToMove->Move.MoveZ;
|
||||
if (ObjectToMove->XformToWorld[2][3]>ObjectToMove->Move.MaxZ)
|
||||
ObjectToMove->Move.MoveZ = 0; /* stop if close enough */
|
||||
ObjectToMove->RecalcXform = 1;
|
||||
}
|
||||
}
|
||||
</PRE>
|
||||
|
|
@ -81,19 +81,19 @@ void RotateAndMovePObject(PObject * ObjectToMove)
|
|||
|
||||
void DrawPObject(PObject * ObjectToXform)
|
||||
{
|
||||
int i, j, NumFaces = ObjectToXform->NumFaces, NumVertices;
|
||||
int i, j, NumFaces = ObjectToXform->NumFaces, NumVertices;
|
||||
int * VertNumsPtr;
|
||||
Face * FacePtr = ObjectToXform->FaceList;
|
||||
Point * ScreenPoints = ObjectToXform->ScreenVertexList;
|
||||
Face * FacePtr = ObjectToXform->FaceList;
|
||||
Point * ScreenPoints = ObjectToXform->ScreenVertexList;
|
||||
long v1, v2, w1, w2;
|
||||
Point Vertices[MAX_POLY_LENGTH];
|
||||
PointListHeader Polygon;
|
||||
|
||||
/* Draw each visible face (polygon) of the object in turn */
|
||||
for (i=0; i<NumFaces; i++, FacePtr++) {
|
||||
NumVertices = FacePtr->NumVerts;
|
||||
for (i=0; i<NumFaces; i++, FacePtr++) {
|
||||
NumVertices = FacePtr->NumVerts;
|
||||
/* Copy over the face's vertices from the vertex list */
|
||||
for (j=0, VertNumsPtr=FacePtr->VertNums; j<NumVertices; j++)
|
||||
for (j=0, VertNumsPtr=FacePtr->VertNums; j<NumVertices; j++)
|
||||
Vertices[j] = ScreenPoints[*VertNumsPtr++];
|
||||
/* Draw only if outside face showing (if the normal to the
|
||||
polygon points toward viewer; that is, has a positive Z component) */
|
||||
|
|
@ -101,40 +101,40 @@ void DrawPObject(PObject * ObjectToXform)
|
|||
w1 = Vertices[NumVertices-1].X - Vertices[0].X;
|
||||
v2 = Vertices[1].Y - Vertices[0].Y;
|
||||
w2 = Vertices[NumVertices-1].Y - Vertices[0].Y;
|
||||
if ((v1*w2 - v2*w1) > 0) {
|
||||
if ((v1*w2 - v2*w1) > 0) {
|
||||
/* It is facing the screen, so draw */
|
||||
/* Appropriately adjust the extent of the rectangle used to
|
||||
erase this object later */
|
||||
for (j=0; j<NumVertices; j++) {
|
||||
if (Vertices[j].X >
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Right)
|
||||
if (Vertices[j].X < SCREEN_WIDTH)
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Right =
|
||||
for (j=0; j<NumVertices; j++) {
|
||||
if (Vertices[j].X >
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Right)
|
||||
if (Vertices[j].X < SCREEN_WIDTH)
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Right =
|
||||
Vertices[j].X;
|
||||
else ObjectToXform->EraseRect[NonDisplayedPage].Right =
|
||||
else ObjectToXform->EraseRect[NonDisplayedPage].Right =
|
||||
SCREEN_WIDTH;
|
||||
if (Vertices[j].Y >
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Bottom)
|
||||
if (Vertices[j].Y < SCREEN_HEIGHT)
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Bottom =
|
||||
if (Vertices[j].Y >
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Bottom)
|
||||
if (Vertices[j].Y < SCREEN_HEIGHT)
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Bottom =
|
||||
Vertices[j].Y;
|
||||
else ObjectToXform->EraseRect[NonDisplayedPage].Bottom=
|
||||
else ObjectToXform->EraseRect[NonDisplayedPage].Bottom=
|
||||
SCREEN_HEIGHT;
|
||||
if (Vertices[j].X <
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Left)
|
||||
if (Vertices[j].X > 0)
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Left =
|
||||
if (Vertices[j].X <
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Left)
|
||||
if (Vertices[j].X > 0)
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Left =
|
||||
Vertices[j].X;
|
||||
else ObjectToXform->EraseRect[NonDisplayedPage].Left=0;
|
||||
if (Vertices[j].Y <
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Top)
|
||||
if (Vertices[j].Y > 0)
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Top =
|
||||
else ObjectToXform->EraseRect[NonDisplayedPage].Left=0;
|
||||
if (Vertices[j].Y <
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Top)
|
||||
if (Vertices[j].Y > 0)
|
||||
ObjectToXform->EraseRect[NonDisplayedPage].Top =
|
||||
Vertices[j].Y;
|
||||
else ObjectToXform->EraseRect[NonDisplayedPage].Top=0;
|
||||
else ObjectToXform->EraseRect[NonDisplayedPage].Top=0;
|
||||
}
|
||||
/* Draw the polygon */
|
||||
DRAW_POLYGON(Vertices, NumVertices, FacePtr->Color, 0, 0);
|
||||
DRAW_POLYGON(Vertices, NumVertices, FacePtr->Color, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue