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

  1.                                               // Example: 051 from Library Reference
  2. #include "..\3D-Ware\dddware.h"
  3. #include <stdio.h>
  4.  
  5. short    main(void)
  6. {
  7.     dddInitKeybd();
  8.  
  9.     while    (!dddkeycode)
  10.     {
  11.         dddGetJoystickPos();
  12.         printf("Joystick Xpos is %d\t",dddmouse_x);
  13.         printf("Joystick Ypos is %d\t",dddmouse_y);
  14.         printf("Joystick button 1 is %d\t",joystick_left_button);
  15.         printf("Joystick button 2 is %d\n",joystick_right_button);
  16.     }
  17.     dddRestoreKeybd();
  18.     return 0;
  19. }
  20.