home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Zone / VRZONE.ISO / mac / PC / PCGLOVE / GLOVE / TEST.C < prev    next >
C/C++ Source or Header  |  1991-11-07  |  368b  |  21 lines

  1. #include <stdio.h>
  2. #include "glove.h"
  3.  
  4. void main()
  5.     {
  6.     glove_data glov;
  7.     glove_init(IHIRES, NULL);
  8.     printf("\n\n");
  9.     while(!kbhit())
  10.         if (glove_ready()) {
  11.             glove_read(&glov);
  12.             printf("%+4d %+4d %+4d %+4d %02.2X %02.2X \r",
  13.                 glov.x, glov.y, glov.z, glov.rot,
  14.                 glov.fingers & 0xFF, glov.keys & 0xFF);
  15.             }
  16.         else
  17.             glove_delay();
  18.     getch();
  19.     glove_quit();
  20.     }
  21.