hedgewars/uLandTemplates.pas
author unc0rr
Sun, 01 Feb 2009 15:58:44 +0000
changeset 1784 dfe9bafb4590
parent 1776 dd5648e250e4
child 1792 c30c6944bd49
permissions -rw-r--r--
Apply nemo's patch polished by me: - Upto 48 hhs in game - Option for border - Disable some weapons on cavern maps
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     1
(*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 883
diff changeset
     2
 * Hedgewars, a free turn based strategy game
883
07a568ba44e0 Update copyright info in source files headers
unc0rr
parents: 715
diff changeset
     3
 * Copyright (c) 2005-2008 Andrey Korotaev <unC0Rr@gmail.com>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     4
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     8
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    12
 * GNU General Public License for more details.
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    13
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    14
 * You should have received a copy of the GNU General Public License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    15
 * along with this program; if not, write to the Free Software
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    17
 *)
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    18
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    19
unit uLandTemplates;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    20
interface
534
92fb2b0d5117 - Fix some bugs
unc0rr
parents: 527
diff changeset
    21
uses SDLh;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    22
{$INCLUDE options.inc}
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    23
1776
dd5648e250e4 - nemo's patch for custom cave map dimensions
unc0rr
parents: 1775
diff changeset
    24
const NTPX = Low(TSDL_Rect.x);
365
a26cec847dd7 - New land generator feature: islands in the sky
unc0rr
parents: 364
diff changeset
    25
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    26
type PPointArray = ^TPointArray;
358
236bbd12d4d9 - New Land Generator
unc0rr
parents: 351
diff changeset
    27
     TPointArray = array[0..64] of TSDL_Rect;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    28
     TEdgeTemplate = record
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    29
                     BasePoints: PPointArray;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    30
                     BasePointsCount: Longword;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    31
                     FillPoints: PPointArray;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    32
                     FillPointsCount: Longword;
429
7f69c7ac2e97 One more land template + some templates tuning
unc0rr
parents: 405
diff changeset
    33
                     BezierizeCount: Longword;
364
52cb4d6f84b7 - Better land generator
unc0rr
parents: 360
diff changeset
    34
                     RandPassesCount: Longword;
1776
dd5648e250e4 - nemo's patch for custom cave map dimensions
unc0rr
parents: 1775
diff changeset
    35
                     TemplateHeight, TemplateWidth: Longword;
1773
bc6ad6136675 nemo's template patch (invertion)
unc0rr
parents: 1761
diff changeset
    36
                     canMirror, canFlip, isNegative, canInvert: boolean;
1776
dd5648e250e4 - nemo's patch for custom cave map dimensions
unc0rr
parents: 1775
diff changeset
    37
                     hasGirders: boolean;
1784
dfe9bafb4590 Apply nemo's patch polished by me:
unc0rr
parents: 1776
diff changeset
    38
                     MaxHedgeHogs: Longword;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    39
                     end;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    40
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    41
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    42
/////////////////// MIRRORED FOUR TIMES //////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    43
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    44
// Hi unC0Rr.  Yeah, I know this is kind of lame.  Real templates should probably
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    45
// be made from scratch for taller/wider area.  But hey, for testing.
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    46
// The first 18 are in all 4 quadrants, the last 18 are in only the bottom 2
1774
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    47
const Template0Points: array[0..18] of TSDL_Rect =
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    48
      (
1775
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    49
       (x:  324; y:  756; w:  196; h:  204),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    50
       (x:  224; y:  596; w:  404; h:   60),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    51
       (x:  240; y:  268; w:  464; h:  152),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    52
       (x:  876; y:  236; w:  168; h:  348),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    53
       (x: 1204; y:   56; w:  148; h:  700),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    54
       (x: 1516; y:   52; w:  192; h:  664),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    55
       (x: 1808; y:   60; w:  328; h:  496),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    56
       (x: 2292; y:   92; w:  184; h:  492),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    57
       (x: 2664; y:  216; w:  196; h:  340),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    58
       (x: 3004; y:  108; w:  176; h:  480),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    59
       (x: 3260; y:  368; w:  120; h:  348),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    60
       (x: 3476; y:  460; w:  208; h:  448),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    61
       (x: 3268; y:  906; w:  192; h:   96),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    62
       (x: 2876; y:  664; w:  204; h:  310),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    63
       (x: 2240; y:  748; w:  344; h:  224),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    64
       (x: 1584; y:  796; w:  440; h:  250),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    65
       (x:  892; y:  852; w:  324; h:  184),
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    66
       (x:  576; y:  976; w:   16; h:   28),
1761
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    67
       (x: NTPX; y:    0; w:    1; h:    1)
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    68
      );
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    69
      Template0FPoints: array[0..0] of TPoint =
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    70
      (
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    71
       (x: 2047; y:    0)
712
e87cafcf0e2d +1 land template
unc0rr
parents: 711
diff changeset
    72
      );
711
8ff62133ac48 One more crazy land template
unc0rr
parents: 710
diff changeset
    73
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    74
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    75
/////////////////// END MIRRORED TWO TIMES ///////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    76
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    77
1774
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    78
const EdgeTemplates: array[0..0] of TEdgeTemplate =
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    79
      (
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    80
       (BasePoints: @Template0Points;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    81
        BasePointsCount: Succ(High(Template0Points));
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    82
        FillPoints: @Template0FPoints;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    83
        FillPointsCount: Succ(High(Template0FPoints));
1775
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    84
        BezierizeCount: 4;
c7dc2f191347 A bit better template
unc0rr
parents: 1774
diff changeset
    85
        RandPassesCount: 12;
1773
bc6ad6136675 nemo's template patch (invertion)
unc0rr
parents: 1761
diff changeset
    86
        TemplateHeight: 1024; TemplateWidth: 4096;
bc6ad6136675 nemo's template patch (invertion)
unc0rr
parents: 1761
diff changeset
    87
        canMirror: true; canFlip: false; isNegative: true; canInvert: false;
1776
dd5648e250e4 - nemo's patch for custom cave map dimensions
unc0rr
parents: 1775
diff changeset
    88
        hasGirders: false;  // this map, and some other caves, are cramped enough and have plenty of ceiling. Maybe not all caves though
1784
dfe9bafb4590 Apply nemo's patch polished by me:
unc0rr
parents: 1776
diff changeset
    89
        MaxHedgehogs: 24;
358
236bbd12d4d9 - New Land Generator
unc0rr
parents: 351
diff changeset
    90
       )
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    91
      );
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    92
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    93
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    94
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    95
implementation
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    96
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    97
end.