hedgewars/uLandTemplates.pas
changeset 51 b6e3ae05857f
parent 49 3afe33c1cf06
child 56 a29135563e94
equal deleted inserted replaced
50:9ab4067dabec 51:b6e3ae05857f
       
     1 (*
       
     2  * Hedgewars, a worms-like game
       
     3  * Copyright (c) 2005, 2006 Andrey Korotaev <unC0Rr@gmail.com>
       
     4  *
       
     5  * Distributed under the terms of the BSD-modified licence:
       
     6  *
       
     7  * Permission is hereby granted, free of charge, to any person obtaining a copy
       
     8  * of this software and associated documentation files (the "Software"), to deal
       
     9  * with the Software without restriction, including without limitation the
       
    10  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
       
    11  * sell copies of the Software, and to permit persons to whom the Software is
       
    12  * furnished to do so, subject to the following conditions:
       
    13  *
       
    14  * 1. Redistributions of source code must retain the above copyright notice,
       
    15  *    this list of conditions and the following disclaimer.
       
    16  * 2. Redistributions in binary form must reproduce the above copyright notice,
       
    17  *    this list of conditions and the following disclaimer in the documentation
       
    18  *    and/or other materials provided with the distribution.
       
    19  * 3. The name of the author may not be used to endorse or promote products
       
    20  *    derived from this software without specific prior written permission.
       
    21  *
       
    22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
       
    23  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
       
    24  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
       
    25  * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
       
    26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
       
    27  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
       
    28  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
       
    29  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
       
    30  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
       
    31  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    32  *)
       
    33 
     1 unit uLandTemplates;
    34 unit uLandTemplates;
     2 interface
    35 interface
     3 uses SDLh;
    36 uses SDLh;
     4 {$INCLUDE options.inc}
    37 {$INCLUDE options.inc}
     5 
    38 
    25        (x: 1700; y:  400),
    58        (x: 1700; y:  400),
    26        (x: 1550; y: 1500)
    59        (x: 1550; y: 1500)
    27       );
    60       );
    28       Template0FPoints: array[0..0] of TPoint =
    61       Template0FPoints: array[0..0] of TPoint =
    29       (
    62       (
    30        (x: 1023; y: 1023)
    63        (x: 1023; y:    0)
    31       );
    64       );
    32 
    65 
    33 const Template1Points: array[0..12] of TPoint =
    66 const Template1Points: array[0..12] of TPoint =
    34       (
    67       (
    35        (x:  300; y: 1500),
    68        (x:  300; y: 1500),
    46        (x: 1750; y: 1000),
    79        (x: 1750; y: 1000),
    47        (x: 1750; y: 1500)
    80        (x: 1750; y: 1500)
    48       );
    81       );
    49       Template1FPoints: array[0..0] of TPoint =
    82       Template1FPoints: array[0..0] of TPoint =
    50       (
    83       (
    51        (x: 1023; y: 1023)
    84        (x: 1023; y:    0)
    52       );
    85       );
    53 
    86 
    54 const Template2Points: array[0..28] of TPoint =
    87 const Template2Points: array[0..28] of TPoint =
    55       (
    88       (
    56        (x:  350; y: 1500),
    89        (x:  350; y: 1500),
    81        (x: 1800; y:  600),
   114        (x: 1800; y:  600),
    82        (x: 1900; y:  600),
   115        (x: 1900; y:  600),
    83        (x: 1700; y: 1010),
   116        (x: 1700; y: 1010),
    84        (x: 1700; y: 1500)
   117        (x: 1700; y: 1500)
    85       );
   118       );
    86       Template2FPoints: array[0..1] of TPoint =
   119       Template2FPoints: array[0..0] of TPoint =
    87       (
   120       (
    88        (x:  600; y: 1023),
   121        (x: 1023; y:    0)
    89        (x: 1500; y: 1023)
       
    90       );
   122       );
    91 
   123 
    92 const Template3Points: array[0..23] of TPoint =
   124 const Template3Points: array[0..23] of TPoint =
    93       (
   125       (
    94        (x:  200; y: 1500),
   126        (x:  200; y: 1500),
   114        (x: 1800; y:  200),
   146        (x: 1800; y:  200),
   115        (x: 1700; y:  600),
   147        (x: 1700; y:  600),
   116        (x: 1900; y: 1010),
   148        (x: 1900; y: 1010),
   117        (x: 1800; y: 1200)
   149        (x: 1800; y: 1200)
   118       );
   150       );
   119       Template3FPoints: array[0..1] of TPoint =
   151       Template3FPoints: array[0..0] of TPoint =
   120       (
   152       (
   121        (x:  500; y: 1023),
   153        (x: 1023; y:    0)
   122        (x: 1500; y: 1023)
       
   123       );
   154       );
   124 
   155 
   125 const Template4Points: array[0..38] of TPoint =
   156 const Template4Points: array[0..38] of TPoint =
   126       (
   157       (
   127        (x:  200; y: 1500),
   158        (x:  200; y: 1500),
   162        (x: 1860; y:  680),
   193        (x: 1860; y:  680),
   163        (x: 1925; y:  810),
   194        (x: 1925; y:  810),
   164        (x: 1800; y: 1000),
   195        (x: 1800; y: 1000),
   165        (x: 1800; y: 1500)
   196        (x: 1800; y: 1500)
   166       );
   197       );
   167       Template4FPoints: array[0..1] of TPoint =
   198       Template4FPoints: array[0..0] of TPoint =
   168       (
   199       (
   169        (x:  500; y: 1023),
   200        (x: 1023; y:    0)
   170        (x: 1500; y: 1023)
       
   171       );
   201       );
   172     
   202     
   173 const Template5Points: array[0..10] of TPoint =
   203 const Template5Points: array[0..10] of TPoint =
   174       (
   204       (
   175        (x:  225; y: 1260),
   205        (x:  225; y: 1260),
   184        (x: 1839; y:  801),
   214        (x: 1839; y:  801),
   185        (x: 1674; y: 1239)
   215        (x: 1674; y: 1239)
   186       );
   216       );
   187       Template5FPoints: array[0..0] of TPoint =
   217       Template5FPoints: array[0..0] of TPoint =
   188       (
   218       (
   189        (x: 1023; y: 1023)
   219        (x: 1023; y:    0)
   190       );
   220       );
   191 
   221 
   192 const Template6Points: array[0..20] of TPoint =
   222 const Template6Points: array[0..20] of TPoint =
   193       (
   223       (
   194        (x:  318; y: 1494),
   224        (x:  318; y: 1494),
   213        (x: 1728; y:  894),
   243        (x: 1728; y:  894),
   214        (x: 1788; y: 1491)
   244        (x: 1788; y: 1491)
   215       );
   245       );
   216       Template6FPoints: array[0..0] of TPoint =
   246       Template6FPoints: array[0..0] of TPoint =
   217       (
   247       (
   218        (x: 1023; y: 1023)
   248        (x: 1023; y:    0)
   219       );
   249       );
   220 
   250 
   221 const Template7Points: array[0..43] of TPoint =
   251 const Template7Points: array[0..43] of TPoint =
   222       (
   252       (
   223        (x:  180; y: 1485),
   253        (x:  180; y: 1485),
   262        (x: 1875; y:  621),
   292        (x: 1875; y:  621),
   263        (x: 1683; y:  747),
   293        (x: 1683; y:  747),
   264        (x: 1665; y:  831),
   294        (x: 1665; y:  831),
   265        (x: 1818; y:  951),
   295        (x: 1818; y:  951),
   266        (x: 1893; y: 1476)
   296        (x: 1893; y: 1476)
   267        );
   297       );
   268       Template7FPoints: array[0..1] of TPoint =
   298       Template7FPoints: array[0..0] of TPoint =
   269       (
   299       (
   270        (x: 630; y: 1023),
   300        (x: 1023; y:    0)
   271        (x:1655; y: 1023)
   301       );
   272       );
   302 
   273 
   303 const Template8Points: array[0..23] of TPoint =
   274 const EdgeTemplates: array[0..7] of TEdgeTemplate =
   304       (
       
   305        (x:  222; y: 1482),
       
   306        (x:  354; y: 1023),
       
   307        (x:  249; y:  783),
       
   308        (x:  240; y:  421),
       
   309        (x:  411; y:  401),
       
   310        (x:  432; y:  777),
       
   311        (x:  573; y:  777),
       
   312        (x:  567; y:  300),
       
   313        (x:  696; y:  250),
       
   314        (x:  744; y:  683),
       
   315        (x:  897; y:  698),
       
   316        (x:  885; y:  450),
       
   317        (x: 1032; y:  479),
       
   318        (x: 1065; y:  698),
       
   319        (x: 1200; y:  690),
       
   320        (x: 1200; y:  218),
       
   321        (x: 1326; y:  252),
       
   322        (x: 1359; y:  786),
       
   323        (x: 1470; y:  810),
       
   324        (x: 1485; y:  379),
       
   325        (x: 1608; y:  342),
       
   326        (x: 1641; y:  819),
       
   327        (x: 1719; y:  864),
       
   328        (x: 1746; y: 1440)      );
       
   329       Template8FPoints: array[0..0] of TPoint =
       
   330       (
       
   331        (x: 1023; y:    0)
       
   332       );
       
   333 
       
   334 const EdgeTemplates: array[0..8] of TEdgeTemplate =
   275       (
   335       (
   276        (BasePoints: @Template0Points;
   336        (BasePoints: @Template0Points;
   277         BasePointsCount: Succ(High(Template0Points));
   337         BasePointsCount: Succ(High(Template0Points));
   278         BezPassCnt: 4;
   338         BezPassCnt: 4;
   279         PassMin: 10; PassDelta: 5;
   339         PassMin: 10; PassDelta: 5;
   350        WaveAmplMin:     5; WaveAmplDelta: 15;
   410        WaveAmplMin:     5; WaveAmplDelta: 15;
   351        WaveFreqMin: 0.015; WaveFreqDelta: 0.002;
   411        WaveFreqMin: 0.015; WaveFreqDelta: 0.002;
   352        FillPoints: @Template7FPoints;
   412        FillPoints: @Template7FPoints;
   353        FillPointsCount: Succ(High(Template7FPoints));
   413        FillPointsCount: Succ(High(Template7FPoints));
   354        canMirror: true; canFlip: false;
   414        canMirror: true; canFlip: false;
       
   415       ),
       
   416       (BasePoints: @Template8Points;
       
   417        BasePointsCount: Succ(High(Template8Points));
       
   418        BezPassCnt: 4;
       
   419        PassMin:  9; PassDelta: 3;
       
   420        WaveAmplMin:    18; WaveAmplDelta: 18;
       
   421        WaveFreqMin: 0.010; WaveFreqDelta: 0.002;
       
   422        FillPoints: @Template8FPoints;
       
   423        FillPointsCount: Succ(High(Template8FPoints));
       
   424        canMirror: true; canFlip: false;
   355       )
   425       )
   356        
       
   357       );
   426       );
   358 
   427 
   359 
   428 
   360 
   429 
   361 implementation
   430 implementation