home *** CD-ROM | disk | FTP | other *** search
- // Example: 171 from Library Reference
- #include "..\3D-Ware\dddware.h"
- // Color 2, 4 points, square clockwise poly.
- short PolyCoords[] = {2,4,50,50,100,50,100,100,50,100};
- char fname[] = {"iffpic.lbm"}; // The filename we choose as the output filename.
- short main(void)
- {
- dddLoadColors("EXAMPLE.COL"); // Load in the color palette called 'example.col' to 'standardpal'.
- dddInitVideo(); // Sets up video to mode 19 VGA 320*200 256 cols.
- dddSetPal(dddstandardpal); // Set up the palette.
- dddInit3d(); // MUST be before any calls to 3D-Ware libraries
- dddCls(); // Clear the graphics screen.
- dddScreenSwap(); // Initialise the screen swapping.
- dddDrawPoly(PolyCoords); // Draw a polygon to the dummy screen.
- dddScreenSwap(); // Flip the real screen and the dummy screen.
- dddDrawPoly(PolyCoords); // Draw the polygon to the dummy screen.
- dddWriteIff(fname, dddstandardpal, 1); // Write out the contents of the dummy screen which
- // logbase is refering to.
- dddRestoreVideo(); // Reset video mode to original.
- dddClose3d(); // Clean up behind ourselves.
- return 0; // Bye.
- }
-