211 end; |
211 end; |
212 addNotHHObj: |
212 addNotHHObj: |
213 for i:= fromPix to toPix do |
213 for i:= fromPix to toPix do |
214 begin |
214 begin |
215 if Land[y, i] and lfNotHHObjMask shr lfNotHHObjShift < lfNotHHObjSize then |
215 if Land[y, i] and lfNotHHObjMask shr lfNotHHObjShift < lfNotHHObjSize then |
216 Land[y, i]:= (Land[y, i] and not lfNotHHObjMask) or ((Land[y, i] and lfNotHHObjMask shr lfNotHHObjShift + 1) shl lfNotHHObjShift); |
216 Land[y, i]:= (Land[y, i] and (not lfNotHHObjMask)) or ((Land[y, i] and lfNotHHObjMask shr lfNotHHObjShift + 1) shl lfNotHHObjShift); |
217 end; |
217 end; |
218 removeNotHHObj: |
218 removeNotHHObj: |
219 for i:= fromPix to toPix do |
219 for i:= fromPix to toPix do |
220 begin |
220 begin |
221 if Land[y, i] and lfNotHHObjMask <> 0 then |
221 if Land[y, i] and lfNotHHObjMask <> 0 then |
222 Land[y, i]:= (Land[y, i] and not lfNotHHObjMask) or ((Land[y, i] and lfNotHHObjMask shr lfNotHHObjShift - 1) shl lfNotHHObjShift); |
222 Land[y, i]:= (Land[y, i] and (not lfNotHHObjMask)) or ((Land[y, i] and lfNotHHObjMask shr lfNotHHObjShift - 1) shl lfNotHHObjShift); |
223 end; |
223 end; |
224 addHH: |
224 addHH: |
225 for i:= fromPix to toPix do |
225 for i:= fromPix to toPix do |
226 begin |
226 begin |
227 if Land[y, i] and lfHHMask < lfHHMask then |
227 if Land[y, i] and lfHHMask < lfHHMask then |
789 else |
789 else |
790 begin |
790 begin |
791 gX:= (cpX + x) div 2; |
791 gX:= (cpX + x) div 2; |
792 gY:= (cpY + y) div 2; |
792 gY:= (cpY + y) div 2; |
793 end; |
793 end; |
794 if not behind or (Land[cpY + y, cpX + x] and lfLandMask = 0) then |
794 if (not behind) or (Land[cpY + y, cpX + x] and lfLandMask = 0) then |
795 begin |
795 begin |
796 if (LandFlags and lfBasic <> 0) or |
796 if (LandFlags and lfBasic <> 0) or |
797 ((LandPixels[gY, gX] and AMask shr AShift > 128) and // This test assumes lfBasic and lfObject differ only graphically |
797 ((LandPixels[gY, gX] and AMask shr AShift > 128) and // This test assumes lfBasic and lfObject differ only graphically |
798 (LandFlags and lfObject = 0)) then |
798 (LandFlags and lfObject = 0)) then |
799 Land[cpY + y, cpX + x]:= lfBasic or LandFlags |
799 Land[cpY + y, cpX + x]:= lfBasic or LandFlags |
800 else Land[cpY + y, cpX + x]:= lfObject or LandFlags |
800 else Land[cpY + y, cpX + x]:= lfObject or LandFlags |
801 end; |
801 end; |
802 if not behind or (LandPixels[gY, gX] = 0) then |
802 if (not behind) or (LandPixels[gY, gX] = 0) then |
803 begin |
803 begin |
804 if tint = $FFFFFFFF then |
804 if tint = $FFFFFFFF then |
805 LandPixels[gY, gX]:= PLongword(@(p^[x * 4]))^ |
805 LandPixels[gY, gX]:= PLongword(@(p^[x * 4]))^ |
806 else |
806 else |
807 begin |
807 begin |