'$DYNAMIC CLS : SCREEN 13: DEFINT A-Z DIM r%(256), g%(256), b%(256), map(320, 200) cc% = 0 FOR r% = 0 TO 7 FOR b% = 0 TO 3 FOR g% = 0 TO 7 r%(cc%) = r% * 9 g%(cc%) = g% * 9 b%(cc%) = b% * 21 cc% = cc% + 1 NEXT: NEXT: NEXT FOR a% = 0 TO 255 PALETTE a%, r%(a%) + g%(a%) * 256 + b%(a%) * 65536 NEXT OPEN "spine.bmp" FOR BINARY AS #1 fl& = 55 FOR y = 0 TO 199 FOR x = 0 TO 319 GET #1, fl&, b GET #1, fl& + 1, g GET #1, fl& + 2, r blue = (b AND 255) / 35 red = (r AND 255) / 35 green = (g AND 255) / 35 PSET ((x + z), 200 - y), green + (FIX(blue / 2) * 8) + (red * 32) map(x, 200 - y) = green + (FIX(blue / 2) * 8) + (red * 32) fl& = fl& + 3 NEXT: NEXT CLOSE #1 BEEP w$ = INPUT$(1) LINE (0, 0)-(319, 199), 0, BF t# = TIMER DO 1 w$ = "": w$ = INKEY$ IF w$ = " " THEN GOSUB show x = INT(RND * 320): y = INT(RND * 200): c = INT(RND * 256) IF map(x, y) < 0 THEN GOTO 1 PSET (x, y), c IF map(x, y) = c THEN map(x, y) = map(x, y) * -1: GOTO 1 LOOP UNTIL w$ = CHR$(27) LOCATE 1, 1: PRINT "ELAPSED SECONDS:"; INT(TIMER - t#) SYSTEM show: total! = 0 FOR y = 0 TO 199 FOR x = 0 TO 319 IF map(x, y) < 0 THEN total! = total! + 1 NEXT: NEXT CLS : LOCATE 20, 1: PRINT total! FOR y = 0 TO 199 FOR x = 0 TO 319 IF map(x, y) < 0 THEN PSET (x, y), ABS(map(x, y)) NEXT: NEXT RETURN