Replace invalid characters with HTML entities
— with — ’ with ’ + with + × with x ç with ç “ with “ ” with ” ‘ with ‘ • with • – with - µ with µ † with † Fix C++ θ with θ Yen symbol instead of times Fix broken apos Bullet again E-circumflex
This commit is contained in:
parent
9e52de9586
commit
500e7f5654
353 changed files with 5091 additions and 5091 deletions
30
51-03.html
30
51-03.html
|
|
@ -42,11 +42,11 @@
|
|||
/* 3D animation program to view a cube as it rotates in Mode X. The viewpoint
|
||||
is fixed at the origin (0,0,0) of world space, looking in the direction of
|
||||
increasingly negative Z. A right-handed coordinate system is used throughout.
|
||||
All C code tested with Borland C++ in C compilation mode. */
|
||||
All C code tested with Borland C++ in C compilation mode. */
|
||||
#include <conio.h>
|
||||
#include <dos.h>
|
||||
#include <math.h>
|
||||
#include “polygon.h”
|
||||
#include “polygon.h”
|
||||
|
||||
#define ROTATION (M_PI / 30.0) /* rotate by 6 degrees at a time */
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ struct Rect EraseRect[2] = { {0, 0, SCREEN_WIDTH, SCREEN_HEIGHT},
|
|||
static unsigned int PageStartOffsets[2] =
|
||||
{PAGE0_START_OFFSET,PAGE1_START_OFFSET};
|
||||
int DisplayedPage, NonDisplayedPage;
|
||||
/* Transformation from cube’s object space to world space. Initially
|
||||
/* Transformation from cube’s object space to world space. Initially
|
||||
set up to perform no rotation and to move the cube into world
|
||||
space -100 units away from the origin down the Z axis. Given the
|
||||
viewing point, -100 down the Z axis means 100 units away in the
|
||||
|
|
@ -149,25 +149,25 @@ void main() {
|
|||
switch (getch()) {
|
||||
case 0x1B: /* Esc to exit */
|
||||
Done = 1; break;
|
||||
case ‘A’: case ‘a’: /* away (-Z) */
|
||||
case ‘A’: case ‘a’: /* away (-Z) */
|
||||
CubeWorldXform[2][3] -= 3.0; RecalcXform = 1; break;
|
||||
case ‘T’: /* towards (+Z). Don’t allow to get too */
|
||||
case ‘t’: /* close, so Z clipping isn’t needed */
|
||||
case ‘T’: /* towards (+Z). Don’t allow to get too */
|
||||
case ‘t’: /* close, so Z clipping isn’t needed */
|
||||
if (CubeWorldXform[2][3] < -40.0) {
|
||||
CubeWorldXform[2][3] += 3.0;
|
||||
CubeWorldXform[2][3] += 3.0;
|
||||
RecalcXform = 1;
|
||||
}
|
||||
break;
|
||||
case ‘4’: /* rotate clockwise around Y */
|
||||
case ‘4’: /* rotate clockwise around Y */
|
||||
AppendRotationY(CubeWorldXform, -ROTATION);
|
||||
RecalcXform=1; break;
|
||||
case ‘6’: /* rotate counterclockwise around Y */
|
||||
case ‘6’: /* rotate counterclockwise around Y */
|
||||
AppendRotationY(CubeWorldXform, ROTATION);
|
||||
RecalcXform=1; break;
|
||||
case ‘8’: /* rotate clockwise around X */
|
||||
case ‘8’: /* rotate clockwise around X */
|
||||
AppendRotationX(CubeWorldXform, -ROTATION);
|
||||
RecalcXform=1; break;
|
||||
case ‘2’: /* rotate counterclockwise around X */
|
||||
case ‘2’: /* rotate counterclockwise around X */
|
||||
AppendRotationX(CubeWorldXform, ROTATION);
|
||||
RecalcXform=1; break;
|
||||
case 0: /* extended code */
|
||||
|
|
@ -180,10 +180,10 @@ void main() {
|
|||
RecalcXform=1; break;
|
||||
case 0x4B: /* left (-X) */
|
||||
CubeWorldXform[0][3] -= 3.0; RecalcXform=1; break;
|
||||
case 0x4D: /* right (+X) */
|
||||
CubeWorldXform[0][3] += 3.0; RecalcXform=1; break;
|
||||
case 0x48: /* up (+Y) */
|
||||
CubeWorldXform[1][3] += 3.0; RecalcXform=1; break;
|
||||
case 0x4D: /* right (+X) */
|
||||
CubeWorldXform[0][3] += 3.0; RecalcXform=1; break;
|
||||
case 0x48: /* up (+Y) */
|
||||
CubeWorldXform[1][3] += 3.0; RecalcXform=1; break;
|
||||
case 0x50: /* down (-Y) */
|
||||
CubeWorldXform[1][3] -= 3.0; RecalcXform=1; break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue