hedgewars/uLand.pas
branchsdl2transition
changeset 9682 aa2431ed87b2
parent 9524 0a52c1dd9400
child 11362 ed5a6478e710
equal deleted inserted replaced
9679:dfaa39674e1e 9682:aa2431ed87b2
   396     p: PLongwordArray;
   396     p: PLongwordArray;
   397 begin
   397 begin
   398 TryDo(Surface <> nil, 'Assert (LandSurface <> nil) failed', true);
   398 TryDo(Surface <> nil, 'Assert (LandSurface <> nil) failed', true);
   399 
   399 
   400 if SDL_MustLock(Surface) then
   400 if SDL_MustLock(Surface) then
   401     SDLTry(SDL_LockSurface(Surface) >= 0, true);
   401     SDLTry(SDL_LockSurface(Surface) >= 0, 'SDL_LockSurface', true);
   402 
   402 
   403 p:= Surface^.pixels;
   403 p:= Surface^.pixels;
   404 for y:= 0 to LAND_HEIGHT - 1 do
   404 for y:= 0 to LAND_HEIGHT - 1 do
   405     begin
   405     begin
   406     for x:= 0 to LAND_WIDTH - 1 do
   406     for x:= 0 to LAND_WIDTH - 1 do
   576     disableLandBack:= true;
   576     disableLandBack:= true;
   577 
   577 
   578     cpX:= (LAND_WIDTH - tmpsurf^.w) div 2;
   578     cpX:= (LAND_WIDTH - tmpsurf^.w) div 2;
   579     cpY:= LAND_HEIGHT - tmpsurf^.h;
   579     cpY:= LAND_HEIGHT - tmpsurf^.h;
   580     if SDL_MustLock(tmpsurf) then
   580     if SDL_MustLock(tmpsurf) then
   581         SDLTry(SDL_LockSurface(tmpsurf) >= 0, true);
   581         SDLTry(SDL_LockSurface(tmpsurf) >= 0, 'SDL_LockSurface', true);
   582 
   582 
   583         p:= tmpsurf^.pixels;
   583         p:= tmpsurf^.pixels;
   584         for y:= 0 to Pred(tmpsurf^.h) do
   584         for y:= 0 to Pred(tmpsurf^.h) do
   585             begin
   585             begin
   586             for x:= 0 to Pred(tmpsurf^.w) do
   586             for x:= 0 to Pred(tmpsurf^.w) do