home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex165.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
1KB
|
31 lines
// Example: 165 from Library Reference
#include "..\3D-Ware\dddware.h"
short Xpos=0, Ypos=0, Zpos=500;
short Xangle=0, Yangle=0, Zangle=0;
short VXpos=0, VYpos=0, VZpos=0;
short VXangle=0, VYangle=0, VZangle=0;
short ShapeHandle;
char Semaphores;
short main(void)
{
dddInitAll();
ShapeHandle = (dddShapeLoad("EXAMPLE.3D")); // Load the .3D data file.
dddSetViewPos16(VXpos,VYpos,VZpos); // Set the viewers angles in the 3D engine.
while (!dddkeycode) // Loop a few times.
{
dddHoriFade(0,0);
dddPrint7(2,70,0,"PRESS ANY KEY TO EXIT");
Yangle += 0x200; // Rotate the shape in the Y plane.
Zangle += 0xc0; // Rotate the shape in the Z plane.
dddSetViewAngles(VXangle,VYangle,VZangle); // Set the viewers angles.
dddClearObjects(); // Clear the viewing table.
dddInsertObject16(DRW_MOBILE,ShapeHandle,Semaphores,Xpos,Ypos,Zpos,Xangle,Yangle,Zangle);
// Insert on object to be rendered.
dddDrawObjects(); // Render all 3D objects we have inserted.
dddSubBox(255,100,70,230,160);
dddScreenSwap(); // Flip the real screen and the dummy screen.
}
dddRestoreAll();
return 0; // Bye.
}