'=========================================================================== ' Subject: FLEXIBLE RASTER DISTANCE Date: 05-28-97 (14:06) ' Author: Frank W. Zammetti Code: QB, QBasic, PDS ' Origin: fzammett@fpsserv.com Packet: GRAPHICS.ABC '=========================================================================== SCREEN 0: CLS: COLOR 2: PRINT PRINT "This is a little effect that I did originally about 10 years ago no the C64" PRINT "that I ported over to the PC. It was a cheat back then, and it still is!" PRINT "This is called (F)lexible (R)aster (D)istance, a relative of (F)lexible" PRINT "(L)ine (D)istance, but while FLD was a real technique, this is a fake that" PRINT "approximates what FRD would look like if it were actually possible!" PRINT: PRINT: COLOR 15 PRINT "PRESS ANY KEY TO BEGIN..." LOCATE 22,1: COLOR 12 PRINT "(C)opyright 1997 by Frank W. Zammetti": PRINT PRINT "Use is as you wish... But please give me credit somewhere!"; DO WHILE INKEY$ = "": LOOP CLEAR: DEFINT a-z: SCREEN 12: CLS DIM FieldCols(100), FieldDist(100): GOSUB ReadCols: GOSUB ReadDistances MainLoop: WAIT &h3da, 8 FOR z = 1 TO 1000: NEXT z WAIT &h3da, 8 ScanLine = 60: GOSUB DisplayField IF INKEY$ <> "" THEN GOTO ByeByeNow y = FieldDist(1) FOR z = 1 TO (FDS - 2): FieldDist(z) = FieldDist(z + 1): NEXT z FieldDist(FDS - 1) = y GOTO MainLoop DisplayField: z = ScanLine y = 1 DisplayFieldLoop: x = FieldDist(y) IF x = -1 THEN RETURN IF x = 0 THEN GOTO DoColor FOR w = 1 TO x: LINE (1, z) - (640, z), 0: z = z + 1: NEXT w DoColor: x = FieldCols(y) IF x = -1 THEN RETURN LINE (1, z) - (640, z), x: z = z + 1: y = y + 1: GOTO DisplayFieldLoop ReadCols: y = 1 ReadColsLoop: READ z: FieldCols(y) = z IF z = -1 THEN GOTO ReadColsAllDone y = y + 1: GOTO ReadColsLoop ReadColsAllDone: FCS = y: RETURN ReadDistances: y = 1 ReadDistancesLoop: READ z: FieldDist(y) = z IF z = -1 THEN GOTO ReadDistancesAllDone y = y + 1: GOTO ReadDistancesLoop ReadDistancesAllDone: FDS = y: RETURN FieldColsData: data 4,4,4,4,12,12,12,14,14,15,14,14,12,12,12,4,4,4,4 data 1,1,1,1,9,9,9,1,1,15,1,1,9,9,9,1,1,1,1 data 2,2,2,2,10,10,10,11,11,15,11,11,10,10,10,2,2,2,2,-1 FieldDistancesData: data 0,1,2,3,4,5,6,7,8,9,10,11,12,11,10,9,8,7,6,5,4,3,2,1,0 data 1,2,3,4,5,6,7,8,9,10,9,8,7,6,5,4,3,2,1,0 data 1,2,3,4,5,6,5,4,3,2,1,1,1,-1 ByeByeNow: SCREEN 0: CLS: PRINT "Goodbye!...": PRINT: PRINT PRINT "Frank W. Zammetti (fzammett@fpsserv.com)" PRINT: PRINT: PRINT: END