hedgewars/uLandObjects.pas
changeset 10131 4b4a043111f4
parent 10108 c68cf030eded
child 10254 eb28335df088
equal deleted inserted replaced
10130:a9d509848390 10131:4b4a043111f4
   128                     LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x];
   128                     LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x];
   129 
   129 
   130             if (Land[cpY + y, cpX + x] <= lfAllObjMask) and ((p^[x] and AMask) <> 0) then
   130             if (Land[cpY + y, cpX + x] <= lfAllObjMask) and ((p^[x] and AMask) <> 0) then
   131                 Land[cpY + y, cpX + x]:= lfObject or LandFlags
   131                 Land[cpY + y, cpX + x]:= lfObject or LandFlags
   132             end;
   132             end;
   133     p:= @(p^[Image^.pitch shr 2])
   133     p:= PLongwordArray(@(p^[Image^.pitch shr 2]))
   134     end;
   134     end;
   135 
   135 
   136 if SDL_MustLock(Image) then
   136 if SDL_MustLock(Image) then
   137     SDL_UnlockSurface(Image);
   137     SDL_UnlockSurface(Image);
   138 WriteLnToConsole(msgOK)
   138 WriteLnToConsole(msgOK)
   168                 LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x];
   168                 LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x];
   169 
   169 
   170         if (Land[cpY + y, cpX + x] <= lfAllObjMask) or (Land[cpY + y, cpX + x] and lfObject <> 0)  then
   170         if (Land[cpY + y, cpX + x] <= lfAllObjMask) or (Land[cpY + y, cpX + x] and lfObject <> 0)  then
   171             SetLand(Land[cpY + y, cpX + x], mp^[x]);
   171             SetLand(Land[cpY + y, cpX + x], mp^[x]);
   172         end;
   172         end;
   173     p:= @(p^[Image^.pitch shr 2]);
   173     p:= PLongwordArray(@(p^[Image^.pitch shr 2]));
   174     mp:= @(mp^[Mask^.pitch shr 2])
   174     mp:= PLongwordArray(@(mp^[Mask^.pitch shr 2]))
   175     end;
   175     end;
   176 
   176 
   177 if SDL_MustLock(Image) then
   177 if SDL_MustLock(Image) then
   178     SDL_UnlockSurface(Image);
   178     SDL_UnlockSurface(Image);
   179 WriteLnToConsole(msgOK)
   179 WriteLnToConsole(msgOK)