'=========================================================================== ' Subject: CIRCULAR PLASMA EFFECT Date: 08-02-97 (20:02) ' Author: Davey W. Taylor Code: QB, QBasic, PDS ' Origin: audio.squad@mailbox.swipnet.se Packet: GRAPHICS.ABC '=========================================================================== 'ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ--ÄÄÄ--Ä -ù ù '³ ** PLASMA EFFECT ** '³ Created by Davey W Taylor '³ '³ Please mention my name if you use this code in your program! 'ÀÄÄÄÄÄ--ÄÄù- ù ù ' ** If you have any comments / suggestions / questions, my email is: ** ' ** audio.squad@mailbox.swipnet.se ** DECLARE SUB setpal (Attr%, Red%, Green%, Blue%) DECLARE SUB getPal (Attr%, Red%, Green%, Blue%) SCREEN 13 'Gee... FOR o% = 0 TO 63 'Set a rainbow palette setpal n% + o%, o% - 1, 0, 63 NEXT o% n% = n% + 64 FOR o% = 0 TO 63 setpal n% + o%, 63, o% - 1, 63 - o% NEXT o% n% = n% + 64 FOR o% = 0 TO 63 setpal n% + o%, 63, 63 - o%, 0 NEXT o% n% = n% + 64 FOR o% = 0 TO 63 setpal n% + o%, 63 - o%, 0, o% - 1 NEXT o% setpal 0, 0, 0, 0 'Fix missed colors setpal 64, 63, 0, 63 setpal 128, 63, 63, 0 setpal 192, 63, 0, 0 FOR n% = 1 TO 319 'Draw the circle pattern c% = (c% + 1) o% = INT(c% - (c% * .012)) MOD 256 IF o% = 0 THEN o% = 1 LINE (n%, 0)-(319 - n%, 199), o% NEXT n% FOR n% = 1 TO 199 c% = (c% + 1) o% = INT(c% - (c% * .012)) MOD 256 IF o% = 0 THEN o% = 1 LINE (319, n%)-(0, 199 - n%), o% NEXT n% LINE (0, 0)-(319, 19), 0, BF 'Clear the sides LINE (0, 180)-(319, 199), 0, BF LINE (0, 0)-(29, 199), 0, BF 'Clear top and bottom LINE (290, 0)-(319, 199), 0, BF LINE (29, 19)-(290, 180), 1, B 'Draw a border LOCATE 1, 9 PRINT "Plasma by Davey W Taylor" DO WAIT &H3DA, 8 'Wait for screen retrace getPal 1, rr%, gr%, br% 'Rotate ' - the safest way to make FOR n% = 2 TO 255 ' - the ' - a delay in a program getPal n%, r%, g%, B% ' - palette setpal n% - 1, r%, g%, B% NEXT n% setpal 255, rr%, gr%, br% LOOP WHILE INKEY$ = "" SUB getPal (Attr%, Red%, Green%, Blue%) OUT &H3C7, Attr% OUT &H3C8, Attr% Red% = INP(&H3C9) Green% = INP(&H3C9) Blue% = INP(&H3C9) END SUB SUB setpal (Attr%, Red%, Green%, Blue%) OUT &H3C7, Attr% OUT &H3C8, Attr% OUT &H3C9, Red% OUT &H3C9, Green% OUT &H3C9, Blue% END SUB