home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a067 / 1.img / GRUMP501.EXE / SVFADEI.PRG < prev    next >
Encoding:
Text File  |  1991-04-23  |  1.2 KB  |  42 lines

  1. /*
  2.      Function: Sv_FadeIn()
  3.      System: GRUMPFISH LIBRARY
  4.      Author: Greg Lief
  5.      Copyright (c) 1988-90, Greg Lief
  6.      Clipper 5.x Version
  7.      Compile instructions: clipper svfadei /n/w/a
  8.  
  9.      Syntax: Sv_FadeIn(<filename>)
  10.  
  11.      Parameter: <filename> is a character string representing the name
  12.                 of file in which to save the hacked up screen.
  13.  
  14.      Returns: Nothing worth writing home about
  15. */
  16. function Sv_FadeIn(cfile)
  17. local maxrow := maxrow()+1, maxcol := maxcol()+1, x, mrow, mcol
  18. local elements := maxrow * maxcol, oldprinter := set(_SET_PRINTFILE, cfile)
  19. local oldconsole := set(_SET_CONSOLE, .F.), a[elements], ncount := 0, cbuff
  20. set print on
  21. afill(a, 0)
  22. do while ncount < elements
  23.    x := gfrand(elements)
  24.    if a[x+1] = 0
  25.       a[x+1] := 1
  26.       mrow := INT(x / maxcol)
  27.       mcol := INT(x % maxcol)
  28.       cbuff := savescreen(mrow, mcol, mrow, mcol)
  29.       ?? chr(mrow) + chr(mcol) + cbuff
  30.       ncount++
  31.    ENDIF
  32. ENDDO
  33. set(_SET_PRINTFILE, oldprinter)
  34. set(_SET_CONSOLE, oldconsole)
  35. set print off
  36. return NIL
  37.  
  38. * end function Sv_FadeIn()
  39. *--------------------------------------------------------------------*
  40.  
  41. * eof svfadei.prg
  42.