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;
|
184
|
35 |
canMirror, canFlip: boolean;
|
|
36 |
end;
|
|
37 |
|
1753
|
38 |
//////////////////////////////////////////////////////////////////////////////
|
|
39 |
/////////////////// MIRRORED FOUR TIMES //////////////////////////////////////
|
|
40 |
//////////////////////////////////////////////////////////////////////////////
|
|
41 |
// Hi unC0Rr. Yeah, I know this is kind of lame. Real templates should probably
|
|
42 |
// be made from scratch for taller/wider area. But hey, for testing.
|
|
43 |
// The first 18 are in all 4 quadrants, the last 18 are in only the bottom 2
|
1761
|
44 |
const Template0Points: array[0..37] of TSDL_Rect =
|
184
|
45 |
(
|
359
|
46 |
(x: 410; y: 1024; w: 1; h: 1),
|
|
47 |
(x: 160; y: 760; w: 130; h: 170),
|
|
48 |
(x: 342; y: 706; w: 316; h: 150),
|
|
49 |
(x: 238; y: 386; w: 270; h: 180),
|
|
50 |
(x: 246; y: 176; w: 242; h: 156),
|
403
|
51 |
(x: 552; y: 128; w: 610; h: 300),
|
|
52 |
(x: 750; y: 468; w: 352; h: 324),
|
359
|
53 |
(x: 650; y: 1024; w: 500; h: 1),
|
|
54 |
(x: 1250; y: 1100; w: 1; h: 1),
|
|
55 |
(x: 1490; y: 1024; w: 1; h: 1),
|
|
56 |
(x: 1452; y: 904; w: 74; h: 12),
|
|
57 |
(x: 1248; y: 575; w: 68; h: 425),
|
|
58 |
(x: 1426; y: 592; w: 140; h: 142),
|
|
59 |
(x: 1310; y: 192; w: 150; h: 350),
|
403
|
60 |
(x: 1588; y: 194; w: 148; h: 242),
|
359
|
61 |
(x: 1618; y: 472; w: 276; h: 314),
|
|
62 |
(x: 1710; y: 850; w: 130; h: 86),
|
365
|
63 |
(x: 1734; y: 1024; w: 1; h: 1),
|
1753
|
64 |
(x: NTPX; y: 0; w: 1; h: 1),
|
1761
|
65 |
(x: 2458; y: 1024; w: 1; h: 1), // X + 2048
|
|
66 |
(x: 2208; y: 760; w: 130; h: 170),
|
|
67 |
(x: 2390; y: 706; w: 316; h: 150),
|
|
68 |
(x: 2286; y: 386; w: 270; h: 180),
|
|
69 |
(x: 2294; y: 176; w: 242; h: 156),
|
|
70 |
(x: 2600; y: 128; w: 610; h: 300),
|
|
71 |
(x: 2798; y: 468; w: 352; h: 324),
|
|
72 |
(x: 2698; y: 1024; w: 500; h: 1),
|
1753
|
73 |
(x: 3298; y: 1100; w: 1; h: 1),
|
|
74 |
(x: 3538; y: 1024; w: 1; h: 1),
|
|
75 |
(x: 3500; y: 904; w: 74; h: 12),
|
|
76 |
(x: 3296; y: 575; w: 68; h: 425),
|
|
77 |
(x: 3474; y: 592; w: 140; h: 142),
|
|
78 |
(x: 3358; y: 192; w: 150; h: 350),
|
|
79 |
(x: 3636; y: 194; w: 148; h: 242),
|
|
80 |
(x: 3666; y: 472; w: 276; h: 314),
|
|
81 |
(x: 3758; y: 850; w: 130; h: 86),
|
|
82 |
(x: 3782; y: 1024; w: 1; h: 1),
|
1761
|
83 |
(x: NTPX; y: 0; w: 1; h: 1)
|
184
|
84 |
);
|
|
85 |
Template0FPoints: array[0..0] of TPoint =
|
|
86 |
(
|
1753
|
87 |
(x: 2047; y: 0)
|
712
|
88 |
);
|
711
|
89 |
|
1753
|
90 |
//////////////////////////////////////////////////////////////////////////////
|
|
91 |
/////////////////// END MIRRORED TWO TIMES ///////////////////////////////////
|
|
92 |
//////////////////////////////////////////////////////////////////////////////
|
|
93 |
|
1761
|
94 |
const EdgeTemplates: array[0..0] of TEdgeTemplate =
|
184
|
95 |
(
|
|
96 |
(BasePoints: @Template0Points;
|
|
97 |
BasePointsCount: Succ(High(Template0Points));
|
|
98 |
FillPoints: @Template0FPoints;
|
|
99 |
FillPointsCount: Succ(High(Template0FPoints));
|
431
|
100 |
BezierizeCount: 3;
|
561
|
101 |
RandPassesCount: 8;
|
360
|
102 |
canMirror: true; canFlip: false;
|
358
|
103 |
)
|
184
|
104 |
);
|
|
105 |
|
|
106 |
|
|
107 |
|
|
108 |
implementation
|
|
109 |
|
|
110 |
end.
|