home *** CD-ROM | disk | FTP | other *** search
- // Example: 33 from Library Reference
- #include "..\3D-Ware\dddware.h"
- #include <stdio.h>
- short count, ShapeHandle;
- long size, max =0;
- char buffer[128];
- short main(void)
- {
- dddSelectEmmAmount(1); // Request 1k of EMM.
- dddInitAll();
-
- dddSetLogbase2CurrentDisplay();
-
- size = dddGetFileSize("EXAMPLE.3D");
-
- while (!dddkeycode)
- {
- ShapeHandle = (dddShapeLoad("EXAMPLE.3D")); // Load the .3D data file.
- max += size;
- dddEmmRelease();
- count++;
-
- dddBox(0,127,20,210,26);
- sprintf(buffer,"Loaded \"Example.3d\" %d times.",count);
- dddMedPrint(1,2,20,buffer);
-
- dddBox(0,167,30,290,40);
- sprintf(buffer,"This would normally require %dk of memory.",max/1024);
- dddMedPrint(1,2,30,buffer);
-
- dddScreenSwap(); // Flip the real screen and the dummy screen.
-
- }
- dddRestoreAll();
- return 0; // Bye.
- }
-