home *** CD-ROM | disk | FTP | other *** search
- /*
- Program: BLANKSCR2()
- System: GRUMPFISH LIBRARY
- Author: Greg Lief
- Copyright (c) 1988-90, Greg Lief
- Clipper 5.x Version
- Compile instructions: clipper blank3 /n/w/a
-
- A whimsical screen-saver (a dancing smiley face)
-
- Calls: GFRAND() (function in $RAND.PRG)
- */
-
- //───── begin preprocessor directives
-
- #include "setcurs.ch"
- #include "grump.ch"
-
- //───── end preprocessor directives
-
- function blankscr2(delay)
- local mstart := seconds(), mtop, mbott, buffer
- do while nextkey() == 0 .and. seconds() - mstart < delay
- enddo
- if nextkey() = 0 && i.e., the do while loop timed out with no keypress
- GFSaveEnv(.t.)
- setcolor('+w/n')
- cls
- mtop := gfrand(maxrow() + 1)
- mbott := gfrand(maxcol() + 1)
- mstart := seconds()
- @ mtop, mbott say chr(2)
- do while inkey() == 0
- if seconds() - mstart > 2.5
- scroll(mtop, mbott, mtop, mbott, 0)
- mtop := gfrand(maxrow() + 1)
- mbott := gfrand(maxcol() + 1)
- @ mtop, mbott say chr(2)
- mstart := seconds()
- endif
- enddo
- GFRestEnv()
- endif
- return NIL
-
- * end function blankscr2()
- *--------------------------------------------------------------------*
-
- * eof blank3.prg
-