home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Virtual Reality Madness
/
VRMAD96_ONE.ISO
/
virtek
/
libex
/
libex145.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-24
|
525b
|
20 lines
// Example: 145 from Library Reference
#include "..\3D-Ware\dddware.h"
#include <stdio.h>
short random;
short main(void)
{
dddInitKeybd();
while (dddkeycode!=_ESC)
{
random = dddRnd();
if (dddkeypressed[_SPACE]) // Check to see if space bar is pressed.
{
dddSetRnd(1000); // Set the random number to a known value.
}
printf("The random value is %d\n",random);
}
dddRestoreKeybd();
return 0; // Bye.
}