hedgewars/uLandTemplates.pas
author unc0rr
Tue, 27 Jan 2009 15:44:40 +0000
changeset 1774 3627ba6099ca
parent 1773 bc6ad6136675
child 1775 c7dc2f191347
permissions -rw-r--r--
Replace current templates with one cavern one
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
365
a26cec847dd7 - New land generator feature: islands in the sky
unc0rr
parents: 364
diff changeset
    24
const NTPX = Low(TSDL_Rect.x); 
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;
1773
bc6ad6136675 nemo's template patch (invertion)
unc0rr
parents: 1761
diff changeset
    35
                     TemplateHeight, TemplateWidth: LongInt;
bc6ad6136675 nemo's template patch (invertion)
unc0rr
parents: 1761
diff changeset
    36
                     canMirror, canFlip, isNegative, canInvert: boolean;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    37
                     end;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    38
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    39
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    40
/////////////////// MIRRORED FOUR TIMES //////////////////////////////////////
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
// 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
    43
// be made from scratch for taller/wider area.  But hey, for testing.
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    44
// 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
    45
const Template0Points: array[0..18] of TSDL_Rect =
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    46
      (
1774
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    47
       (x:  324; y: 1656; w:  196; h:  204),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    48
       (x:  224; y: 1496; w:  404; h:   60),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    49
       (x:  240; y: 1168; w:  464; h:  152),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    50
       (x:  876; y: 1136; w:  168; h:  348),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    51
       (x: 1204; y:  956; w:  148; h:  700),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    52
       (x: 1516; y:  952; w:  192; h:  664),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    53
       (x: 1808; y:  960; w:  328; h:  496),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    54
       (x: 2292; y:  992; w:  184; h:  492),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    55
       (x: 2664; y: 1116; w:  196; h:  340),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    56
       (x: 3004; y: 1008; w:  176; h:  480),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    57
       (x: 3260; y: 1268; w:  120; h:  348),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    58
       (x: 3476; y: 1360; w:  208; h:  448),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    59
       (x: 3268; y: 1856; w:  192; h:   96),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    60
       (x: 2876; y: 1564; w:  204; h:  380),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    61
       (x: 2240; y: 1648; w:  344; h:  324),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    62
       (x: 1584; y: 1696; w:  440; h:  300),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    63
       (x:  892; y: 1752; w:  324; h:  184),
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    64
       (x:  576; y: 1876; w:   16; h:   28),
1761
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    65
       (x: NTPX; y:    0; w:    1; h:    1)
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    66
      );
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    67
      Template0FPoints: array[0..0] of TPoint =
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    68
      (
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    69
       (x: 2047; y:    0)
712
e87cafcf0e2d +1 land template
unc0rr
parents: 711
diff changeset
    70
      );
711
8ff62133ac48 One more crazy land template
unc0rr
parents: 710
diff changeset
    71
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    72
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    73
/////////////////// END MIRRORED TWO TIMES ///////////////////////////////////
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
1774
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    76
const EdgeTemplates: array[0..0] of TEdgeTemplate =
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    77
      (
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    78
       (BasePoints: @Template0Points;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    79
        BasePointsCount: Succ(High(Template0Points));
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    80
        FillPoints: @Template0FPoints;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    81
        FillPointsCount: Succ(High(Template0FPoints));
1774
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    82
        BezierizeCount: 2;
3627ba6099ca Replace current templates with one cavern one
unc0rr
parents: 1773
diff changeset
    83
        RandPassesCount: 10;
1773
bc6ad6136675 nemo's template patch (invertion)
unc0rr
parents: 1761
diff changeset
    84
        TemplateHeight: 1024; TemplateWidth: 4096;
bc6ad6136675 nemo's template patch (invertion)
unc0rr
parents: 1761
diff changeset
    85
        canMirror: true; canFlip: false; isNegative: true; canInvert: false;
358
236bbd12d4d9 - New Land Generator
unc0rr
parents: 351
diff changeset
    86
       )
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    87
      );
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    88
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    89
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    90
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    91
implementation
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    92
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    93
end.