home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / WGT_TC21.ZIP / WGT24.C < prev    next >
C/C++ Source or Header  |  1992-07-17  |  1KB  |  64 lines

  1. #include <conio.h>
  2. #include <stdio.h>
  3. #include "c:\tc\wgt\wgt.h"
  4.  
  5. /*   WORDUP Graphics Toolkit   Version 2.1
  6.      Demonstration program 24
  7.  
  8.     Shows off some special FX using wwipe.
  9.  
  10. */
  11.  
  12. block screen1,screen2;        // two virtual screens
  13.  
  14. int i,j;
  15. color palette[256];
  16.  
  17. void main(void)
  18. {
  19. vga256();        // initializes system
  20. screen1=wloadblock("c:\\tc\\wgt\\wgt1.blk");
  21. screen2=wnewblock(0,0,319,199);
  22. wnormscreen();
  23. wloadpalette("c:\\tc\\wgt\\wgt1.pal",&palette);
  24.  
  25. wcls(0);
  26. getch();
  27. for (i=0; i<200; i++)
  28.   {
  29.   wwipe(0,0,319,i,screen1);
  30.   wwipe(319,199,0,199-i,screen1);
  31.   }
  32. getch();
  33.  
  34.  
  35. for (i=0; i<100; i++)
  36.   {
  37.   wwipe(0,i,319,i,screen2);
  38.   wwipe(0,199-i,319,199-i,screen2);
  39.   }
  40. getch();
  41. for (i=0; i<320; i++)
  42.   wwipe(159,99,i,0,screen1);
  43. for (i=0; i<200; i++)
  44.   wwipe(159,99,319,i,screen1);
  45. for (i=319; i>=0; i--)
  46.   wwipe(159,99,i,199,screen1);
  47. for (i=199; i>=0; i--)
  48.   wwipe(159,99,0,i,screen1);
  49. getch();
  50. for (i=0; i<200; i++)
  51.    wwipe(0,i,319,i,screen2);
  52. getch();
  53.  
  54. wfreeblock(screen1);    // remember to free that memory
  55. wfreeblock(screen2);
  56. textmode(C80);                // used to return to text mode
  57. }
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.