equal
deleted
inserted
replaced
201 end |
201 end |
202 end; |
202 end; |
203 |
203 |
204 procedure Push(_xl, _xr, _y, _dir: integer); |
204 procedure Push(_xl, _xr, _y, _dir: integer); |
205 begin |
205 begin |
|
206 TryDo(Stack.Count <= 8192, 'FillLand: stack overflow', true); |
206 _y:= _y + _dir; |
207 _y:= _y + _dir; |
207 if (_y < 0) or (_y > 1023) then exit; |
208 if (_y < 0) or (_y > 1023) then exit; |
208 with Stack.points[Stack.Count] do |
209 with Stack.points[Stack.Count] do |
209 begin |
210 begin |
210 xl:= _xl; |
211 xl:= _xl; |
211 xr:= _xr; |
212 xr:= _xr; |
212 y:= _y; |
213 y:= _y; |
213 dir:= _dir |
214 dir:= _dir |
214 end; |
215 end; |
215 inc(Stack.Count); |
216 inc(Stack.Count) |
216 TryDo(Stack.Count < 8192, 'stack overflow', true) |
|
217 end; |
217 end; |
218 |
218 |
219 procedure Pop(out _xl, _xr, _y, _dir: integer); |
219 procedure Pop(out _xl, _xr, _y, _dir: integer); |
220 begin |
220 begin |
221 dec(Stack.Count); |
221 dec(Stack.Count); |