
-----------------------------------
taron123
Mon Apr 02, 2012 9:36 am

Help me please
-----------------------------------
i cant  draw anything  after my star and rain loop .. 


code : 

setscreen ("graphics:max;max,nobuttonbar") 
%rain
type rain :
record
x : array 1 .. 500 of int
y : array 1 .. 500 of int
hspd : array 1 .. 500 of int
vspd : array 1 .. 500 of int
dist : array 1 .. 500 of int
end record

var r : rain

for i : 1 .. 500
randint (r.x (i), -300, 1200)
randint (r.y (i), 0, 900)
randint (r.hspd (i), 1, 3)
randint (r.vspd (i), 5, 10)
end for

loop
drawfillbox(0,1,maxx,maxy, black )
for i : 1 .. 500
drawline (r.x(i), r.y(i), r.x(i) + r.hspd(i), r.y(i) - r.vspd(i), white )
r.x(i) += r.hspd(i)
r.y(i) -= r.vspd(i)
if r.y(i)10 then
            star:=0
        end if
        for stars:0..100
            randint (drawstara,0,100)
            
                randint (starx2(drawstara),0,maxx)
                randint (stary2(drawstara),400,maxy)
                starvalue:=1
              randint (starsize(drawstara),1,15)
            randint (starcolor,9,14)
            starx:=starx2
            stary:=stary2
            drawfillstar (starx(drawstara)-1,stary(drawstara)-1,starx(drawstara)+starsize(drawstara)+1,stary(drawstara)+starsize(drawstara)+1,yellow)
            drawfillstar (starx(drawstara),stary(drawstara),starx(drawstara)+starsize(drawstara),stary(drawstara)+starsize(drawstara),yellow)

        end for

delay ( 5) 
View.Update

end loop
 





% Draws the Grass 
drawfillbox (0, 0, 1010, 180, green) 


% Draws the moon 
drawfilloval (200, 550, 60, 60, white) 
drawfilloval (235, 570, 60, 60, black) % 