'=========================================================================== ' Subject: GRAPHICS MELT #3 Date: 03-04-97 (19:28) ' Author: Nick Kochakian Code: QB, QBasic, PDS ' Origin: NickK@worldnet.att.net Packet: GRAPHICS.ABC '=========================================================================== 'Graphics melt #3 ' '3/2/97 '1997 By: - Nick Kochakian - ' 'This melts any graphic you put a "box" around. ' 'This program is different from the first two because after you define the 'box the graphics or text fall until they meet up with any other graphic or 'text item. Note: Don't run this if you just have some text (or graphics) and 'nothing to break their "fall". ' 'If you have any comments or questions e-mail me at: nickK@worldnet.att.net ' 'Have fun! :) DEFINT A-Z RANDOMIZE TIMER SCREEN 13 LOCATE 2, 2: PRINT "Graphics Melt 1997 By: Nick Kochakian" LOCATE 3, 2: PRINT "Melting Lemmings! (Below)" LOCATE 7, 2 FOR i = 1 TO 10 ccol = INT(RND * 150) + 1 COLOR ccol PRINT CHR$(1); NEXT i LOCATE 8, 2 COLOR 20 FOR i = 1 TO 10 PRINT "Û"; NEXT i PRINT "" x1 = 7 y1 = 47 x = x1 y = y1 x2 = 89 y2 = 56 'delay = 7000 'LINE (x1, y1)-(x2, y2), 15, B'Uncomment these two to put a box around the 'END 'graphics you want melted. Then recomment. pixels = 10000 px = pixels py = pixels pc = pixels onc = pixels DIM x(px) DIM y(py) DIM c(pc) DIM o(onc) px = 1 py = 1 pc = 1 onc = 1 pixcnt = 0 DO IF POINT(x, y) > 0 THEN col = POINT(x, y) x(px) = x y(py) = y c(pc) = col px = px + 1 py = py + 1 pc = pc + 1 pixcnt = pixcnt + 1 END IF 0 x = x + 1 IF x > x2 THEN x = x1: y = y + 1 LOOP UNTIL y > y2 'px = px + 1 'py = py + 1 'x(px) = -1 'y(py) = -1 px = pixcnt py = pixcnt pc = pixcnt onc = pixcnt cntrr = 1 'SLEEP 3 DO PSET (x(px), y(py)), 0 y(py) = y(py) + 1 IF POINT(x(px), y(py)) <> 0 THEN y(py) = y(py) - 1: o(onc) = 1 PSET (x(px), y(py)), c(pc) oncbak = onc onc = 1 onccnt = 0 FOR i = 1 TO pixcnt IF o(onc) = 1 THEN onccnt = onccnt + 1 onc = onc + 1 NEXT i IF onccnt = pixcnt THEN cntrr = 2 onc = oncbak px = px - 1 py = py - 1 pc = pc - 1 onc = onc - 1 IF px < 1 THEN px = pixcnt IF py < 1 THEN py = pixcnt IF pc < 1 THEN pc = pixcnt IF onc < 1 THEN onc = pixcnt FOR i = 1 TO delay NEXT i LOOP UNTIL INKEY$ <> "" OR cntrr = 2 END