home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / FSGFX.ZIP / G_DOT.C < prev    next >
C/C++ Source or Header  |  1990-03-06  |  434b  |  23 lines

  1. /* g_dot.c */
  2. /* put a graphics dot */
  3.  
  4. #include "mygraph.h"
  5.  
  6. int g_dot(x,y)
  7. int x;
  8. int y;
  9. {
  10.     int spot;
  11.     unsigned char uchar;
  12.     spot = (80 * y) + (x/8);
  13.     uchar = 0x80 >> (x % 8 ); 
  14.  
  15.     if(redrawmode == OR)
  16.         *(pchscreen+spot) =    *(pchscreen+spot) | uchar; 
  17.     else if(redrawmode == XOR)
  18.         *(pchscreen+spot) =    *(pchscreen+spot) ^ uchar; 
  19.     else if(redrawmode == AND)
  20.         *(pchscreen+spot) =    *(pchscreen+spot) & uchar; 
  21. }
  22.  
  23.