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

  1. /*
  2.  *    m_graph_cursor.c
  3.  *
  4.  *    Public Domain (p) March 1990 By Rodney Loos
  5.  *    Syntax modified by S. Sampson
  6.  */
  7.  
  8. #include <dos.h>
  9. #include "mouse.h"
  10.  
  11. /*
  12.  *    Create a graphic cursor
  13.  */
  14.  
  15. void m_graph_cursor(int x_hot, int y_hot, void far *cmask)
  16. {
  17.     struct    SREGS    msregs;
  18.     union    REGS    mousreg;
  19.     unsigned  maskseg, maskoff;
  20.  
  21.     maskseg = FP_SEG(cmask);
  22.     maskoff = FP_OFF(cmask);
  23.  
  24.     mousreg.x.ax = 9;
  25.     mousreg.x.bx = x_hot;        /* horizontal hot spot of cursor */
  26.     mousreg.x.cx = y_hot;        /* vertical hot spot of cursor */
  27.     mousreg.x.dx = maskoff;        /* offset of mask  */
  28.  
  29.     segread(&msregs);        /* copy the current segment registers to msregs */
  30.     msregs.es = maskseg;        /* segment address of cursor mask */
  31.     int86x(0x33, &mousreg, &mousreg, &msregs);
  32. }
  33.