106 if not doSet then |
106 if not doSet then |
107 begin |
107 begin |
108 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
108 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
109 for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do |
109 for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do |
110 if isCurrent then |
110 if isCurrent then |
111 Land[y + dy, i]:= Land[y + dy, i] and $FF7F |
111 Land[y + dy, i]:= Land[y + dy, i] and lfCurrentMask |
112 else if Land[y + dy, i] and $007F > 0 then |
112 else if Land[y + dy, i] and lfObjMask > 0 then |
113 Land[y + dy, i]:= (Land[y + dy, i] and $FF80) or ((Land[y + dy, i] and $7F) - 1); |
113 Land[y + dy, i]:= (Land[y + dy, i] and lfNotObjMask) or ((Land[y + dy, i] and lfObjMask) - 1); |
114 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
114 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
115 for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do |
115 for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do |
116 if isCurrent then |
116 if isCurrent then |
117 Land[y - dy, i]:= Land[y - dy, i] and $FF7F |
117 Land[y - dy, i]:= Land[y - dy, i] and lfCurrentMask |
118 else if Land[y - dy, i] and $007F > 0 then |
118 else if Land[y - dy, i] and lfObjMask > 0 then |
119 Land[y - dy, i]:= (Land[y - dy, i] and $FF80) or ((Land[y - dy, i] and $7F) - 1); |
119 Land[y - dy, i]:= (Land[y - dy, i] and lfNotObjMask) or ((Land[y - dy, i] and lfObjMask) - 1); |
120 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
120 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
121 for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do |
121 for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do |
122 if isCurrent then |
122 if isCurrent then |
123 Land[y + dx, i]:= Land[y + dx, i] and $FF7F |
123 Land[y + dx, i]:= Land[y + dx, i] and lfCurrentMask |
124 else if Land[y + dx, i] and $007F > 0 then |
124 else if Land[y + dx, i] and lfObjMask > 0 then |
125 Land[y + dx, i]:= (Land[y + dx, i] and $FF80) or ((Land[y + dx, i] and $7F) - 1); |
125 Land[y + dx, i]:= (Land[y + dx, i] and lfNotObjMask) or ((Land[y + dx, i] and lfObjMask) - 1); |
126 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
126 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
127 for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do |
127 for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do |
128 if isCurrent then |
128 if isCurrent then |
129 Land[y - dx, i]:= Land[y - dx, i] and $FF7F |
129 Land[y - dx, i]:= Land[y - dx, i] and lfCurrentMask |
130 else if Land[y - dx, i] and $007F > 0 then |
130 else if Land[y - dx, i] and lfObjMask > 0 then |
131 Land[y - dx, i]:= (Land[y - dx, i] and $FF80) or ((Land[y - dx, i] and $7F) - 1) |
131 Land[y - dx, i]:= (Land[y - dx, i] and lfNotObjMask) or ((Land[y - dx, i] and lfObjMask) - 1) |
132 end |
132 end |
133 else |
133 else |
134 begin |
134 begin |
135 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
135 if ((y + dy) and LAND_HEIGHT_MASK) = 0 then |
136 for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do |
136 for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do |
137 if isCurrent then |
137 if isCurrent then |
138 Land[y + dy, i]:= Land[y + dy, i] or $80 |
138 Land[y + dy, i]:= Land[y + dy, i] or lfCurrentHog |
139 else if Land[y + dy, i] and $007F < 127 then |
139 else if Land[y + dy, i] and lfObjMask < lfObjMask then |
140 Land[y + dy, i]:= (Land[y + dy, i] and $FF80) or ((Land[y + dy, i] and $7F) + 1); |
140 Land[y + dy, i]:= (Land[y + dy, i] and lfNotObjMask) or ((Land[y + dy, i] and lfObjMask) + 1); |
141 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
141 if ((y - dy) and LAND_HEIGHT_MASK) = 0 then |
142 for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do |
142 for i:= Max(x - dx, 0) to Min(x + dx, LAND_WIDTH - 1) do |
143 if isCurrent then |
143 if isCurrent then |
144 Land[y - dy, i]:= Land[y - dy, i] or $80 |
144 Land[y - dy, i]:= Land[y - dy, i] or lfCurrentHog |
145 else if Land[y - dy, i] and $007F < 127 then |
145 else if Land[y - dy, i] and lfObjMask < lfObjMask then |
146 Land[y - dy, i]:= (Land[y - dy, i] and $FF80) or ((Land[y - dy, i] and $7F) + 1); |
146 Land[y - dy, i]:= (Land[y - dy, i] and lfNotObjMask) or ((Land[y - dy, i] and lfObjMask) + 1); |
147 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
147 if ((y + dx) and LAND_HEIGHT_MASK) = 0 then |
148 for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do |
148 for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do |
149 if isCurrent then |
149 if isCurrent then |
150 Land[y + dx, i]:= Land[y + dx, i] or $80 |
150 Land[y + dx, i]:= Land[y + dx, i] or lfCurrentHog |
151 else if Land[y + dx, i] and $007F < 127 then |
151 else if Land[y + dx, i] and lfObjMask < lfObjMask then |
152 Land[y + dx, i]:= (Land[y + dx, i] and $FF80) or ((Land[y + dx, i] and $7F) + 1); |
152 Land[y + dx, i]:= (Land[y + dx, i] and lfNotObjMask) or ((Land[y + dx, i] and lfObjMask) + 1); |
153 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
153 if ((y - dx) and LAND_HEIGHT_MASK) = 0 then |
154 for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do |
154 for i:= Max(x - dy, 0) to Min(x + dy, LAND_WIDTH - 1) do |
155 if isCurrent then |
155 if isCurrent then |
156 Land[y - dx, i]:= Land[y - dx, i] or $80 |
156 Land[y - dx, i]:= Land[y - dx, i] or lfCurrentHog |
157 else if Land[y - dx, i] and $007F < 127 then |
157 else if Land[y - dx, i] and lfObjMask < lfObjMask then |
158 Land[y - dx, i]:= (Land[y - dx, i] and $FF80) or ((Land[y - dx, i] and $7F) + 1) |
158 Land[y - dx, i]:= (Land[y - dx, i] and lfNotObjMask) or ((Land[y - dx, i] and lfObjMask) + 1) |
159 end |
159 end |
160 end; |
160 end; |
161 |
161 |
162 |
162 |
163 |
163 |