sync on
 
texsize=256
 
gosub getsnowflaketextrure
 
cls
 
paste image 1,1,1
 
print "Press any key..."
 
suspend for key
 
backdrop on
color backdrop 0
autocam off
 
position camera 320,240,-420
 
maxsnowflakes=100
 
dim snowx(maxsnowflakes)
dim snowy(maxsnowflakes)
 
for i=1 to maxsnowflakes
   snowx(i)=rnd(640)
   snowy(i)=rnd(480)
   make object plain i,30,30
   texture object i,1
   ghost object on i
   make object plain i+maxsnowflakes,30,30
   texture object i+maxsnowflakes,1
   ghost object on i+maxsnowflakes
next i
 
do
 
   for i=1 to maxsnowflakes
      snowy(i)=snowy(i)-1
      if snowy(i)<0 then snowy(i)=480
      position object i,snowx(i),snowy(i),0
      position object i+maxsnowflakes,snowx(i),snowy(i),0
   next i
 
   sync
 
loop
 
 
end
 
getsnowflaketextrure:
 
   dim round(360)
   for i=1 to 360
      round(i)=rnd(100)
   next i
 
   x=texsize/2
   y=texsize/2
   for i=0 to 100
      ink rgb(i+155,i+155,255),0
      for j=1 to 360
         roundr#=round(j)
         ir#=i
         jr#=j
         distance#=(roundr#/100)*ir#
         dx#=cos(jr#)*distance#
         dy#=sin(jr#)*distance#
         dot x+dx#,y+dy#
      next j
   next i
 
   get image 1,1,1,texsize,texsize
  ` get image 1,0,0,1,1
 
return