home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex107.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
1KB
|
27 lines
// Example: 107 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 libraries !!!
dddInitKeybd();
dddScreenSwap(); // Initialise the screen swapping.
if (!dddReadPcx("EXAMPLE.PCX")) // Read in the 320*200 256 color PCX 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.
}