home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Madness / VRMAD96_ONE.ISO / virtek / libex / libex173.c < prev   
C/C++ Source or Header  |  1995-08-24  |  1KB  |  26 lines

  1.                                               // Example: 173 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. short    Xpos, Ypos, X1pos, Y1pos;
  4. short    X, Y, X1, Y1, count;
  5. short  main(void)
  6. {
  7.   dddLoadColors("EXAMPLE.COL");               // Load in the color palette called 'example.col' to 'standardpal'.
  8.   dddInitVideo();
  9.   dddSetPal(dddstandardpal);
  10.   X  = Y  = 0;
  11.   X1 = Y1 = 10;
  12.   for (count=0; count<180; count++)           // Loop so that we can draw a few boxes.
  13.   {
  14.     Xpos  = X+count;                          // Set up left of  the box.
  15.     X1pos = X1+count;                         // Set up the right of the box.
  16.     Ypos  = Y+count;                          // Set up the top of the box
  17.     Y1pos = Y1+count;                         // Set up the bottom of the box.
  18.     dddXBox(count, Xpos, Ypos, X1pos, Y1pos); // Xor the box on the dummy screen.
  19.     dddScreenSwap();                          // Swap the screens so we can see the box.
  20.     dddXBox(count, Xpos, Ypos, X1pos, Y1pos); // Xor the box on the dummy screen.
  21.     dddScreenSwap();                          // Swap the screens so we can see the box.
  22.   }
  23.   dddRestoreVideo();                          // Restore the users display.
  24.   return 0;                                   // Sayonarra.
  25. }
  26.