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 / WGT29.C < prev    next >
C/C++ Source or Header  |  1992-09-14  |  928b  |  49 lines

  1. #include <dos.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <conio.h>
  5. #include <wgt.h>
  6. #include <spr.h>
  7.  
  8. color p[256];
  9. block sprites[201];
  10. char *scrolltext="MOVESCREEN IS USEFUL FOR SCROLLING AREAS OF THE SCREEN.  IT CAN BE USED FOR MAKING IMPRESSIVE INTROS!!!!!  REGISTER THE WGT SYSTEM....";
  11. int scrnum;
  12. int nextlet,j,k;
  13. int i;
  14.  
  15.  
  16.  
  17.  
  18. void main(void)
  19. {
  20. vga256();
  21. wloadsprites(&p,"letters.spr",sprites);
  22.  
  23. for (i=0; i<180; i++)
  24.   {
  25.   wsetcolor(i);
  26.   wline(0,0,319,i);
  27.   wline(319,199,0,180-i);
  28.   }
  29.  
  30. scrnum=0;
  31. wsetcolor(0);
  32. do {
  33. scrnum=0;
  34. do
  35.   {
  36.   nextlet=wgetblockwidth(sprites[scrolltext[scrnum]+1]);
  37.   for (j=0; j<=nextlet+1; j+=2)
  38.     {
  39.     wbar(318,189,319,199);
  40.     wputblock(319-j,189,sprites[scrolltext[scrnum]+1],0);
  41.     wretrace();
  42.     wmovescreen(0,189,319,199,2,2);
  43.     }
  44.   scrnum++;
  45.   } while (scrolltext[scrnum+1] !=0);
  46. } while (!kbhit());
  47. wfreesprites(sprites);
  48. }
  49.