home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 1 / FishNMoreVol1.bin / more / code_examples / librar / skydrop.c < prev    next >
Text File  |  1989-02-08  |  874b  |  35 lines

  1. /*--------------------------------------*/
  2. /*                    */
  3. /*             SKYDROP(X,X,X)        */
  4. /*                    */
  5. /* Displays a string given in the first */
  6. /* argument by "dropping" it from the    */
  7. /* top of the screen.  The second and    */
  8. /* third arguments are the screen    */
  9. /* coordinates of the final destination */
  10. /* of the string.  The last argument is */
  11. /* the rate of fall.            */
  12. /*                    */
  13. /*--------------------------------------*/
  14. void skydrop(x,y,string,a)
  15. char *string;
  16. int a,x,y;
  17. {
  18.     int j,jj,k,length;
  19.     cursor(0);
  20.     if (x<0){
  21.             clrscr();
  22.             x*=-1;
  23.     }
  24.     length=strlen(string);
  25.     for (j=0;j<length;j++){
  26.              for (k=0;k<x;k++){
  27.                   curs_out(k,y+j,string[j],1);
  28.                   if (k!=0)
  29.                       curs_out(k-1,y+j,32,1);
  30.                   for (jj=0;jj<a;jj++);
  31.              }
  32.     }
  33.     cursor(1);
  34. }
  35.