home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c100 / 1.ddi / MOUSE.ZIP / M_MOTION.C < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-11  |  371 b   |  20 lines

  1. /*
  2.  *    m_motion.c
  3.  *
  4.  *    Public Domain (p) March 1990 By Rodney Loos
  5.  *    Syntax modified by S. Sampson
  6.  */
  7.  
  8. #include "mouse.h"
  9.  
  10. /* reads the motion of the mouse */
  11.  
  12. void m_motion(int *x, int *y)
  13. {
  14.     __Mpar->m1 = 11;
  15.     mouse(__Mpar);
  16.  
  17.     *x = __Mpar->m3;    /* horizontal distance since last call */
  18.     *y = __Mpar->m4;    /* vertical distance since last call   */
  19. }
  20.