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

  1.                                    // Example: 110 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. #include  <stdio.h>
  4. #include  <stdlib.h>
  5. short  main(void)
  6. {
  7.   dddInitVideo();                  // Sets up video to mode 19 VGA 320*200 256 cols.
  8.   dddInit3d();                     // MUST be before any calls to 3D-Ware libraries
  9.   dddInitKeybd();
  10.   dddScreenSwap();                 // Initialise the screen swapping.
  11.   if  (!dddReadRaw("EXAMPLE.RAW")) // Read in the 320*200 256 + colors .RAW file.
  12.   {
  13.       dddRestoreKeybd();
  14.     dddRestoreVideo();             // Reset video mode to original.
  15.     dddClose3d();                  // Clean up behind ourselves.
  16.     puts("** ERROR ** File not found.");
  17.     exit (0);                      // Bye.
  18.   }
  19.   dddSetPal(ddduserpal);           // Set up the palette.
  20.   dddScreenSwap();
  21.   while(!dddkeycode);              // Wait for a key to be pressed.
  22.   dddRestoreKeybd();
  23.   dddRestoreVideo();               // Reset video mode to original.
  24.   dddClose3d();                    // Clean up behind ourselves.
  25.   return 0;                        // Bye.
  26. }
  27.