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
92
52-05.html
92
52-05.html
|
|
@ -41,8 +41,8 @@
|
|||
<PRE>
|
||||
/* Initializes the cubes and adds them to the object list. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include “polygon.h”
|
||||
|
||||
#define ROT_6 (M_PI / 30.0) /* rotate 6 degrees at a time */
|
||||
|
|
@ -99,64 +99,64 @@ void InitializeCubes()
|
|||
int i, j, k;
|
||||
PObject *WorkingCube;
|
||||
|
||||
for (i=0; i<NUM_CUBES; i++) {
|
||||
for (i=0; i<NUM_CUBES; i++) {
|
||||
if ((WorkingCube = malloc(sizeof(PObject))) == NULL) {
|
||||
printf(“Couldn't get memory\n”); exit(1); }
|
||||
WorkingCube->DrawFunc = DrawPObject;
|
||||
WorkingCube->RecalcFunc = XformAndProjectPObject;
|
||||
WorkingCube->MoveFunc = RotateAndMovePObject;
|
||||
WorkingCube->RecalcXform = 1;
|
||||
for (k=0; k<2; k++) {
|
||||
WorkingCube->EraseRect[k].Left =
|
||||
WorkingCube->EraseRect[k].Top = 0x7FFF;
|
||||
WorkingCube->EraseRect[k].Right = 0;
|
||||
WorkingCube->EraseRect[k].Bottom = 0;
|
||||
WorkingCube->DrawFunc = DrawPObject;
|
||||
WorkingCube->RecalcFunc = XformAndProjectPObject;
|
||||
WorkingCube->MoveFunc = RotateAndMovePObject;
|
||||
WorkingCube->RecalcXform = 1;
|
||||
for (k=0; k<2; k++) {
|
||||
WorkingCube->EraseRect[k].Left =
|
||||
WorkingCube->EraseRect[k].Top = 0x7FFF;
|
||||
WorkingCube->EraseRect[k].Right = 0;
|
||||
WorkingCube->EraseRect[k].Bottom = 0;
|
||||
}
|
||||
WorkingCube->RDelayCount = InitRDelayCounts[i];
|
||||
WorkingCube->RDelayCountBase = BaseRDelayCounts[i];
|
||||
WorkingCube->MDelayCount = InitMDelayCounts[i];
|
||||
WorkingCube->MDelayCountBase = BaseMDelayCounts[i];
|
||||
/* Set the object->world xform to none */
|
||||
for (j=0; j<3; j++)
|
||||
for (k=0; k<4; k++)
|
||||
WorkingCube->XformToWorld[j][k] = INT_TO_FIXED(0);
|
||||
WorkingCube->XformToWorld[0][0] =
|
||||
WorkingCube->XformToWorld[1][1] =
|
||||
WorkingCube->XformToWorld[2][2] =
|
||||
WorkingCube->XformToWorld[3][3] = INT_TO_FIXED(1);
|
||||
WorkingCube->RDelayCount = InitRDelayCounts[i];
|
||||
WorkingCube->RDelayCountBase = BaseRDelayCounts[i];
|
||||
WorkingCube->MDelayCount = InitMDelayCounts[i];
|
||||
WorkingCube->MDelayCountBase = BaseMDelayCounts[i];
|
||||
/* Set the object->world xform to none */
|
||||
for (j=0; j<3; j++)
|
||||
for (k=0; k<4; k++)
|
||||
WorkingCube->XformToWorld[j][k] = INT_TO_FIXED(0);
|
||||
WorkingCube->XformToWorld[0][0] =
|
||||
WorkingCube->XformToWorld[1][1] =
|
||||
WorkingCube->XformToWorld[2][2] =
|
||||
WorkingCube->XformToWorld[3][3] = INT_TO_FIXED(1);
|
||||
/* Set the initial location */
|
||||
for (j=0; j<3; j++) WorkingCube->XformToWorld[j][3] =
|
||||
for (j=0; j<3; j++) WorkingCube->XformToWorld[j][3] =
|
||||
INT_TO_FIXED(CubeStartCoords[i][j]);
|
||||
WorkingCube->NumVerts = NUM_CUBE_VERTS;
|
||||
WorkingCube->VertexList = CubeVerts;
|
||||
WorkingCube->NumFaces = NUM_CUBE_FACES;
|
||||
WorkingCube->Rotate = InitialRotate[i];
|
||||
WorkingCube->Move.MoveX = INT_TO_FIXED(InitialMove[i].MoveX);
|
||||
WorkingCube->Move.MoveY = INT_TO_FIXED(InitialMove[i].MoveY);
|
||||
WorkingCube->Move.MoveZ = INT_TO_FIXED(InitialMove[i].MoveZ);
|
||||
WorkingCube->Move.MinX = INT_TO_FIXED(InitialMove[i].MinX);
|
||||
WorkingCube->Move.MinY = INT_TO_FIXED(InitialMove[i].MinY);
|
||||
WorkingCube->Move.MinZ = INT_TO_FIXED(InitialMove[i].MinZ);
|
||||
WorkingCube->Move.MaxX = INT_TO_FIXED(InitialMove[i].MaxX);
|
||||
WorkingCube->Move.MaxY = INT_TO_FIXED(InitialMove[i].MaxY);
|
||||
WorkingCube->Move.MaxZ = INT_TO_FIXED(InitialMove[i].MaxZ);
|
||||
if ((WorkingCube->XformedVertexList =
|
||||
WorkingCube->NumVerts = NUM_CUBE_VERTS;
|
||||
WorkingCube->VertexList = CubeVerts;
|
||||
WorkingCube->NumFaces = NUM_CUBE_FACES;
|
||||
WorkingCube->Rotate = InitialRotate[i];
|
||||
WorkingCube->Move.MoveX = INT_TO_FIXED(InitialMove[i].MoveX);
|
||||
WorkingCube->Move.MoveY = INT_TO_FIXED(InitialMove[i].MoveY);
|
||||
WorkingCube->Move.MoveZ = INT_TO_FIXED(InitialMove[i].MoveZ);
|
||||
WorkingCube->Move.MinX = INT_TO_FIXED(InitialMove[i].MinX);
|
||||
WorkingCube->Move.MinY = INT_TO_FIXED(InitialMove[i].MinY);
|
||||
WorkingCube->Move.MinZ = INT_TO_FIXED(InitialMove[i].MinZ);
|
||||
WorkingCube->Move.MaxX = INT_TO_FIXED(InitialMove[i].MaxX);
|
||||
WorkingCube->Move.MaxY = INT_TO_FIXED(InitialMove[i].MaxY);
|
||||
WorkingCube->Move.MaxZ = INT_TO_FIXED(InitialMove[i].MaxZ);
|
||||
if ((WorkingCube->XformedVertexList =
|
||||
malloc(NUM_CUBE_VERTS*sizeof(Point3))) == NULL) {
|
||||
printf(“Couldn't get memory\n”); exit(1); }
|
||||
if ((WorkingCube->ProjectedVertexList =
|
||||
if ((WorkingCube->ProjectedVertexList =
|
||||
malloc(NUM_CUBE_VERTS*sizeof(Point3))) == NULL) {
|
||||
printf(“Couldn't get memory\n”); exit(1); }
|
||||
if ((WorkingCube->ScreenVertexList =
|
||||
if ((WorkingCube->ScreenVertexList =
|
||||
malloc(NUM_CUBE_VERTS*sizeof(Point))) == NULL) {
|
||||
printf(“Couldn't get memory\n”); exit(1); }
|
||||
if ((WorkingCube->FaceList =
|
||||
if ((WorkingCube->FaceList =
|
||||
malloc(NUM_CUBE_FACES*sizeof(Face))) == NULL) {
|
||||
printf(“Couldn't get memory\n”); exit(1); }
|
||||
/* Initialize the faces */
|
||||
for (j=0; j<NUM_CUBE_FACES; j++) {
|
||||
WorkingCube->FaceList[j].VertNums = VertNumList[j];
|
||||
WorkingCube->FaceList[j].NumVerts = VertsInFace[j];
|
||||
WorkingCube->FaceList[j].Color = Colors[i][j];
|
||||
for (j=0; j<NUM_CUBE_FACES; j++) {
|
||||
WorkingCube->FaceList[j].VertNums = VertNumList[j];
|
||||
WorkingCube->FaceList[j].NumVerts = VertsInFace[j];
|
||||
WorkingCube->FaceList[j].Color = Colors[i][j];
|
||||
}
|
||||
ObjectList[NumObjects++] = (Object *)WorkingCube;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue