1 (*
2  * Hedgewars, a free turn based strategy game
3  * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; version 2 of the License
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  *)
18 
19 {$INCLUDE "options.inc"}
20 
21 unit uLandTemplates;
22 interface
23 uses SDLh;
24 
25 const NTPX = Low(SmallInt);
26 
27 type TPointArray = array[0..64] of TSDL_Rect;
28      PPointArray = ^TPointArray;
29      TEdgeTemplate = record
30                      BasePoints: PPointArray;
31                      BasePointsCount: Longword;
32                      FillPoints: PPointArray;
33                      FillPointsCount: Longword;
34                      TemplateHeight, TemplateWidth: Longword;
35                      canMirror, canFlip, isNegative, canInvert: boolean;
36                      hasGirders: boolean;
37                      MaxHedgeHogs: Longword;
38                      end;
39 ///////////////////////// ORIGINAL SET //////////////////////////////
40 /// Area expanded to 2848x1424 at Tiys request to move out border ///
41 /////////////////////////////////////////////////////////////////////
42 const Template0Points: array[0..18] of TSDL_Rect =
43       (
44        (x:  810; y: 1424; w:    1; h:    1),
45        (x:  560; y: 1160; w:  130; h:  170),
46        (x:  742; y: 1106; w:  316; h:  150),
47        (x:  638; y:  786; w:  270; h:  180),
48        (x:  646; y:  576; w:  242; h:  156),
49        (x:  952; y:  528; w:  610; h:  300),
50        (x: 1150; y:  868; w:  352; h:  324),
51        (x: 1050; y: 1424; w:  500; h:    1),
52        (x: 1650; y: 1500; w:    1; h:    1),
53        (x: 1890; y: 1424; w:    1; h:    1),
54        (x: 1852; y: 1304; w:   74; h:   12),
55        (x: 1648; y:  975; w:   68; h:  425),
56        (x: 1826; y:  992; w:  140; h:  142),
57        (x: 1710; y:  592; w:  150; h:  350),
58        (x: 1988; y:  594; w:  148; h:  242),
59        (x: 2018; y:  872; w:  276; h:  314),
60        (x: 2110; y: 1250; w:  130; h:   86),
61        (x: 2134; y: 1424; w:    1; h:    1),
62        (x: NTPX; y:    0; w:    1; h:    1)
63       );
64       Template0FPoints: array[0..0] of TPoint =
65       (
66        (x: 1023; y:    0)
67       );
68 
69 const Template1Points: array[0..15] of TSDL_Rect =
70       (
71        (x:  800; y: 1424; w:   25; h:    1),
72        (x:  684; y: 1292; w:  254; h:   58),
73        (x:  892; y: 1034; w:  100; h:  200),
74        (x:  654; y:  646; w:  276; h:  380),
75        (x: 1020; y:  654; w:  125; h:  270),
76        (x: 1080; y:  950; w:   96; h:  390),
77        (x: 1226; y: 1014; w:  110; h:  350),
78        (x: 1200; y:  586; w:  150; h:  380),
79        (x: 1400; y:  586; w:  170; h:  375),
80        (x: 1412; y:  990; w:  188; h:  298),
81        (x: 1640; y: 1068; w:  136; h:  172),
82        (x: 1670; y:  594; w:  120; h:  392),
83        (x: 1914; y:  594; w:  364; h:  362),
84        (x: 1850; y: 1052; w:  315; h:  232),
85        (x: 1860; y: 1424; w:   25; h:    1),
86        (x: NTPX; y:    0; w:    1; h:    1)
87       );
88       Template1FPoints: array[0..0] of TPoint =
89       (
90        (x: 1023; y:    0)
91       );
92 
93 const Template2Points: array[0..21] of TSDL_Rect =
94       (
95        (x:  754; y: 1424; w:    1; h:    1),
96        (x:  632; y: 1326; w:  226; h:   60),
97        (x:  520; y: 1246; w:  298; h:   62),
98        (x:  680; y: 1104; w:  210; h:  102),
99        (x:  608; y:  822; w:  192; h:  248),
100        (x:  692; y:  560; w:  206; h:  240),
101        (x:  926; y:  572; w:   92; h:  334),
102        (x:  862; y:  928; w:  226; h:  126),
103        (x:  956; y: 1078; w:  268; h:  156),
104        (x: 1122; y:  564; w:  138; h:  500),
105        (x: 1290; y:  556; w:   94; h:  352),
106        (x: 1298; y:  962; w:  170; h:  264),
107        (x: 1492; y:  784; w:   84; h:  446),
108        (x: 1606; y:  600; w:  158; h:  278),
109        (x: 1700; y:  890; w:  104; h:  336),
110        (x: 1816; y:  946; w:   90; h:  398),
111        (x: 1946; y:  592; w:  134; h:  532),
112        (x: 2102; y:  646; w:  156; h:  258),
113        (x: 2100; y:  948; w:  132; h:  340),
114        (x: 1934; y: 1298; w:  252; h:   82),
115        (x: 2004; y: 1424; w:    1; h:    1),
116        (x: NTPX; y:    0; w:    1; h:    1)
117       );
118       Template2FPoints: array[0..0] of TPoint =
119       (
120        (x: 1023; y:    0)
121       );
122 
123 const Template3Points: array[0..16] of TSDL_Rect =
124       (
125        (x:  748; y: 1424; w:    1; h:    1),
126        (x:  636; y: 1252; w:  208; h:   72),
127        (x:  898; y: 1110; w:  308; h:   60),
128        (x: 1128; y: 1252; w:  434; h:   40),
129        (x: 1574; y: 1112; w:  332; h:   40),
130        (x: 1802; y: 1238; w:  226; h:   36),
131        (x: 1930; y: 1424; w:    1; h:    1),
132        (x: NTPX; y:    0; w:    1; h:    1),
133        (x: 2060; y:  898; w:  111; h:  111),
134        (x: 1670; y:  876; w:   34; h:  102),
135        (x: 1082; y:  814; w:  284; h:  132),
136        (x:  630; y:  728; w:  126; h:  168),
137        (x:  810; y:  574; w:  114; h:  100),
138        (x: 1190; y:  572; w:  352; h:  120),
139        (x: 1674; y:  528; w:   60; h:  240),
140        (x: 1834; y:  622; w:  254; h:  116),
141        (x: NTPX; y:    0; w:    1; h:    1)
142       );
143       Template3FPoints: array[0..0] of TPoint =
144       (
145        (x: 1023; y:    0)
146       );
147 
148 const Template4Points: array[0..22] of TSDL_Rect =
149       (
150        (x:  818; y: 1424; w:    1; h:    1),
151        (x:  648; y: 1300; w:  186; h:   62),
152        (x:  672; y: 1092; w:  254; h:  138),
153        (x: 1010; y: 1168; w:   90; h:  166),
154        (x: 1220; y: 1016; w:  224; h:  258),
155        (x: 1642; y: 1158; w:   96; h:  146),
156        (x: 1950; y: 1098; w:  224; h:  134),
157        (x: 1930; y: 1302; w:  210; h:   54),
158        (x: 1932; y: 1424; w:    1; h:    1),
159        (x: NTPX; y:    0; w:    1; h:    1),
160        (x:  602; y:  818; w:  110; h:   92),
161        (x:  652; y:  712; w:  160; h:   32),
162        (x:  550; y:  568; w:  134; h:   78),
163        (x: 1102; y:  560; w:  132; h:   84),
164        (x: 1102; y:  708; w:  230; h:   36),
165        (x: 1120; y:  848; w:  166; h:   96),
166        (x: NTPX; y:    0; w:    1; h:    1),
167        (x: 2102; y:  834; w:  202; h:   42),
168        (x: 1652; y:  788; w:  134; h:   98),
169        (x: 1614; y:  552; w:  116; h:  154),
170        (x: 1828; y:  652; w:  150; h:   70),
171        (x: 2150; y:  552; w:   86; h:  220),
172        (x: NTPX; y:    0; w:    1; h:    1)
173       );
174       Template4FPoints: array[0..0] of TPoint =
175       (
176        (x: 1023; y:    0)
177       );
178 
179 const Template5Points: array[0..15] of TSDL_Rect =
180       (
181        (x:  674; y: 1424; w:    1; h:    1),
182        (x:  590; y: 1318; w:  168; h:   26),
183        (x:  782; y:  976; w:  122; h:  314),
184        (x:  968; y: 1144; w:   56; h:  180),
185        (x: 1078; y: 1256; w:   64; h:   56),
186        (x: 1140; y: 1050; w:  106; h:  220),
187        (x: 1044; y:  896; w:  162; h:  140),
188        (x:  896; y:  610; w:  886; h:  174),
189        (x: 1334; y:  848; w:  296; h:  108),
190        (x: 1350; y: 1152; w:  152; h:  146),
191        (x: 1572; y: 1174; w:   60; h:  152),
192        (x: 1684; y: 1122; w:  150; h:  138),
193        (x: 1894; y:  764; w:   56; h:  582),
194        (x: 2020; y: 1174; w:   94; h:  232),
195        (x: 2012; y: 1424; w:    1; h:    1),
196        (x: NTPX; y:    0; w:    1; h:    1)
197        );
198       Template5FPoints: array[0..0] of TPoint =
199       (
200        (x: 1023; y:    0)
201       );
202 
203 const Template6Points: array[0..13] of TSDL_Rect =
204       (
205        (x:  768; y: 1422; w:    2; h:    2),
206        (x:  666; y: 1240; w:  302; h:  110),
207        (x:  694; y:  912; w:  104; h:  290),
208        (x:  970; y:  980; w:  364; h:  122),
209        (x:  968; y:  840; w:  368; h:  100),
210        (x:  632; y:  660; w:  482; h:  130),
211        (x: 1178; y:  642; w:   62; h:   64),
212        (x: 1390; y:  554; w:   58; h:  246),
213        (x: 1600; y:  676; w:  590; h:   98),
214        (x: 1488; y:  842; w:  214; h:  188),
215        (x: 1450; y: 1086; w:  406; h:   92),
216        (x: 1984; y:  902; w:  190; h:  412),
217        (x: 2046; y: 1420; w:    2; h:    2),
218        (x: NTPX; y:    0; w:    1; h:    1)
219        );
220       Template6FPoints: array[0..0] of TPoint =
221       (
222        (x: 1023; y:    0)
223       );
224 
225 const Template7Points: array[0..5] of TSDL_Rect =
226       (
227        (x:  562; y: 1424; w:  400; h:    1),
228        (x:  626; y:  634; w:  142; h:  360),
229        (x: 1336; y: 1140; w:  400; h:  200),
230        (x: 1976; y:  576; w:  186; h:  550),
231        (x: 1830; y: 1424; w:  454; h:    1),
232        (x: NTPX; y:    0; w:    1; h:    1)
233       );
234       Template7FPoints: array[0..0] of TPoint =
235       (
236        (x: 1023; y:    0)
237       );
238 
239 
240 const Template8Points: array[0..19] of TSDL_Rect =
241       (
242        (x:  764; y: 1424; w:   20; h:    1),
243        (x:  690; y: 1260; w:   64; h:   62),
244        (x:  886; y: 1150; w:   52; h:  146),
245        (x:  656; y:  990; w:  116; h:  144),
246        (x:  870; y:  868; w:  138; h:  168),
247        (x:  642; y:  642; w:  158; h:  162),
248        (x:  908; y:  710; w:  198; h:   72),
249        (x: 1170; y:  628; w:  118; h:  134),
250        (x: 1036; y: 1118; w:  142; h:  132),
251        (x: 1368; y: 1100; w:  172; h:   58),
252        (x: 1370; y: 1204; w:  172; h:   62),
253        (x: 1632; y: 1104; w:   82; h:  226),
254        (x: 1756; y:  994; w:   64; h:  152),
255        (x: 1614; y:  734; w:  106; h:  152),
256        (x: 1810; y:  660; w:  380; h:   82),
257        (x: 1928; y:  822; w:   30; h:  118),
258        (x: 1940; y:  988; w:  212; h:   50),
259        (x: 1864; y: 1146; w:  128; h:  146),
260        (x: 2030; y: 1424; w:   20; h:    1),
261        (x: NTPX; y:    0; w:    1; h:    1)
262       );
263       Template8FPoints: array[0..0] of TPoint =
264       (
265        (x: 1023; y:    0)
266       );
267 
268 const Template9Points: array[0..31] of TSDL_Rect =
269       (
270        (x:  740; y: 1424; w:    1; h:    1),
271        (x:  676; y: 1302; w:   44; h:   54),
272        (x:  834; y: 1236; w:   58; h:   90),
273        (x:  666; y: 1134; w:   80; h:   80),
274        (x:  646; y: 1004; w:   96; h:  108),
275        (x:  826; y: 1046; w:  110; h:  112),
276        (x:  634; y:  692; w:  118; h:  164),
277        (x:  828; y:  796; w:  130; h:  110),
278        (x:  916; y:  598; w:  344; h:   78),
279        (x: 1088; y:  826; w:   50; h:   40),
280        (x: 1026; y:  960; w:   32; h:  148),
281        (x: 1098; y: 1050; w:  160; h:   34),
282        (x: 1074; y: 1188; w:   36; h:  136),
283        (x: 1414; y: 1248; w:   48; h:   48),
284        (x: 1486; y: 1128; w:   64; h:   88),
285        (x: 1358; y: 1060; w:   70; h:   74),
286        (x: 1516; y:  996; w:   68; h:   70),
287        (x: 1518; y:  884; w:   68; h:   82),
288        (x: 1358; y:  724; w:   44; h:  140),
289        (x: 1672; y:  706; w:   52; h:   66),
290        (x: 1654; y:  902; w:   58; h:   66),
291        (x: 1634; y: 1160; w:   76; h:  112),
292        (x: 1780; y: 1162; w:  124; h:   64),
293        (x: 1872; y:  872; w:   54; h:  134),
294        (x: 1810; y:  596; w:  246; h:   62),
295        (x: 2106; y:  554; w:   38; h:  238),
296        (x: 2212; y:  748; w:   28; h:   28),
297        (x: 2092; y:  924; w:  144; h:   94),
298        (x: 2032; y: 1078; w:  248; h:   20),
299        (x: 2032; y: 1202; w:  238; h:   16),
300        (x: 2080; y: 1424; w:    1; h:    1),
301        (x: NTPX; y:    0; w:    1; h:    1)
302       );
303       Template9FPoints: array[0..0] of TPoint =
304       (
305        (x: 1023; y:    0)
306       );
307 
308 const Template10Points: array[0..13] of TSDL_Rect =
309       (
310        (x:  588; y: 1424; w:  190; h:    1),
311        (x:  640; y: 1082; w:  140; h:  150),
312        (x:  714; y:  868; w:  352; h:   94),
313        (x: 1126; y:  646; w:  106; h:  282),
314        (x: 1302; y:  790; w:  368; h:  142),
315        (x: 1358; y:  988; w:  116; h:  244),
316        (x: 1276; y: 1424; w:   14; h:    1),
317        (x: NTPX; y:    0; w:    1; h:    1),
318        (x: 1464; y: 1424; w:   22; h:    1),
319        (x: 1688; y: 1195; w:  120; h:  120),
320        (x: 1858; y:  674; w:  354; h:  448),
321        (x: 2088; y: 1195; w:  120; h:  120),
322        (x: 2182; y: 1424; w:    2; h:    1),
323        (x: NTPX; y:    0; w:    1; h:    1)
324       );
325       Template10FPoints: array[0..0] of TPoint =
326       (
327        (x: 1023; y:    0)
328       );
329 
330 const Template11Points: array[0..9] of TSDL_Rect =
331       (
332        (x:  674; y: 1424; w:  166; h:    1),
333        (x:  730; y: 1262; w:   96; h:   92),
334        (x:  892; y: 1090; w:  152; h:  250),
335        (x: 1146; y: 1046; w:   36; h:  270),
336        (x: 1338; y: 1026; w:   54; h:  224),
337        (x: 1534; y: 1046; w:   44; h:  216),
338        (x: 1692; y: 1030; w:   46; h:  300),
339        (x: 1848; y: 1064; w:  158; h:  272),
340        (x: 1984; y: 1424; w:  136; h:    1),
341        (x: NTPX; y:    0; w:    1; h:    1)
342       );
343       Template11FPoints: array[0..0] of TPoint =
344       (
345        (x: 1023; y:    0)
346       );
347 
348 const Template12Points: array[0..13] of TSDL_Rect =
349       (
350        (x:  760; y: 1424; w:    2; h:    2),
351        (x:  642; y: 1030; w:   46; h:  286),
352        (x:  854; y: 1072; w:  194; h:   56),
353        (x:  654; y:  734; w:  534; h:  200),
354        (x: 1270; y:  676; w:   58; h:  468),
355        (x: 1476; y:  672; w:  198; h:  112),
356        (x: 1400; y: 1424; w:   64; h:    2),
357        (x: NTPX; y:    0; w:    1; h:    1),
358        (x: 1644; y: 1424; w:   64; h:    2),
359        (x: 1756; y:  894; w:  184; h:   94),
360        (x: 2000; y:  814; w:   76; h:  358),
361        (x: 2148; y:  984; w:  108; h:  304),
362        (x: 2088; y: 1424; w:  176; h:    1),
363        (x: NTPX; y:    0; w:    1; h:    1)
364       );
365       Template12FPoints: array[0..0] of TPoint =
366       (
367        (x: 1023; y:    0)
368       );
369 
370 const Template13Points: array[0..15] of TSDL_Rect =
371       (
372        (x:  846; y: 1424; w:  140; h:    2),
373        (x:  680; y: 1272; w:  196; h:   32),
374        (x:  654; y: 1080; w:  262; h:  134),
375        (x: 1054; y: 1072; w:  220; h:  136),
376        (x: 1008; y:  890; w:  268; h:  110),
377        (x:  700; y:  762; w:  104; h:  200),
378        (x:  846; y:  624; w:  306; h:   58),
379        (x: 1316; y:  588; w:   84; h:  206),
380        (x: 1548; y:  574; w:  104; h:  220),
381        (x: 1826; y:  576; w:  120; h:  202),
382        (x: 1956; y:  818; w:  192; h:   68),
383        (x: 1626; y:  948; w:  246; h:   88),
384        (x: 1656; y: 1106; w:  194; h:  150),
385        (x: 1968; y: 1106; w:  198; h:  152),
386        (x: 1844; y: 1424; w:    2; h:    2),
387        (x: NTPX; y:    0; w:    1; h:    1)
388       );
389       Template13FPoints: array[0..0] of TPoint =
390       (
391        (x: 1023; y:    0)
392       );
393 
394 const Template14Points: array[0..13] of TSDL_Rect =
395       (
396        (x:  686; y: 1424; w:    2; h:    2),
397        (x:  644; y: 1286; w:   84; h:   54),
398        (x:  612; y: 1086; w:  150; h:  166),
399        (x: 1078; y: 1240; w:  186; h:   98),
400        (x: 1144; y: 1004; w:  124; h:   58),
401        (x: 1020; y:  582; w:  112; h:  194),
402        (x: 1388; y:  660; w:   92; h:  132),
403        (x: 1710; y:  574; w:  154; h:  196),
404        (x: 1560; y:  974; w:  118; h:   64),
405        (x: 1452; y: 1222; w:  328; h:   92),
406        (x: 1996; y: 1030; w:  242; h:  222),
407        (x: 1998; y: 1316; w:  254; h:   50),
408        (x: 2008; y: 1424; w:    2; h:    2),
409        (x: NTPX; y:    0; w:    1; h:    1)
410       );
411       Template14FPoints: array[0..0] of TPoint =
412       (
413        (x: 1023; y:    0)
414       );
415 
416 const Template15Points: array[0..23] of TSDL_Rect =
417       (
418        (x:  702; y: 1424; w:    2; h:    2),
419        (x:  640; y: 1290; w:   44; h:   94),
420        (x:  750; y: 1262; w:   44; h:   94),
421        (x:  860; y: 1306; w:   78; h:   70),
422        (x:  866; y: 1424; w:    2; h:    2),
423        (x: NTPX; y:    0; w:    1; h:    1),
424        (x: 1204; y: 1424; w:    2; h:    2),
425        (x: 1120; y: 1182; w:  108; h:  174),
426        (x:  884; y: 1024; w:  314; h:   98),
427        (x:  710; y:  882; w:   76; h:  230),
428        (x:  834; y:  686; w:  220; h:  154),
429        (x: 1240; y:  674; w:   56; h:  266),
430        (x: 1424; y:  644; w:   78; h:  304),
431        (x: 1648; y:  646; w:  116; h:  162),
432        (x: 1980; y:  726; w:  190; h:  228),
433        (x: 1760; y: 1004; w:  140; h:   84),
434        (x: 1596; y: 1140; w:  242; h:  118),
435        (x: 1616; y: 1424; w:    2; h:    2),
436        (x: NTPX; y:    0; w:    1; h:    1),
437        (x: 1894; y: 1424; w:    2; h:    2),
438        (x: 1850; y: 1328; w:   88; h:   34),
439        (x: 1998; y: 1238; w:   96; h:  112),
440        (x: 2056; y: 1424; w:    2; h:    2),
441        (x: NTPX; y:    0; w:    1; h:    1)
442       );
443       Template15FPoints: array[0..0] of TPoint =
444       (
445        (x: 1023; y:    0)
446       );
447 
448 const Template16Points: array[0..28] of TSDL_Rect =
449       (
450        (x:  700; y: 1424; w:    2; h:    2),
451        (x:  794; y: 1302; w:   58; h:   62),
452        (x:  780; y: 1170; w:   94; h:   90),
453        (x:  586; y: 1026; w:   80; h:  220),
454        (x:  776; y: 1000; w:   82; h:  118),
455        (x:  582; y:  728; w:  134; h:  226),
456        (x:  768; y:  728; w:   52; h:   52),
457        (x:  872; y:  574; w:   56; h:  212),
458        (x:  988; y:  722; w:   60; h:   62),
459        (x: 1118; y:  724; w:  108; h:  218),
460        (x: 1012; y:  916; w:   36; h:  168),
461        (x: 1128; y: 1056; w:  140; h:  134),
462        (x:  988; y: 1250; w:   74; h:   82),
463        (x: 1150; y: 1424; w:  102; h:    2),
464        (x: NTPX; y:    0; w:    1; h:    1),
465        (x: 1704; y: 1424; w:   72; h:    2),
466        (x: 1626; y: 1308; w:  266; h:   34),
467        (x: 1624; y: 1148; w:  252; h:   80),
468        (x: 1612; y:  976; w:  256; h:   94),
469        (x: 1540; y:  834; w:  174; h:   86),
470        (x: 1796; y:  718; w:  156; h:   96),
471        (x: 1486; y:  614; w:  206; h:   66),
472        (x: 1846; y:  556; w:  152; h:   40),
473        (x: 2108; y:  672; w:   60; h:  162),
474        (x: 1942; y:  888; w:  146; h:   80),
475        (x: 2086; y: 1034; w:  178; h:  122),
476        (x: 1972; y: 1220; w:   34; h:  124),
477        (x: 2098; y: 1424; w:   52; h:    2),
478        (x: NTPX; y:    0; w:    1; h:    1)
479       );
480       Template16FPoints: array[0..0] of TPoint =
481       (
482        (x: 1023; y:    0)
483       );
484 
485 const Template17Points: array[0..13] of TSDL_Rect =
486       (
487        (x:  630; y: 1424; w:    2; h:    2),
488        (x:  566; y: 1256; w:  128; h:  118),
489        (x:  752; y: 1256; w:   98; h:  114),
490        (x:  748; y: 1074; w:  140; h:  138),
491        (x:  956; y: 1072; w:  136; h:  142),
492        (x: 1146; y: 1070; w:  114; h:  252),
493        (x: 1324; y:  778; w:  120; h:  390),
494        (x: 1522; y:  862; w:  114; h:  210),
495        (x: 1724; y:  706; w:  130; h:  252),
496        (x: 1936; y:  606; w:  278; h:  234),
497        (x: 1924; y: 1044; w:  272; h:   52),
498        (x: 1972; y: 1252; w:  180; h:   56),
499        (x: 1998; y: 1424; w:   42; h:    2),
500        (x: NTPX; y:    0; w:    1; h:    1)
501       );
502       Template17FPoints: array[0..0] of TPoint =
503       (
504        (x: 1023; y:    0)
505       );
506 //////////////////// MIXING AND MATCHING ORIGINAL //////////////////////////////////////
507 const Template18Points: array[0..32] of TSDL_Rect =
508       (
509        (x:  610; y: 1424; w:    1; h:    1),
510        (x:  360; y: 1160; w:  130; h:  170),
511        (x:  542; y: 1106; w:  316; h:  150),
512        (x:  438; y:  786; w:  270; h:  180),
513        (x:  446; y:  576; w:  242; h:  156),
514        (x:  752; y:  528; w:  610; h:  300),
515        (x:  950; y:  868; w:  352; h:  324),
516        (x:  850; y: 1424; w:  500; h:    1),
517        (x: 1450; y: 1500; w:    1; h:    1),
518        (x: 1690; y: 1424; w:    1; h:    1),
519        (x: 1652; y: 1304; w:   74; h:   12),
520        (x: 1448; y:  975; w:   68; h:  425),
521        (x: 1626; y:  992; w:  140; h:  142),
522        (x: 1510; y:  592; w:  150; h:  350),
523        (x: 1788; y:  594; w:  148; h:  242),
524        (x: 1818; y:  872; w:  276; h:  314),
525        (x: 1910; y: 1250; w:  130; h:   86),
526        (x: 1934; y: 1424; w:    1; h:    1),
527        (x: NTPX; y:    0; w:    1; h:    1),
528        (x: 2230; y: 1424; w:    2; h:    2),
529        (x: 2166; y: 1256; w:  128; h:  118),
530        (x: 2352; y: 1256; w:   98; h:  114),
531        (x: 2348; y: 1074; w:  140; h:  138),
532        (x: 2556; y: 1072; w:  136; h:  142),
533        (x: 2746; y: 1070; w:  114; h:  252),
534        (x: 2924; y:  778; w:  120; h:  390),
535        (x: 3122; y:  862; w:  114; h:  210),
536        (x: 3324; y:  706; w:  130; h:  252),
537        (x: 3536; y:  606; w:  278; h:  234),
538        (x: 3524; y: 1044; w:  272; h:   52),
539        (x: 3572; y: 1252; w:  180; h:   56),
540        (x: 3598; y: 1424; w:   42; h:    2),
541        (x: NTPX; y:    0; w:    1; h:    1)
542       );
543       Template18FPoints: array[0..0] of TPoint =
544       (
545        (x: 2047; y:    0)
546       );
547 
548 const Template19Points: array[0..44] of TSDL_Rect =
549       (
550        (x:  600; y: 1424; w:   25; h:    1),
551        (x:  484; y: 1292; w:  254; h:   58),
552        (x:  692; y: 1034; w:  100; h:  200),
553        (x:  454; y:  646; w:  276; h:  380),
554        (x:  820; y:  654; w:  125; h:  270),
555        (x:  880; y:  950; w:   96; h:  390),
556        (x: 1026; y: 1014; w:  110; h:  350),
557        (x: 1000; y:  586; w:  150; h:  380),
558        (x: 1200; y:  586; w:  170; h:  375),
559        (x: 1212; y:  990; w:  188; h:  298),
560        (x: 1440; y: 1068; w:  136; h:  172),
561        (x: 1470; y:  594; w:  120; h:  392),
562        (x: 1714; y:  594; w:  364; h:  362),
563        (x: 1650; y: 1052; w:  315; h:  232),
564        (x: 1660; y: 1424; w:   25; h:    1),
565        (x: NTPX; y:    0; w:    1; h:    1),
566        (x: 2000; y: 1424; w:    2; h:    2),
567        (x: 2094; y: 1302; w:   58; h:   62),
568        (x: 2080; y: 1170; w:   94; h:   90),
569        (x: 1886; y: 1026; w:   80; h:  220),
570        (x: 2076; y: 1000; w:   82; h:  118),
571        (x: 1882; y:  728; w:  134; h:  226),
572        (x: 2068; y:  728; w:   52; h:   52),
573        (x: 2172; y:  574; w:   56; h:  212),
574        (x: 2288; y:  722; w:   60; h:   62),
575        (x: 2418; y:  724; w:  108; h:  218),
576        (x: 2312; y:  916; w:   36; h:  168),
577        (x: 2428; y: 1056; w:  140; h:  134),
578        (x: 2288; y: 1250; w:   74; h:   82),
579        (x: 2450; y: 1424; w:  102; h:    2),
580        (x: NTPX; y:    0; w:    1; h:    1),
581        (x: 3004; y: 1424; w:   72; h:    2),
582        (x: 2926; y: 1308; w:  266; h:   34),
583        (x: 2924; y: 1148; w:  252; h:   80),
584        (x: 2912; y:  976; w:  256; h:   94),
585        (x: 2840; y:  834; w:  174; h:   86),
586        (x: 3096; y:  718; w:  156; h:   96),
587        (x: 2786; y:  614; w:  206; h:   66),
588        (x: 3146; y:  556; w:  152; h:   40),
589        (x: 3408; y:  672; w:   60; h:  162),
590        (x: 3242; y:  888; w:  146; h:   80),
591        (x: 3386; y: 1034; w:  178; h:  122),
592        (x: 3272; y: 1220; w:   34; h:  124),
593        (x: 3398; y: 1424; w:   52; h:    2),
594        (x: NTPX; y:    0; w:    1; h:    1)
595       );
596       Template19FPoints: array[0..0] of TPoint =
597       (
598        (x: 2047; y:    0)
599       );
600 
601 const Template20Points: array[0..45] of TSDL_Rect =
602       (
603        (x:  554; y: 1424; w:    1; h:    1),
604        (x:  432; y: 1326; w:  226; h:   60),
605        (x:  320; y: 1246; w:  298; h:   62),
606        (x:  480; y: 1104; w:  210; h:  102),
607        (x:  408; y:  822; w:  192; h:  248),
608        (x:  492; y:  560; w:  206; h:  240),
609        (x:  726; y:  572; w:   92; h:  334),
610        (x:  662; y:  928; w:  226; h:  126),
611        (x:  756; y: 1078; w:  268; h:  156),
612        (x:  922; y:  564; w:  138; h:  500),
613        (x: 1090; y:  556; w:   94; h:  352),
614        (x: 1098; y:  962; w:  170; h:  264),
615        (x: 1292; y:  784; w:   84; h:  446),
616        (x: 1406; y:  600; w:  158; h:  278),
617        (x: 1500; y:  890; w:  104; h:  336),
618        (x: 1616; y:  946; w:   90; h:  398),
619        (x: 1746; y:  592; w:  134; h:  532),
620        (x: 1902; y:  646; w:  156; h:  258),
621        (x: 1900; y:  948; w:  132; h:  340),
622        (x: 1734; y: 1298; w:  252; h:   82),
623        (x: 1804; y: 1424; w:    1; h:    1),
624        (x: NTPX; y:    0; w:    1; h:    1),
625        (x: 2102; y: 1424; w:    2; h:    2),
626        (x: 2040; y: 1290; w:   44; h:   94),
627        (x: 2150; y: 1262; w:   44; h:   94),
628        (x: 2260; y: 1306; w:   78; h:   70),
629        (x: 2266; y: 1424; w:    2; h:    2),
630        (x: NTPX; y:    0; w:    1; h:    1),
631        (x: 2604; y: 1424; w:    2; h:    2),
632        (x: 2520; y: 1182; w:  108; h:  174),
633        (x: 2284; y: 1024; w:  314; h:   98),
634        (x: 2110; y:  882; w:   76; h:  230),
635        (x: 2234; y:  686; w:  220; h:  154),
636        (x: 2640; y:  674; w:   56; h:  266),
637        (x: 2824; y:  644; w:   78; h:  304),
638        (x: 3048; y:  646; w:  116; h:  162),
639        (x: 3380; y:  726; w:  190; h:  228),
640        (x: 3160; y: 1004; w:  140; h:   84),
641        (x: 2996; y: 1140; w:  242; h:  118),
642        (x: 3016; y: 1424; w:    2; h:    2),
643        (x: NTPX; y:    0; w:    1; h:    1),
644        (x: 3294; y: 1424; w:    2; h:    2),
645        (x: 3250; y: 1328; w:   88; h:   34),
646        (x: 3398; y: 1238; w:   96; h:  112),
647        (x: 3456; y: 1424; w:    2; h:    2),
648        (x: NTPX; y:    0; w:    1; h:    1)
649       );
650       Template20FPoints: array[0..0] of TPoint =
651       (
652        (x: 2047; y:    0)
653       );
654 
655 const Template21Points: array[0..30] of TSDL_Rect =
656       (
657        (x:  548; y: 1424; w:    1; h:    1),
658        (x:  436; y: 1252; w:  208; h:   72),
659        (x:  698; y: 1110; w:  308; h:   60),
660        (x:  928; y: 1252; w:  434; h:   40),
661        (x: 1374; y: 1112; w:  332; h:   40),
662        (x: 1602; y: 1238; w:  226; h:   36),
663        (x: 1730; y: 1424; w:    1; h:    1),
664        (x: NTPX; y:    0; w:    1; h:    1),
665        (x: 1860; y:  898; w:  111; h:  111),
666        (x: 1470; y:  876; w:   34; h:  102),
667        (x:  882; y:  814; w:  284; h:  132),
668        (x:  430; y:  728; w:  126; h:  168),
669        (x:  610; y:  574; w:  114; h:  100),
670        (x:  990; y:  572; w:  352; h:  120),
671        (x: 1474; y:  528; w:   60; h:  240),
672        (x: 1634; y:  622; w:  254; h:  116),
673        (x: NTPX; y:    0; w:    1; h:    1),
674        (x: 1936; y: 1424; w:    2; h:    2),
675        (x: 1894; y: 1286; w:   84; h:   54),
676        (x: 1862; y: 1086; w:  150; h:  166),
677        (x: 2328; y: 1240; w:  186; h:   98),
678        (x: 2394; y: 1004; w:  124; h:   58),
679        (x: 2270; y:  582; w:  112; h:  194),
680        (x: 2638; y:  660; w:   92; h:  132),
681        (x: 2960; y:  574; w:  154; h:  196),
682        (x: 2810; y:  974; w:  118; h:   64),
683        (x: 2702; y: 1222; w:  328; h:   92),
684        (x: 3246; y: 1030; w:  242; h:  222),
685        (x: 3248; y: 1316; w:  254; h:   50),
686        (x: 3258; y: 1424; w:    2; h:    2),
687        (x: NTPX; y:    0; w:    1; h:    1)
688       );
689       Template21FPoints: array[0..0] of TPoint =
690       (
691        (x: 2047; y:    0)
692       );
693 
694 const Template22Points: array[0..38] of TSDL_Rect =
695       (
696        (x:  618; y: 1424; w:    1; h:    1),
697        (x:  448; y: 1300; w:  186; h:   62),
698        (x:  472; y: 1092; w:  254; h:  138),
699        (x:  810; y: 1168; w:   90; h:  166),
700        (x: 1020; y: 1016; w:  224; h:  258),
701        (x: 1442; y: 1158; w:   96; h:  146),
702        (x: 1750; y: 1098; w:  224; h:  134),
703        (x: 1730; y: 1302; w:  210; h:   54),
704        (x: 1732; y: 1424; w:    1; h:    1),
705        (x: NTPX; y:    0; w:    1; h:    1),
706        (x:  402; y:  818; w:  110; h:   92),
707        (x:  452; y:  712; w:  160; h:   32),
708        (x:  350; y:  568; w:  134; h:   78),
709        (x:  902; y:  560; w:  132; h:   84),
710        (x:  902; y:  708; w:  230; h:   36),
711        (x:  920; y:  808; w:  166; h:   96),
712        (x: NTPX; y:    0; w:    1; h:    1),
713        (x: 1902; y:  834; w:  202; h:   42),
714        (x: 1452; y:  788; w:  134; h:   98),
715        (x: 1414; y:  552; w:  116; h:  154),
716        (x: 1628; y:  652; w:  150; h:   70),
717        (x: 1950; y:  552; w:   86; h:  220),
718        (x: NTPX; y:    0; w:    1; h:    1),
719        (x: 2246; y: 1424; w:  140; h:    2),
720        (x: 2080; y: 1272; w:  196; h:   32),
721        (x: 2054; y: 1080; w:  262; h:  134),
722        (x: 2454; y: 1072; w:  220; h:  136),
723        (x: 2408; y:  890; w:  268; h:  110),
724        (x: 2100; y:  762; w:  104; h:  200),
725        (x: 2246; y:  624; w:  306; h:   58),
726        (x: 2716; y:  588; w:   84; h:  206),
727        (x: 2948; y:  574; w:  104; h:  220),
728        (x: 3226; y:  576; w:  120; h:  202),
729        (x: 3356; y:  818; w:  192; h:   68),
730        (x: 3026; y:  948; w:  246; h:   88),
731        (x: 3056; y: 1106; w:  194; h:  150),
732        (x: 3368; y: 1106; w:  198; h:  152),
733        (x: 3244; y: 1424; w:    2; h:    2),
734        (x: NTPX; y:    0; w:    1; h:    1)
735       );
736       Template22FPoints: array[0..0] of TPoint =
737       (
738        (x: 2047; y:    0)
739       );
740 
741 const Template23Points: array[0..29] of TSDL_Rect =
742       (
743        (x:  474; y: 1424; w:    1; h:    1),
744        (x:  390; y: 1318; w:  168; h:   26),
745        (x:  582; y:  976; w:  122; h:  314),
746        (x:  768; y: 1144; w:   56; h:  180),
747        (x:  878; y: 1256; w:   64; h:   56),
748        (x:  940; y: 1050; w:  106; h:  220),
749        (x:  844; y:  896; w:  162; h:  140),
750        (x:  696; y:  610; w:  886; h:  174),
751        (x: 1134; y:  848; w:  296; h:  108),
752        (x: 1150; y: 1152; w:  152; h:  146),
753        (x: 1372; y: 1174; w:   60; h:  152),
754        (x: 1484; y: 1122; w:  150; h:  138),
755        (x: 1694; y:  764; w:   56; h:  582),
756        (x: 1820; y: 1174; w:   94; h:  232),
757        (x: 1812; y: 1424; w:    1; h:    1),
758        (x: NTPX; y:    0; w:    1; h:    1),
759        (x: 2110; y: 1424; w:    2; h:    2),
760        (x: 1992; y: 1030; w:   46; h:  286),
761        (x: 2204; y: 1072; w:  194; h:   56),
762        (x: 2004; y:  734; w:  534; h:  200),
763        (x: 2620; y:  676; w:   58; h:  468),
764        (x: 2826; y:  672; w:  198; h:  112),
765        (x: 2750; y: 1424; w:   64; h:    2),
766        (x: NTPX; y:    0; w:    1; h:    1),
767        (x: 2994; y: 1424; w:   64; h:    2),
768        (x: 3106; y:  894; w:  184; h:   94),
769        (x: 3350; y:  814; w:   76; h:  358),
770        (x: 3498; y:  984; w:  108; h:  304),
771        (x: 3438; y: 1424; w:  176; h:    1),
772        (x: NTPX; y:    0; w:    1; h:    1)
773        );
774       Template23FPoints: array[0..0] of TPoint =
775       (
776        (x: 2047; y:    0)
777       );
778 
779 const Template24Points: array[0..23] of TSDL_Rect =
780       (
781        (x:  474; y: 1424; w:  166; h:    1),
782        (x:  530; y: 1262; w:   96; h:   92),
783        (x:  692; y: 1090; w:  152; h:  250),
784        (x: 946; y: 1046; w:   36; h:  270),
785        (x: 1138; y: 1026; w:   54; h:  224),
786        (x: 1334; y: 1046; w:   44; h:  216),
787        (x: 1492; y: 1030; w:   46; h:  300),
788        (x: 1648; y: 1064; w:  158; h:  272),
789        (x: 1784; y: 1424; w:  136; h:    1),
790        (x: NTPX; y:    0; w:    1; h:    1),
791        (x: 2068; y: 1422; w:    2; h:    2),
792        (x: 1966; y: 1240; w:  302; h:  110),
793        (x: 1994; y:  912; w:  104; h:  290),
794        (x: 2270; y:  980; w:  364; h:  122),
795        (x: 2268; y:  840; w:  368; h:  100),
796        (x: 1932; y:  660; w:  482; h:  130),
797        (x: 2478; y:  642; w:   62; h:   64),
798        (x: 2690; y:  554; w:   58; h:  246),
799        (x: 2900; y:  676; w:  590; h:   98),
800        (x: 2788; y:  842; w:  214; h:  188),
801        (x: 2750; y: 1086; w:  406; h:   92),
802        (x: 3284; y:  902; w:  190; h:  412),
803        (x: 3346; y: 1420; w:    2; h:    2),
804        (x: NTPX; y:    0; w:    1; h:    1)
805        );
806       Template24FPoints: array[0..0] of TPoint =
807       (
808        (x: 2047; y:    0)
809       );
810 
811 const Template25Points: array[0..19] of TSDL_Rect =
812       (
813        (x:  362; y: 1424; w:  400; h:    1),
814        (x:  426; y:  634; w:  142; h:  360),
815        (x: 1136; y: 1140; w:  400; h:  200),
816        (x: 1776; y:  576; w:  186; h:  550),
817        (x: 1630; y: 1424; w:  454; h:    1),
818        (x: NTPX; y:    0; w:    1; h:    1),
819        (x: 1938; y: 1424; w:  190; h:    1),
820        (x: 1990; y: 1082; w:  140; h:  150),
821        (x: 2064; y:  868; w:  352; h:   94),
822        (x: 2476; y:  646; w:  106; h:  282),
823        (x: 2652; y:  790; w:  368; h:  142),
824        (x: 2708; y:  988; w:  116; h:  244),
825        (x: 2626; y: 1424; w:   14; h:    1),
826        (x: NTPX; y:    0; w:    1; h:    1),
827        (x: 2814; y: 1424; w:   22; h:    1),
828        (x: 3038; y: 1195; w:  120; h:  120),
829        (x: 3208; y:  674; w:  354; h:  448),
830        (x: 3438; y: 1195; w:  120; h:  120),
831        (x: 3532; y: 1424; w:    2; h:    1),
832        (x: NTPX; y:    0; w:    1; h:    1)
833       );
834       Template25FPoints: array[0..0] of TPoint =
835       (
836        (x: 2047; y:    0)
837       );
838 
839 
840 const Template26Points: array[0..51] of TSDL_Rect =
841       (
842        (x:  564; y: 1424; w:   20; h:    1),
843        (x:  490; y: 1260; w:   64; h:   62),
844        (x:  686; y: 1150; w:   52; h:  146),
845        (x:  456; y:  990; w:  116; h:  144),
846        (x:  670; y:  868; w:  138; h:  168),
847        (x:  442; y:  642; w:  158; h:  162),
848        (x:  708; y:  710; w:  198; h:   72),
849        (x:  970; y:  628; w:  118; h:  134),
850        (x:  836; y: 1118; w:  142; h:  132),
851        (x: 1168; y: 1100; w:  172; h:   58),
852        (x: 1170; y: 1204; w:  172; h:   62),
853        (x: 1432; y: 1104; w:   82; h:  226),
854        (x: 1556; y:  994; w:   64; h:  152),
855        (x: 1414; y:  734; w:  106; h:  152),
856        (x: 1610; y:  660; w:  380; h:   82),
857        (x: 1728; y:  822; w:   30; h:  118),
858        (x: 1740; y:  988; w:  212; h:   50),
859        (x: 1664; y: 1146; w:  128; h:  146),
860        (x: 1830; y: 1424; w:   20; h:    1),
861        (x: NTPX; y:    0; w:    1; h:    1),
862        (x: 2140; y: 1424; w:    1; h:    1),
863        (x: 2076; y: 1302; w:   44; h:   54),
864        (x: 2234; y: 1236; w:   58; h:   90),
865        (x: 2066; y: 1134; w:   80; h:   80),
866        (x: 2046; y: 1004; w:   96; h:  108),
867        (x: 2226; y: 1046; w:  110; h:  112),
868        (x: 2034; y:  692; w:  118; h:  164),
869        (x: 2228; y:  796; w:  130; h:  110),
870        (x: 2316; y:  598; w:  344; h:   78),
871        (x: 2488; y:  826; w:   50; h:   40),
872        (x: 2426; y:  960; w:   32; h:  148),
873        (x: 2498; y: 1050; w:  160; h:   34),
874        (x: 2474; y: 1188; w:   36; h:  136),
875        (x: 2814; y: 1248; w:   48; h:   48),
876        (x: 2886; y: 1128; w:   64; h:   88),
877        (x: 2758; y: 1060; w:   70; h:   74),
878        (x: 2916; y:  996; w:   68; h:   70),
879        (x: 2918; y:  884; w:   68; h:   82),
880        (x: 2758; y:  724; w:   44; h:  140),
881        (x: 3072; y:  706; w:   52; h:   66),
882        (x: 3054; y:  902; w:   58; h:   66),
883        (x: 3034; y: 1160; w:   76; h:  112),
884        (x: 3180; y: 1162; w:  124; h:   64),
885        (x: 3272; y:  872; w:   54; h:  134),
886        (x: 3210; y:  596; w:  246; h:   62),
887        (x: 3506; y:  554; w:   38; h:  238),
888        (x: 3612; y:  748; w:   28; h:   28),
889        (x: 3492; y:  924; w:  144; h:   94),
890        (x: 3432; y: 1078; w:  248; h:   20),
891        (x: 3432; y: 1202; w:  238; h:   16),
892        (x: 3480; y: 1424; w:    1; h:    1),
893        (x: NTPX; y:    0; w:    1; h:    1)
894       );
895       Template26FPoints: array[0..0] of TPoint =
896       (
897        (x: 2047; y:    0)
898       );
899 
900 const Template27Points: array[0..42] of TSDL_Rect =
901       (
902        (x:  610; y: 1424; w:    1; h:    1),
903        (x:  360; y: 1160; w:  130; h:  170),
904        (x:  542; y: 1106; w:  316; h:  150),
905        (x:  438; y:  786; w:  270; h:  180),
906        (x:  446; y:  576; w:  242; h:  156),
907        (x:  752; y:  528; w:  610; h:  300),
908        (x:  950; y:  868; w:  352; h:  324),
909        (x:  850; y: 1424; w:  500; h:    1),
910        (x: 1450; y: 1500; w:    1; h:    1),
911        (x: 1690; y: 1424; w:    1; h:    1),
912        (x: 1652; y: 1304; w:   74; h:   12),
913        (x: 1448; y:  975; w:   68; h:  425),
914        (x: 1626; y:  992; w:  140; h:  142),
915        (x: 1510; y:  592; w:  150; h:  350),
916        (x: 1788; y:  594; w:  148; h:  242),
917        (x: 1818; y:  872; w:  276; h:  314),
918        (x: 1910; y: 1250; w:  130; h:   86),
919        (x: 1934; y: 1424; w:    1; h:    1),
920        (x: NTPX; y:    0; w:    1; h:    1),
921        (x: 2202; y: 1424; w:    2; h:    2),
922        (x: 2140; y: 1290; w:   44; h:   94),
923        (x: 2250; y: 1262; w:   44; h:   94),
924        (x: 2360; y: 1306; w:   78; h:   70),
925        (x: 2366; y: 1424; w:    2; h:    2),
926        (x: NTPX; y:    0; w:    1; h:    1),
927        (x: 2704; y: 1424; w:    2; h:    2),
928        (x: 2620; y: 1182; w:  108; h:  174),
929        (x: 2384; y: 1024; w:  314; h:   98),
930        (x: 2210; y:  882; w:   76; h:  230),
931        (x: 2334; y:  686; w:  220; h:  154),
932        (x: 2740; y:  674; w:   56; h:  266),
933        (x: 2924; y:  644; w:   78; h:  304),
934        (x: 3148; y:  646; w:  116; h:  162),
935        (x: 3480; y:  726; w:  190; h:  228),
936        (x: 3260; y: 1004; w:  140; h:   84),
937        (x: 3096; y: 1140; w:  242; h:  118),
938        (x: 3116; y: 1424; w:    2; h:    2),
939        (x: NTPX; y:    0; w:    1; h:    1),
940        (x: 3394; y: 1424; w:    2; h:    2),
941        (x: 3350; y: 1328; w:   88; h:   34),
942        (x: 3498; y: 1238; w:   96; h:  112),
943        (x: 3556; y: 1424; w:    2; h:    2),
944        (x: NTPX; y:    0; w:    1; h:    1)
945       );
946       Template27FPoints: array[0..0] of TPoint =
947       (
948        (x: 2047; y:    0)
949       );
950 
951 const Template28Points: array[0..29] of TSDL_Rect =
952       (
953        (x:  600; y: 1424; w:   25; h:    1),
954        (x:  484; y: 1292; w:  254; h:   58),
955        (x:  692; y: 1034; w:  100; h:  200),
956        (x:  454; y:  646; w:  276; h:  380),
957        (x:  820; y:  654; w:  125; h:  270),
958        (x:  880; y:  950; w:   96; h:  390),
959        (x: 1026; y: 1014; w:  110; h:  350),
960        (x: 1000; y:  586; w:  150; h:  380),
961        (x: 1200; y:  586; w:  170; h:  375),
962        (x: 1212; y:  990; w:  188; h:  298),
963        (x: 1440; y: 1068; w:  136; h:  172),
964        (x: 1470; y:  594; w:  120; h:  392),
965        (x: 1714; y:  594; w:  364; h:  362),
966        (x: 1650; y: 1052; w:  315; h:  232),
967        (x: 1660; y: 1424; w:   25; h:    1),
968        (x: NTPX; y:    0; w:    1; h:    1),
969        (x: 1986; y: 1424; w:    2; h:    2),
970        (x: 1944; y: 1286; w:   84; h:   54),
971        (x: 1912; y: 1086; w:  150; h:  166),
972        (x: 2378; y: 1240; w:  186; h:   98),
973        (x: 2444; y: 1004; w:  124; h:   58),
974        (x: 2320; y:  582; w:  112; h:  194),
975        (x: 2688; y:  660; w:   92; h:  132),
976        (x: 3010; y:  574; w:  154; h:  196),
977        (x: 2860; y:  974; w:  118; h:   64),
978        (x: 2752; y: 1222; w:  328; h:   92),
979        (x: 3296; y: 1030; w:  242; h:  222),
980        (x: 3298; y: 1316; w:  254; h:   50),
981        (x: 3308; y: 1424; w:    2; h:    2),
982        (x: NTPX; y:    0; w:    1; h:    1)
983       );
984       Template28FPoints: array[0..0] of TPoint =
985       (
986        (x: 2047; y:    0)
987       );
988 
989 const Template29Points: array[0..37] of TSDL_Rect =
990       (
991        (x:  554; y: 1424; w:    1; h:    1),
992        (x:  432; y: 1326; w:  226; h:   60),
993        (x:  320; y: 1246; w:  298; h:   62),
994        (x:  480; y: 1104; w:  210; h:  102),
995        (x:  408; y:  822; w:  192; h:  248),
996        (x:  492; y:  560; w:  206; h:  240),
997        (x:  726; y:  572; w:   92; h:  334),
998        (x:  662; y:  928; w:  226; h:  126),
999        (x:  756; y: 1078; w:  268; h:  156),
1000        (x:  922; y:  564; w:  138; h:  500),
1001        (x: 1090; y:  556; w:   94; h:  352),
1002        (x: 1098; y:  962; w:  170; h:  264),
1003        (x: 1292; y:  784; w:   84; h:  446),
1004        (x: 1406; y:  600; w:  158; h:  278),
1005        (x: 1500; y:  890; w:  104; h:  336),
1006        (x: 1616; y:  946; w:   90; h:  398),
1007        (x: 1746; y:  592; w:  134; h:  532),
1008        (x: 1902; y:  646; w:  156; h:  258),
1009        (x: 1900; y:  948; w:  132; h:  340),
1010        (x: 1734; y: 1298; w:  252; h:   82),
1011        (x: 1804; y: 1424; w:    1; h:    1),
1012        (x: NTPX; y:    0; w:    1; h:    1),
1013        (x: 2096; y: 1424; w:  140; h:    2),
1014        (x: 1930; y: 1272; w:  196; h:   32),
1015        (x: 1904; y: 1080; w:  262; h:  134),
1016        (x: 2304; y: 1072; w:  220; h:  136),
1017        (x: 2258; y:  890; w:  268; h:  110),
1018        (x: 1950; y:  762; w:  104; h:  200),
1019        (x: 2096; y:  624; w:  306; h:   58),
1020        (x: 2566; y:  588; w:   84; h:  206),
1021        (x: 2798; y:  574; w:  104; h:  220),
1022        (x: 3076; y:  576; w:  120; h:  202),
1023        (x: 3206; y:  818; w:  192; h:   68),
1024        (x: 2876; y:  948; w:  246; h:   88),
1025        (x: 2906; y: 1106; w:  194; h:  150),
1026        (x: 3218; y: 1106; w:  198; h:  152),
1027        (x: 3094; y: 1424; w:    2; h:    2),
1028        (x: NTPX; y:    0; w:    1; h:    1)
1029       );
1030       Template29FPoints: array[0..0] of TPoint =
1031       (
1032        (x: 2047; y:    0)
1033       );
1034 
1035 const Template30Points: array[0..30] of TSDL_Rect =
1036       (
1037        (x:  548; y: 1424; w:    1; h:    1),
1038        (x:  436; y: 1252; w:  208; h:   72),
1039        (x:  698; y: 1110; w:  308; h:   60),
1040        (x:  928; y: 1252; w:  434; h:   40),
1041        (x: 1374; y: 1112; w:  332; h:   40),
1042        (x: 1602; y: 1238; w:  226; h:   36),
1043        (x: 1730; y: 1424; w:    1; h:    1),
1044        (x: NTPX; y:    0; w:    1; h:    1),
1045        (x: 1860; y:  898; w:  111; h:  111),
1046        (x: 1470; y:  876; w:   34; h:  102),
1047        (x:  882; y:  814; w:  284; h:  132),
1048        (x:  430; y:  728; w:  126; h:  168),
1049        (x:  610; y:  574; w:  114; h:  100),
1050        (x:  990; y:  572; w:  352; h:  120),
1051        (x: 1474; y:  528; w:   60; h:  240),
1052        (x: 1634; y:  622; w:  254; h:  116),
1053        (x: NTPX; y:    0; w:    1; h:    1),
1054        (x: 1960; y: 1424; w:    2; h:    2),
1055        (x: 1842; y: 1030; w:   46; h:  286),
1056        (x: 2054; y: 1072; w:  194; h:   56),
1057        (x: 1854; y:  734; w:  534; h:  200),
1058        (x: 2470; y:  676; w:   58; h:  468),
1059        (x: 2676; y:  672; w:  198; h:  112),
1060        (x: 2600; y: 1424; w:   64; h:    2),
1061        (x: NTPX; y:    0; w:    1; h:    1),
1062        (x: 2844; y: 1424; w:   64; h:    2),
1063        (x: 2956; y:  894; w:  184; h:   94),
1064        (x: 3200; y:  814; w:   76; h:  358),
1065        (x: 3348; y:  984; w:  108; h:  304),
1066        (x: 3288; y: 1424; w:  176; h:    1),
1067        (x: NTPX; y:    0; w:    1; h:    1)
1068       );
1069       Template30FPoints: array[0..0] of TPoint =
1070       (
1071        (x: 2047; y:    0)
1072       );
1073 
1074 const Template31Points: array[0..32] of TSDL_Rect =
1075       (
1076        (x:  618; y: 1424; w:    1; h:    1),
1077        (x:  448; y: 1300; w:  186; h:   62),
1078        (x:  472; y: 1092; w:  254; h:  138),
1079        (x:  810; y: 1168; w:   90; h:  166),
1080        (x: 1020; y: 1016; w:  224; h:  258),
1081        (x: 1442; y: 1158; w:   96; h:  146),
1082        (x: 1750; y: 1098; w:  224; h:  134),
1083        (x: 1730; y: 1302; w:  210; h:   54),
1084        (x: 1732; y: 1424; w:    1; h:    1),
1085        (x: NTPX; y:    0; w:    1; h:    1),
1086        (x:  402; y:  818; w:  110; h:   92),
1087        (x:  452; y:  712; w:  160; h:   32),
1088        (x:  350; y:  568; w:  134; h:   78),
1089        (x:  902; y:  560; w:  132; h:   84),
1090        (x:  902; y:  708; w:  230; h:   36),
1091        (x:  920; y:  808; w:  166; h:   96),
1092        (x: NTPX; y:    0; w:    1; h:    1),
1093        (x: 1902; y:  834; w:  202; h:   42),
1094        (x: 1452; y:  788; w:  134; h:   98),
1095        (x: 1414; y:  552; w:  116; h:  154),
1096        (x: 1628; y:  652; w:  150; h:   70),
1097        (x: 1950; y:  552; w:   86; h:  220),
1098        (x: NTPX; y:    0; w:    1; h:    1),
1099        (x: 2274; y: 1424; w:  166; h:    1),
1100        (x: 2330; y: 1262; w:   96; h:   92),
1101        (x: 2492; y: 1090; w:  152; h:  250),
1102        (x: 2746; y: 1046; w:   36; h:  270),
1103        (x: 2938; y: 1026; w:   54; h:  224),
1104        (x: 3134; y: 1046; w:   44; h:  216),
1105        (x: 3292; y: 1030; w:   46; h:  300),
1106        (x: 3448; y: 1064; w:  158; h:  272),
1107        (x: 3584; y: 1424; w:  136; h:    1),
1108        (x: NTPX; y:    0; w:    1; h:    1)
1109       );
1110       Template31FPoints: array[0..0] of TPoint =
1111       (
1112        (x: 2047; y:    0)
1113       );
1114 
1115 const Template32Points: array[0..29] of TSDL_Rect =
1116       (
1117        (x:  474; y: 1424; w:    1; h:    1),
1118        (x:  390; y: 1318; w:  168; h:   26),
1119        (x:  582; y:  976; w:  122; h:  314),
1120        (x:  768; y: 1144; w:   56; h:  180),
1121        (x:  878; y: 1256; w:   64; h:   56),
1122        (x:  940; y: 1050; w:  106; h:  220),
1123        (x:  844; y:  896; w:  162; h:  140),
1124        (x:  696; y:  610; w:  886; h:  174),
1125        (x: 1134; y:  848; w:  296; h:  108),
1126        (x: 1150; y: 1152; w:  152; h:  146),
1127        (x: 1372; y: 1174; w:   60; h:  152),
1128        (x: 1484; y: 1122; w:  150; h:  138),
1129        (x: 1694; y:  764; w:   56; h:  582),
1130        (x: 1820; y: 1174; w:   94; h:  232),
1131        (x: 1812; y: 1424; w:    1; h:    1),
1132        (x: NTPX; y:    0; w:    1; h:    1),
1133        (x: 2088; y: 1424; w:  190; h:    1),
1134        (x: 2140; y: 1082; w:  140; h:  150),
1135        (x: 2214; y:  868; w:  352; h:   94),
1136        (x: 2626; y:  646; w:  106; h:  282),
1137        (x: 2802; y:  790; w:  368; h:  142),
1138        (x: 2858; y:  988; w:  116; h:  244),
1139        (x: 2776; y: 1424; w:   14; h:    1),
1140        (x: NTPX; y:    0; w:    1; h:    1),
1141        (x: 2964; y: 1424; w:   22; h:    1),
1142        (x: 3188; y: 1195; w:  120; h:  120),
1143        (x: 3358; y:  674; w:  354; h:  448),
1144        (x: 3588; y: 1195; w:  120; h:  120),
1145        (x: 3682; y: 1424; w:    2; h:    1),
1146        (x: NTPX; y:    0; w:    1; h:    1)
1147       );
1148       Template32FPoints: array[0..0] of TPoint =
1149       (
1150          (x: 2047; y:    0)
1151       );
1152 
1153 const Template33Points: array[0..45] of TSDL_Rect =
1154       (
1155        (x:  568; y: 1422; w:    2; h:    2),
1156        (x:  466; y: 1240; w:  302; h:  110),
1157        (x:  494; y:  912; w:  104; h:  290),
1158        (x:  770; y:  980; w:  364; h:  122),
1159        (x:  768; y:  840; w:  368; h:  100),
1160        (x:  432; y:  660; w:  482; h:  130),
1161        (x:  978; y:  642; w:   62; h:   64),
1162        (x: 1190; y:  554; w:   58; h:  246),
1163        (x: 1400; y:  676; w:  590; h:   98),
1164        (x: 1288; y:  842; w:  214; h:  188),
1165        (x: 1250; y: 1086; w:  406; h:   92),
1166        (x: 1784; y:  902; w:  190; h:  412),
1167        (x: 1846; y: 1420; w:    2; h:    2),
1168        (x: NTPX; y:    0; w:    1; h:    1),
1169        (x: 2140; y: 1424; w:    1; h:    1),
1170        (x: 2076; y: 1302; w:   44; h:   54),
1171        (x: 2234; y: 1236; w:   58; h:   90),
1172        (x: 2066; y: 1134; w:   80; h:   80),
1173        (x: 2046; y: 1004; w:   96; h:  108),
1174        (x: 2226; y: 1046; w:  110; h:  112),
1175        (x: 2034; y:  692; w:  118; h:  164),
1176        (x: 2228; y:  796; w:  130; h:  110),
1177        (x: 2316; y:  598; w:  344; h:   78),
1178        (x: 2488; y:  826; w:   50; h:   40),
1179        (x: 2426; y:  960; w:   32; h:  148),
1180        (x: 2498; y: 1050; w:  160; h:   34),
1181        (x: 2474; y: 1188; w:   36; h:  136),
1182        (x: 2814; y: 1248; w:   48; h:   48),
1183        (x: 2886; y: 1128; w:   64; h:   88),
1184        (x: 2758; y: 1060; w:   70; h:   74),
1185        (x: 2916; y:  996; w:   68; h:   70),
1186        (x: 2918; y:  884; w:   68; h:   82),
1187        (x: 2758; y:  724; w:   44; h:  140),
1188        (x: 3072; y:  706; w:   52; h:   66),
1189        (x: 3054; y:  902; w:   58; h:   66),
1190        (x: 3034; y: 1160; w:   76; h:  112),
1191        (x: 3180; y: 1162; w:  124; h:   64),
1192        (x: 3272; y:  872; w:   54; h:  134),
1193        (x: 3210; y:  596; w:  246; h:   62),
1194        (x: 3506; y:  554; w:   38; h:  238),
1195        (x: 3612; y:  748; w:   28; h:   28),
1196        (x: 3492; y:  924; w:  144; h:   94),
1197        (x: 3432; y: 1078; w:  248; h:   20),
1198        (x: 3432; y: 1202; w:  238; h:   16),
1199        (x: 3480; y: 1424; w:    1; h:    1),
1200        (x: NTPX; y:    0; w:    1; h:    1)
1201       );
1202       Template33FPoints: array[0..0] of TPoint =
1203       (
1204        (x: 2047; y:    0)
1205       );
1206 
1207 const Template34Points: array[0..25] of TSDL_Rect =
1208       (
1209        (x:  362; y: 1424; w:  400; h:    1),
1210        (x:  426; y:  634; w:  142; h:  360),
1211        (x: 1136; y: 1140; w:  400; h:  200),
1212        (x: 1776; y:  576; w:  186; h:  550),
1213        (x: 1630; y: 1424; w:  454; h:    1),
1214        (x: NTPX; y:    0; w:    1; h:    1),
1215        (x: 1964; y: 1424; w:   20; h:    1),
1216        (x: 1890; y: 1260; w:   64; h:   62),
1217        (x: 2086; y: 1150; w:   52; h:  146),
1218        (x: 1856; y:  990; w:  116; h:  144),
1219        (x: 2070; y:  868; w:  138; h:  168),
1220        (x: 1842; y:  642; w:  158; h:  162),
1221        (x: 2108; y:  710; w:  198; h:   72),
1222        (x: 2370; y:  628; w:  118; h:  134),
1223        (x: 2236; y: 1118; w:  142; h:  132),
1224        (x: 2568; y: 1100; w:  172; h:   58),
1225        (x: 2570; y: 1204; w:  172; h:   62),
1226        (x: 2832; y: 1104; w:   82; h:  226),
1227        (x: 2956; y:  994; w:   64; h:  152),
1228        (x: 2814; y:  734; w:  106; h:  152),
1229        (x: 3010; y:  660; w:  380; h:   82),
1230        (x: 3128; y:  822; w:   30; h:  118),
1231        (x: 3140; y:  988; w:  212; h:   50),
1232        (x: 3064; y: 1146; w:  128; h:  146),
1233        (x: 3230; y: 1424; w:   20; h:    1),
1234        (x: NTPX; y:    0; w:    1; h:    1)
1235       );
1236       Template34FPoints: array[0..0] of TPoint =
1237       (
1238        (x: 2047; y:    0)
1239       );
1240 
1241 const Template35Points: array[0..48] of TSDL_Rect =
1242       (
1243        (x:  564; y: 1424; w:   20; h:    1),
1244        (x:  490; y: 1260; w:   64; h:   62),
1245        (x:  686; y: 1150; w:   52; h:  146),
1246        (x:  456; y:  990; w:  116; h:  144),
1247        (x:  670; y:  868; w:  138; h:  168),
1248        (x:  442; y:  642; w:  158; h:  162),
1249        (x:  708; y:  710; w:  198; h:   72),
1250        (x:  970; y:  628; w:  118; h:  134),
1251        (x:  836; y: 1118; w:  142; h:  132),
1252        (x: 1168; y: 1100; w:  172; h:   58),
1253        (x: 1170; y: 1204; w:  172; h:   62),
1254        (x: 1432; y: 1104; w:   82; h:  226),
1255        (x: 1556; y:  994; w:   64; h:  152),
1256        (x: 1414; y:  734; w:  106; h:  152),
1257        (x: 1610; y:  660; w:  380; h:   82),
1258        (x: 1728; y:  822; w:   30; h:  118),
1259        (x: 1740; y:  988; w:  212; h:   50),
1260        (x: 1664; y: 1146; w:  128; h:  146),
1261        (x: 1830; y: 1424; w:   20; h:    1),
1262        (x: NTPX; y:    0; w:    1; h:    1),
1263        (x: 2100; y: 1424; w:    2; h:    2),
1264        (x: 2194; y: 1302; w:   58; h:   62),
1265        (x: 2180; y: 1170; w:   94; h:   90),
1266        (x: 1986; y: 1026; w:   80; h:  220),
1267        (x: 2176; y: 1000; w:   82; h:  118),
1268        (x: 1982; y:  728; w:  134; h:  226),
1269        (x: 2168; y:  728; w:   52; h:   52),
1270        (x: 2272; y:  574; w:   56; h:  212),
1271        (x: 2388; y:  722; w:   60; h:   62),
1272        (x: 2518; y:  724; w:  108; h:  218),
1273        (x: 2412; y:  916; w:   36; h:  168),
1274        (x: 2528; y: 1056; w:  140; h:  134),
1275        (x: 2388; y: 1250; w:   74; h:   82),
1276        (x: 2550; y: 1424; w:  102; h:    2),
1277        (x: NTPX; y:    0; w:    1; h:    1),
1278        (x: 3104; y: 1424; w:   72; h:    2),
1279        (x: 3026; y: 1308; w:  266; h:   34),
1280        (x: 3024; y: 1148; w:  252; h:   80),
1281        (x: 3012; y:  976; w:  256; h:   94),
1282        (x: 2940; y:  834; w:  174; h:   86),
1283        (x: 3196; y:  718; w:  156; h:   96),
1284        (x: 2886; y:  614; w:  206; h:   66),
1285        (x: 3246; y:  556; w:  152; h:   40),
1286        (x: 3508; y:  672; w:   60; h:  162),
1287        (x: 3342; y:  888; w:  146; h:   80),
1288        (x: 3486; y: 1034; w:  178; h:  122),
1289        (x: 3372; y: 1220; w:   34; h:  124),
1290        (x: 3498; y: 1424; w:   52; h:    2),
1291        (x: NTPX; y:    0; w:    1; h:    1)
1292       );
1293       Template35FPoints: array[0..0] of TPoint =
1294       (
1295        (x: 2047; y:    0)
1296       );
1297 
1298 ///////////////////////// CAVERNS ///////////////////////////////////
1299 const Template36Points: array[0..18] of TSDL_Rect =
1300       (
1301        (x:  324; y:  756; w:  196; h:  204),
1302        (x:  224; y:  596; w:  404; h:   60),
1303        (x:  240; y:  268; w:  464; h:  152),
1304        (x:  876; y:  236; w:  168; h:  348),
1305        (x: 1204; y:   56; w:  148; h:  700),
1306        (x: 1516; y:   52; w:  192; h:  664),
1307        (x: 1808; y:   60; w:  328; h:  496),
1308        (x: 2292; y:   92; w:  184; h:  492),
1309        (x: 2664; y:  216; w:  196; h:  340),
1310        (x: 3004; y:  108; w:  176; h:  480),
1311        (x: 3260; y:  368; w:  120; h:  348),
1312        (x: 3476; y:  460; w:  208; h:  448),
1313        (x: 3268; y:  906; w:  192; h:   96),
1314        (x: 2876; y:  664; w:  204; h:  310),
1315        (x: 2240; y:  748; w:  344; h:  224),
1316        (x: 1584; y:  796; w:  440; h:  250),
1317        (x:  892; y:  852; w:  324; h:  184),
1318        (x:  576; y:  976; w:   16; h:   28),
1319        (x: NTPX; y:    0; w:    1; h:    1)
1320       );
1321       Template36FPoints: array[0..0] of TPoint =
1322       (
1323        (x: 2047; y:    0)
1324       );
1325 ////////////////////////////// ... Silly ...  ////////////////////////////////
1326 /// Ok. Tiy does not care for these.  Perhaps they could be saved.
1327 /// For now, just rare.
1328 //////////////////////////////////////////////////////////////////////////////
1329 
1330 // maybe Tiy would be ok with this if it was smoother/more climable and a bit shorter?
1331 const Template37Points: array[0..27] of TSDL_Rect =
1332       (
1333        (x:  700; y: 2100; w: 120; h: 175),
1334        (x:  800; y: 1200; w: 120; h: 175),
1335        (x:  900; y:  400; w: 120; h: 150),
1336        (x: 1100; y:  600; w: 120; h: 150),
1337        (x: 1300; y:  900; w: 120; h: 150),
1338        (x: 1000; y: 1000; w: 120; h: 150),
1339        (x: 1700; y: 1850; w: 120; h: 175),
1340        (x: 2048; y: 2100; w: 120; h: 175),
1341        (x: NTPX; y:    0; w:   1; h:   1),
1342        (x: 2048; y: 2100; w: 120; h: 150),
1343        (x: 2400; y: 1850; w: 120; h: 150),
1344        (x: 2600; y: 1000; w: 120; h: 175),
1345        (x: 2800; y:  900; w: 120; h: 150),
1346        (x: 3000; y:  600; w: 120; h: 150),
1347        (x: 3200; y:  400; w: 120; h: 150),
1348        (x: 3300; y: 1200; w: 120; h: 150),
1349        (x: 3400; y: 2100; w: 120; h: 175),
1350        (x: NTPX; y:    0; w:   1; h:   1),
1351        (x: 1450; y:  700; w: 125; h: 125),
1352        (x: 1850; y:  500; w: 125; h: 125),
1353        (x: 2250; y:  500; w: 125; h: 125),
1354        (x: 2500; y:  700; w: 125; h: 125),
1355        (x: NTPX; y:    0; w:   1; h:   1),
1356        (x: 1550; y: 1500; w: 125; h: 125),
1357        (x: 1830; y: 1150; w: 125; h: 125),
1358        (x: 2260; y: 1000; w: 125; h: 125),
1359        (x: 2250; y: 1400; w: 125; h: 125),
1360        (x: NTPX; y:    0; w:   1; h:   1)
1361       );
1362       Template37FPoints: array[0..0] of TPoint =
1363       (
1364        (x: 2047; y:    0)
1365       );
1366 // attempt to make a series of moderate hills/valleys - was before I really figured out the whole probabilities thing
1367 // fixed much much later by unC0Rr during tempaltes review for new generator
1368 const Template38Points: array[0..16] of TSDL_Rect =
1369       (
1370        (x:  100; y: 2100; w:   1; h:    1),
1371        (x:  100; y: 1600; w: 250; h:  500),
1372        (x:  400; y:  600; w: 250; h: 1500),
1373        (x:  700; y: 1600; w: 250; h:  600),
1374        (x: 1000; y: 1800; w: 250; h:  300),
1375        (x: 1300; y:  500; w: 250; h: 1600),
1376        (x: 1600; y: 1700; w: 150; h:  400),
1377        (x: 1800; y: 1600; w: 150; h:  500),
1378        (x: 2000; y: 1400; w: 150; h:  700),
1379        (x: 2200; y:  300; w: 250; h: 1800),
1380        (x: 2500; y: 1500; w: 250; h:  600),
1381        (x: 2800; y: 1900; w: 250; h:  200),
1382        (x: 3100; y: 1600; w: 250; h:  500),
1383        (x: 3400; y:  600; w: 250; h: 1500),
1384        (x: 3700; y: 1800; w: 150; h:  300),
1385        (x: 3700; y: 2100; w:   1; h:    1),
1386        (x: NTPX; y:    0; w:   1; h:    1)
1387       );
1388       Template38FPoints: array[0..0] of TPoint =
1389       (
1390        (x: 2047; y:    0)
1391       );
1392 
1393 // 8 tiny islands
1394 const Template39Points: array[0..39] of TSDL_Rect =
1395       (
1396        (x:   90; y: 520; w:   1; h:   1),
1397        (x:   90; y: 350; w:  10; h: 150),
1398        (x:  170; y: 350; w:  10; h: 150),
1399        (x:  170; y: 520; w:   1; h:   1),
1400        (x: NTPX; y:   0; w:   1; h:   1),
1401        (x:  270; y: 520; w:   1; h:   1),
1402        (x:  270; y: 350; w:  10; h: 150),
1403        (x:  350; y: 350; w:  10; h: 150),
1404        (x:  350; y: 520; w:   1; h:   1),
1405        (x: NTPX; y:   0; w:   1; h:   1),
1406        (x:  450; y: 520; w:   1; h:   1),
1407        (x:  450; y: 350; w:  10; h: 150),
1408        (x:  530; y: 350; w:  10; h: 150),
1409        (x:  530; y: 520; w:   1; h:   1),
1410        (x: NTPX; y:   0; w:   1; h:   1),
1411        (x:  630; y: 520; w:   1; h:   1),
1412        (x:  630; y: 350; w:  10; h: 150),
1413        (x:  710; y: 350; w:  10; h: 150),
1414        (x:  710; y: 520; w:   1; h:   1),
1415        (x: NTPX; y:   0; w:   1; h:   1),
1416        (x:  810; y: 520; w:   1; h:   1),
1417        (x:  810; y: 350; w:  10; h: 150),
1418        (x:  890; y: 350; w:  10; h: 150),
1419        (x:  890; y: 520; w:   1; h:   1),
1420        (x: NTPX; y:   0; w:   1; h:   1),
1421        (x:  990; y: 520; w:   1; h:   1),
1422        (x:  990; y: 350; w:  10; h: 150),
1423        (x: 1070; y: 350; w:  10; h: 150),
1424        (x: 1070; y: 520; w:   1; h:   1),
1425        (x: NTPX; y:   0; w:   1; h:   1),
1426        (x: 1170; y: 520; w:   1; h:   1),
1427        (x: 1170; y: 350; w:  10; h: 150),
1428        (x: 1250; y: 350; w:  10; h: 150),
1429        (x: 1250; y: 520; w:   1; h:   1),
1430        (x: NTPX; y:   0; w:   1; h:   1),
1431        (x: 1350; y: 520; w:   1; h:   1),
1432        (x: 1350; y: 350; w:  10; h: 150),
1433        (x: 1430; y: 350; w:  10; h: 150),
1434        (x: 1430; y: 520; w:   1; h:   1),
1435        (x: NTPX; y:   0; w:   1; h:   1)
1436       );
1437       Template39FPoints: array[0..0] of TPoint =
1438       (
1439        (x: 512; y:    0)
1440       );
1441 const Template40Points: array[0..7] of TSDL_Rect =
1442       (
1443        (x:   90; y: 1050; w:    1; h:   1),
1444        (x:  100; y:  800; w:  100; h: 200),
1445        (x:  300; y:  600; w:  100; h: 200),
1446        (x:  500; y:  200; w:  100; h: 200),
1447        (x:  700; y:  600; w:  100; h: 100),
1448        (x:  900; y:  800; w:  100; h: 200),
1449        (x:  900; y: 1050; w:    1; h:   1),
1450        (x: NTPX; y:    0; w:    1; h:   1)
1451       );
1452       Template40FPoints: array[0..0] of TPoint =
1453       (
1454        (x: 512; y:    0)
1455       );
1456 // Many islands
1457 const Template41Points: array[0..85] of TSDL_Rect =
1458       (
1459        (x:   95; y: 500; w:  26; h:  26),
1460        (x:  100; y: 275; w:  50; h: 125),
1461        (x:  325; y: 275; w:  50; h: 125),
1462        (x:  330; y: 500; w:  26; h:  26),
1463        (x: NTPX; y:   0; w:   1; h:   1),
1464        (x:  725; y: 125; w:  26; h:  26),
1465        (x:  725; y:  25; w:  30; h:  50),
1466        (x:  825; y:  35; w:  30; h:  35),
1467        (x:  825; y: 135; w:  26; h:  26),
1468        (x: NTPX; y:   0; w:   1; h:   1),
1469        (x: 1150; y: 550; w:  50; h:  75),
1470        (x: 1250; y: 300; w:  50; h:  75),
1471        (x: 1350; y: 300; w:  50; h:  75),
1472        (x: 1400; y: 575; w:  50; h:  75),
1473        (x: NTPX; y:   0; w:   1; h:   1),
1474        (x:  725; y:1050; w:  75; h:  75),
1475        (x:  700; y: 800; w: 125; h: 175),
1476        (x:  950; y: 800; w: 125; h: 175),
1477        (x: 1000; y:1100; w:  75; h:  75),
1478        (x: NTPX; y:   0; w:   1; h:   1),
1479        (x:  175; y:1500; w:  26; h:  26),
1480        (x:  180; y:1400; w:  30; h:  50),
1481        (x:  250; y:1400; w:  30; h:  50),
1482        (x:  275; y:1510; w:  26; h:  26),
1483        (x: NTPX; y:   0; w:   1; h:   1),
1484        (x:  500; y:1800; w: 125; h: 125),
1485        (x:  600; y:1650; w: 125; h: 125),
1486        (x:  750; y:1650; w: 125; h: 125),
1487        (x:  950; y:1850; w: 125; h: 125),
1488        (x: NTPX; y:   0; w:   1; h:   1),
1489        (x: 1075; y:1450; w:  26; h:  26),
1490        (x: 1100; y:1300; w:  30; h:  50),
1491        (x: 1150; y:1300; w:  30; h:  50),
1492        (x: 1175; y:1430; w:  26; h:  26),
1493        (x: NTPX; y:   0; w:   1; h:   1),
1494        (x: 1600; y:1250; w:  50; h: 125),
1495        (x: 1700; y: 950; w:  50; h: 125),
1496        (x: 1850; y: 500; w:  75; h: 125),
1497        (x: 1950; y: 550; w:  75; h: 175),
1498        (x: 2250; y: 950; w:  50; h: 125),
1499        (x: 2350; y:1250; w:  50; h: 125),
1500        (x: NTPX; y:   0; w:   1; h:   1),
1501        (x: 1750; y:2010; w:  26; h:  26),
1502        (x: 1900; y:1870; w:  75; h:  75),
1503        (x: 2050; y:1870; w:  75; h:  75),
1504        (x: 2175; y:2010; w:  26; h:  26),
1505        (x: NTPX; y:   0; w:   1; h:   1),
1506        (x: 2500; y:1700; w:  26; h:  26),
1507        (x: 2575; y:1500; w:  35; h:  75),
1508        (x: 2650; y:1500; w:  35; h:  75),
1509        (x: 2700; y:1690; w:  26; h:  26),
1510        (x: NTPX; y:   0; w:   1; h:   1),
1511        (x: 2000; y: 125; w:  26; h:  26),
1512        (x: 2000; y:  50; w:  50; h:  50),
1513        (x: 2100; y:  50; w:  50; h:  50),
1514        (x: 2150; y: 150; w:  26; h:  26),
1515        (x: NTPX; y:   0; w:   1; h:   1),
1516        (x: 2600; y: 350; w:  50; h: 125),
1517        (x: 2750; y: 250; w:  75; h:  75),
1518        (x: 3200; y: 525; w:  75; h:  75),
1519        (x: 2750; y: 550; w:  75; h: 125),
1520        (x: NTPX; y:   0; w:   1; h:   1),
1521        (x: 2800; y:1150; w:  26; h:  26),
1522        (x: 2770; y: 950; w:  50; h:  50),
1523        (x: 2880; y: 950; w:  50; h:  50),
1524        (x: 2900; y:1150; w:  26; h:  26),
1525        (x: NTPX; y:   0; w:   1; h:   1),
1526        (x: 3075; y:1985; w:  26; h:  26),
1527        (x: 3255; y:1700; w:  75; h: 125),
1528        (x: 3475; y:1700; w:  75; h: 125),
1529        (x: 3625; y:1985; w:  26; h:  26),
1530        (x: NTPX; y:   0; w:   1; h:   1),
1531        (x: 3200; y:1450; w:  26; h:  26),
1532        (x: 3140; y:1350; w:  50; h:  50),
1533        (x: 3280; y:1350; w:  50; h:  50),
1534        (x: 3300; y:1450; w:  26; h:  26),
1535        (x: NTPX; y:   0; w:   1; h:   1),
1536        (x: 3500; y:1050; w:  50; h:  75),
1537        (x: 3650; y: 600; w:  75; h: 125),
1538        (x: 3800; y: 600; w:  75; h: 125),
1539        (x: 3900; y:1000; w:  50; h:  75),
1540        (x: NTPX; y:   0; w:   1; h:   1),
1541        (x: 3800; y: 200; w:  50; h:  75),
1542        (x: 3975; y:  50; w:  75; h:  50),
1543        (x: 4010; y: 225; w:  50; h:  75),
1544        (x: NTPX; y:   0; w:   1; h:   1)
1545        );
1546       Template41FPoints: array[0..0] of TPoint =
1547       (
1548        (x: 2047; y:    0)
1549       );
1550 // 2 tiny islands
1551 const Template42Points: array[0..13] of TSDL_Rect =
1552       (
1553        (x:   90; y: 520; w:   1; h:   1),
1554        (x:   90; y:  50; w:  10; h:  50),
1555        (x:  170; y: 200; w:  10; h:  50),
1556        (x:  270; y: 350; w:  10; h:  50),
1557        (x:  350; y: 150; w:  10; h:  50),
1558        (x:  350; y: 520; w:   1; h:   1),
1559        (x: NTPX; y:   0; w:   1; h:   1),
1560        (x: 1170; y: 520; w:   1; h:   1),
1561        (x: 1170; y: 150; w:  10; h:  50),
1562        (x: 1250; y: 350; w:  10; h:  50),
1563        (x: 1350; y: 200; w:  10; h:  50),
1564        (x: 1430; y:  50; w:  10; h:  50),
1565        (x: 1430; y: 520; w:   1; h:   1),
1566        (x: NTPX; y:   0; w:   1; h:   1)
1567       );
1568       Template42FPoints: array[0..0] of TPoint =
1569       (
1570        (x: 512; y:    0)
1571       );
1572 // Many islands
1573 const Template43Points: array[0..172] of TSDL_Rect =
1574       (
1575        (x:   95; y: 500; w:  26; h:  26),
1576        (x:  100; y: 275; w:  50; h: 125),
1577        (x:  325; y: 275; w:  50; h: 125),
1578        (x:  330; y: 500; w:  26; h:  26),
1579        (x: NTPX; y:   0; w:   1; h:   1),
1580        (x:  725; y: 125; w:  26; h:  26),
1581        (x:  725; y:  25; w:  30; h:  50),
1582        (x:  825; y:  35; w:  30; h:  35),
1583        (x:  825; y: 135; w:  26; h:  26),
1584        (x: NTPX; y:   0; w:   1; h:   1),
1585        (x: 1150; y: 550; w:  50; h:  75),
1586        (x: 1250; y: 300; w:  50; h:  75),
1587        (x: 1350; y: 300; w:  50; h:  75),
1588        (x: 1400; y: 575; w:  50; h:  75),
1589        (x: NTPX; y:   0; w:   1; h:   1),
1590        (x:  725; y:1050; w:  75; h:  75),
1591        (x:  700; y: 800; w: 125; h: 175),
1592        (x:  950; y: 800; w: 125; h: 175),
1593        (x: 1000; y:1100; w:  75; h:  75),
1594        (x: NTPX; y:   0; w:   1; h:   1),
1595        (x:  175; y:1500; w:  26; h:  26),
1596        (x:  180; y:1400; w:  30; h:  50),
1597        (x:  250; y:1400; w:  30; h:  50),
1598        (x:  275; y:1510; w:  26; h:  26),
1599        (x: NTPX; y:   0; w:   1; h:   1),
1600        (x:  500; y:1800; w: 125; h: 125),
1601        (x:  600; y:1650; w: 125; h: 125),
1602        (x:  750; y:1650; w: 125; h: 125),
1603        (x:  950; y:1850; w: 125; h: 125),
1604        (x: NTPX; y:   0; w:   1; h:   1),
1605        (x: 1075; y:1450; w:  26; h:  26),
1606        (x: 1100; y:1300; w:  30; h:  50),
1607        (x: 1150; y:1300; w:  30; h:  50),
1608        (x: 1175; y:1430; w:  26; h:  26),
1609        (x: NTPX; y:   0; w:   1; h:   1),
1610        (x: 1600; y:1250; w:  50; h: 125),
1611        (x: 1700; y: 950; w:  50; h: 125),
1612        (x: 1850; y: 500; w:  75; h: 125),
1613        (x: 1950; y: 550; w:  75; h: 175),
1614        (x: 2250; y: 950; w:  50; h: 125),
1615        (x: 2350; y:1250; w:  50; h: 125),
1616        (x: NTPX; y:   0; w:   1; h:   1),
1617        (x: 1750; y:2010; w:  26; h:  26),
1618        (x: 1900; y:1870; w:  75; h:  75),
1619        (x: 2050; y:1870; w:  75; h:  75),
1620        (x: 2175; y:2010; w:  26; h:  26),
1621        (x: NTPX; y:   0; w:   1; h:   1),
1622        (x: 2500; y:1700; w:  26; h:  26),
1623        (x: 2575; y:1500; w:  35; h:  75),
1624        (x: 2650; y:1500; w:  35; h:  75),
1625        (x: 2700; y:1690; w:  26; h:  26),
1626        (x: NTPX; y:   0; w:   1; h:   1),
1627        (x: 2000; y: 125; w:  26; h:  26),
1628        (x: 2000; y:  50; w:  50; h:  50),
1629        (x: 2100; y:  50; w:  50; h:  50),
1630        (x: 2150; y: 150; w:  26; h:  26),
1631        (x: NTPX; y:   0; w:   1; h:   1),
1632        (x: 2600; y: 350; w:  50; h: 125),
1633        (x: 2750; y: 250; w:  75; h:  75),
1634        (x: 3200; y: 525; w:  75; h:  75),
1635        (x: 2750; y: 550; w:  75; h: 125),
1636        (x: NTPX; y:   0; w:   1; h:   1),
1637        (x: 2800; y:1150; w:  26; h:  26),
1638        (x: 2770; y: 950; w:  50; h:  50),
1639        (x: 2880; y: 950; w:  50; h:  50),
1640        (x: 2900; y:1150; w:  26; h:  26),
1641        (x: NTPX; y:   0; w:   1; h:   1),
1642        (x: 3075; y:1985; w:  26; h:  26),
1643        (x: 3255; y:1700; w:  75; h: 125),
1644        (x: 3475; y:1700; w:  75; h: 125),
1645        (x: 3625; y:1985; w:  26; h:  26),
1646        (x: NTPX; y:   0; w:   1; h:   1),
1647        (x: 3200; y:1450; w:  26; h:  26),
1648        (x: 3140; y:1350; w:  50; h:  50),
1649        (x: 3280; y:1350; w:  50; h:  50),
1650        (x: 3300; y:1450; w:  26; h:  26),
1651        (x: NTPX; y:   0; w:   1; h:   1),
1652        (x: 3500; y:1050; w:  50; h:  75),
1653        (x: 3650; y: 600; w:  75; h: 125),
1654        (x: 3800; y: 600; w:  75; h: 125),
1655        (x: 3900; y:1000; w:  50; h:  75),
1656        (x: NTPX; y:   0; w:   1; h:   1),
1657        (x: 3800; y: 200; w:  50; h:  75),
1658        (x: 3975; y:  50; w:  75; h:  50),
1659        (x: 4010; y: 225; w:  50; h:  75),
1660        (x: NTPX; y:   0; w:   1; h:   1),
1661        (x:   95; y:2548; w:  26; h:  26),
1662        (x:  100; y:2323; w:  50; h: 125),
1663        (x:  325; y:2323; w:  50; h: 125),
1664        (x:  330; y:2548; w:  26; h:  26),
1665        (x: NTPX; y:2048; w:   1; h:   1),
1666        (x:  725; y:2173; w:  26; h:  26),
1667        (x:  725; y:2073; w:  30; h:  50),
1668        (x:  825; y:2083; w:  30; h:  35),
1669        (x:  825; y:2183; w:  26; h:  26),
1670        (x: NTPX; y:2048; w:   1; h:   1),
1671        (x: 1150; y:2598; w:  50; h:  75),
1672        (x: 1250; y:2348; w:  50; h:  75),
1673        (x: 1350; y:2348; w:  50; h:  75),
1674        (x: 1400; y:2623; w:  50; h:  75),
1675        (x: NTPX; y:2048; w:   1; h:   1),
1676        (x:  525; y:3098; w:  75; h:  75),
1677        (x:  700; y:2848; w: 125; h: 175),
1678        (x:  950; y:2948; w: 125; h: 175),
1679        (x: 1100; y:3148; w:  75; h:  75),
1680        (x: NTPX; y:2048; w:   1; h:   1),
1681        (x:  175; y:3548; w:  26; h:  26),
1682        (x:  210; y:3448; w:  30; h:  50),
1683        (x:  240; y:3448; w:  30; h:  50),
1684        (x:  275; y:3558; w:  26; h:  26),
1685        (x: NTPX; y:2048; w:   1; h:   1),
1686        (x:  450; y:3848; w: 125; h: 125),
1687        (x:  600; y:3798; w: 125; h: 125),
1688        (x:  750; y:3798; w: 125; h: 125),
1689        (x:  950; y:3898; w: 125; h: 125),
1690        (x: NTPX; y:2048; w:   1; h:   1),
1691        (x: 1075; y:3498; w:  26; h:  26),
1692        (x: 1110; y:3348; w:  30; h:  50),
1693        (x: 1140; y:3348; w:  30; h:  50),
1694        (x: 1175; y:3478; w:  26; h:  26),
1695        (x: NTPX; y:2048; w:   1; h:   1),
1696        (x: 1600; y:3298; w:  50; h: 125),
1697        (x: 1700; y:3198; w:  50; h: 125),
1698        (x: 1850; y:2548; w:  75; h: 125),
1699        (x: 1950; y:2598; w:  75; h: 175),
1700        (x: 2250; y:3198; w:  50; h: 125),
1701        (x: 2350; y:3298; w:  50; h: 125),
1702        (x: NTPX; y:2048; w:   1; h:   1),
1703        (x: 1750; y:4058; w:  26; h:  26),
1704        (x: 1900; y:3918; w:  75; h:  75),
1705        (x: 2050; y:3918; w:  75; h:  75),
1706        (x: 2175; y:4058; w:  26; h:  26),
1707        (x: NTPX; y:2048; w:   1; h:   1),
1708        (x: 2500; y:3748; w:  26; h:  26),
1709        (x: 2575; y:3548; w:  35; h:  75),
1710        (x: 2650; y:3548; w:  35; h:  75),
1711        (x: 2700; y:3738; w:  26; h:  26),
1712        (x: NTPX; y:2048; w:   1; h:   1),
1713        (x: 2000; y:2173; w:  26; h:  26),
1714        (x: 2050; y:2098; w:  50; h:  50),
1715        (x: 2100; y:2098; w:  50; h:  50),
1716        (x: 2150; y:2198; w:  26; h:  26),
1717        (x: NTPX; y:2048; w:   1; h:   1),
1718        (x: 2600; y:2298; w:  50; h: 125),
1719        (x: 2750; y:2448; w:  75; h:  75),
1720        (x: 2900; y:2573; w:  75; h:  75),
1721        (x: 3150; y:2598; w:  75; h: 125),
1722        (x: NTPX; y:2048; w:   1; h:   1),
1723        (x: 2800; y:3198; w:  26; h:  26),
1724        (x: 2840; y:2998; w:  50; h:  50),
1725        (x: 2880; y:2998; w:  50; h:  50),
1726        (x: 2900; y:3198; w:  26; h:  26),
1727        (x: NTPX; y:2048; w:   1; h:   1),
1728        (x: 3075; y:4033; w:  26; h:  26),
1729        (x: 3325; y:3748; w:  75; h: 125),
1730        (x: 3475; y:3748; w:  75; h: 125),
1731        (x: 3625; y:4033; w:  26; h:  26),
1732        (x: NTPX; y:2048; w:   1; h:   1),
1733        (x: 3200; y:3498; w:  26; h:  26),
1734        (x: 3240; y:3398; w:  50; h:  50),
1735        (x: 3280; y:3398; w:  50; h:  50),
1736        (x: 3300; y:3498; w:  26; h:  26),
1737        (x: NTPX; y:2048; w:   1; h:   1),
1738        (x: 3500; y:3098; w:  50; h:  75),
1739        (x: 3650; y:2648; w:  75; h: 125),
1740        (x: 3800; y:2648; w:  75; h: 125),
1741        (x: 3900; y:3048; w:  50; h:  75),
1742        (x: NTPX; y:2048; w:   1; h:   1),
1743        (x: 3800; y:2248; w:  50; h:  75),
1744        (x: 3875; y:2148; w:  75; h:  75),
1745        (x: 3925; y:2098; w:  75; h:  50),
1746        (x: 4050; y:2173; w:  50; h:  75),
1747        (x: NTPX; y:2048; w:   1; h:   1)
1748       );
1749       Template43FPoints: array[0..0] of TPoint =
1750       (
1751        (x: 4095; y:    0)
1752       );
1753 
1754 // 3 large caverns
1755 const Template44Points: array[0..14] of TSDL_Rect =
1756       (
1757        (x:    0; y: 100; w:   1; h:  50),
1758        (x: 4095; y: 100; w:   1; h:  50),
1759        (x: 4095; y: 400; w:   1; h:  50),
1760        (x:    0; y: 360; w:   1; h:  50),
1761        (x: NTPX; y:   0; w:   1; h:   1),
1762        (x:    0; y: 750; w:   1; h:  50),
1763        (x: 4095; y: 750; w:   1; h:  50),
1764        (x: 4095; y:1100; w:   1; h:  50),
1765        (x:    0; y:1100; w:   1; h:  50),
1766        (x: NTPX; y:   0; w:   1; h:   1),
1767        (x:    0; y:1300; w:   1; h: 250),
1768        (x: 4095; y:1300; w:   1; h: 250),
1769        (x: 4095; y:1800; w:   1; h: 200),
1770        (x:    0; y:1800; w:   1; h: 200),
1771        (x: NTPX; y:   0; w:   1; h:   1)
1772       );
1773       Template44FPoints: array[0..5] of TSDL_Rect =
1774       (
1775        (x:   1; y:  90; w:   0; h:   0),
1776        (x:   1; y: 500; w:   0; h:   0),
1777        (x:4095; y: 500; w:   0; h:   0),
1778        (x:   1; y:1200; w:   0; h:   0),
1779        (x:4095; y:1200; w:   0; h:   0),
1780        (x:   1; y:2010; w:   0; h:   0)
1781       );
1782 
1783 // large caverns with an island
1784 const Template45Points: array[0..11] of TSDL_Rect =
1785       (
1786        (x:  500; y: 100; w:   1; h: 300),
1787        (x: 3700; y: 100; w:   1; h: 300),
1788        (x: 3700; y: 900; w: 200; h: 300),
1789        (x: 3700; y:1700; w:   1; h: 250),
1790        (x:  500; y:1700; w:   1; h: 250),
1791        (x:  300; y: 900; w: 200; h: 250),
1792        (x: NTPX; y:   0; w:   1; h:   1),
1793        (x: 1000; y: 800; w:   1; h:   1),
1794        (x: 2700; y: 800; w: 600; h: 100),
1795        (x: 2700; y:1200; w: 600; h: 200),
1796        (x: 1000; y:1200; w: 200; h: 200),
1797        (x: NTPX; y:   0; w:   1; h:   1)
1798       );
1799       Template45FPoints: array[0..2] of TSDL_Rect =
1800       (
1801        (x:   1; y:   1; w:   0; h:   0),
1802        (x:   1; y:2047; w:   0; h:   0),
1803        (x:1005; y: 805; w:   0; h:   0)
1804       );
1805 
1806 const Template46Points: array[0..19] of TSDL_Rect =
1807       (
1808        (x:  800; y: 1424; w:    1; h:    1),
1809        (x:  800; y: 1224; w:    1; h:    1),
1810        (x: 2200; y: 1224; w:    1; h:    1),
1811        (x: 2200; y: 1424; w:    1; h:    1),
1812        (x: NTPX; y:    0; w:    1; h:    1),
1813        (x:  800; y: 1024; w:    1; h:    1),
1814        (x:  800; y:  844; w:    1; h:    1),
1815        (x: 2200; y:  844; w:    1; h:    1),
1816        (x: 2200; y: 1024; w:    1; h:    1),
1817        (x: NTPX; y:    0; w:    1; h:    1),
1818        (x:  800; y:  664; w:    1; h:    1),
1819        (x:  800; y:  484; w:    1; h:    1),
1820        (x: 2200; y:  484; w:    1; h:    1),
1821        (x: 2200; y:  664; w:    1; h:    1),
1822        (x: NTPX; y:    0; w:    1; h:    1),
1823        (x:  800; y:  304; w:    1; h:    1),
1824        (x:  800; y:  104; w:    1; h:    1),
1825        (x: 2200; y:  104; w:    1; h:    1),
1826        (x: 2200; y:  304; w:    1; h:    1),
1827        (x: NTPX; y:    0; w:    1; h:    1)
1828 
1829       );
1830       Template46FPoints: array[0..0] of TPoint =
1831       (
1832        (x: 1023; y:    0)
1833       );
1834 
1835 ////////////////////////////////////////////////////////////////////////
1836 var EdgeTemplates: array[0..46] of TEdgeTemplate =
1837       (
1838        (BasePoints: PPointArray(@Template0Points);
1839         BasePointsCount: Succ(High(Template0Points));
1840         FillPoints: PPointArray(@Template0FPoints);
1841         FillPointsCount: Succ(High(Template0FPoints));
1842         TemplateHeight: 1424; TemplateWidth: 3072;
1843         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1844         hasGirders: true;
1845         MaxHedgeHogs: 18;
1846        ),
1847        (BasePoints: PPointArray(@Template1Points);
1848         BasePointsCount: Succ(High(Template1Points));
1849         FillPoints: PPointArray(@Template1FPoints);
1850         FillPointsCount: Succ(High(Template1FPoints));
1851         TemplateHeight: 1424; TemplateWidth: 3072;
1852         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1853         hasGirders: true;
1854         MaxHedgeHogs: 18;
1855        ),
1856        (BasePoints: PPointArray(@Template2Points);
1857         BasePointsCount: Succ(High(Template2Points));
1858         FillPoints: PPointArray(@Template2FPoints);
1859         FillPointsCount: Succ(High(Template2FPoints));
1860         TemplateHeight: 1424; TemplateWidth: 3072;
1861         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1862         hasGirders: true;
1863         MaxHedgeHogs: 18;
1864        ),
1865        (BasePoints: PPointArray(@Template3Points);
1866         BasePointsCount: Succ(High(Template3Points));
1867         FillPoints: PPointArray(@Template3FPoints);
1868         FillPointsCount: Succ(High(Template3FPoints));
1869         TemplateHeight: 1424; TemplateWidth: 3072;
1870         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1871         hasGirders: true;
1872         MaxHedgeHogs: 18;
1873        ),
1874        (BasePoints: PPointArray(@Template4Points);
1875         BasePointsCount: Succ(High(Template4Points));
1876         FillPoints: PPointArray(@Template4FPoints);
1877         FillPointsCount: Succ(High(Template4FPoints));
1878         TemplateHeight: 1424; TemplateWidth: 3072;
1879         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1880         hasGirders: true;
1881         MaxHedgeHogs: 18;
1882        ),
1883        (BasePoints: PPointArray(@Template5Points);
1884         BasePointsCount: Succ(High(Template5Points));
1885         FillPoints: PPointArray(@Template5FPoints);
1886         FillPointsCount: Succ(High(Template5FPoints));
1887         TemplateHeight: 1424; TemplateWidth: 3072;
1888         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1889         hasGirders: true;
1890         MaxHedgeHogs: 18;
1891        ),
1892        (BasePoints: PPointArray(@Template6Points);
1893         BasePointsCount: Succ(High(Template6Points));
1894         FillPoints: PPointArray(@Template6FPoints);
1895         FillPointsCount: Succ(High(Template6FPoints));
1896         TemplateHeight: 1424; TemplateWidth: 3072;
1897         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1898         hasGirders: true;
1899         MaxHedgeHogs: 18;
1900        ),
1901        (BasePoints: PPointArray(@Template7Points);
1902         BasePointsCount: Succ(High(Template7Points));
1903         FillPoints: PPointArray(@Template7FPoints);
1904         FillPointsCount: Succ(High(Template7FPoints));
1905         TemplateHeight: 1424; TemplateWidth: 3072;
1906         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1907         hasGirders: true;
1908         MaxHedgeHogs: 18;
1909        ),
1910        (BasePoints: PPointArray(@Template8Points);
1911         BasePointsCount: Succ(High(Template8Points));
1912         FillPoints: PPointArray(@Template8FPoints);
1913         FillPointsCount: Succ(High(Template8FPoints));
1914         TemplateHeight: 1424; TemplateWidth: 3072;
1915         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1916         hasGirders: true;
1917         MaxHedgeHogs: 18;
1918        ),
1919        (BasePoints: PPointArray(@Template9Points);
1920         BasePointsCount: Succ(High(Template9Points));
1921         FillPoints: PPointArray(@Template9FPoints);
1922         FillPointsCount: Succ(High(Template9FPoints));
1923         TemplateHeight: 1424; TemplateWidth: 3072;
1924         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1925         hasGirders: true;
1926         MaxHedgeHogs: 18;
1927        ),
1928        (BasePoints: PPointArray(@Template10Points);
1929         BasePointsCount: Succ(High(Template10Points));
1930         FillPoints: PPointArray(@Template10FPoints);
1931         FillPointsCount: Succ(High(Template10FPoints));
1932         TemplateHeight: 1424; TemplateWidth: 3072;
1933         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1934         hasGirders: true;
1935         MaxHedgeHogs: 18;
1936        ),
1937        (BasePoints: PPointArray(@Template11Points);
1938         BasePointsCount: Succ(High(Template11Points));
1939         FillPoints: PPointArray(@Template11FPoints);
1940         FillPointsCount: Succ(High(Template11FPoints));
1941         TemplateHeight: 1424; TemplateWidth: 3072;
1942         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1943         hasGirders: true;
1944         MaxHedgeHogs: 18;
1945        ),
1946        (BasePoints: PPointArray(@Template12Points);
1947         BasePointsCount: Succ(High(Template12Points));
1948         FillPoints: PPointArray(@Template12FPoints);
1949         FillPointsCount: Succ(High(Template12FPoints));
1950         TemplateHeight: 1424; TemplateWidth: 3072;
1951         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1952         hasGirders: true;
1953         MaxHedgeHogs: 18;
1954        ),
1955        (BasePoints: PPointArray(@Template13Points);
1956         BasePointsCount: Succ(High(Template13Points));
1957         FillPoints: PPointArray(@Template13FPoints);
1958         FillPointsCount: Succ(High(Template13FPoints));
1959         TemplateHeight: 1424; TemplateWidth: 3072;
1960         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1961         hasGirders: true;
1962         MaxHedgeHogs: 18;
1963        ),
1964        (BasePoints: PPointArray(@Template14Points);
1965         BasePointsCount: Succ(High(Template14Points));
1966         FillPoints: PPointArray(@Template14FPoints);
1967         FillPointsCount: Succ(High(Template14FPoints));
1968         TemplateHeight: 1424; TemplateWidth: 3072;
1969         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1970         hasGirders: true;
1971         MaxHedgeHogs: 18;
1972        ),
1973        (BasePoints: PPointArray(@Template15Points);
1974         BasePointsCount: Succ(High(Template15Points));
1975         FillPoints: PPointArray(@Template15FPoints);
1976         FillPointsCount: Succ(High(Template15FPoints));
1977         TemplateHeight: 1424; TemplateWidth: 3072;
1978         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1979         hasGirders: true;
1980         MaxHedgeHogs: 18;
1981        ),
1982        (BasePoints: PPointArray(@Template16Points);
1983         BasePointsCount: Succ(High(Template16Points));
1984         FillPoints: PPointArray(@Template16FPoints);
1985         FillPointsCount: Succ(High(Template16FPoints));
1986         TemplateHeight: 1424; TemplateWidth: 3072;
1987         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1988         hasGirders: true;
1989         MaxHedgeHogs: 18;
1990        ),
1991        (BasePoints: PPointArray(@Template17Points);
1992         BasePointsCount: Succ(High(Template17Points));
1993         FillPoints: PPointArray(@Template17FPoints);
1994         FillPointsCount: Succ(High(Template17FPoints));
1995         TemplateHeight: 1424; TemplateWidth: 3072;
1996         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
1997         hasGirders: true;
1998         MaxHedgeHogs: 18;
1999        ),
2000        (BasePoints: PPointArray(@Template18Points);
2001         BasePointsCount: Succ(High(Template18Points));
2002         FillPoints: PPointArray(@Template18FPoints);
2003         FillPointsCount: Succ(High(Template18FPoints));
2004         TemplateHeight: 1424; TemplateWidth: 4096;
2005         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2006         hasGirders: true;
2007         MaxHedgeHogs: 36;
2008        ),
2009        (BasePoints: PPointArray(@Template19Points);
2010         BasePointsCount: Succ(High(Template19Points));
2011         FillPoints: PPointArray(@Template19FPoints);
2012         FillPointsCount: Succ(High(Template19FPoints));
2013         TemplateHeight: 1424; TemplateWidth: 4096;
2014         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2015         hasGirders: true;
2016         MaxHedgeHogs: 36;
2017        ),
2018        (BasePoints: PPointArray(@Template20Points);
2019         BasePointsCount: Succ(High(Template20Points));
2020         FillPoints: PPointArray(@Template20FPoints);
2021         FillPointsCount: Succ(High(Template20FPoints));
2022         TemplateHeight: 1424; TemplateWidth: 4096;
2023         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2024         hasGirders: true;
2025         MaxHedgeHogs: 36;
2026        ),
2027        (BasePoints: PPointArray(@Template21Points);
2028         BasePointsCount: Succ(High(Template21Points));
2029         FillPoints: PPointArray(@Template21FPoints);
2030         FillPointsCount: Succ(High(Template21FPoints));
2031         TemplateHeight: 1424; TemplateWidth: 4096;
2032         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2033         hasGirders: true;
2034         MaxHedgeHogs: 36;
2035        ),
2036        (BasePoints: PPointArray(@Template22Points);
2037         BasePointsCount: Succ(High(Template22Points));
2038         FillPoints: PPointArray(@Template22FPoints);
2039         FillPointsCount: Succ(High(Template22FPoints));
2040         TemplateHeight: 1424; TemplateWidth: 4096;
2041         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2042         hasGirders: true;
2043         MaxHedgeHogs: 36;
2044        ),
2045        (BasePoints: PPointArray(@Template23Points);
2046         BasePointsCount: Succ(High(Template23Points));
2047         FillPoints: PPointArray(@Template23FPoints);
2048         FillPointsCount: Succ(High(Template23FPoints));
2049         TemplateHeight: 1424; TemplateWidth: 4096;
2050         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2051         hasGirders: true;
2052         MaxHedgeHogs: 36;
2053        ),
2054        (BasePoints: PPointArray(@Template24Points);
2055         BasePointsCount: Succ(High(Template24Points));
2056         FillPoints: PPointArray(@Template24FPoints);
2057         FillPointsCount: Succ(High(Template24FPoints));
2058         TemplateHeight: 1424; TemplateWidth: 4096;
2059         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2060         hasGirders: true;
2061         MaxHedgeHogs: 36;
2062        ),
2063        (BasePoints: PPointArray(@Template25Points);
2064         BasePointsCount: Succ(High(Template25Points));
2065         FillPoints: PPointArray(@Template25FPoints);
2066         FillPointsCount: Succ(High(Template25FPoints));
2067         TemplateHeight: 1424; TemplateWidth: 4096;
2068         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2069         hasGirders: true;
2070         MaxHedgeHogs: 36;
2071        ),
2072        (BasePoints: PPointArray(@Template26Points);
2073         BasePointsCount: Succ(High(Template26Points));
2074         FillPoints: PPointArray(@Template26FPoints);
2075         FillPointsCount: Succ(High(Template26FPoints));
2076         TemplateHeight: 1424; TemplateWidth: 4096;
2077         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2078         hasGirders: true;
2079         MaxHedgeHogs: 36;
2080        ),
2081        (BasePoints: PPointArray(@Template27Points);
2082         BasePointsCount: Succ(High(Template27Points));
2083         FillPoints: PPointArray(@Template27FPoints);
2084         FillPointsCount: Succ(High(Template27FPoints));
2085         TemplateHeight: 1424; TemplateWidth: 4096;
2086         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2087         hasGirders: true;
2088         MaxHedgeHogs: 36;
2089        ),
2090        (BasePoints: PPointArray(@Template28Points);
2091         BasePointsCount: Succ(High(Template28Points));
2092         FillPoints: PPointArray(@Template28FPoints);
2093         FillPointsCount: Succ(High(Template28FPoints));
2094         TemplateHeight: 1424; TemplateWidth: 4096;
2095         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2096         hasGirders: true;
2097         MaxHedgeHogs: 36;
2098        ),
2099        (BasePoints: PPointArray(@Template29Points);
2100         BasePointsCount: Succ(High(Template29Points));
2101         FillPoints: PPointArray(@Template29FPoints);
2102         FillPointsCount: Succ(High(Template29FPoints));
2103         TemplateHeight: 1424; TemplateWidth: 4096;
2104         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2105         hasGirders: true;
2106         MaxHedgeHogs: 36;
2107        ),
2108        (BasePoints: PPointArray(@Template30Points);
2109         BasePointsCount: Succ(High(Template30Points));
2110         FillPoints: PPointArray(@Template30FPoints);
2111         FillPointsCount: Succ(High(Template30FPoints));
2112         TemplateHeight: 1424; TemplateWidth: 4096;
2113         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2114         hasGirders: true;
2115         MaxHedgeHogs: 36;
2116        ),
2117        (BasePoints: PPointArray(@Template31Points);
2118         BasePointsCount: Succ(High(Template31Points));
2119         FillPoints: PPointArray(@Template31FPoints);
2120         FillPointsCount: Succ(High(Template31FPoints));
2121         TemplateHeight: 1424; TemplateWidth: 4096;
2122         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2123         hasGirders: true;
2124         MaxHedgeHogs: 36;
2125        ),
2126        (BasePoints: PPointArray(@Template32Points);
2127         BasePointsCount: Succ(High(Template32Points));
2128         FillPoints: PPointArray(@Template32FPoints);
2129         FillPointsCount: Succ(High(Template32FPoints));
2130         TemplateHeight: 1424; TemplateWidth: 4096;
2131         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2132         hasGirders: true;
2133         MaxHedgeHogs: 36;
2134        ),
2135        (BasePoints: PPointArray(@Template33Points);
2136         BasePointsCount: Succ(High(Template33Points));
2137         FillPoints: PPointArray(@Template33FPoints);
2138         FillPointsCount: Succ(High(Template33FPoints));
2139         TemplateHeight: 1424; TemplateWidth: 4096;
2140         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2141         hasGirders: true;
2142         MaxHedgeHogs: 36;
2143        ),
2144        (BasePoints: PPointArray(@Template34Points);
2145         BasePointsCount: Succ(High(Template34Points));
2146         FillPoints: PPointArray(@Template34FPoints);
2147         FillPointsCount: Succ(High(Template34FPoints));
2148         TemplateHeight: 1424; TemplateWidth: 4096;
2149         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2150         hasGirders: true;
2151         MaxHedgeHogs: 36;
2152        ),
2153        (BasePoints: PPointArray(@Template35Points);
2154         BasePointsCount: Succ(High(Template35Points));
2155         FillPoints: PPointArray(@Template35FPoints);
2156         FillPointsCount: Succ(High(Template35FPoints));
2157         TemplateHeight: 1424; TemplateWidth: 4096;
2158         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2159         hasGirders: true;
2160         MaxHedgeHogs: 36;
2161        ),
2162        (BasePoints: PPointArray(@Template36Points);
2163         BasePointsCount: Succ(High(Template36Points));
2164         FillPoints: PPointArray(@Template36FPoints);
2165         FillPointsCount: Succ(High(Template36FPoints));
2166         TemplateHeight: 1024; TemplateWidth: 4096;
2167         canMirror: true; canFlip: false; isNegative: true; canInvert: false;
2168         hasGirders: false;
2169         MaxHedgeHogs: 32;
2170        ),
2171        (BasePoints: PPointArray(@Template37Points);
2172         BasePointsCount: Succ(High(Template37Points));
2173         FillPoints: PPointArray(@Template37FPoints);
2174         FillPointsCount: Succ(High(Template37FPoints));
2175         TemplateHeight: 2048; TemplateWidth: 4096;
2176         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2177         hasGirders: true;
2178         MaxHedgeHogs: 48;
2179        ),
2180        (BasePoints: PPointArray(@Template38Points);
2181         BasePointsCount: Succ(High(Template38Points));
2182         FillPoints: PPointArray(@Template38FPoints);
2183         FillPointsCount: Succ(High(Template38FPoints));
2184         TemplateHeight: 2048; TemplateWidth: 4096;
2185         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2186         hasGirders: true;
2187         MaxHedgeHogs: 48;
2188        ),
2189        (BasePoints: PPointArray(@Template39Points);
2190         BasePointsCount: Succ(High(Template39Points));
2191         FillPoints: PPointArray(@Template39FPoints);
2192         FillPointsCount: Succ(High(Template39FPoints));
2193         TemplateHeight: 512; TemplateWidth: 1536;
2194         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2195         hasGirders: false;
2196         MaxHedgeHogs: 8;
2197        ),
2198        (BasePoints: PPointArray(@Template40Points);
2199         BasePointsCount: Succ(High(Template40Points));
2200         FillPoints: PPointArray(@Template40FPoints);
2201         FillPointsCount: Succ(High(Template40FPoints));
2202         TemplateHeight: 1024; TemplateWidth: 1024;
2203         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2204         hasGirders: false;
2205         MaxHedgeHogs: 8;
2206        ),
2207        (BasePoints: PPointArray(@Template41Points);
2208         BasePointsCount: Succ(High(Template41Points));
2209         FillPoints: PPointArray(@Template41FPoints);
2210         FillPointsCount: Succ(High(Template41FPoints));
2211         TemplateHeight: 2048; TemplateWidth: 4096;
2212         canMirror: true; canFlip: true; isNegative: false; canInvert: false;
2213         hasGirders: true;
2214         MaxHedgeHogs: 48;
2215        ),
2216        (BasePoints: PPointArray(@Template42Points);
2217         BasePointsCount: Succ(High(Template42Points));
2218         FillPoints: PPointArray(@Template42FPoints);
2219         FillPointsCount: Succ(High(Template42FPoints));
2220         TemplateHeight: 512; TemplateWidth: 1536;
2221         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2222         hasGirders: false;
2223         MaxHedgeHogs: 8;
2224        ),
2225        (BasePoints: PPointArray(@Template43Points);
2226         BasePointsCount: Succ(High(Template43Points));
2227         FillPoints: PPointArray(@Template43FPoints);
2228         FillPointsCount: Succ(High(Template43FPoints));
2229         TemplateHeight: 4096; TemplateWidth: 4096;
2230         canMirror: true; canFlip: true; isNegative: false; canInvert: false;
2231         hasGirders: true;
2232         MaxHedgeHogs: 64;
2233        ),
2234        (BasePoints: PPointArray(@Template44Points);
2235         BasePointsCount: Succ(High(Template44Points));
2236         FillPoints: PPointArray(@Template44FPoints);
2237         FillPointsCount: Succ(High(Template44FPoints));
2238         TemplateHeight: 2048; TemplateWidth: 4096;
2239         canMirror: false; canFlip: false; isNegative: true; canInvert: false;
2240         hasGirders: false;
2241         MaxHedgeHogs: 48;
2242        ),
2243        (BasePoints: PPointArray(@Template45Points);
2244         BasePointsCount: Succ(High(Template45Points));
2245         FillPoints: PPointArray(@Template45FPoints);
2246         FillPointsCount: Succ(High(Template45FPoints));
2247         TemplateHeight: 2048; TemplateWidth: 4096;
2248         canMirror: false; canFlip: false; isNegative: true; canInvert: false;
2249         hasGirders: false;
2250         MaxHedgeHogs: 48;
2251        ),
2252        (BasePoints: PPointArray(@Template46Points);
2253         BasePointsCount: Succ(High(Template46Points));
2254         FillPoints: PPointArray(@Template46FPoints);
2255         FillPointsCount: Succ(High(Template46FPoints));
2256         TemplateHeight: 1424; TemplateWidth: 3072;
2257         canMirror: true; canFlip: false; isNegative: false; canInvert: false;
2258         hasGirders: true;
2259         MaxHedgeHogs: 18;
2260        )
2261       );
2262 const SmallTemplates: array[0..2] of Longword = ( 39, 40, 42 );
2263 const MediumTemplates: array[0..18] of Longword =
2264       ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 46 );
2265 const LargeTemplates: array[0..17] of Longword =
2266       (
2267         18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
2268         28, 29, 30, 31, 32, 33, 34, 35
2269       );
2270 const CavernTemplates: array[0..5] of Longword = (36, 2, 3, 21, 29, 45);
2271 const WackyTemplates: array[0..4] of Longword = (37, 38, 41, 43, 44);
2272 const TemplateCounts: array[0..5] of Longword = (
2273           0
2274         , Succ(High(SmallTemplates))
2275         , Succ(High(MediumTemplates))
2276         , Succ(High(LargeTemplates))
2277         , Succ(High(CavernTemplates))
2278         , Succ(High(WackyTemplates))
2279         );
2280 const GroupedTemplatesCount = Succ(High(SmallTemplates))
2281         + Succ(High(MediumTemplates))
2282         + Succ(High(LargeTemplates))
2283         + Succ(High(CavernTemplates))
2284         + Succ(High(WackyTemplates));
2285 
2286 implementation
2287 
2288 end.
2289