'=========================================================================== ' Subject: FLAMING TEXT Date: 02-13-97 (11:15) ' Author: Angelo Ken Pesce Code: QB, QBasic, PDS ' Origin: ken@uniserv.uniplan.it Packet: GRAPHICS.ABC '=========================================================================== DECLARE SUB BrnPrint2 (y%, x%, text$, iter%) DECLARE SUB pal () DECLARE SUB BurnPrintDel (y%, x%, text$, iter%, delay%) DECLARE SUB BetterBurnPrint (y%, x%, text$, iter%) DECLARE SUB BurnPrint (y%, x%, text$, iter%) ' BurnPrint Routines Demo ' By Angelo KEN Pesce 1997 ' You can use those routinses as you wish ' ken@uniserv.uniplan.it DEFINT A-Z: ' Not very useful here SCREEN 13: ' We must use screen 13 ' SetUp a 48 color palette (Routine made by Phobia) CALL pal CALL BurnPrint(11, 13, "Angelo 'Ken' Pesce", 20) CALL BurnPrint(13, 13, "TEXT Fireffect Demo", 20) CALL BurnPrint(15, 13, "ApsoftWARE 1997", 20) CALL BrnPrint2(5, 13, "BURN", 20) CALL BrnPrint2(5, 11, "Burn", 10) CALL BrnPrint2(5, 9, "burn", 5) waittime = 3000: ' Trim it according your cpu speed (now is set for a P166) CALL BurnPrintDel(15, 13, "WAIT AND BURN", 20, waittime) CLS CALL BetterBurnPrint(11, 13, "Clear Burning", 40) CALL BetterBurnPrint(15, 15, "--10--", 50) CALL BetterBurnPrint(15, 15, "--9--", 50) CALL BetterBurnPrint(15, 15, "--8--", 50) CALL BetterBurnPrint(15, 15, "--7--", 50) CALL BetterBurnPrint(15, 15, "--6--", 50) CALL BetterBurnPrint(15, 15, "--5--", 50) CALL BetterBurnPrint(15, 15, "--4--", 50) CALL BetterBurnPrint(15, 15, "--3--", 50) CALL BetterBurnPrint(15, 15, "--2--", 50) CALL BetterBurnPrint(15, 15, "--1--", 50) CALL BetterBurnPrint(15, 15, "--0--", 50) SCREEN 0 SUB BetterBurnPrint (y%, x%, text$, iter%) ' Sin Table DIM sn(360) FOR r = 0 TO 360 sn(r) = SIN(r) NEXT ' PRINT THE TEXT COLOR 48: LOCATE y%, x% PRINT text$ ' WAIT KEYPRESS DO: LOOP WHILE INKEY$ = "" ' CALCULATE TEXT POSITION lenght = LEN(text$) xstart = (x * 8) - 8 xend = ((x + lenght) * 8) - 8 ystart = (y * 8) - 32 - 8 yend = (y * 8) - 8 FOR r = 1 TO iter% FOR y = ystart TO yend + 8 FOR x = xstart TO xend col = FIX((POINT(x + sn(a), y) + POINT(x, y + 1) + POINT(x, y - 1) + POINT(x + 1, y) + POINT(x - 1, y)) / 5) IF col < 0 THEN col = 0 PSET (x, y - 1), col a = a + 1: IF a = 360 THEN a = 0 NEXT x NEXT y NEXT r END SUB SUB BrnPrint2 (y%, x%, text$, iter%) ' Sin Table DIM sn(360) FOR r = 0 TO 360 sn(r) = SIN(r) NEXT ' PRINT THE TEXT COLOR 48 FOR z = 1 TO LEN(text$) LOCATE y% + z, x% a$ = LEFT$(text$, z) a$ = RIGHT$(a$, 1) PRINT a$ NEXT ' WAIT KEYPRESS DO: LOOP WHILE INKEY$ = "" ' CALCULATE TEXT POSITION xstart = (x * 8) - 8 xend = (x * 8) - 8 ystart = (y * 8) - 8 yend = (y * 8) - 8 + (LEN(text$) * 8) FOR r = 1 TO iter% FOR y = ystart TO yend + 8 FOR x = xstart TO xend + 8 col = FIX(POINT(x + sn(a), y) + POINT(x, y + 1)) / 2 - (3 * RND) IF col < 0 THEN col = 0 PSET (x, y), col a = a + 1: IF a = 360 THEN a = 0 NEXT x NEXT y NEXT r END SUB SUB BurnPrint (y%, x%, text$, iter%) ' Sin Table DIM sn(360) FOR r = 0 TO 360 sn(r) = SIN(r) NEXT ' PRINT THE TEXT COLOR 48: LOCATE y%, x% PRINT text$ ' WAIT KEYPRESS DO: LOOP WHILE INKEY$ = "" ' CALCULATE TEXT POSITION lenght = LEN(text$) xstart = (x * 8) - 8 xend = ((x + lenght) * 8) - 8 ystart = (y * 8) - 16 yend = (y * 8) - 8 FOR r = 1 TO iter% FOR y = ystart TO yend + 8 FOR x = xstart TO xend col = FIX(POINT(x + sn(a), y) + POINT(x, y + 1)) / 2 - (3 * RND) IF col < 0 THEN col = 0 PSET (x, y), col a = a + 1: IF a = 360 THEN a = 0 NEXT x NEXT y NEXT r END SUB SUB BurnPrintDel (y%, x%, text$, iter%, delay%) ' Sin Table DIM sn(360) FOR r = 0 TO 360 sn(r) = SIN(r) NEXT ' PRINT THE TEXT COLOR 48: LOCATE y%, x% PRINT text$ ' Delay FOR zz = 0 TO delay FOR z = 0 TO delay NEXT NEXT ' CALCULATE TEXT POSITION lenght = LEN(text$) xstart = (x * 8) - 8 xend = ((x + lenght) * 8) - 8 ystart = (y * 8) - 16 yend = (y * 8) - 8 FOR r = 1 TO iter% FOR y = ystart TO yend + 8 FOR x = xstart TO xend col = FIX(POINT(x + sn(a), y) + POINT(x, y + 1)) / 2 - (3 * RND) IF col < 0 THEN col = 0 PSET (x, y), col a = a + 1: IF a = 360 THEN a = 0 NEXT x NEXT y NEXT r END SUB SUB pal ' MADE BY PHOBIA ' setup palette (Made By PHOBIA) FOR Ac% = 0 TO 63 OUT &H3C7, Ac% / 4 OUT &H3C9, Ac% OUT &H3C9, 0 OUT &H3C9, 0 OUT &H3C7, Ac% / 4 + 16 OUT &H3C9, 63 OUT &H3C9, Ac% OUT &H3C9, 0 OUT &H3C7, Ac% / 4 + 32 OUT &H3C9, 63 OUT &H3C9, 63 OUT &H3C9, Ac% NEXT END SUB