'=========================================================================== ' Subject: NOEL CANDLE AND FLAMES Date: 06-20-97 (00:00) ' Author: Tika Carr Code: QB, QBasic, PDS ' Origin: t.carr@pobox.com Packet: GRAPHICS.ABC '=========================================================================== ' Fire and Flames ' by Andrew L. Ayers (andrewa@indirect.com) ' April 30, 1997 ' ' Modified by Tika Carr (t.carr@pobox.com) on June 20, 1997 DEFINT A-Z DECLARE SUB Flame (ix%, iy%) SCREEN 13 RANDOMIZE (-TIMER) 'Make some random stars FOR i = 0 TO 100 x = INT(RND * 319): y = INT(RND * 199): c = 80 + INT(RND * 8) PSET (x, y), c NEXT ' Make a red candle LINE (135, 83)-(175, 181), 16, BF ' Put in text & color in text background (messy, I know...) COLOR 68: LOCATE 15, 20: PRINT "N": LOCATE 16, 20: PRINT "O" LOCATE 17, 20: PRINT "E": LOCATE 18, 20: PRINT "L" LINE (151, 111)-(160, 144), 0, B: LINE (150, 110)-(160, 145), 68, B PAINT (159, 114), 16, 68: LINE (150, 110)-(160, 145), 16, B PAINT (155, 123), 16, 68 'Light the candle :) Flame 155, 80 PALETTE: SCREEN 0, 0, 0, 0: WIDTH 80: COLOR 7, 0: CLS : END SUB Flame (ix, iy) ' *** Original palette routine by PHOBIA *** FOR slot = 0 TO 63 ' Fade from black to red (slots 0 - 15) OUT &H3C7, slot / 4: OUT &H3C9, slot: OUT &H3C9, 0: OUT &H3C9, 0 ' Fade from red to yellow (slots 16 - 31) OUT &H3C7, slot / 4 + 16: OUT &H3C9, 63: OUT &H3C9, slot: OUT &H3C9, 0 ' Fade from yellow to white (slots 32- 47) OUT &H3C7, slot / 4 + 32: OUT &H3C9, 63: OUT &H3C9, 63: OUT &H3C9, slot NEXT 'CIRCLE (159, 100), 2, 47: PAINT (159, 100), 47, 47 CIRCLE (ix, iy), 2, 47: PAINT (ix, iy), 47, 47 DO 'FOR y = 98 TO 69 STEP -1: FOR x = 157 TO 161 FOR y = iy - 2 TO iy - 31 STEP -1: FOR x = ix - 2 TO ix + 2 c = POINT(x + (INT(RND * 3) - 1), y) + POINT(x, y + 1) c = (c \ 2) + INT(RND * 3) - 1 IF c < 0 THEN c = 0 ELSE IF c > 47 THEN c = 47 END IF PSET (x, y), c NEXT x, y LOOP UNTIL INKEY$ <> "" END SUB