home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex173.c
< prev
Wrap
C/C++ Source or Header
|
1995-08-24
|
1KB
|
26 lines
// Example: 173 from Library Reference
#include "..\3D-Ware\dddware.h"
short Xpos, Ypos, X1pos, Y1pos;
short X, Y, X1, Y1, count;
short main(void)
{
dddLoadColors("EXAMPLE.COL"); // Load in the color palette called 'example.col' to 'standardpal'.
dddInitVideo();
dddSetPal(dddstandardpal);
X = Y = 0;
X1 = Y1 = 10;
for (count=0; count<180; count++) // Loop so that we can draw a few boxes.
{
Xpos = X+count; // Set up left of the box.
X1pos = X1+count; // Set up the right of the box.
Ypos = Y+count; // Set up the top of the box
Y1pos = Y1+count; // Set up the bottom of the box.
dddXBox(count, Xpos, Ypos, X1pos, Y1pos); // Xor the box on the dummy screen.
dddScreenSwap(); // Swap the screens so we can see the box.
dddXBox(count, Xpos, Ypos, X1pos, Y1pos); // Xor the box on the dummy screen.
dddScreenSwap(); // Swap the screens so we can see the box.
}
dddRestoreVideo(); // Restore the users display.
return 0; // Sayonarra.
}