hedgewars/uLandGraphics.pas
changeset 3749 d0920e92008e
parent 3697 d5b30d6373fc
child 4357 a1fcfc341a52
equal deleted inserted replaced
3748:daea2650a5aa 3749:d0920e92008e
   616 case bpp of
   616 case bpp of
   617      4: for y:= 0 to Pred(h) do
   617      4: for y:= 0 to Pred(h) do
   618             begin
   618             begin
   619             for x:= 0 to Pred(w) do
   619             for x:= 0 to Pred(w) do
   620                 if PLongword(@(p^[x * 4]))^ <> 0 then
   620                 if PLongword(@(p^[x * 4]))^ <> 0 then
   621                    if ((cpY + y) < Longint(topY)) or
   621                    if ((cpY + y) <= Longint(topY)) or
   622                       ((cpY + y) > LAND_HEIGHT) or
   622                       ((cpY + y) >= LAND_HEIGHT) or
   623                       ((cpX + x) < Longint(leftX)) or
   623                       ((cpX + x) <= Longint(leftX)) or
   624                       ((cpX + x) > Longint(rightX)) or
   624                       ((cpX + x) >= Longint(rightX)) or
   625                       (Land[cpY + y, cpX + x] <> 0) then
   625                       (Land[cpY + y, cpX + x] <> 0) then
   626                       begin
   626                       begin
   627                       if SDL_MustLock(Image) then
   627                       if SDL_MustLock(Image) then
   628                          SDL_UnlockSurface(Image);
   628                          SDL_UnlockSurface(Image);
   629                       exit(false)
   629                       exit(false)