share/hedgewars/Data/Scripts/TechMaps.lua
changeset 10959 1225f42f61e2
parent 10950 356c8fb7fb56
child 10961 b30f29396f0c
equal deleted inserted replaced
10957:f3fcba306da9 10959:1225f42f61e2
    23 
    23 
    24 -- this handles interim lazy copypasta from HedgeEditor
    24 -- this handles interim lazy copypasta from HedgeEditor
    25 -- while I'm still messing with things
    25 -- while I'm still messing with things
    26 function LoadSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
    26 function LoadSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
    27 	PlaceSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
    27 	PlaceSprite(pX, pY, pSprite, pFrame, pTint, p1, p2, p3, pLandFlags)
       
    28 end
       
    29 
       
    30 function PreviewGirder(x, y, f)
       
    31     if f == 0 then
       
    32         AddPoint(x-40,y,1)
       
    33         AddPoint(x+40,y)
       
    34     elseif f == 1 then
       
    35         AddPoint(x-29,y-29,1)
       
    36         AddPoint(x+29,y+29)
       
    37     elseif f == 2 then
       
    38         AddPoint(x,y-40,1)
       
    39         AddPoint(x,y+40)
       
    40     elseif f == 3 then
       
    41         AddPoint(x-29,y+29,1)
       
    42         AddPoint(x+29,y-29)
       
    43     elseif f == 4 then
       
    44         AddPoint(x-79,y,1)
       
    45         AddPoint(x+79,y)
       
    46     elseif f == 5 then
       
    47         AddPoint(x-54,y-54,1)
       
    48         AddPoint(x+54,y+54)
       
    49     elseif f == 6 then
       
    50         AddPoint(x,y-80,1)
       
    51         AddPoint(x,y+80)
       
    52     elseif f == 7 then
       
    53         AddPoint(x-54,y+54,1)
       
    54         AddPoint(x+54,y-54)
       
    55     end
       
    56 end
       
    57 
       
    58 function PreviewRubber()
       
    59 end
       
    60 
       
    61 function onPreviewInit()
       
    62     MapGen = mgDrawn
       
    63     TemplateFilter = 0
       
    64 
       
    65     for x = 1, 16 do
       
    66         AddPoint(x*100,100,5)
       
    67     end
       
    68 	if mapID == 4 then
       
    69 	---nice rope and airmines landflag testmap
       
    70     -- it'd be nice if these coordinates were stored somewhere generic so they didn't have to be edited twice. Some map array or something
       
    71 	PreviewGirder(194, 388, 7)
       
    72 	PreviewGirder(338, 334, 4)
       
    73 	PreviewGirder(484, 390, 5)
       
    74 	PreviewGirder(139, 543, 6)
       
    75 	PreviewGirder(544, 540, 6)
       
    76 	PreviewGirder(201, 687, 5)
       
    77 	PreviewGirder(485, 684, 7)
       
    78 	PreviewGirder(259, 839, 6)
       
    79 	PreviewGirder(426, 837, 6)
       
    80 	PreviewGirder(259, 999, 6)
       
    81 	PreviewGirder(426, 998, 6)
       
    82 	PreviewGirder(259, 1159, 6)
       
    83 	PreviewGirder(426, 1158, 6)
       
    84 	PreviewGirder(259, 1318, 6)
       
    85 	PreviewGirder(426, 1318, 6)
       
    86 	PreviewGirder(426, 1478, 6)
       
    87 	PreviewGirder(259, 1478, 6)
       
    88 	PreviewGirder(515, 1477, 4)
       
    89 	PreviewGirder(659, 1537, 5)
       
    90 	PreviewGirder(774, 1652, 5)
       
    91 	PreviewGirder(836, 1799, 6)
       
    92 	PreviewGirder(907, 1890, 4)
       
    93 	PreviewGirder(1067, 1890, 4)
       
    94 	PreviewGirder(1212, 1823, 7)
       
    95 	PreviewGirder(1359, 1764, 4)
       
    96 	PreviewGirder(1504, 1822, 5)
       
    97 	PreviewGirder(1647, 1886, 4)
       
    98 	PreviewGirder(1807, 1886, 4)
       
    99 	PreviewGirder(1362, 1869, 4)
       
   100 	PreviewGirder(1968, 1885, 4)
       
   101 	PreviewGirder(2111, 1823, 7)
       
   102 	PreviewGirder(2257, 1769, 4)
       
   103 	PreviewGirder(2403, 1825, 5)
       
   104 	PreviewGirder(2549, 1887, 4)
       
   105 	PreviewGirder(2709, 1887, 4)
       
   106 	PreviewGirder(2868, 1887, 4)
       
   107 	PreviewGirder(2958, 1854, 2)
       
   108 	PreviewGirder(2928, 1773, 1)
       
   109 	PreviewGirder(2898, 1692, 2)
       
   110 	PreviewGirder(2928, 1613, 3)
       
   111 	PreviewGirder(3045, 1584, 4)
       
   112 	PreviewGirder(3162, 1619, 1)
       
   113 	PreviewGirder(3192, 1697, 2)
       
   114 	PreviewGirder(3160, 1777, 3)
       
   115 	PreviewGirder(3128, 1857, 2)
       
   116 	PreviewGirder(3218, 1886, 4)
       
   117 	PreviewGirder(3379, 1885, 4)
       
   118 	PreviewGirder(3524, 1818, 7)
       
   119 	PreviewGirder(3641, 1702, 7)
       
   120 	PreviewGirder(3756, 1585, 7)
       
   121 	PreviewGirder(4021, 1316, 7)
       
   122 	PreviewGirder(3842, 1503, 3)
       
   123 	PreviewGirder(3899, 1409, 7)
       
   124 	PreviewGirder(3694, 1974, 7)
       
   125 	PreviewGirder(3809, 1858, 7)
       
   126 	PreviewGirder(3925, 1741, 7)
       
   127 	PreviewGirder(4022, 1613, 7)
       
   128 	PreviewGirder(2256, 1877, 4)
       
   129 	PreviewGirder(3046, 1728, 0)
       
   130 	PreviewGirder(501, 1777, 6)
       
   131 	PreviewGirder(572, 1868, 4)
       
   132 	PreviewGirder(3372, 771, 7)
       
   133 	PreviewGirder(3517, 715, 4)
       
   134 	PreviewGirder(3663, 774, 5)
       
   135 	PreviewGirder(3313, 923, 6)
       
   136 	PreviewGirder(3373, 1066, 5)
       
   137 	PreviewGirder(3518, 1128, 4)
       
   138 	PreviewGirder(3662, 1065, 7)
       
   139 	PreviewGirder(3723, 924, 6)
       
   140 	PreviewGirder(2474, 1373, 6)
       
   141 	PreviewGirder(2474, 1252, 2)
       
   142 	PreviewGirder(2507, 1200, 0)
       
   143 	PreviewGirder(2626, 1200, 4)
       
   144 	PreviewGirder(2716, 1270, 6)
       
   145 	PreviewGirder(2505, 1464, 0)
       
   146 	PreviewGirder(2625, 1464, 4)
       
   147 	PreviewGirder(2716, 1391, 6)
       
   148 	PreviewGirder(1544, 300, 7)
       
   149 	PreviewGirder(1691, 245, 4)
       
   150 	PreviewGirder(1838, 304, 5)
       
   151 	PreviewGirder(1487, 453, 6)
       
   152 	PreviewGirder(1548, 597, 5)
       
   153 	PreviewGirder(1692, 657, 4)
       
   154 	PreviewGirder(1835, 593, 7)
       
   155 	PreviewGirder(1900, 451, 6)
       
   156 	PreviewGirder(3527, 93, 6)
       
   157 	PreviewGirder(3586, 238, 5)
       
   158 	PreviewGirder(3703, 354, 5)
       
   159 	PreviewGirder(3820, 471, 5)
       
   160 	PreviewGirder(3938, 588, 5)
       
   161 	PreviewGirder(4044, 651, 0)
       
   162 	PreviewGirder(3618, 22, 4)
       
   163 	PreviewGirder(3779, 22, 4)
       
   164 	PreviewGirder(3939, 22, 4)
       
   165 	PreviewGirder(4047, 22, 0)
       
   166 	PreviewGirder(936, 1198, 7)
       
   167 	PreviewGirder(1080, 1143, 4)
       
   168 	PreviewGirder(1225, 1202, 5)
       
   169 	PreviewGirder(1278, 1352, 6)
       
   170 	PreviewGirder(881, 1351, 6)
       
   171 	PreviewGirder(943, 1496, 5)
       
   172 	PreviewGirder(1219, 1495, 7)
       
   173 	PreviewGirder(1160, 1645, 6)
       
   174 	PreviewGirder(998, 1649, 6)
       
   175 	PreviewGirder(1160, 1766, 2)
       
   176 	PreviewGirder(998, 1770, 2)
       
   177 	PreviewGirder(1077, 1824, 4)
       
   178 	PreviewGirder(1824, 1138, 6)
       
   179 	PreviewGirder(834, 606, 7)
       
   180 	PreviewGirder(950, 593, 5)
       
   181 	PreviewGirder(1035, 683, 1)
       
   182 	PreviewGirder(748, 696, 3)
       
   183 	PreviewGirder(764, 780, 5)
       
   184 	PreviewGirder(850, 870, 1)
       
   185 	PreviewGirder(937, 850, 7)
       
   186 	PreviewGirder(1018, 768, 7)
       
   187 	PreviewGirder(2589, 444, 7)
       
   188 	PreviewGirder(2704, 329, 7)
       
   189 	PreviewGirder(2604, 560, 5)
       
   190 	PreviewGirder(2719, 675, 5)
       
   191 	PreviewGirder(2832, 689, 7)
       
   192 	PreviewGirder(2947, 573, 7)
       
   193 	PreviewGirder(2820, 317, 5)
       
   194 	PreviewGirder(2936, 433, 5)
       
   195 	PreviewGirder(2987, 489, 1)
       
   196 	PreviewGirder(338, 559, 4)
       
   197     end
       
   198 
       
   199     FlushPoints()
    28 end
   200 end
    29 
   201 
    30 function LoadMap(mID)
   202 function LoadMap(mID)
    31 
   203 
    32 	techX = {}
   204 	techX = {}