Okay, now I have another question: Is there a way to use the file commands to store the location of pixels? The reason I ask comes from applying the make memblock from image - make image from memblock commands (in the above post) and then loading the image as a texture for a ghosted object. It takes SOOOOOO much time to process even the smallest image and then apply it as a texture when using memblocks that I need to know. Is there such a way to use files? For example:
Set display mode 1280,1024,32
Randomize timer()
`Ready the file for writing
Open to write 1,"WeatherW.Stm"
Open to write 2,"WeatherH.Stm"
`Random storm pixel starters
REPEAT
INK RGB(255,255,255),0
For Storm=1 to 100
A=RND(1280)
B=RND(1024)
DOT A,B,RGB(255,255,255)
(((!!!HERE IS WHERE WE WOULD STORE THE A AND B VALUES BEFORE THEY CHANGE. We would need to store as a DWORD and position it w/ the storm value!!!)))
FILE OPERATION 1,(Storm), A
File operation 2,(Storm), B
(((!!!Now that we have the location of the first pixel, we can create it's brother and sister pixels... IE: give the cloud map some form.!!!)))
For Pixel=1 to 50
For FILEs=1 to 100
FILE OPERATION 1,(FILEs),A
FILE OPERATION 2,(FILEs),B
DOT A+RND(5),B+RND(5),RGB(255,255,255)
Next FILEs
Next Pixel
Next Storm
(((!!!Now we need to let the storms decay and die... but how? We have the location of every starting pixel in the screen... so reverting the ink color to black (INK RGB(0,0,0,),0) would result in a decaying storm. We'll have to place more pixels randomly so all of the white pixels are destroyed!!!)))
INK RGB(0,0,0),0
FOR DECAY=1 to 100
FOR ANTIPIX=1 to 100
FILE OPERATION 1,(FILEs),A
FILE OPERATION 2,(FILEs),B
Dot A+RND(5),B+RND(5),(IF YOU DO THE COLOR THING HERE it's 0,0,0,)
NEXT ANTIPIX
NEXT DECAY
UNTIL ESCAPEKEY()=1
Now I suppose your wondering about how we'll address the issue of the storms movement. By adding and subtracting values from the width and height (A and B in the above code), movement is achieved. Still, I need to know the correct way to use the file commands... as the above illustration does not work when correctly imputed into DBPro
Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.