home *** CD-ROM | disk | FTP | other *** search
- // Example: 019 from Library Reference
- #include "..\3D-Ware\dddware.h"
- short Xpos=0, Ypos=0, Zpos=400, VXpos=0, VYpos=0, VZpos=0;
- short Xangle=0, Yangle=0, Zangle=0;
- short VXangle=0, VYangle=0, VZangle=0;
- short ShapeHandle;
- char Semaphores;
- char far memptr[64000]={1,1};
- void main(void)
- {
- dddInitAll();
- ShapeHandle = (dddShapeLoad("EXAMPLE.3D")); // Load the .3D data file.
- dddSetViewPos16(VXpos,VYpos,VZpos); // Set the viewers angles in the 3D engine.
- dddCopyMemory2ScreenBuffer(memptr); // Copy memory with 2 pixels set.
- while (!dddkeycode)
- {
- dddCopyScreenBuffer2Logbase();
- dddClearObjects(); // Clear the viewing table.
- Yangle += 0x200; // Rotate the shape in the Y plane.
- Zangle += 0x200; // Rotate the shape in the Z plane.
- dddSetViewAngles(VXangle,VYangle,VZangle); // Set the viewers angles.
- dddInsertObject16(DRW_MOBILE,ShapeHandle,Semaphores,Xpos,Ypos,Zpos,Xangle,Yangle,Zangle);
- dddDrawObjects(); // Render all 3D objects we have inserted.
- dddScreenSwap(); // Flip the real screen and the dummy screen.
- }
- dddRestoreAll();
- }
-