hedgewars/uRender.pas
changeset 9792 59cde1e53ca5
parent 9666 8dcb25112d96
child 9950 2759212a27de
child 9998 736015b847e3
equal deleted inserted replaced
9791:446e4919b738 9792:59cde1e53ca5
   333 if (Y + SpritesData[Sprite].Height > BottomY) then
   333 if (Y + SpritesData[Sprite].Height > BottomY) then
   334     r.h:= BottomY - Y + 1;
   334     r.h:= BottomY - Y + 1;
   335 if (X + SpritesData[Sprite].Width > RightX) then
   335 if (X + SpritesData[Sprite].Width > RightX) then
   336     r.w:= RightX - X + 1;
   336     r.w:= RightX - X + 1;
   337 
   337 
       
   338 if (r.h < r.y) or (r.w < r.x) then 
       
   339     exit;
       
   340 
   338 dec(r.h, r.y);
   341 dec(r.h, r.y);
   339 dec(r.w, r.x);
   342 dec(r.w, r.x);
   340 
   343 
   341 DrawTextureFromRect(X + r.x, Y + r.y, @r, SpritesData[Sprite].Texture)
   344 DrawTextureFromRect(X + r.x, Y + r.y, @r, SpritesData[Sprite].Texture)
   342 end;
   345 end;