home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Graphics / graphics-16000.iso / msdos / animutil / fastgfx / fg110c / 12-11.c < prev    next >
Text File  |  1992-01-30  |  431b  |  25 lines

  1. #include <fastgraf.h>
  2. #include <stdio.h>
  3.  
  4. void main(void);
  5.  
  6. void main()
  7. {
  8.    int b, x, y;
  9.  
  10.    fg_initjoy(1);
  11.    fg_initjoy(2);
  12.  
  13.    while (1) {
  14.       x = fg_getxjoy(1);
  15.       y = fg_getyjoy(1);
  16.       b = fg_button(1);
  17.       printf("1:  %3d %3d %1d\n",x,y,b);
  18.       x = fg_getxjoy(2);
  19.       y = fg_getyjoy(2);
  20.       b = fg_button(2);
  21.       printf("2:  %3d %3d %1d\n\n",x,y,b);
  22.       fg_waitfor(9);
  23.       }
  24. }
  25.