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

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