146 begin |
146 begin |
147 for i:= 0 to pred(BasePointsCount) do |
147 for i:= 0 to pred(BasePointsCount) do |
148 if pa.ar[i].x <> NTPX then |
148 if pa.ar[i].x <> NTPX then |
149 pa.ar[i].x:= LAND_WIDTH - 1 - pa.ar[i].x; |
149 pa.ar[i].x:= LAND_WIDTH - 1 - pa.ar[i].x; |
150 for i:= 0 to pred(FillPointsCount) do |
150 for i:= 0 to pred(FillPointsCount) do |
151 FillPoints^[i].x:= LAND_WIDTH - 1 - FillPoints^[i].x; |
151 fps^[i].x:= LAND_WIDTH - 1 - fps^[i].x; |
152 end; |
152 end; |
153 |
153 |
154 (* Experiment in making this option more useful |
154 (* Experiment in making this option more useful |
155 if ((not isNegative) and (cTemplateFilter = 4)) or |
155 if ((not isNegative) and (cTemplateFilter = 4)) or |
156 (canFlip and (getrandom(2) = 0)) then |
156 (canFlip and (getrandom(2) = 0)) then |
179 if pa.ar[i].y < 0 then |
179 if pa.ar[i].y < 0 then |
180 pa.ar[i].y:= 0; |
180 pa.ar[i].y:= 0; |
181 end; |
181 end; |
182 for i:= 0 to pred(FillPointsCount) do |
182 for i:= 0 to pred(FillPointsCount) do |
183 begin |
183 begin |
184 dec(FillPoints^[i].y, 100); |
184 dec(fps^[i].y, 100); |
185 if FillPoints^[i].y < 0 then |
185 if fps^[i].y < 0 then |
186 FillPoints^[i].y:= 0; |
186 fps^[i].y:= 0; |
187 end; |
187 end; |
188 end; |
188 end; |
189 |
189 |
190 if (canFlip and (getrandom(2) = 0)) then |
190 if (canFlip and (getrandom(2) = 0)) then |
191 begin |
191 begin |
192 for i:= 0 to pred(BasePointsCount) do |
192 for i:= 0 to pred(BasePointsCount) do |
193 pa.ar[i].y:= LAND_HEIGHT - 1 - pa.ar[i].y; |
193 pa.ar[i].y:= LAND_HEIGHT - 1 - pa.ar[i].y; |
194 for i:= 0 to pred(FillPointsCount) do |
194 for i:= 0 to pred(FillPointsCount) do |
195 FillPoints^[i].y:= LAND_HEIGHT - 1 - FillPoints^[i].y; |
195 fps^[i].y:= LAND_HEIGHT - 1 - fps^[i].y; |
196 end; |
196 end; |
197 end |
197 end |
198 end; |
198 end; |
199 |
199 |
200 |
200 |
201 procedure GenBlank(var Template: TEdgeTemplate); |
201 procedure GenBlank(var Template: TEdgeTemplate); |
202 var pa: TPixAr; |
202 var pa: TPixAr; |
203 i: Longword; |
203 i: Longword; |
204 y, x: Longword; |
204 y, x: Longword; |
205 begin |
205 fps: TPointArray; |
|
206 begin |
|
207 fps:=Template.FillPoints^; |
206 ResizeLand(Template.TemplateWidth, Template.TemplateHeight); |
208 ResizeLand(Template.TemplateWidth, Template.TemplateHeight); |
207 for y:= 0 to LAND_HEIGHT - 1 do |
209 for y:= 0 to LAND_HEIGHT - 1 do |
208 for x:= 0 to LAND_WIDTH - 1 do |
210 for x:= 0 to LAND_WIDTH - 1 do |
209 Land[y, x]:= lfBasic; |
211 Land[y, x]:= lfBasic; |
210 {$HINTS OFF} |
212 {$HINTS OFF} |
211 SetPoints(Template, pa); |
213 SetPoints(Template, pa, @fps); |
212 {$HINTS ON} |
214 {$HINTS ON} |
213 for i:= 1 to Template.BezierizeCount do |
215 for i:= 1 to Template.BezierizeCount do |
214 begin |
216 begin |
215 BezierizeEdge(pa, _0_5); |
217 BezierizeEdge(pa, _0_5); |
216 RandomizePoints(pa); |
218 RandomizePoints(pa); |