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 |
|
1776
|
24 |
const NTPX = Low(TSDL_Rect.x);
|
365
|
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;
|
1776
|
35 |
TemplateHeight, TemplateWidth: Longword;
|
1773
|
36 |
canMirror, canFlip, isNegative, canInvert: boolean;
|
1776
|
37 |
hasGirders: boolean;
|
1784
|
38 |
MaxHedgeHogs: Longword;
|
184
|
39 |
end;
|
|
40 |
|
1753
|
41 |
//////////////////////////////////////////////////////////////////////////////
|
|
42 |
/////////////////// MIRRORED FOUR TIMES //////////////////////////////////////
|
|
43 |
//////////////////////////////////////////////////////////////////////////////
|
|
44 |
// Hi unC0Rr. Yeah, I know this is kind of lame. Real templates should probably
|
|
45 |
// be made from scratch for taller/wider area. But hey, for testing.
|
|
46 |
// The first 18 are in all 4 quadrants, the last 18 are in only the bottom 2
|
1774
|
47 |
const Template0Points: array[0..18] of TSDL_Rect =
|
184
|
48 |
(
|
1775
|
49 |
(x: 324; y: 756; w: 196; h: 204),
|
|
50 |
(x: 224; y: 596; w: 404; h: 60),
|
|
51 |
(x: 240; y: 268; w: 464; h: 152),
|
|
52 |
(x: 876; y: 236; w: 168; h: 348),
|
|
53 |
(x: 1204; y: 56; w: 148; h: 700),
|
|
54 |
(x: 1516; y: 52; w: 192; h: 664),
|
|
55 |
(x: 1808; y: 60; w: 328; h: 496),
|
|
56 |
(x: 2292; y: 92; w: 184; h: 492),
|
|
57 |
(x: 2664; y: 216; w: 196; h: 340),
|
|
58 |
(x: 3004; y: 108; w: 176; h: 480),
|
|
59 |
(x: 3260; y: 368; w: 120; h: 348),
|
|
60 |
(x: 3476; y: 460; w: 208; h: 448),
|
|
61 |
(x: 3268; y: 906; w: 192; h: 96),
|
|
62 |
(x: 2876; y: 664; w: 204; h: 310),
|
|
63 |
(x: 2240; y: 748; w: 344; h: 224),
|
|
64 |
(x: 1584; y: 796; w: 440; h: 250),
|
|
65 |
(x: 892; y: 852; w: 324; h: 184),
|
|
66 |
(x: 576; y: 976; w: 16; h: 28),
|
1761
|
67 |
(x: NTPX; y: 0; w: 1; h: 1)
|
184
|
68 |
);
|
|
69 |
Template0FPoints: array[0..0] of TPoint =
|
|
70 |
(
|
1753
|
71 |
(x: 2047; y: 0)
|
712
|
72 |
);
|
711
|
73 |
|
1753
|
74 |
//////////////////////////////////////////////////////////////////////////////
|
|
75 |
/////////////////// END MIRRORED TWO TIMES ///////////////////////////////////
|
|
76 |
//////////////////////////////////////////////////////////////////////////////
|
|
77 |
|
1774
|
78 |
const EdgeTemplates: array[0..0] of TEdgeTemplate =
|
184
|
79 |
(
|
|
80 |
(BasePoints: @Template0Points;
|
|
81 |
BasePointsCount: Succ(High(Template0Points));
|
|
82 |
FillPoints: @Template0FPoints;
|
|
83 |
FillPointsCount: Succ(High(Template0FPoints));
|
1775
|
84 |
BezierizeCount: 4;
|
|
85 |
RandPassesCount: 12;
|
1773
|
86 |
TemplateHeight: 1024; TemplateWidth: 4096;
|
|
87 |
canMirror: true; canFlip: false; isNegative: true; canInvert: false;
|
1776
|
88 |
hasGirders: false; // this map, and some other caves, are cramped enough and have plenty of ceiling. Maybe not all caves though
|
1784
|
89 |
MaxHedgehogs: 24;
|
358
|
90 |
)
|
184
|
91 |
);
|
|
92 |
|
|
93 |
|
|
94 |
|
|
95 |
implementation
|
|
96 |
|
|
97 |
end.
|