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

  1. /* g_puts.c */
  2. /* put a string in graphics mode */
  3.  
  4. #include "mygraph.h"
  5.  
  6. g_puts(locx,locy,temp)
  7. int locx;
  8. int locy;
  9. char temp[];
  10. {
  11.     register int x;
  12.     register int y;
  13.     int i,j,k;
  14.     int letter;
  15.     char zchar;
  16.     unsigned char mask;
  17.     int spot;
  18.     unsigned char uchar;
  19.  
  20.     i = 0;
  21.  
  22.     if(locx < 0)
  23.         locx = oldtextx;
  24.     if(locy < 0)
  25.         locy = oldtexty;
  26.     while(temp[i] != 0)
  27.     {
  28.         letter = temp[i++] - ' ';
  29.  
  30.         for(y = 0; y<FONTH; y++)
  31.         {
  32.             for(x = FONTW-1; x>=0; x--)
  33.             {
  34.                 j = locx+x;
  35.                 k = locy+y;    
  36.                 if(alphabet[letter][y][x])
  37.                 {
  38.                     g_macrodot(j,k);
  39.                 }
  40.                 else
  41.                 {
  42.                     g_macrodoterase(j,k);
  43.                 }
  44.             }
  45.         }
  46.  
  47.         if(locx < SCR_XMAX)
  48.             locx += FONTW;
  49.         else
  50.             locx = 0;
  51.     }
  52.     oldtextx = locx;    
  53.     oldtexty = locy;
  54. }
  55.  
  56.  
  57.