
-----------------------------------
Prince
Tue May 27, 2003 10:12 pm

drawing stuff
-----------------------------------
anybody hav an idea how i can draw bricks onto a screen (50 of em 10x5) and then take them away wen theyre hit

-----------------------------------
Prince
Tue May 27, 2003 10:15 pm


-----------------------------------
i tried a for loop


for j : 1 .. 5
    for k : 1 .. 10
        Draw.Box (a1, b1, a2, b2, black)
        a1 := b2
        a2 += 40
    end for
    a1 := 1
    a2 := 40
    b1 -= 10
    b2 -= 10
end for


but wen the whole prog loops back around they get erased

-----------------------------------
Asok
Tue May 27, 2003 10:29 pm


-----------------------------------
if u're gonna keep it like that you'll need an array of booleans, one for each block. So if the boolean = true then it draws it, if it's false then it skips it or draws a white box or whatever.

-----------------------------------
Prince
Tue May 27, 2003 10:34 pm


-----------------------------------
is ther a way i could do it without the array of booleans

-----------------------------------
Asok
Tue May 27, 2003 10:36 pm


-----------------------------------
yea, have all the bricks drawn and simply draw over it with a white Draw.FillBox
the have an integer keeping track of how many blocks you have left.
