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

  1.                                                       // Example: 014 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. #include  <stdio.h>
  4. char     colors[768];
  5. short    result;
  6. short  main(void)
  7. {
  8.   dddInitVideo();                                     // Init the graphics screen.
  9.   dddLoadColors("BLACK.COL");                         // Load in the color palette called 'example.col' to 'standardpal'.
  10.   dddSetPal(dddstandardpal);                          // Set the VGA color registers to this palette.
  11.   dddStrnSet(colors, 0, 768);                         // Set the whole of a 768 byte array to value 0
  12.                                                       // byte array called 'colors' to zero.
  13.   dddRestoreVideo();                                  // Retore normal video operations.
  14.   result = (dddCmpsPal(colors));                      // Do the compare.
  15.   if  (result)
  16.   {
  17.     puts("The color palettes match each-other.");     // Success.
  18.   }
  19.   else
  20.   {
  21.                                                       // Failure.
  22.     puts("The color palettes do not match each-other.");
  23.   }
  24.   return 0;                                           // Bye.
  25. }
  26.