home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name grptread -- Read the color of a point
- *
- * Synopsis color = grptread(ppos);
- *
- * int color The color of the point at *ppos.
- * The color is in the range 0 to 3,
- * corresponding to the selected
- * palette.
- * PT *ppos Pointer to the coordinates of the point
- * whose color is returned.
- *
- * Description GRPTREAD returns the palette color associated with the
- * point on the current display page whose position is
- * given by *ppos.
- *
- * Returns color The color of the point at *ppos.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1983, 1984, 1986
- *
- * Version 3.02 March 20, 1987
- * Corrected the BIOS function number.
- *
- **/
-
- #include <bgraph.h>
- #include <bscreen.h>
-
- int grptread(ppos)
- PT *ppos;
- {
- int ax,bx,cx,dx,flags;
-
- ax = 0x0d00;
- bx = utbyword(b_curpage,0);
- cx = ppos->x % max_x; /* Wrap values on the screen. */
- dx = ppos->y % max_y;
-
- bios(16,&ax,&bx,&cx,&dx,&flags);
-
- return(utlobyte(ax));
- }