958 end; |
958 end; |
959 if LandGet(yy + py, xx + px) <= lfAllObjMask then |
959 if LandGet(yy + py, xx + px) <= lfAllObjMask then |
960 if gun then |
960 if gun then |
961 begin |
961 begin |
962 LandDirty[yy div 32, xx div 32]:= 1; |
962 LandDirty[yy div 32, xx div 32]:= 1; |
963 if LandPixels[ry, rx] = 0 then |
963 if LandPixelGet(ry, rx) = 0 then |
964 LandSet(ly, lx, lfDamaged or lfObject) |
964 LandSet(ly, lx, lfDamaged or lfObject) |
965 else LandSet(ly, lx, lfDamaged or lfBasic) |
965 else LandSet(ly, lx, lfDamaged or lfBasic) |
966 end |
966 end |
967 else LandSet(ly, lx, lf); |
967 else LandSet(ly, lx, lf); |
968 if gun then |
968 if gun then |
969 LandPixels[ry, rx]:= (Gear^.Tint shr 24 shl RShift) or |
969 LandPixelSet(ry, rx, (Gear^.Tint shr 24 shl RShift) or |
970 (Gear^.Tint shr 16 and $FF shl GShift) or |
970 (Gear^.Tint shr 16 and $FF shl GShift) or |
971 (Gear^.Tint shr 8 and $FF shl BShift) or |
971 (Gear^.Tint shr 8 and $FF shl BShift) or |
972 (p^[px] and AMask) |
972 (p^[px] and AMask)) |
973 else LandPixels[ry, rx]:= addBgColor(LandPixels[ry, rx], p^[px]); |
973 else LandPixelSet(ry, rx, addBgColor(LandPixelGet(ry, rx), p^[px])); |
974 end |
974 end |
975 else allpx:= false |
975 else allpx:= false |
976 end; |
976 end; |
977 p:= PLongWordArray(@(p^[s^.pitch shr 2])) |
977 p:= PLongWordArray(@(p^[s^.pitch shr 2])) |
978 end; |
978 end; |