23
|
1 |
unit uLandTemplates;
|
|
2 |
interface
|
|
3 |
uses SDLh;
|
|
4 |
{$INCLUDE options.inc}
|
|
5 |
|
|
6 |
type PPointArray = ^TPointArray;
|
|
7 |
TPointArray = array[0..0] of TPoint;
|
|
8 |
TEdgeTemplate = record
|
|
9 |
BasePoints: PPointArray;
|
|
10 |
BasePointsCount: Longword;
|
|
11 |
BezPassCnt: Longword;
|
|
12 |
PassMin, PassDelta: Longword;
|
|
13 |
WaveAmplMin, WaveAmplDelta: real;
|
|
14 |
WaveFreqMin, WaveFreqDelta: real;
|
|
15 |
FillPoints: PPointArray;
|
|
16 |
FillPointsCount: Longword;
|
27
|
17 |
canMirror, canFlip: boolean;
|
23
|
18 |
end;
|
|
19 |
|
|
20 |
const Template0Points: array[0..4] of TPoint =
|
|
21 |
(
|
|
22 |
(x: 500; y: 1500),
|
|
23 |
(x: 350; y: 400),
|
|
24 |
(x: 1023; y: 820),
|
|
25 |
(x: 1700; y: 400),
|
|
26 |
(x: 1550; y: 1500)
|
|
27 |
);
|
|
28 |
Template0FPoints: array[0..0] of TPoint =
|
|
29 |
(
|
|
30 |
(x: 1023; y: 1023)
|
|
31 |
);
|
|
32 |
|
30
|
33 |
const Template1Points: array[0..12] of TPoint =
|
23
|
34 |
(
|
|
35 |
(x: 300; y: 1500),
|
|
36 |
(x: 300; y: 1000),
|
|
37 |
(x: 250; y: 750),
|
30
|
38 |
(x: 550; y: 480),
|
|
39 |
(x: 650; y: 780),
|
|
40 |
(x: 810; y: 780),
|
|
41 |
(x: 800; y: 500),
|
27
|
42 |
(x: 1200; y: 500),
|
30
|
43 |
(x: 1300; y: 800),
|
|
44 |
(x: 1500; y: 500),
|
23
|
45 |
(x: 1800; y: 750),
|
|
46 |
(x: 1750; y: 1000),
|
|
47 |
(x: 1750; y: 1500)
|
|
48 |
);
|
|
49 |
Template1FPoints: array[0..0] of TPoint =
|
|
50 |
(
|
|
51 |
(x: 1023; y: 1023)
|
|
52 |
);
|
|
53 |
|
30
|
54 |
const Template2Points: array[0..28] of TPoint =
|
23
|
55 |
(
|
|
56 |
(x: 350; y: 1500),
|
|
57 |
(x: 350; y: 1000),
|
27
|
58 |
(x: 190; y: 850),
|
|
59 |
(x: 500; y: 750),
|
|
60 |
(x: 520; y: 450),
|
|
61 |
(x: 190; y: 600),
|
23
|
62 |
(x: 210; y: 260),
|
30
|
63 |
(x: 800; y: 310),
|
|
64 |
(x: 1350; y: 220),
|
|
65 |
(x: 1250; y: 360),
|
|
66 |
(x: 1550; y: 520),
|
|
67 |
(x: 1100; y: 400),
|
|
68 |
(x: 900; y: 470),
|
23
|
69 |
(x: 650; y: 400),
|
30
|
70 |
(x: 900; y: 750),
|
|
71 |
(x: 600; y: 750),
|
|
72 |
(x: 600; y: 850),
|
|
73 |
(x: 1100; y: 900),
|
23
|
74 |
(x: 1200; y: 1000),
|
30
|
75 |
(x: 1200; y: 1300),
|
|
76 |
(x: 1400; y: 1300),
|
23
|
77 |
(x: 1400; y: 1000),
|
30
|
78 |
(x: 1280; y: 850),
|
|
79 |
(x: 1150; y: 630),
|
|
80 |
(x: 1600; y: 850),
|
23
|
81 |
(x: 1800; y: 600),
|
|
82 |
(x: 1900; y: 600),
|
|
83 |
(x: 1700; y: 1010),
|
30
|
84 |
(x: 1700; y: 1500)
|
23
|
85 |
);
|
|
86 |
Template2FPoints: array[0..1] of TPoint =
|
|
87 |
(
|
|
88 |
(x: 600; y: 1023),
|
|
89 |
(x: 1500; y: 1023)
|
|
90 |
);
|
|
91 |
|
27
|
92 |
const Template3Points: array[0..23] of TPoint =
|
|
93 |
(
|
|
94 |
(x: 200; y: 1500),
|
|
95 |
(x: 200; y: 1000),
|
|
96 |
(x: 390; y: 650),
|
|
97 |
(x: 210; y: 260),
|
|
98 |
(x: 1000; y: 420),
|
|
99 |
(x: 1100; y: 200),
|
|
100 |
(x: 1250; y: 420),
|
|
101 |
(x: 1250; y: 620),
|
|
102 |
(x: 900; y: 610),
|
|
103 |
(x: 650; y: 450),
|
|
104 |
(x: 550; y: 500),
|
|
105 |
(x: 650; y: 700),
|
|
106 |
(x: 1200; y: 800),
|
|
107 |
(x: 1200; y: 1000),
|
|
108 |
(x: 1200; y: 1200),
|
|
109 |
(x: 1400; y: 1200),
|
|
110 |
(x: 1400; y: 1000),
|
|
111 |
(x: 1280; y: 750),
|
|
112 |
(x: 1500; y: 600),
|
|
113 |
(x: 1400; y: 200),
|
|
114 |
(x: 1800; y: 200),
|
|
115 |
(x: 1700; y: 600),
|
|
116 |
(x: 1900; y: 1010),
|
|
117 |
(x: 1800; y: 1200)
|
|
118 |
);
|
|
119 |
Template3FPoints: array[0..1] of TPoint =
|
|
120 |
(
|
|
121 |
(x: 500; y: 1023),
|
|
122 |
(x: 1500; y: 1023)
|
|
123 |
);
|
|
124 |
|
|
125 |
const Template4Points: array[0..38] of TPoint =
|
|
126 |
(
|
|
127 |
(x: 200; y: 1500),
|
|
128 |
(x: 200; y: 1000),
|
|
129 |
(x: 210; y: 800),
|
|
130 |
(x: 480; y: 830),
|
|
131 |
(x: 460; y: 700),
|
|
132 |
(x: 150; y: 610),
|
|
133 |
(x: 150; y: 310),
|
|
134 |
(x: 220; y: 200),
|
|
135 |
(x: 340; y: 195),
|
|
136 |
(x: 410; y: 415),
|
|
137 |
(x: 420; y: 495),
|
|
138 |
(x: 535; y: 615),
|
|
139 |
(x: 705; y: 600),
|
|
140 |
(x: 760; y: 425),
|
|
141 |
(x: 815; y: 230),
|
|
142 |
(x: 970; y: 200),
|
|
143 |
(x: 1050; y: 360),
|
|
144 |
(x: 850; y: 590),
|
|
145 |
(x: 1070; y: 790),
|
|
146 |
(x: 1000; y: 1000),
|
|
147 |
(x: 1000; y: 1500),
|
|
148 |
(x: 1250; y: 1500),
|
|
149 |
(x: 1250; y: 1000),
|
|
150 |
(x: 1260; y: 830),
|
|
151 |
(x: 1290; y: 700),
|
|
152 |
(x: 1270; y: 450),
|
|
153 |
(x: 1180; y: 280),
|
|
154 |
(x: 1210; y: 160),
|
|
155 |
(x: 1370; y: 160),
|
|
156 |
(x: 1505; y: 205),
|
|
157 |
(x: 1630; y: 315),
|
|
158 |
(x: 1660; y: 450),
|
|
159 |
(x: 1580; y: 620),
|
|
160 |
(x: 1670; y: 725),
|
|
161 |
(x: 1800; y: 730),
|
|
162 |
(x: 1860; y: 680),
|
|
163 |
(x: 1925; y: 810),
|
|
164 |
(x: 1800; y: 1000),
|
|
165 |
(x: 1800; y: 1500)
|
|
166 |
);
|
|
167 |
Template4FPoints: array[0..1] of TPoint =
|
|
168 |
(
|
|
169 |
(x: 500; y: 1023),
|
|
170 |
(x: 1500; y: 1023)
|
|
171 |
);
|
30
|
172 |
|
|
173 |
const Template5Points: array[0..10] of TPoint =
|
|
174 |
(
|
|
175 |
(x: 225; y: 1260),
|
|
176 |
(x: 254; y: 226),
|
|
177 |
(x: 729; y: 238),
|
|
178 |
(x: 658; y: 441),
|
|
179 |
(x: 661; y: 651),
|
|
180 |
(x: 1023; y: 759),
|
|
181 |
(x: 1374; y: 648),
|
|
182 |
(x: 1473; y: 285),
|
|
183 |
(x: 1803; y: 207),
|
|
184 |
(x: 1839; y: 801),
|
|
185 |
(x: 1674; y: 1239)
|
|
186 |
);
|
|
187 |
Template5FPoints: array[0..0] of TPoint =
|
|
188 |
(
|
|
189 |
(x: 1023; y: 1023)
|
|
190 |
);
|
27
|
191 |
|
35
|
192 |
const Template6Points: array[0..20] of TPoint =
|
|
193 |
(
|
|
194 |
(x: 318; y: 1494),
|
|
195 |
(x: 270; y: 1023),
|
|
196 |
(x: 252; y: 921),
|
|
197 |
(x: 480; y: 888),
|
|
198 |
(x: 492; y: 753),
|
|
199 |
(x: 654; y: 756),
|
|
200 |
(x: 687; y: 630),
|
|
201 |
(x: 906; y: 627),
|
|
202 |
(x: 987; y: 813),
|
|
203 |
(x: 1125; y: 825),
|
|
204 |
(x: 1134; y: 645),
|
|
205 |
(x: 1236; y: 558),
|
|
206 |
(x: 1260; y: 438),
|
|
207 |
(x: 1467; y: 462),
|
|
208 |
(x: 1536; y: 348),
|
|
209 |
(x: 1680; y: 402),
|
|
210 |
(x: 1713; y: 594),
|
|
211 |
(x: 1593; y: 693),
|
|
212 |
(x: 1707; y: 774),
|
|
213 |
(x: 1728; y: 894),
|
|
214 |
(x: 1788; y: 1491)
|
|
215 |
);
|
|
216 |
Template6FPoints: array[0..0] of TPoint =
|
|
217 |
(
|
|
218 |
(x: 1023; y: 1023)
|
|
219 |
);
|
|
220 |
|
49
|
221 |
const Template7Points: array[0..43] of TPoint =
|
|
222 |
(
|
|
223 |
(x: 180; y: 1485),
|
|
224 |
(x: 411; y: 1020),
|
|
225 |
(x: 402; y: 912),
|
|
226 |
(x: 141; y: 897),
|
|
227 |
(x: 156; y: 729),
|
|
228 |
(x: 417; y: 813),
|
|
229 |
(x: 432; y: 585),
|
|
230 |
(x: 147; y: 570),
|
|
231 |
(x: 138; y: 435),
|
|
232 |
(x: 444; y: 417),
|
|
233 |
(x: 447; y: 207),
|
|
234 |
(x: 573; y: 261),
|
|
235 |
(x: 663; y: 201),
|
|
236 |
(x: 711; y: 375),
|
|
237 |
(x: 897; y: 411),
|
|
238 |
(x: 936; y: 498),
|
|
239 |
(x: 663; y: 558),
|
|
240 |
(x: 669; y: 762),
|
|
241 |
(x: 957; y: 723),
|
|
242 |
(x: 984; y: 864),
|
|
243 |
(x: 729; y: 879),
|
|
244 |
(x: 879; y: 1020),
|
|
245 |
(x: 981; y: 1449),
|
|
246 |
(x: 1242; y: 1449),
|
|
247 |
(x: 1476; y: 1020),
|
|
248 |
(x: 1470; y: 900),
|
|
249 |
(x: 1284; y: 897),
|
|
250 |
(x: 1218; y: 774),
|
|
251 |
(x: 1464; y: 765),
|
|
252 |
(x: 1464; y: 672),
|
|
253 |
(x: 1119; y: 630),
|
|
254 |
(x: 1116; y: 537),
|
|
255 |
(x: 1485; y: 501),
|
|
256 |
(x: 1167; y: 246),
|
|
257 |
(x: 1263; y: 180),
|
|
258 |
(x: 1572; y: 312),
|
|
259 |
(x: 1767; y: 162),
|
|
260 |
(x: 1827; y: 306),
|
|
261 |
(x: 1647; y: 465),
|
|
262 |
(x: 1875; y: 621),
|
|
263 |
(x: 1683; y: 747),
|
|
264 |
(x: 1665; y: 831),
|
|
265 |
(x: 1818; y: 951),
|
|
266 |
(x: 1893; y: 1476)
|
|
267 |
);
|
|
268 |
Template7FPoints: array[0..1] of TPoint =
|
|
269 |
(
|
|
270 |
(x: 630; y: 1023),
|
|
271 |
(x:1655; y: 1023)
|
|
272 |
);
|
|
273 |
|
|
274 |
const EdgeTemplates: array[0..7] of TEdgeTemplate =
|
23
|
275 |
(
|
|
276 |
(BasePoints: @Template0Points;
|
|
277 |
BasePointsCount: Succ(High(Template0Points));
|
|
278 |
BezPassCnt: 4;
|
27
|
279 |
PassMin: 10; PassDelta: 5;
|
|
280 |
WaveAmplMin: 17; WaveAmplDelta: 20;
|
|
281 |
WaveFreqMin: 0.010; WaveFreqDelta: 0.002;
|
23
|
282 |
FillPoints: @Template0FPoints;
|
|
283 |
FillPointsCount: Succ(High(Template0FPoints));
|
27
|
284 |
canMirror: false; canFlip: false;
|
23
|
285 |
),
|
|
286 |
(BasePoints: @Template1Points;
|
|
287 |
BasePointsCount: Succ(High(Template1Points));
|
30
|
288 |
BezPassCnt: 3;
|
27
|
289 |
PassMin: 10; PassDelta: 2;
|
|
290 |
WaveAmplMin: 25; WaveAmplDelta: 15;
|
|
291 |
WaveFreqMin: 0.008; WaveFreqDelta: 0.002;
|
23
|
292 |
FillPoints: @Template1FPoints;
|
|
293 |
FillPointsCount: Succ(High(Template1FPoints));
|
27
|
294 |
canMirror: false; canFlip: false;
|
23
|
295 |
),
|
|
296 |
(BasePoints: @Template2Points;
|
|
297 |
BasePointsCount: Succ(High(Template2Points));
|
25
|
298 |
BezPassCnt: 3;
|
27
|
299 |
PassMin: 14; PassDelta: 3;
|
|
300 |
WaveAmplMin: 10; WaveAmplDelta: 10;
|
|
301 |
WaveFreqMin: 0.010; WaveFreqDelta: 0.002;
|
23
|
302 |
FillPoints: @Template2FPoints;
|
|
303 |
FillPointsCount: Succ(High(Template2FPoints));
|
27
|
304 |
canMirror: true; canFlip: false;
|
|
305 |
),
|
|
306 |
(BasePoints: @Template3Points;
|
|
307 |
BasePointsCount: Succ(High(Template3Points));
|
|
308 |
BezPassCnt: 4;
|
|
309 |
PassMin: 15; PassDelta: 2;
|
|
310 |
WaveAmplMin: 8; WaveAmplDelta: 12;
|
|
311 |
WaveFreqMin: 0.015; WaveFreqDelta: 0.0015;
|
|
312 |
FillPoints: @Template3FPoints;
|
|
313 |
FillPointsCount: Succ(High(Template3FPoints));
|
|
314 |
canMirror: true; canFlip: false;
|
|
315 |
),
|
|
316 |
(BasePoints: @Template4Points;
|
|
317 |
BasePointsCount: Succ(High(Template4Points));
|
|
318 |
BezPassCnt: 3;
|
|
319 |
PassMin: 19; PassDelta: 5;
|
|
320 |
WaveAmplMin: 12; WaveAmplDelta: 14;
|
|
321 |
WaveFreqMin: 0.008; WaveFreqDelta: 0.001;
|
|
322 |
FillPoints: @Template4FPoints;
|
|
323 |
FillPointsCount: Succ(High(Template4FPoints));
|
|
324 |
canMirror: true; canFlip: false;
|
49
|
325 |
),
|
30
|
326 |
(BasePoints: @Template5Points;
|
|
327 |
BasePointsCount: Succ(High(Template5Points));
|
|
328 |
BezPassCnt: 4;
|
|
329 |
PassMin: 15; PassDelta: 1;
|
|
330 |
WaveAmplMin: 15; WaveAmplDelta: 14;
|
|
331 |
WaveFreqMin: 0.008; WaveFreqDelta: 0.002;
|
|
332 |
FillPoints: @Template5FPoints;
|
|
333 |
FillPointsCount: Succ(High(Template5FPoints));
|
|
334 |
canMirror: true; canFlip: false;
|
35
|
335 |
),
|
|
336 |
(BasePoints: @Template6Points;
|
|
337 |
BasePointsCount: Succ(High(Template6Points));
|
|
338 |
BezPassCnt: 3;
|
|
339 |
PassMin: 15; PassDelta: 1;
|
|
340 |
WaveAmplMin: 15; WaveAmplDelta: 10;
|
|
341 |
WaveFreqMin: 0.010; WaveFreqDelta: 0.0015;
|
|
342 |
FillPoints: @Template6FPoints;
|
|
343 |
FillPointsCount: Succ(High(Template6FPoints));
|
|
344 |
canMirror: true; canFlip: false;
|
49
|
345 |
),
|
|
346 |
(BasePoints: @Template7Points;
|
|
347 |
BasePointsCount: Succ(High(Template7Points));
|
|
348 |
BezPassCnt: 3;
|
|
349 |
PassMin: 12; PassDelta: 4;
|
|
350 |
WaveAmplMin: 5; WaveAmplDelta: 15;
|
|
351 |
WaveFreqMin: 0.015; WaveFreqDelta: 0.002;
|
|
352 |
FillPoints: @Template7FPoints;
|
|
353 |
FillPointsCount: Succ(High(Template7FPoints));
|
|
354 |
canMirror: true; canFlip: false;
|
35
|
355 |
)
|
30
|
356 |
|
23
|
357 |
);
|
|
358 |
|
30
|
359 |
|
|
360 |
|
23
|
361 |
implementation
|
|
362 |
|
|
363 |
end.
|