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
38
40-03.html
38
40-03.html
|
|
@ -44,11 +44,11 @@
|
|||
<PRE>
|
||||
/* Draws all pixels in the horizontal line segment passed in, from
|
||||
(LeftX,Y) to (RightX,Y), in the specified color in mode 13h, the
|
||||
VGA’s 320x200 256-color mode. Both LeftX and RightX are drawn. No
|
||||
VGA’s 320x200 256-color mode. Both LeftX and RightX are drawn. No
|
||||
drawing will take place if LeftX > RightX. */
|
||||
|
||||
#include <dos.h>
|
||||
#include “polygon.h”
|
||||
#include “polygon.h”
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_SEGMENT 0xA000
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
|
||||
/* Draw each pixel in the horizontal line segment, starting with
|
||||
the leftmost one */
|
||||
for (X = LeftX; X <= RightX; X++)
|
||||
for (X = LeftX; X <= RightX; X++)
|
||||
DrawPixel(X, Y, Color);
|
||||
}
|
||||
|
||||
|
|
@ -69,10 +69,10 @@
|
|||
unsigned char far *ScreenPtr;
|
||||
|
||||
#ifdef __TURBOC__
|
||||
ScreenPtr = MK_FP(SCREEN_SEGMENT, Y * SCREEN_WIDTH + X);
|
||||
ScreenPtr = MK_FP(SCREEN_SEGMENT, Y * SCREEN_WIDTH + X);
|
||||
#else /* MSC 5.0 */
|
||||
FP_SEG(ScreenPtr) = SCREEN_SEGMENT;
|
||||
FP_OFF(ScreenPtr) = Y * SCREEN_WIDTH + X;
|
||||
FP_OFF(ScreenPtr) = Y * SCREEN_WIDTH + X;
|
||||
#endif
|
||||
*ScreenPtr = (unsigned char) Color;
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
|
||||
#include <conio.h>
|
||||
#include <dos.h>
|
||||
#include “polygon.h”
|
||||
#include “polygon.h”
|
||||
|
||||
#define DRAW_POLYGON(PointList,Color,Shape,X,Y) \
|
||||
Polygon.Length = sizeof(PointList)/sizeof(struct Point); \
|
||||
|
|
@ -153,8 +153,8 @@
|
|||
static struct Point Triangle4[] = {{20,20},{20,0},{0,10}};
|
||||
union REGS regset;
|
||||
|
||||
/* Set the display to VGA mode 13h, 320×200 256-color mode */
|
||||
regset.x.ax = 0×0013;
|
||||
/* Set the display to VGA mode 13h, 320x200 256-color mode */
|
||||
regset.x.ax = 0x0013;
|
||||
int86(0x10, ®set, ®set);
|
||||
|
||||
/* Draw three complex polygons */
|
||||
|
|
@ -166,30 +166,30 @@
|
|||
getch(); /* wait for a keypress */
|
||||
|
||||
/* Draw some adjacent nonconvex polygons */
|
||||
for (i=0; i<5; i++) {
|
||||
for (j=0; j<8; j++) {
|
||||
DRAW_POLYGON(Polygon4, 16+i*8+j, NONCONVEX, 40+(i*60),
|
||||
30+(j*20));
|
||||
for (i=0; i<5; i++) {
|
||||
for (j=0; j<8; j++) {
|
||||
DRAW_POLYGON(Polygon4, 16+i*8+j, NONCONVEX, 40+(i*60),
|
||||
30+(j*20));
|
||||
}
|
||||
}
|
||||
getch(); /* wait for a keypress */
|
||||
|
||||
/* Draw adjacent triangles across the screen */
|
||||
for (j=0; j<=80; j+=20) {
|
||||
for (i=0; i<290; i += 30) {
|
||||
for (j=0; j<=80; j+=20) {
|
||||
for (i=0; i<290; i += 30) {
|
||||
DRAW_POLYGON(Triangle1, 2, CONVEX, i, j);
|
||||
DRAW_POLYGON(Triangle2, 4, CONVEX, i+15, j);
|
||||
DRAW_POLYGON(Triangle2, 4, CONVEX, i+15, j);
|
||||
}
|
||||
}
|
||||
for (j=100; j<=170; j+=20) {
|
||||
for (j=100; j<=170; j+=20) {
|
||||
/* Do a row of pointing-right triangles */
|
||||
for (i=0; i<290; i += 20) {
|
||||
for (i=0; i<290; i += 20) {
|
||||
DRAW_POLYGON(Triangle3, 40, CONVEX, i, j);
|
||||
}
|
||||
/* Do a row of pointing-left triangles halfway between one row
|
||||
of pointing-right triangles and the next, to fit between */
|
||||
for (i=0; i<290; i += 20) {
|
||||
DRAW_POLYGON(Triangle4, 1, CONVEX, i, j+10);
|
||||
for (i=0; i<290; i += 20) {
|
||||
DRAW_POLYGON(Triangle4, 1, CONVEX, i, j+10);
|
||||
}
|
||||
}
|
||||
getch(); /* wait for a keypress */
|
||||
|
|
|
|||
Loading…
Reference in a new issue