home *** CD-ROM | disk | FTP | other *** search
- // Example: 014 from Library Reference
- #include "..\3D-Ware\dddware.h"
- #include <stdio.h>
- char colors[768];
- short result;
- short main(void)
- {
- dddInitVideo(); // Init the graphics screen.
- dddLoadColors("BLACK.COL"); // Load in the color palette called 'example.col' to 'standardpal'.
- dddSetPal(dddstandardpal); // Set the VGA color registers to this palette.
- dddStrnSet(colors, 0, 768); // Set the whole of a 768 byte array to value 0
- // byte array called 'colors' to zero.
- dddRestoreVideo(); // Retore normal video operations.
- result = (dddCmpsPal(colors)); // Do the compare.
- if (result)
- {
- puts("The color palettes match each-other."); // Success.
- }
- else
- {
- // Failure.
- puts("The color palettes do not match each-other.");
- }
- return 0; // Bye.
- }
-