hedgewars/uLandTemplates.pas
author unc0rr
Tue, 06 Dec 2005 19:46:40 +0000
changeset 25 27aa8030322b
parent 24 79c411363184
child 27 c374fe590272
permissions -rw-r--r--
- Get rid of old frontend - additions to avematan theme - many work on frontend
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     1
unit uLandTemplates;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     2
interface
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     3
uses SDLh;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     4
{$INCLUDE options.inc}
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     5
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     6
type PPointArray = ^TPointArray;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     7
     TPointArray = array[0..0] of TPoint;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     8
     TEdgeTemplate = record
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
     9
                     BasePoints: PPointArray;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    10
                     BasePointsCount: Longword;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    11
                     BezPassCnt: Longword; 
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    12
                     PassMin, PassDelta: Longword;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    13
                     WaveAmplMin, WaveAmplDelta: real;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    14
                     WaveFreqMin, WaveFreqDelta: real;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    15
                     FillPoints: PPointArray;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    16
                     FillPointsCount: Longword;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    17
                     end;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    18
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    19
const Template0Points: array[0..4] of TPoint =
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    20
      (
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    21
       (x:  500; y: 1500),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    22
       (x:  350; y:  400),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    23
       (x: 1023; y:  820),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    24
       (x: 1700; y:  400),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    25
       (x: 1550; y: 1500)
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    26
      );
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    27
      Template0FPoints: array[0..0] of TPoint =
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    28
      (
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    29
       (x: 1023; y: 1023)
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    30
      );
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    31
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    32
const Template1Points: array[0..6] of TPoint =
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    33
      (
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    34
       (x:  300; y: 1500),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    35
       (x:  300; y: 1000),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    36
       (x:  250; y:  750),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    37
       (x: 1023; y:  600),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    38
       (x: 1800; y:  750),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    39
       (x: 1750; y: 1000),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    40
       (x: 1750; y: 1500)
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    41
      );
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    42
      Template1FPoints: array[0..0] of TPoint =
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    43
      (
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    44
       (x: 1023; y: 1023)
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    45
      );
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    46
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    47
const Template2Points: array[0..18] of TPoint =
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    48
      (
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    49
       (x:  350; y: 1500),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    50
       (x:  350; y: 1000),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    51
       (x:  190; y:  650),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    52
       (x:  210; y:  260),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    53
       (x: 1650; y:  220),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    54
       (x: 1650; y:  460),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    55
       (x:  900; y:  410),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    56
       (x:  650; y:  400),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    57
       (x: 1200; y: 1000),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    58
       (x: 1200; y: 1200),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    59
       (x: 1400; y: 1200),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    60
       (x: 1400; y: 1000),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    61
       (x: 1280; y:  750),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    62
       (x: 1150; y:  530),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    63
       (x: 1700; y:  750),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    64
       (x: 1800; y:  600),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    65
       (x: 1900; y:  600),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    66
       (x: 1700; y: 1010),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    67
       (x: 1700; y: 1200)
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    68
      );
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    69
      Template2FPoints: array[0..1] of TPoint =
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    70
      (
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    71
       (x:  600; y: 1023),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    72
       (x: 1500; y: 1023)
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    73
      );
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    74
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    75
const EdgeTemplates: array[0..2] of TEdgeTemplate =
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    76
      (
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    77
       (BasePoints: @Template0Points;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    78
        BasePointsCount: Succ(High(Template0Points));
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    79
        BezPassCnt: 4;
24
79c411363184 Add theme objects to land
unc0rr
parents: 23
diff changeset
    80
        PassMin: 4; PassDelta: 1;
23
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    81
        WaveAmplMin:    27; WaveAmplDelta: 22;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    82
        WaveFreqMin: 0.010; WaveFreqDelta: 0.015;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    83
        FillPoints: @Template0FPoints;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    84
        FillPointsCount: Succ(High(Template0FPoints));
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    85
       ),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    86
       (BasePoints: @Template1Points;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    87
        BasePointsCount: Succ(High(Template1Points));
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    88
        BezPassCnt: 4;
24
79c411363184 Add theme objects to land
unc0rr
parents: 23
diff changeset
    89
        PassMin: 5; PassDelta: 2;
23
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    90
        WaveAmplMin:    20; WaveAmplDelta: 10;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    91
        WaveFreqMin: 0.015; WaveFreqDelta: 0.020;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    92
        FillPoints: @Template1FPoints;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    93
        FillPointsCount: Succ(High(Template1FPoints));
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    94
       ),
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    95
       (BasePoints: @Template2Points;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    96
        BasePointsCount: Succ(High(Template2Points));
25
27aa8030322b - Get rid of old frontend
unc0rr
parents: 24
diff changeset
    97
        BezPassCnt: 3;
24
79c411363184 Add theme objects to land
unc0rr
parents: 23
diff changeset
    98
        PassMin: 3; PassDelta: 2;
23
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
    99
        WaveAmplMin:    30; WaveAmplDelta: 15;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   100
        WaveFreqMin: 0.010; WaveFreqDelta: 0.015;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   101
        FillPoints: @Template2FPoints;
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   102
        FillPointsCount: Succ(High(Template2FPoints));
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   103
       )
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   104
      );
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   105
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   106
implementation
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   107
16322d14f068 - Land generator uses templates to generate
unc0rr
parents:
diff changeset
   108
end.