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

  1.                                        // Example: 061 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. short    VXangle=0, VYangle=0, VZangle=0;
  4. short    count;
  5. short  main(void)
  6. {
  7.   dddLoadColors("EXAMPLE.COL");        // Load in the color palette called 'example.col' to 'standardpal'.
  8.   dddInitVideo();                      // Initialise the mode 19 (0x13) video screen.
  9.   dddSetPal(dddstandardpal);           // Set the VGA color resisters.
  10.   dddInit3d();                         // Initialise the 3D-Ware graphics code.
  11.   dddSetClipArea(0,319,0,199);         // Set up the clipping area for the full screen.
  12.   dddSetHorizonClip(0,319,0,199,100);  // Set up the horizon clipping area for the full screen.
  13.   for (count=0; count<100; count++)
  14.   {
  15.     VXangle+=0x40;                     // Rotate slowly around the Xangle.
  16.     VZangle+=0x40;                     // Rotate slowly around the Zangle.
  17.     dddHoriFade(VXangle, VZangle);     // Dump a banded horizon to the screen.
  18.     dddScreenSwap();
  19.   }
  20.   dddRestoreVideo();
  21.   dddClose3d();
  22.   return 0;                            // Ciao.
  23. }
  24.