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

  1.                                 // Example: 145 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. #include <stdio.h>
  4. short    random;
  5. short  main(void)
  6. {
  7.   dddInitKeybd();
  8.   while  (dddkeycode!=_ESC)
  9.   {
  10.     random = dddRnd();
  11.     if  (dddkeypressed[_SPACE]) // Check to see if space bar is pressed.
  12.     {
  13.       dddSetRnd(1000);          // Set the random number to a known value.
  14.     }
  15.     printf("The random value is %d\n",random);
  16.   }
  17.   dddRestoreKeybd();
  18.   return 0;                     // Bye.
  19. }
  20.