hedgewars/uLandObjects.pas
changeset 12847 f72c6f64c94c
parent 12764 df9d9d19406a
child 12920 4d3b52f1ba18
--- a/hedgewars/uLandObjects.pas	Wed Nov 22 17:38:47 2017 -0500
+++ b/hedgewars/uLandObjects.pas	Thu Nov 23 16:02:29 2017 -0500
@@ -35,7 +35,7 @@
 implementation
 uses uStore, uConsts, uConsole, uRandom, uSound
      , uTypes, uVariables, uDebug, uUtils
-     , uPhysFSLayer, adler32;
+     , uPhysFSLayer, adler32, uRenderUtils;
 
 const MaxRects = 512;
       MAXOBJECTRECTS = 16;
@@ -472,15 +472,10 @@
         inc(x, getrandom(12) + 12)
     until x >= LAND_WIDTH - Width;
     bRes:= cnt <> 0;
-AddFileLog('CHECKPOINT 004');
     if bRes then
         begin
         i:= getrandom(cnt);
-        r.x:= ar[i].X;
-        r.y:= ar[i].Y;
-        r.w:= Width;
-        r.h:= Height;
-        SDL_UpperBlit(Obj.Surf, nil, Surface, @r);
+        copyToXY(Obj.Surf, Surface, ar[i].X, ar[i].Y);
         AddRect(ar[i].x - 32, ar[i].y - 32, Width + 64, Height + 64);
         dec(Maxcnt)
         end