home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name mograph - Set mouse graphics-mode cursor.
- *
- * Synopsis ercode = mograph(pmasks,hot_row,hot_col);
- *
- * int ercode Error return code:
- * MO_OK if successful;
- * MO_ABSENT if mouse not found.
- * const unsigned *pmasks
- * Address of array of 32 words
- * indicating dot or color pattern of
- * cursor.
- * int hot_row Row location of cursor's hot spot,
- * specified in pixels relative to row 0
- * at the top row of the cursor pattern.
- * int hot_col Column location of cursor's hot spot,
- * specified in pixels relative to column
- * 0 at the leftmost column of the
- * cursor pattern. In screen modes 4 and
- * 5, this value should be even.
- *
- * Description This function defines the shape, color, and center ("hot
- * spot") of the mouse cursor in graphics modes.
- *
- * The first sixteen words pointed to by pmasks
- * are the "screen mask", which indicates which
- * bits of the existing screen data should be ignored.
- * The next sixteen words are the "cursor mask",
- * which indicates which bits of the screen
- * data should be inverted.
- *
- * Example Here is the default graphics cursor, which is
- * automatically established when the mouse is reset. The
- * hot spot is at (-1,-1), which is just above and to the
- * left of the upper left corner of the bits shown.
- *
- * Screen mask:
- *
- * pmasks[ 0] = 0x9fff; 1001111111111111
- * pmasks[ 1] = 0x8fff; 1000111111111111
- * pmasks[ 2] = 0x87ff; 1000011111111111
- * pmasks[ 3] = 0x83ff; 1000001111111111
- * pmasks[ 4] = 0x81ff; 1000000111111111
- * pmasks[ 5] = 0x80ff; 1000000011111111
- * pmasks[ 6] = 0x807f; 1000000001111111
- * pmasks[ 7] = 0x803f; 1000000000111111
- * pmasks[ 8] = 0x801f; 1000000000011111
- * pmasks[ 9] = 0x800f; 1000000000001111
- * pmasks[10] = 0x80ff; 1000000011111111
- * pmasks[11] = 0x887f; 1000100001111111
- * pmasks[12] = 0x987f; 1001100001111111
- * pmasks[13] = 0xfc3f; 1111110000111111
- * pmasks[14] = 0xfc3f; 1111110000111111
- * pmasks[15] = 0xfeff; 1111111011111111
- *
- * Cursor mask:
- *
- * pmasks[16] = 0x0000; 0000000000000000
- * pmasks[17] = 0x2000; 0010000000000000
- * pmasks[18] = 0x3000; 0011000000000000
- * pmasks[19] = 0x3800; 0011100000000000
- * pmasks[20] = 0x3c00; 0011110000000000
- * pmasks[21] = 0x3e00; 0011111000000000
- * pmasks[22] = 0x3f00; 0011111100000000
- * pmasks[23] = 0x3f80; 0011111110000000
- * pmasks[24] = 0x3fc0; 0011111111000000
- * pmasks[25] = 0x3fe0; 0011111111100000
- * pmasks[26] = 0x3e00; 0011111000000000
- * pmasks[27] = 0x2300; 0010001100000000
- * pmasks[28] = 0x0300; 0000001100000000
- * pmasks[29] = 0x0180; 0000000110000000
- * pmasks[30] = 0x0180; 0000000110000000
- * pmasks[31] = 0x0000; 0000000000000000
- *
- * Returns ercode Error return code:
- * MO_OK if successful;
- * MO_ABSENT if mouse driver not installed.
- * b_mouse Number of mouse buttons (0 if no driver).
- *
- * Version 6.00 (C)Copyright Blaise Computing Inc. 1989
- *
- **/
-
- #include <bmouse.h>
-
- int mograph(pmasks,hot_row,hot_col)
- const unsigned *pmasks;
- int hot_row,hot_col;
- {
- DOSREG regs;
-
- regs.ax = 9;
- regs.bx = hot_col;
- regs.cx = hot_row;
- regs.dx = utoff(pmasks);
- regs.es = utseg(pmasks);
- return mogate(®s,®s);
- }