02-21-2007, 10:40 PM
I can't get the GET-PUT to work. I have a randomly generated pixel background, and I'm trying to GET a block of it where some lines will be drawn so I can PUT it back over to erase the sprite before drawing the next frame. Instead, it draws black! I'll include the relevant code.
Phaser is a sub which draws lines from (1,1) to (x,y). Brush draws a thick spot on the screen.
Code:
dim sprite(150, 150) as integer
screen 20
for x = 0 to 1024
for y = 0 to 768
c = rnd * 15 + 16
pset (x, y), c
next: next
sleep
for c = 1 to frames
get (0,0)-(101, c+1), sprite
phaser(100, c)
sleep 10
put (0, 0), sprite
brush(100, c, 0)
next i
In the beginning, there is darkness â the emptiness of a matrix waiting for the light. Then a single photon flares into existence. Then another. Soon, thousands more. Optronic pathways connect, subroutines emerge from the chaos, and a holographic consciousness is born." -The Doctor