hedgewars/uLandTemplates.pas
author unc0rr
Mon, 26 Jan 2009 16:03:15 +0000
changeset 1764 578ccded87ad
parent 1761 c7038eade58d
child 1773 bc6ad6136675
permissions -rw-r--r--
Fix russian translation
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;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    35
                     canMirror, canFlip: boolean;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    36
                     end;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    37
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    38
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    39
/////////////////// MIRRORED FOUR TIMES //////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    40
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    41
// 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
    42
// be made from scratch for taller/wider area.  But hey, for testing.
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    43
// The first 18 are in all 4 quadrants, the last 18 are in only the bottom 2
1761
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    44
const Template0Points: array[0..37] of TSDL_Rect =
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    45
      (
359
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    46
       (x:  410; y: 1024; w:    1; h:    1),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    47
       (x:  160; y:  760; w:  130; h:  170),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    48
       (x:  342; y:  706; w:  316; h:  150),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    49
       (x:  238; y:  386; w:  270; h:  180),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    50
       (x:  246; y:  176; w:  242; h:  156),
403
282b00e559bd Better templates, giving more different lands
unc0rr
parents: 393
diff changeset
    51
       (x:  552; y:  128; w:  610; h:  300),
282b00e559bd Better templates, giving more different lands
unc0rr
parents: 393
diff changeset
    52
       (x:  750; y:  468; w:  352; h:  324),
359
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    53
       (x:  650; y: 1024; w:  500; h:    1),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    54
       (x: 1250; y: 1100; w:    1; h:    1),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    55
       (x: 1490; y: 1024; w:    1; h:    1),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    56
       (x: 1452; y:  904; w:   74; h:   12),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    57
       (x: 1248; y:  575; w:   68; h:  425),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    58
       (x: 1426; y:  592; w:  140; h:  142),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    59
       (x: 1310; y:  192; w:  150; h:  350),
403
282b00e559bd Better templates, giving more different lands
unc0rr
parents: 393
diff changeset
    60
       (x: 1588; y:  194; w:  148; h:  242),
359
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    61
       (x: 1618; y:  472; w:  276; h:  314),
59fbfc65fbda - New land templates
unc0rr
parents: 358
diff changeset
    62
       (x: 1710; y:  850; w:  130; h:   86),
365
a26cec847dd7 - New land generator feature: islands in the sky
unc0rr
parents: 364
diff changeset
    63
       (x: 1734; y: 1024; w:    1; h:    1),
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    64
       (x: NTPX; y:    0; w:    1; h:    1),
1761
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    65
       (x: 2458; y: 1024; w:    1; h:    1), // X + 2048
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    66
       (x: 2208; y:  760; w:  130; h:  170),
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    67
       (x: 2390; y:  706; w:  316; h:  150),
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    68
       (x: 2286; y:  386; w:  270; h:  180),
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    69
       (x: 2294; y:  176; w:  242; h:  156),
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    70
       (x: 2600; y:  128; w:  610; h:  300),
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    71
       (x: 2798; y:  468; w:  352; h:  324),
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    72
       (x: 2698; y: 1024; w:  500; h:    1),
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    73
       (x: 3298; y: 1100; w:    1; h:    1),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    74
       (x: 3538; y: 1024; w:    1; h:    1),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    75
       (x: 3500; y:  904; w:   74; h:   12),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    76
       (x: 3296; y:  575; w:   68; h:  425),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    77
       (x: 3474; y:  592; w:  140; h:  142),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    78
       (x: 3358; y:  192; w:  150; h:  350),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    79
       (x: 3636; y:  194; w:  148; h:  242),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    80
       (x: 3666; y:  472; w:  276; h:  314),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    81
       (x: 3758; y:  850; w:  130; h:   86),
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    82
       (x: 3782; y: 1024; w:    1; h:    1),
1761
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    83
       (x: NTPX; y:    0; w:    1; h:    1)
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    84
      );
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    85
      Template0FPoints: array[0..0] of TPoint =
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    86
      (
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    87
       (x: 2047; y:    0)
712
e87cafcf0e2d +1 land template
unc0rr
parents: 711
diff changeset
    88
      );
711
8ff62133ac48 One more crazy land template
unc0rr
parents: 710
diff changeset
    89
1753
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    90
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    91
/////////////////// END MIRRORED TWO TIMES ///////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    92
//////////////////////////////////////////////////////////////////////////////
2ccba26f1aa4 Apply nemo's world resize patch
unc0rr
parents: 1066
diff changeset
    93
1761
c7038eade58d Fix width/height dependant consts
unc0rr
parents: 1753
diff changeset
    94
const EdgeTemplates: array[0..0] of TEdgeTemplate =
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    95
      (
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    96
       (BasePoints: @Template0Points;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    97
        BasePointsCount: Succ(High(Template0Points));
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    98
        FillPoints: @Template0FPoints;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    99
        FillPointsCount: Succ(High(Template0FPoints));
431
79ac59673df3 - Two more land templates
unc0rr
parents: 429
diff changeset
   100
        BezierizeCount: 3;
561
19d2d422ff84 Improve land generator
unc0rr
parents: 534
diff changeset
   101
        RandPassesCount: 8;
360
ab6a94334d6d - Two more templates
unc0rr
parents: 359
diff changeset
   102
        canMirror: true; canFlip: false;
358
236bbd12d4d9 - New Land Generator
unc0rr
parents: 351
diff changeset
   103
       )
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   104
      );
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   105
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   106
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   107
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   108
implementation
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   109
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   110
end.