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

  1.                                    // Example: 062 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. short    VXangle=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();
  9.   dddSetPal(dddstandardpal);
  10.   dddInit3d();
  11.   dddSetClipArea(0,319,0,199);
  12.   dddSetHorizonClip(0,319,0,199,100);
  13.   for (count=0; count<100; count++)
  14.   {
  15.     VXangle+=0x40;                 // Rotate around slowly in the X plane.
  16.     VZangle+=0x400;                // Rotate around fast in the Z plane.
  17.     VZangle=(VZangle & 0xFFC0);    // Make sure we have values between 0 and 0xFFC0
  18.     dddHorizon(VXangle, VZangle);  // Draw the horizon on the screen.
  19.     dddScreenSwap();
  20.   }
  21.   dddRestoreVideo();
  22.   dddClose3d();
  23.   return 0;
  24. }
  25.