home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex110.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
1KB
|
27 lines
// Example: 110 from Library Reference
#include "..\3D-Ware\dddware.h"
#include <stdio.h>
#include <stdlib.h>
short main(void)
{
dddInitVideo(); // Sets up video to mode 19 VGA 320*200 256 cols.
dddInit3d(); // MUST be before any calls to 3D-Ware libraries
dddInitKeybd();
dddScreenSwap(); // Initialise the screen swapping.
if (!dddReadRaw("EXAMPLE.RAW")) // Read in the 320*200 256 + colors .RAW file.
{
dddRestoreKeybd();
dddRestoreVideo(); // Reset video mode to original.
dddClose3d(); // Clean up behind ourselves.
puts("** ERROR ** File not found.");
exit (0); // Bye.
}
dddSetPal(ddduserpal); // Set up the palette.
dddScreenSwap();
while(!dddkeycode); // Wait for a key to be pressed.
dddRestoreKeybd();
dddRestoreVideo(); // Reset video mode to original.
dddClose3d(); // Clean up behind ourselves.
return 0; // Bye.
}