'=========================================================================== ' Subject: MAC-SCREEN SAVER LIKE LINES Date: 07-05-97 (08:46) ' Author: Dyselxic DJ Code: QB, QBasic, PDS ' Origin: Dislexic@Earthlink.net Packet: GRAPHICS.ABC '=========================================================================== '***************MAC-SCREEN SAVER IMITATION*************** '*************** WRITTEN BY DYSLEXIC DJ *************** '*************** JULY 5, 1997 *************** CLS LOCATE 11, 33 COLOR 1 PRINT "DYSLEXIC DJ'S " 'This is just the LOCATE 13, 33 'title screen. COLOR 14 'Nothing special. PRINT "SCREEN SAVER!" LOCATE 19, 15 COLOR 8 PRINT "(Yes, it's a rip-off of that old Mac Sceen Saver.)" DO: LOOP WHILE INKEY$ = "" 1 CLS LOCATE 5, 33 COLOR 9 PRINT "YOUR OPTIONS:" 'The user chosen 4 LOCATE 9, 1 'variables. COLOR 2 INPUT "HOW MANY LINES LONG(1 - 100)"; lin IF lin > 100 OR lin < 1 THEN 4 5 LOCATE 10, 1 INPUT "WHAT COLOR SECTION(1=BLUES,2=GREENS,3=GREYS,4=REDS,5=VIOLETS)"; colsec IF colsec > 5 OR colsec < 1 THEN 5 IF colsec = 1 THEN sel$ = "BLUES" IF colsec = 2 THEN sel$ = "GREENS" IF colsec = 3 THEN sel$ = "GREYS" IF colsec = 4 THEN sel$ = "REDS" IF colsec = 5 THEN sel$ = "VIOLETS" 6 LOCATE 11, 1 INPUT "WHAT SPEED(1 - 10, 1 BEING FAST, AND 10 IS SLOW)"; sped IF sped < 1 OR sped > 10 THEN 6 sped = sped * 100 7 LOCATE 12, 1 INPUT "HOW MANY LINES SHOULD BE DRAWN BEFORE A COLOR CHANGE?(50-500)"; chng IF chng < 50 OR chng > 500 THEN 7 CLS COLOR 3 PRINT "IS THE CORRECT?" 'Make sure the PRINT 'user is o.k. PRINT lin; " LINES LONG" 'with the selec- PRINT 'tion. PRINT "COLORED IN "; sel$ PRINT PRINT "AND CRUISES AT "; sped \ 100 PRINT PRINT "WITH A COLOR CHANGE EVERY "; chng; " LINES" COLOR 1 INPUT "(Y/N)"; correct$ LET correct$ = LCASE$(correct$) IF correct$ <> "y" THEN 1 CLS LOCATE 12, 35 COLOR 9 PRINT "GET READY!" LOCATE 15, 21 COLOR 6 PRINT "(hit 'Q' exit the program at any time)" SLEEP IF colsec = 1 THEN C1 = 1: C2 = 9: C3 = 11 'Get colors IF colsec = 2 THEN C1 = 2: C2 = 10: C3 = 14 'ready. IF colsec = 3 THEN C1 = 8: C2 = 7: C3 = 15 IF colsec = 4 THEN C1 = 4: C2 = 12: C3 = 15 IF colsec = 5 THEN C1 = 5: C2 = 13: C3 = 15 CLS SCREEN 12 'Switch to right 'mode of display. 10 CLS DO IF B = 1 THEN x = x + 10 'This is the IF B = 0 THEN x = x - 4 'opening loop. IF H = 1 THEN y = y + 7 'The line starts IF H = 0 THEN y = y - 6 'at location 1,1 IF B1 = 1 THEN x1 = x1 + 3 'which is the IF B1 = 0 THEN x1 = x1 - 8 'common starting IF H1 = 1 THEN y1 = y1 + 5 'point for the IF H1 = 0 THEN y1 = y1 - 2 'earaser line as IF x <= 2 THEN B = 1 'well. The first IF x >= 639 THEN B = 0 'loop will go as IF y <= 2 THEN H = 1 'long as the IF y >= 479 THEN H = 0 'user told it IF x1 <= 2 THEN B1 = 1 'to. When the IF x1 >= 639 THEN B1 = 0 'trail is long IF y1 <= 2 THEN H1 = 1 'enough, then we IF y1 >= 479 THEN H1 = 0 'will jump to the LINE (x, y)-(x1, y1), z 'loop that R = R + 1: IF R = lin THEN 20 'includes the FOR T = 1 TO sped: NEXT T 'earaser line. LOOP 20 DO 'This is the loop 'contains the IF B = 1 THEN x = x + 10 'the eraser line. IF B = 0 THEN x = x - 4 'It will follow IF H = 1 THEN y = y + 7 'The exact same IF H = 0 THEN y = y - 6 'path as it's IF B1 = 1 THEN x1 = x1 + 3 'predecessor, IF B1 = 0 THEN x1 = x1 - 8 'beginning with IF H1 = 1 THEN y1 = y1 + 5 'location 1,1. IF H1 = 0 THEN y1 = y1 - 2 IF x <= 2 THEN B = 1 IF x >= 639 THEN B = 0 IF y <= 2 THEN H = 1 IF y >= 479 THEN H = 0 IF x1 <= 2 THEN B1 = 1 IF x1 >= 639 THEN B1 = 0 IF y1 <= 2 THEN H1 = 1 IF y1 >= 479 THEN H1 = 0 IF B2 = 1 THEN X2 = X2 + 10 IF B2 = 0 THEN X2 = X2 - 4 IF H2 = 1 THEN Y2 = Y2 + 7 IF H2 = 0 THEN Y2 = Y2 - 6 IF B3 = 1 THEN X3 = X3 + 3 IF B3 = 0 THEN X3 = X3 - 8 IF H3 = 1 THEN Y3 = Y3 + 5 IF H3 = 0 THEN Y3 = Y3 - 2 IF X2 <= 2 THEN B2 = 1 IF X2 >= 639 THEN B2 = 0 IF Y2 <= 2 THEN H2 = 1 IF Y2 >= 479 THEN H2 = 0 IF X3 <= 2 THEN B3 = 1 IF X3 >= 639 THEN B3 = 0 IF Y3 <= 2 THEN H3 = 1 IF Y3 >= 479 THEN H3 = 0 LINE (x, y)-(x1, y1), M LINE (X2, Y2)-(X3, Y3), 0 N = N + 1 IF N > 0 AND N < chng THEN M = C1 IF N > chng AND N < chng * 2 THEN M = C2 IF N > chng * 2 AND N < chng * 3 THEN M = C3 IF N > chng * 3 AND N < chng * 4 THEN M = C2 IF N > chng * 4 THEN N = 0 FOR T = 1 TO sped: NEXT T T$ = INKEY$ LET T$ = LCASE$(T$) IF T$ = "q" THEN 200 LOOP 200 END 'I'm sure there are easier ways to do this program, but I don't know 'how to do it. I only had one year of QBasic in high school, and 'didn't pay much attention to boot. Please e-mail me if you have 'suggestions on how to shorten this code, improve colors (I don't 'know how to use PALETTE), or just want to congradulate me on 'actually doing a program that a little 4-year-old would have trouble 'doing. My name is MR. DYSLEXIC DJ, and this is my address. ' -dislexic@earthlink.net 'Again, thanks for taking time out and reading this over abundant 'REM statements.