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

  1.                                                // Example: 33 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. #include <stdio.h>
  4. short    count, ShapeHandle;
  5. long     size, max =0;
  6. char     buffer[128];
  7. short  main(void)
  8. {
  9.   dddSelectEmmAmount(1);                       // Request 1k of EMM.
  10.   dddInitAll();
  11.  
  12.   dddSetLogbase2CurrentDisplay();
  13.  
  14.   size = dddGetFileSize("EXAMPLE.3D");
  15.  
  16.   while  (!dddkeycode)
  17.   {
  18.     ShapeHandle = (dddShapeLoad("EXAMPLE.3D"));  // Load the .3D data file.
  19.     max += size;
  20.     dddEmmRelease();
  21.     count++;
  22.  
  23.     dddBox(0,127,20,210,26);
  24.     sprintf(buffer,"Loaded \"Example.3d\" %d times.",count);
  25.     dddMedPrint(1,2,20,buffer);
  26.  
  27.     dddBox(0,167,30,290,40);
  28.     sprintf(buffer,"This would normally require %dk of memory.",max/1024);
  29.     dddMedPrint(1,2,30,buffer);
  30.  
  31.     dddScreenSwap();                           // Flip the real screen and the dummy screen.
  32.  
  33.   }
  34.   dddRestoreAll();
  35.   return 0;                                    // Bye.
  36. }
  37.