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

  1.                                                // Example: 127 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. short    VXpos=0, VYpos=-20, VZpos=0, VXangle=0, VYangle=0, VZangle=0;
  4. short    Xpos=0, Ypos=0, Zpos=900, Xangle=0, Yangle=0, Zangle=0;
  5. short    ShapeHandle;
  6. char     Semaphores;
  7. short  main(void)
  8. {
  9.   dddSelectEmmAmount(1);                       // Request 1k of EMM.
  10.   dddInitAll();
  11.   ShapeHandle = (dddShapeLoad("EXAMPLE.3D"));  // Load the .3D data file.
  12.   while  (!dddkeycode)
  13.   {
  14.     dddSetViewPos16(VXpos,VYpos,VZpos);        // Set the viewers angles in the 3D world.
  15.     dddSetViewAngles(VXangle,VYangle,VZangle); // Set the viewers angles.
  16.     dddHoriFade(VXangle,VZangle);              // Clear the graphics screen.
  17.     dddDotGrid();
  18.     dddClearObjects();                         // Clear the viewing table.
  19.     Zangle += 0x100;
  20.     dddInsertObject16(DRW_MOBILE,ShapeHandle,Semaphores,Xpos,Ypos,Zpos,Xangle,Yangle,Zangle);
  21.                                                // Insert an object to be rendered.
  22.     dddDrawObjects();                          // Render all 3D objects we have inserted.
  23.     dddScreenSwap();                           // Flip the real screen and the dummy screen.
  24.   }
  25.   dddRestoreAll();
  26.   return 0;                                    // Bye.
  27. }
  28.  
  29.