hedgewars/uLand.pas
changeset 10131 4b4a043111f4
parent 10108 c68cf030eded
child 10142 adb804cb2638
equal deleted inserted replaced
10130:a9d509848390 10131:4b4a043111f4
   418         if (cReducedQuality and rqBlurryLand) = 0 then
   418         if (cReducedQuality and rqBlurryLand) = 0 then
   419             LandPixels[y, x]:= p^[x] or AMask
   419             LandPixels[y, x]:= p^[x] or AMask
   420         else
   420         else
   421             LandPixels[y div 2, x div 2]:= p^[x] or AMask;
   421             LandPixels[y div 2, x div 2]:= p^[x] or AMask;
   422 
   422 
   423     p:= @(p^[Surface^.pitch div 4]);
   423     p:= PLongwordArray(@(p^[Surface^.pitch div 4]));
   424     end;
   424     end;
   425 
   425 
   426 if SDL_MustLock(Surface) then
   426 if SDL_MustLock(Surface) then
   427     SDL_UnlockSurface(Surface);
   427     SDL_UnlockSurface(Surface);
   428 end;
   428 end;
   593         p:= tmpsurf^.pixels;
   593         p:= tmpsurf^.pixels;
   594         for y:= 0 to Pred(tmpsurf^.h) do
   594         for y:= 0 to Pred(tmpsurf^.h) do
   595             begin
   595             begin
   596             for x:= 0 to Pred(tmpsurf^.w) do
   596             for x:= 0 to Pred(tmpsurf^.w) do
   597                 SetLand(Land[cpY + y, cpX + x], p^[x]);
   597                 SetLand(Land[cpY + y, cpX + x], p^[x]);
   598             p:= @(p^[tmpsurf^.pitch div 4]);
   598             p:= PLongwordArray(@(p^[tmpsurf^.pitch div 4]));
   599             end;
   599             end;
   600 
   600 
   601     if SDL_MustLock(tmpsurf) then
   601     if SDL_MustLock(tmpsurf) then
   602         SDL_UnlockSurface(tmpsurf);
   602         SDL_UnlockSurface(tmpsurf);
   603     if not disableLandBack then
   603     if not disableLandBack then