home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / C128CPM / SGTOOL12.ARC / LIBC128.ARC / VDCWINCD.C < prev   
Encoding:
C/C++ Source or Header  |  1993-08-10  |  550 b   |  31 lines

  1. /*
  2. SG C Tools 1.2
  3.  
  4. (C) 1993 Steve Goldsmith
  5. All Rights Reserved
  6.  
  7. Compiled with HI-TECH C 3.09 (CP/M-80).
  8. */
  9.  
  10. #include <hitech.h>
  11. #include <vdc.h>
  12.  
  13. extern uchar  vdcScrHorz;
  14. extern ushort vdcDispMem;
  15.  
  16. /* clear window given x1, y1, x2, y2 rectangle in current page */
  17.  
  18. void clrwinvdc(uchar X1, uchar Y1, uchar X2, uchar Y2, uchar Ch)
  19. {
  20.   uchar XLen;
  21.   ushort DispOfs;
  22.  
  23.   DispOfs = Y1*vdcScrHorz+vdcDispMem+X1;
  24.   XLen = X2-X1+1;
  25.   for(; Y1 <= Y2; Y1++)
  26.   {
  27.     fillmemvdc(DispOfs,XLen,Ch);
  28.     DispOfs += vdcScrHorz;
  29.   }
  30. }
  31.