'=========================================================================== ' Subject: BIDIRECTIONAL LINE PLASMA 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% = 0 TO 319 STEP 2 'Draw the bidirectional pattern c% = c% + 1 IF c% = 0 THEN c% = 1 LINE (n%, 0)-(n%, 199), c% LINE (319 - n%, 0)-(319 - n%, 199), c% 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