home *** CD-ROM | disk | FTP | other *** search
- /*
- Program: BLANKSCR3()
- System: GRUMPFISH LIBRARY
- Author: Greg Lief
- Copyright (c) 1988-90, Greg Lief
- Clipper 5.01 Version
- Compile instructions: clipper blank4 /n/w/a
-
- Geez!! Not another screen-blanker!? But this one is the coolest
- of all of them - the planetarium! NOTE: this still uses hard-coded
- colors because the colors should be left alone for best effect.
-
- Calls: GFRAND() (function in $RAND.PRG)
- */
-
- //───── begin preprocessor directives
-
- #include "setcurs.ch"
- #include "grump.ch"
-
- //───── end preprocessor directives
-
-
- function blankscr3(delay)
- local mstart := seconds(), mtop := 11, mbott := 14, buffer, ;
- spaces_[45], kounter, mmrow, mmcol, key, xx
- afill(spaces_, -1)
- 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., 0, "+bg/n")
- cls
- key := kounter := 0
- do while key == 0
- kounter := if(kounter < 45, kounter + 1, 1)
- xx := gfrand((maxrow() + 1) * (maxcol() + 1))
- if spaces_[kounter] > -1
- mmrow := int(spaces_[kounter] / (maxcol() + 1) )
- mmcol := int(spaces_[kounter] % (maxcol() + 1) )
- if gfrand(100) < 45
- @ mmrow, mmcol ssay chr(250) color "+w/n"
- key := max(inkey(.15), key)
- else
- @ mmrow, mmcol ssay chr(04) color "+w/n"
- key := max(inkey(.12), key)
- @ mmrow, mmcol ssay chr(254) color "+w/n"
- key := max(inkey(.12), key)
- @ mmrow, mmcol ssay chr(15) color "+w/n"
- key := max(inkey(.12), key)
- endif
- @ mmrow, mmcol ssay chr(32)
- endif
- spaces_[kounter] := xx
- @ int(xx / (maxcol() + 1)), int(xx % (maxcol() + 1)) ssay chr(250) ;
- color "+bg/n"
- key := max(inkey(.01), key)
- enddo
- GFRestEnv()
- endif
- return NIL
-
- * end function blankscr3()
- *--------------------------------------------------------------------*
-
- * eof blank4.prg
-