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

  1. /*
  2.     Program: BLANKSCR2()
  3.     System: GRUMPFISH LIBRARY
  4.     Author: Greg Lief
  5.     Copyright (c) 1988-90, Greg Lief
  6.     Clipper 5.x Version
  7.     Compile instructions: clipper blank3 /n/w/a
  8.  
  9.     A whimsical screen-saver (a dancing smiley face)
  10.  
  11.     Calls: GFRAND()      (function in $RAND.PRG)
  12. */
  13.  
  14. //───── begin preprocessor directives
  15.  
  16. #include "setcurs.ch"
  17. #include "grump.ch"
  18.  
  19. //───── end preprocessor directives
  20.  
  21. function blankscr2(delay)
  22. local mstart := seconds(), mtop, mbott, buffer
  23. do while nextkey() == 0 .and. seconds() - mstart < delay
  24. enddo
  25. if nextkey() = 0     && i.e., the do while loop timed out with no keypress
  26.    GFSaveEnv(.t.)
  27.    setcolor('+w/n')
  28.    cls
  29.    mtop := gfrand(maxrow() + 1)
  30.    mbott := gfrand(maxcol() + 1)
  31.    mstart := seconds()
  32.    @ mtop, mbott say chr(2)
  33.    do while inkey() == 0
  34.       if seconds() - mstart > 2.5
  35.          scroll(mtop, mbott, mtop, mbott, 0)
  36.          mtop := gfrand(maxrow() + 1)
  37.          mbott := gfrand(maxcol() + 1)
  38.          @ mtop, mbott say chr(2)
  39.          mstart := seconds()
  40.       endif
  41.    enddo
  42.    GFRestEnv()
  43. endif
  44. return NIL
  45.  
  46. * end function blankscr2()
  47. *--------------------------------------------------------------------*
  48.  
  49. * eof blank3.prg
  50.