The last loop is still bothering me, it is needlessly complicated and could make errors. Like i suggested earlier, here's how it would look:
Code:for i:=numofbullets-1 downto 0 do begin bullet[i].yplace:=bullet[i].yplace+4; if bullet[i].yplace>ClientHeight then begin bullet[i].Free; dec(numofbullets); bullet[i]:=bullet[numofbullets]; else begin Form1.Canvas.Draw(bullet[i].xplace, bullet[i].yplace, bulletimg); end; end;
Bookmarks