home *** CD-ROM | disk | FTP | other *** search
- ' ***************************************************************
- ' ***************************************************************
- ' ** QBASIC / QuickBasic **
- ' ** FANCYCLS **
- ' ** Fancy Clear Screen Routine **
- ' ** (c) 1990 by **
- ' ** Thomas Jaeger **
- ' ** 1848 Andalucia Drive **
- ' ** El Paso, Texas 79935 **
- ' ** USA **
- ' ***************************************************************
- ' ***************************************************************
- '
- '
- ' This program is distributed under the shareware concept.
- '
- ' You can put this routine in your next GW-, TURBO-, POWER-, or
- ' QuickBASIC routine. If you use this routine, please make a
- ' distribution of US $1-5 to support this shareware concept.
- '
- ' Other routines will follow.
- '
- ' ----------------------------------------------------------------------
- '
- ' How about a fancy clear screen routine to impress your friends
- ' in your next program?
- ' Immediately you called FANCYCLS with GOSUB 10000, the screen starts
- ' to crumble by coincidence. A great effect.
- ' The routine will detect, if you have a monochrome, graphics card.
- ' (screenseg &HB800 vs. &HB000). If you don't want the
- ' background color to be changed, just erase line 10090.
- '
- ' ----------------------------------------------------------------------
- '
- '
- ' >>>>> Your program starts hier <<<<<
- '
- ' The following code only fills the screen with asteriks to give a better
- ' demonstration. You can leave this code out of your program.
- '
- waiting$ = INKEY$
- CLS
- WHILE waiting$ = ""
- WHILE NOT EndPrint = -1
- FOR counter% = 1 TO 25
- PRINT STRING$(80, "*");
- NEXT counter%
- EndPrint = -1
- LOCATE 13, 35
- PRINT " PRESS ANY KEY! "
- WEND
- waiting$ = INKEY$
- WEND
- LOCATE 14, 35
- PRINT " WAIT A SECOND "
- CALL FANCYCLS
- ' You probably want to end your program then.
- END ' Program
-
- SUB FANCYCLS
- DIM f%(2000) ' local dimension is necessary (screen array)
-
- FOR counter% = 0 TO 2000
- f%(counter%) = counter%
- NEXT counter%
-
- FOR counter% = 2000 TO 0 STEP -1
- SWAP f%(INT(RND(1) * counter%)), f%(counter)
- NEXT counter%
-
- DEF SEG = &H40
- IF PEEK(&H49) = 7 THEN ScrSeg% = &HB000 ELSE ScrSeg% = &HB800
- DEF SEG
-
- DEF SEG = ScrSeg%
- FOR counter% = 0 TO 2000
- FOR delay% = 1 TO 100: NEXT delay%
- POKE f%(counter%) * 2, 32
- POKE f%(counter%) * 2 + 1, 0 ' Background = black
- NEXT counter%
- DEF SEG
- END SUB
-