hedgewars/uLandObjects.pas
changeset 15099 07de9e60c305
parent 15027 88e3d1ff67bb
child 15142 d97f0b96e45f
equal deleted inserted replaced
15098:9397e07b3086 15099:07de9e60c305
   169                    (LerpByte((color and RMask) shr RShift, (landColor and RMask) shr RShift, alpha) shl RShift)
   169                    (LerpByte((color and RMask) shr RShift, (landColor and RMask) shr RShift, alpha) shl RShift)
   170                     or (LerpByte((color and GMask) shr GShift, (landColor and GMask) shr GShift, alpha) shl GShift)
   170                     or (LerpByte((color and GMask) shr GShift, (landColor and GMask) shr GShift, alpha) shl GShift)
   171                     or (LerpByte((color and BMask) shr BShift, (landColor and BMask) shr BShift, alpha) shl BShift)
   171                     or (LerpByte((color and BMask) shr BShift, (landColor and BMask) shr BShift, alpha) shl BShift)
   172                     or (LerpByte(alpha, 255, (color and AMask) shr AShift) shl AShift);
   172                     or (LerpByte(alpha, 255, (color and AMask) shr AShift) shl AShift);
   173 
   173 
   174             if Land[cpY + y, cpX + x] <= lfAllObjMask then
   174             end;
   175                 Land[cpY + y, cpX + x]:= lfObject or LandFlags
   175 
   176             end;
   176         if ((color and AMask) <> 0) and (Land[cpY + y, cpX + x] <= lfAllObjMask) then
       
   177             Land[cpY + y, cpX + x]:= lfObject or LandFlags
   177         end;
   178         end;
   178     p:= PLongwordArray(@(p^[Image^.pitch shr 2]))
   179     p:= PLongwordArray(@(p^[Image^.pitch shr 2]))
   179     end;
   180     end;
   180 
   181 
   181 if SDL_MustLock(Image) then
   182 if SDL_MustLock(Image) then