home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / w / wgt3_ex.zip / WGT28.C < prev    next >
C/C++ Source or Header  |  1992-09-14  |  713b  |  36 lines

  1. #include <conio.h>
  2. #include <wgt.h>
  3.  
  4. /*   WORDUP Graphics Toolkit   Version 3.0
  5.      Demonstration program 28
  6.  
  7.   Shows wpan.
  8.   Since 320x200x256 doesn't support multiple pages, the vertical
  9.   lines you might see when the screen scrolls down is just what is
  10.   in memory after the VGA screen buffer. Do not be alarmed.
  11.  
  12. */
  13.  
  14. int i;
  15.  
  16. void main(void)
  17. {
  18. vga256();        // initializes system
  19.  
  20. for (i=1; i<200; i++)
  21.   {
  22.   wsetcolor(i);
  23.   wline(0,0,319,i);
  24.   wsetcolor(200-i);
  25.   wline(319,199,0,i);
  26.   }
  27.  
  28. do {
  29. for (i=0; i<100; i++) { wpan(i*320); delay(20);}
  30. for (i=0; i<50; i++) { wpan(rand() % 10); delay(40);}
  31. } while (!kbhit());
  32.  
  33.  
  34. getch();
  35. textmode(C80);        // used to return to text mode
  36. }