184
|
1 |
(*
|
1066
|
2 |
* Hedgewars, a free turn based strategy game
|
883
|
3 |
* Copyright (c) 2005-2008 Andrey Korotaev <unC0Rr@gmail.com>
|
184
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
|
17 |
*)
|
|
18 |
|
|
19 |
unit uLandTemplates;
|
|
20 |
interface
|
534
|
21 |
uses SDLh;
|
184
|
22 |
{$INCLUDE options.inc}
|
|
23 |
|
365
|
24 |
const NTPX = Low(TSDL_Rect.x);
|
|
25 |
|
184
|
26 |
type PPointArray = ^TPointArray;
|
358
|
27 |
TPointArray = array[0..64] of TSDL_Rect;
|
184
|
28 |
TEdgeTemplate = record
|
|
29 |
BasePoints: PPointArray;
|
|
30 |
BasePointsCount: Longword;
|
|
31 |
FillPoints: PPointArray;
|
|
32 |
FillPointsCount: Longword;
|
429
|
33 |
BezierizeCount: Longword;
|
364
|
34 |
RandPassesCount: Longword;
|
1773
|
35 |
TemplateHeight, TemplateWidth: LongInt;
|
|
36 |
canMirror, canFlip, isNegative, canInvert: boolean;
|
184
|
37 |
end;
|
|
38 |
|
1753
|
39 |
//////////////////////////////////////////////////////////////////////////////
|
|
40 |
/////////////////// MIRRORED FOUR TIMES //////////////////////////////////////
|
|
41 |
//////////////////////////////////////////////////////////////////////////////
|
|
42 |
// Hi unC0Rr. Yeah, I know this is kind of lame. Real templates should probably
|
|
43 |
// be made from scratch for taller/wider area. But hey, for testing.
|
|
44 |
// The first 18 are in all 4 quadrants, the last 18 are in only the bottom 2
|
1761
|
45 |
const Template0Points: array[0..37] of TSDL_Rect =
|
184
|
46 |
(
|
359
|
47 |
(x: 410; y: 1024; w: 1; h: 1),
|
|
48 |
(x: 160; y: 760; w: 130; h: 170),
|
|
49 |
(x: 342; y: 706; w: 316; h: 150),
|
|
50 |
(x: 238; y: 386; w: 270; h: 180),
|
|
51 |
(x: 246; y: 176; w: 242; h: 156),
|
403
|
52 |
(x: 552; y: 128; w: 610; h: 300),
|
|
53 |
(x: 750; y: 468; w: 352; h: 324),
|
359
|
54 |
(x: 650; y: 1024; w: 500; h: 1),
|
|
55 |
(x: 1250; y: 1100; w: 1; h: 1),
|
|
56 |
(x: 1490; y: 1024; w: 1; h: 1),
|
|
57 |
(x: 1452; y: 904; w: 74; h: 12),
|
|
58 |
(x: 1248; y: 575; w: 68; h: 425),
|
|
59 |
(x: 1426; y: 592; w: 140; h: 142),
|
|
60 |
(x: 1310; y: 192; w: 150; h: 350),
|
403
|
61 |
(x: 1588; y: 194; w: 148; h: 242),
|
359
|
62 |
(x: 1618; y: 472; w: 276; h: 314),
|
|
63 |
(x: 1710; y: 850; w: 130; h: 86),
|
365
|
64 |
(x: 1734; y: 1024; w: 1; h: 1),
|
1753
|
65 |
(x: NTPX; y: 0; w: 1; h: 1),
|
1761
|
66 |
(x: 2458; y: 1024; w: 1; h: 1), // X + 2048
|
|
67 |
(x: 2208; y: 760; w: 130; h: 170),
|
|
68 |
(x: 2390; y: 706; w: 316; h: 150),
|
|
69 |
(x: 2286; y: 386; w: 270; h: 180),
|
|
70 |
(x: 2294; y: 176; w: 242; h: 156),
|
|
71 |
(x: 2600; y: 128; w: 610; h: 300),
|
|
72 |
(x: 2798; y: 468; w: 352; h: 324),
|
|
73 |
(x: 2698; y: 1024; w: 500; h: 1),
|
1753
|
74 |
(x: 3298; y: 1100; w: 1; h: 1),
|
|
75 |
(x: 3538; y: 1024; w: 1; h: 1),
|
|
76 |
(x: 3500; y: 904; w: 74; h: 12),
|
|
77 |
(x: 3296; y: 575; w: 68; h: 425),
|
|
78 |
(x: 3474; y: 592; w: 140; h: 142),
|
|
79 |
(x: 3358; y: 192; w: 150; h: 350),
|
|
80 |
(x: 3636; y: 194; w: 148; h: 242),
|
|
81 |
(x: 3666; y: 472; w: 276; h: 314),
|
|
82 |
(x: 3758; y: 850; w: 130; h: 86),
|
|
83 |
(x: 3782; y: 1024; w: 1; h: 1),
|
1761
|
84 |
(x: NTPX; y: 0; w: 1; h: 1)
|
184
|
85 |
);
|
|
86 |
Template0FPoints: array[0..0] of TPoint =
|
|
87 |
(
|
1753
|
88 |
(x: 2047; y: 0)
|
712
|
89 |
);
|
1773
|
90 |
const Template1Points: array[0..4] of TSDL_Rect =
|
|
91 |
(
|
|
92 |
(x: 100; y: 100; w: 1; h: 1),
|
|
93 |
(x: 100; y: 100; w: 3000; h: 1500),
|
|
94 |
(x: 500; y: 500; w: 2000; h: 1000),
|
|
95 |
(x: 4000; y: 2000; w: 1; h: 1),
|
|
96 |
(x: NTPX; y: 0; w: 1; h: 1)
|
|
97 |
);
|
|
98 |
Template1FPoints: array[0..0] of TPoint =
|
|
99 |
(
|
|
100 |
(x: 2047; y: 0)
|
|
101 |
);
|
711
|
102 |
|
1753
|
103 |
//////////////////////////////////////////////////////////////////////////////
|
|
104 |
/////////////////// END MIRRORED TWO TIMES ///////////////////////////////////
|
|
105 |
//////////////////////////////////////////////////////////////////////////////
|
|
106 |
|
1773
|
107 |
const EdgeTemplates: array[0..1] of TEdgeTemplate =
|
184
|
108 |
(
|
|
109 |
(BasePoints: @Template0Points;
|
|
110 |
BasePointsCount: Succ(High(Template0Points));
|
|
111 |
FillPoints: @Template0FPoints;
|
|
112 |
FillPointsCount: Succ(High(Template0FPoints));
|
431
|
113 |
BezierizeCount: 3;
|
561
|
114 |
RandPassesCount: 8;
|
1773
|
115 |
TemplateHeight: 1024; TemplateWidth: 4096;
|
|
116 |
canMirror: true; canFlip: false; isNegative: false; canInvert: true;
|
|
117 |
// Yes. I know this isn't a good map to invert, just testing
|
|
118 |
),
|
|
119 |
(BasePoints: @Template1Points;
|
|
120 |
BasePointsCount: Succ(High(Template1Points));
|
|
121 |
FillPoints: @Template0FPoints;
|
|
122 |
FillPointsCount: Succ(High(Template1FPoints));
|
|
123 |
BezierizeCount: 6;
|
|
124 |
RandPassesCount: 8;
|
|
125 |
TemplateHeight: 2048; TemplateWidth: 4096;
|
|
126 |
canMirror: true; canFlip: false; isNegative: true; canInvert: false;
|
|
127 |
// make a decent cave about one time in, oh, 5 or 6 :-/
|
358
|
128 |
)
|
184
|
129 |
);
|
|
130 |
|
|
131 |
|
|
132 |
|
|
133 |
implementation
|
|
134 |
|
|
135 |
end.
|