home *** CD-ROM | disk | FTP | other *** search
- 100 ' ***************************************************************
- 110 ' ***************************************************************
- 120 ' ** GW-BASIC 3.23 **
- 130 ' ** FANCYCLS **
- 140 ' ** Fancy Clear Screen Routine **
- 150 ' ** (c) 1990 by **
- 160 ' ** Thomas Jaeger **
- 170 ' ** 1848 Andalucia Drive **
- 180 ' ** El Paso, Texas 79935 **
- 190 ' ** USA **
- 200 ' ***************************************************************
- 210 ' ***************************************************************
- 220 '
- 230 '
- 240 ' This program is distributed under the shareware concept.
- 250 '
- 260 ' You can put this routine in your next GW-, TURBO-, POWER-, or
- 270 ' QuickBASIC routine. If you use this routine, please make a
- 280 ' distribution of US $1-5 to support this shareware concept.
- 290 '
- 300 ' Other routines will follow.
- 310 '
- 320 ' ----------------------------------------------------------------------
- 330 '
- 340 ' How about a fancy clear screen routine to impress your friends
- 350 ' in your next program?
- 360 ' Immediately you called FANCYCLS with GOSUB 10000, the screen starts
- 370 ' to crumble by coincidence. A great effect.
- 380 ' The routine will detect, if you have a monochrome, graphics card.
- 390 ' (screenseg &HB800 vs. &HB000). If you don't want the
- 400 ' background color to be changed, just erase line 10090.
- 410 '
- 420 ' ----------------------------------------------------------------------
- 430 '
- 440 DIM F%(2000) ' dimension is necessary for screen
- 450 KEY OFF
- 460 '
- 470 ' >>>>> Your program starts hier <<<<<
- 480 '
- 490 ' The following code only fills the screen with asteriks to give a better
- 500 ' demonstration. You can leave this code out of your program.
- 510 '
- 520 WAITING$ = INKEY$
- 530 CLS
- 540 WHILE WAITING$ = ""
- 550 WHILE NOT ENDPRINT = -1
- 560 FOR COUNTER% = 1 TO 25
- 570 PRINT STRING$(80, CHR$(219));
- 580 NEXT COUNTER%
- 590 ENDPRINT = -1
- 600 LOCATE 13, 35
- 610 PRINT " PRESS ANY KEY! "
- 620 WEND
- 630 WAITING$ = INKEY$
- 640 WEND
- 650 LOCATE 14, 35
- 660 PRINT " WAIT A SECOND "
- 670 GOSUB 10000 '* CALL FANCYCLS
- 680 ' You probably want to end your program then.
- 690 END ' Program
- 9997 '
- 9998 '* SUB FANCYCLS
- 9999 '
- 10000 FOR COUNTER% = 0 TO 2000
- 10010 F%(COUNTER%) = COUNTER%
- 10020 NEXT COUNTER%
- 10030 FOR COUNTER% = 2000 TO 0 STEP -1
- 10040 SWAP F%(INT(RND(1) * COUNTER%)), F%(COUNTER)
- 10050 NEXT COUNTER%
- 10051 DEF SEG = &H40
- 10052 IF PEEK(&H49) = 7 THEN SCRSEG% = &HB000 ELSE SCRSEG% = &HB800
- 10059 DEF SEG
- 10060 DEF SEG = SCRSEG%
- 10070 FOR COUNTER% = 0 TO 2000
- 10075 FOR DELAY% = 1 TO 300: NEXT DELAY% '* if a compiler is used!
- 10080 POKE F%(COUNTER%) * 2, 32
- 10090 POKE F%(COUNTER%) * 2 + 1, 0 ' Background = black
- 10100 NEXT COUNTER%
- 10105 DEF SEG
- 10110 RETURN ' to your main program
- 10120 '* END SUB
-
-