'=========================================================================== ' Subject: COPPER BAR FADES Date: 05-28-96 (09:43) ' Author: The ABC Programmer Code: QB, QBasic, PDS ' Origin: Converted from PASCAL Code Packet: GRAPHICS.ABC '=========================================================================== ' > howdie, nice fader! i was wandering if you would be able ' > to comment the program and repost it. i.e what the ports ' > are etc for us less experienced programmers... 'Okay, if you don't quote so much next time. ' bar-fade in, copper v7.0, by Bas van Gaalen, Holland, PD ' Converted to BASIC by William Yu (05-28-96) DEFINT A-Z DECLARE SUB Incbars () DECLARE SUB Copperbars () CONST Size = 20 ' number of text-lines DIM SHARED pal(0 TO 3 * Size - 1) WIDTH 80, 25 ' 25 lines mode Copperbars ' default = black -> otherwise flash of blue will appear COLOR 1 ' set text to blue (now black, 'cos pal changed) PRINT PRINT "Is this what you mean?": PRINT FOR i = 1 TO 20 PRINT "Test line", i NEXT i DO Incbars Copperbars LOOP UNTIL INKEY$ <> "" ' do stuff until keypressed... SCREEN 0, 0, 0, 0 END SUB Copperbars WAIT &H3DA, 8 ' Wait for vertical retrace cc = 0 FOR l = 0 TO Size - 1 OUT &H3C8, 1 ' set pal-idx number (1=blue) OUT &H3C9, pal(cc) ' set first two pal-value's (red and green OUT &H3C9, pal(cc + 1) ' intensities) FOR j = 0 TO 15 ' 16 vertical retraces = one text line WAIT &H3DA, 1 WAIT &H3DA, 1 NEXT j OUT &H3C9, pal(cc + 2) ' set last pal-value (blue), and thus activate cc = cc + 3 ' new palette NEXT l END SUB 'increase first value in the pal-array (the one representing red), and scroll 'that in the array SUB Incbars IF pal(0) < 63 THEN pal(0) = pal(0) + 1 FOR i = 3 * Size - 2 TO 0 STEP -1 pal(i + 1) = pal(i) NEXT i END SUB