home *** CD-ROM | disk | FTP | other *** search
/ Virtual Reality Zone / VRZONE.ISO / mac / PC / PCGLOVE / GLOVE / PREVIOUS / TEST.C < prev   
C/C++ Source or Header  |  1991-10-28  |  377b  |  19 lines

  1. #include <stdio.h>
  2. #include "glove.h"
  3.  
  4. void main(int argc, char *argv[])
  5.     {
  6.     glove_data glov;
  7.     glove_init(argc > 1 ? atoi(argv[1]) : IHIRES, NULL);
  8.     while(!kbhit())
  9.         {
  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, 255&glov.rot,
  14.                 255&glov.fingers, 255&glov.keys);
  15.             }
  16.         }
  17.     glove_quit();
  18.     }
  19.