home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c005 / 4.ddi / C / GRPTWRIT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1986-08-05  |  986 b   |  40 lines

  1. /**
  2. *
  3. * Name        grptwrit -- Write a "colored" dot at a specified position
  4. *
  5. * Synopsis    iret = grptwrit(ppos,color);
  6. *
  7. *        int iret      0 is always returned.
  8. *        PT  *ppos      The point to plot.
  9. *        int color      The color (0, 1, 2, or 3) from the defined
  10. *                  palette to use for the plotted point.
  11. *                  0 is the background color and adding
  12. *                  128 "XORs" the value to the current
  13. *                  color of the position.
  14. *
  15. * Description    GRPTWRIT just plots the specified point on the current
  16. *        display page using the specified color.  The coordinates
  17. *        are wrapped to be in the physical screen.
  18. *
  19. * Version    3.0 (C)Copyright Blaise Computing Inc.    1983, 1984, 1986
  20. *
  21. **/
  22.  
  23. #include <bgraph.h>
  24. #include <bscreen.h>
  25.  
  26. int grptwrit(ppos,color)
  27. PT  *ppos;
  28. int color;
  29. {
  30.     int ax,bx,cx,dx,flags;
  31.  
  32.     ax = utbyword(12,color);
  33.     bx = utbyword(b_curpage,0);
  34.     cx = ppos->x % b_maxx;
  35.     dx = ppos->y % b_maxy;
  36.     bios(16,&ax,&bx,&cx,&dx,&flags);
  37.  
  38.     return(0);
  39. }
  40.