1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Convert the buildings coordinates into a json file.

This commit is contained in:
Frank Zago 2011-08-20 04:48:23 +00:00
parent b3a3cabd5b
commit 6bbccaa76d
3 changed files with 411 additions and 372 deletions

382
config/buildings.json Normal file
View File

@ -0,0 +1,382 @@
// Buildings coordinates inside a city, ordered by city type (0 to 8)
{
"town_type":
[
{ "defnames": [
{ "id": 16, "defname": "TBCSBLAK.def", "x": 213, "y": 251 },
{ "id": 8, "defname": "TBCSCAS2.def", "x": 478, "y": 66 },
{ "id": 9, "defname": "TBCSCAS3.def", "x": 478, "y": 37 },
{ "id": 7, "defname": "TBCSCSTL.def", "x": 595, "y": 66 },
{ "id": 6, "defname": "TBCSDOCK.def", "x": 478, "y": 134 },
{ "id": 30, "defname": "TBCSDW_0.def", "x": 304, "y": 92 },
{ "id": 31, "defname": "TBCSDW_1.def", "x": 360, "y": 130 },
{ "id": 32, "defname": "TBCSDW_2.def", "x": 76, "y": 57 },
{ "id": 33, "defname": "TBCSDW_3.def", "x": 176, "y": 101 },
{ "id": 34, "defname": "TBCSDW_4.def", "x": 563, "y": 211 },
{ "id": 35, "defname": "TBCSDW_5.def", "x": 174, "y": 190 },
{ "id": 36, "defname": "TBCSDW_6.def", "x": 303, "y": 0 },
{ "id": 21, "defname": "TBCSEXT0.def", "x": 384, "y": 193 },
{ "id": 22, "defname": "TBCSEXT1.def", "x": 0, "y": 198 },
{ "id": -1, "defname": "TBCSEXT2.def", "x": 46, "y": 119 },
{ "id": 11, "defname": "TBCSHAL2.def", "x": 0, "y": 176 },
{ "id": 12, "defname": "TBCSHAL3.def", "x": 0, "y": 164 },
{ "id": 13, "defname": "TBCSHAL4.def", "x": 0, "y": 154 },
{ "id": 10, "defname": "TBCSHALL.def", "x": 0, "y": 209 },
{ "id": 26, "defname": "TBCSHOLY.def", "x": 456, "y": 109 },
{ "id": 18, "defname": "TBCSHRD1.def", "x": 76, "y": 53 },
{ "id": 19, "defname": "TBCSHRD2.def", "x": 76, "y": 35 },
{ "id": 1, "defname": "TBCSMAG2.def", "x": 706, "y": 135 },
{ "id": 2, "defname": "TBCSMAG3.def", "x": 704, "y": 107 },
{ "id": 3, "defname": "TBCSMAG4.def", "x": 704, "y": 76 },
{ "id": 0, "defname": "TBCSMAGE.def", "x": 707, "y": 166 },
{ "id": 14, "defname": "TBCSMARK.def", "x": 413, "y": 264 },
{ "id": 15, "defname": "TBCSSILO.def", "x": 488, "y": 228 },
{ "id": 17, "defname": "TBCSSPEC.def", "x": 533, "y": 71 },
{ "id": 5, "defname": "TBCSTVRN.def", "x": 0, "y": 230 },
{ "id": 37, "defname": "TBCSUP_0.def", "x": 304, "y": 65 },
{ "id": 38, "defname": "TBCSUP_1.def", "x": 360, "y": 115 },
{ "id": 39, "defname": "TBCSUP_2.def", "x": 76, "y": 35 },
{ "id": 40, "defname": "TBCSUP_3.def", "x": 176, "y": 85 },
{ "id": 41, "defname": "TBCSUP_4.def", "x": 563, "y": 173 },
{ "id": 42, "defname": "TBCSUP_5.def", "x": 160, "y": 190 },
{ "id": 43, "defname": "TBCSUP_6.def", "x": 303, "y": 0 },
{ "id": 20, "defname": "TBCSBOAT.def", "x": 478, "y": 134 },
] },
{ "defnames": [
{ "id": 16, "defname": "TBRMBLAK.def", "x": 558, "y": 105 },
{ "id": 9, "defname": "TBRMCAS3.def", "x": 79, "y": 18 },
{ "id": 8, "defname": "TBRMCAS2.def", "x": 79, "y": 18 },
{ "id": 7, "defname": "TBRMCSTL.def", "x": 63, "y": 25 },
{ "id": 30, "defname": "TBRMDW_0.def", "x": 0, "y": 236 },
{ "id": 31, "defname": "TBRMDW_1.def", "x": 0, "y": 154 },
{ "id": 32, "defname": "TBRMDW_2.def", "x": 668, "y": 101 },
{ "id": 33, "defname": "TBRMDW_3.def", "x": 287, "y": 73 },
{ "id": 34, "defname": "TBRMDW_4.def", "x": 68, "y": 146 },
{ "id": 35, "defname": "TBRMDW_5.def", "x": 362, "y": 90 },
{ "id": 36, "defname": "TBRMDW_6.def", "x": 502, "y": 27 },
{ "id": 21, "defname": "TBRMEXT0.def", "x": 555, "y": 297 },
{ "id": 22, "defname": "TBRMEXT1.def", "x": 0, "y": 181 },
{ "id": -1, "defname": "TBRMEXT2.def", "x": 327, "y": 236 },
{ "id": 27, "defname": "TBRMEXT3.def", "x": 293, "y": 235 },
{ "id": 28, "defname": "TBRMEXT4.def", "x": 295, "y": 191 },
{ "id": 29, "defname": "TBRMEXT5.def", "x": 260, "y": 171 },
{ "id": 43, "defname": "TBRMUP_6.def", "x": 502, "y": 5 },
{ "id": 42, "defname": "TBRMUP_5.def", "x": 362, "y": 90 },
{ "id": 41, "defname": "TBRMUP_4.def", "x": 63, "y": 146 },
{ "id": 40, "defname": "TBRMUP_3.def", "x": 287, "y": 28 },
{ "id": 39, "defname": "TBRMUP_2.def", "x": 665, "y": 101 },
{ "id": 38, "defname": "TBRMUP_1.def", "x": 0, "y": 143 },
{ "id": 37, "defname": "TBRMUP_0.def", "x": 0, "y": 236 },
{ "id": 5, "defname": "TBRMTVRN.def", "x": 181, "y": 229 },
{ "id": 17, "defname": "TBRMSPEC.def", "x": 555, "y": 297 },
{ "id": 15, "defname": "TBRMSILO.def", "x": 245, "y": 324 },
{ "id": 14, "defname": "TBRMMARK.def", "x": 129, "y": 301 },
{ "id": 0, "defname": "TBRMMAGE.def", "x": 454, "y": 200 },
{ "id": 1, "defname": "TBRMMAG2.def", "x": 438, "y": 178 },
{ "id": 2, "defname": "TBRMMAG3.def", "x": 418, "y": 153 },
{ "id": 3, "defname": "TBRMMAG4.def", "x": 406, "y": 129 },
{ "id": 4, "defname": "TBRMMAG5.def", "x": 384, "y": 104 },
{ "id": 25, "defname": "TBRMHRD4.def", "x": 47, "y": 142 },
{ "id": 24, "defname": "TBRMHRD3.def", "x": 47, "y": 142 },
{ "id": 19, "defname": "TBRMHRD2.def", "x": 0, "y": 143 },
{ "id": 18, "defname": "TBRMHRD1.def", "x": 0, "y": 154 },
{ "id": 26, "defname": "TBRMHOLY.def", "x": 0, "y": 54 },
{ "id": 10, "defname": "TBRMHALL.def", "x": 565, "y": 216 },
{ "id": 13, "defname": "TBRMHAL4.def", "x": 534, "y": 187 },
{ "id": 12, "defname": "TBRMHAL3.def", "x": 538, "y": 187 },
{ "id": 11, "defname": "TBRMHAL2.def", "x": 538, "y": 187 },
], },
{ "defnames": [
{ "id": 16, "defname": "TBTWBLAK.def", "x": 478, "y": 211 },
{ "id": 9, "defname": "TBTWCAS3.def", "x": 301, "y": 0 },
{ "id": 7, "defname": "TBTWCSTL.def", "x": 304, "y": 0 },
{ "id": 30, "defname": "TBTWDW_0.def", "x": 453, "y": 221 },
{ "id": 31, "defname": "TBTWDW_1.def", "x": 4, "y": 46 },
{ "id": 32, "defname": "TBTWDW_2.def", "x": 209, "y": 177 },
{ "id": 33, "defname": "TBTWDW_3.def", "x": 613, "y": 95 },
{ "id": 34, "defname": "TBTWDW_4.def", "x": 511, "y": 75 },
{ "id": 35, "defname": "TBTWDW_5.def", "x": 681, "y": 208 },
{ "id": 36, "defname": "TBTWDW_6.def", "x": 75, "y": 144 },
{ "id": 21, "defname": "TBTWEXT0.def", "x": 409, "y": 82 },
{ "id": 22, "defname": "TBTWEXT1.def", "x": 702, "y": 115 },
{ "id": 23, "defname": "TBTWEXT2.def", "x": 592, "y": 189 },
{ "id": 11, "defname": "TBTWHAL2.def", "x": 0, "y": 220 },
{ "id": 12, "defname": "TBTWHAL3.def", "x": 0, "y": 82 },
{ "id": 13, "defname": "TBTWHAL4.def", "x": 0, "y": 82 },
{ "id": 10, "defname": "TBTWHALL.def", "x": 0, "y": 259 },
{ "id": 26, "defname": "TBTWHOLY.def", "x": 237, "y": 14 },
{ "id": 18, "defname": "TBTWHRD1.def", "x": 0, "y": 47 },
{ "id": 19, "defname": "TBTWHRD2.def", "x": 0, "y": 28 },
{ "id": 1, "defname": "TBTWMAG2.def", "x": 593, "y": 65 },
{ "id": 2, "defname": "TBTWMAG3.def", "x": 593, "y": 48 },
{ "id": 3, "defname": "TBTWMAG4.def", "x": 593, "y": 31 },
{ "id": 4, "defname": "TBTWMAG5.def", "x": 593, "y": 14 },
{ "id": 0, "defname": "TBTWMAGE.def", "x": 597, "y": 82 },
{ "id": 14, "defname": "TBTWMARK.def", "x": 614, "y": 292 },
{ "id": 15, "defname": "TBTWSILO.def", "x": 763, "y": 214 },
{ "id": 17, "defname": "TBTWSPEC.def", "x": 674, "y": 276 },
{ "id": 5, "defname": "TBTWTVRN.def", "x": 375, "y": 278 },
{ "id": 37, "defname": "TBTWUP_0.def", "x": 446, "y": 221 },
{ "id": 38, "defname": "TBTWUP_1.def", "x": 4, "y": 28 },
{ "id": 39, "defname": "TBTWUP_2.def", "x": 209, "y": 177 },
{ "id": 40, "defname": "TBTWUP_3.def", "x": 613, "y": 74 },
{ "id": 41, "defname": "TBTWUP_4.def", "x": 511, "y": 8 },
{ "id": 42, "defname": "TBTWUP_5.def", "x": 681, "y": 157 },
{ "id": 43, "defname": "TBTWUP_6.def", "x": 75, "y": 91 },
{ "id": 8, "defname": "TBTWCAS2.def", "x": 301, "y": 0 },
], },
{ "defnames": [
{ "id": 16, "defname": "TBINBLAK.def", "x": 684, "y": 253 },
{ "id": 9, "defname": "TBINCAS3.def", "x": 222, "y": 18 },
{ "id": 7, "defname": "TBINCSTL.def", "x": 222, "y": 44 },
{ "id": 30, "defname": "TBINDW_0.def", "x": 614, "y": 256 },
{ "id": 31, "defname": "TBINDW_1.def", "x": 187, "y": 248 },
{ "id": 32, "defname": "TBINDW_2.def", "x": 9, "y": 325 },
{ "id": 33, "defname": "TBINDW_3.def", "x": 414, "y": 204 },
{ "id": 34, "defname": "TBINDW_4.def", "x": 359, "y": 296 },
{ "id": 35, "defname": "TBINDW_5.def", "x": 220, "y": 350 },
{ "id": 36, "defname": "TBINDW_6.def", "x": 420, "y": 153 },
{ "id": 21, "defname": "TBINEXT0.def", "x": 297, "y": 0 },
{ "id": 22, "defname": "TBINEXT1.def", "x": 227, "y": 174 },
{ "id": 23, "defname": "TBINEXT2.def", "x": 593, "y": 104 },
{ "id": 11, "defname": "TBINHAL2.def", "x": 0, "y": 174 },
{ "id": 12, "defname": "TBINHAL3.def", "x": 0, "y": 174 },
{ "id": 13, "defname": "TBINHAL4.def", "x": 0, "y": 131 },
{ "id": 10, "defname": "TBINHALL.def", "x": 0, "y": 174 },
{ "id": 26, "defname": "TBINHOLY.def", "x": 24, "y": 10 },
{ "id": 18, "defname": "TBINHRD1.def", "x": 614, "y": 256 },
{ "id": 19, "defname": "TBINHRD2.def", "x": 614, "y": 221 },
{ "id": 24, "defname": "TBINHRD3.def", "x": 10, "y": 301 },
{ "id": 25, "defname": "TBINHRD4.def", "x": 9, "y": 273 },
{ "id": 1, "defname": "TBINMAG2.def", "x": 667, "y": 101 },
{ "id": 2, "defname": "TBINMAG3.def", "x": 667, "y": 83 },
{ "id": 3, "defname": "TBINMAG4.def", "x": 667, "y": 56 },
{ "id": 4, "defname": "TBINMAG5.def", "x": 667, "y": 35 },
{ "id": 0, "defname": "TBINMAGE.def", "x": 667, "y": 127 },
{ "id": 14, "defname": "TBINMARK.def", "x": 511, "y": 301 },
{ "id": 15, "defname": "TBINSILO.def", "x": 497, "y": 337 },
{ "id": 5, "defname": "TBINTVRN.def", "x": 105, "y": 219 },
{ "id": 37, "defname": "TBINUP_0.def", "x": 614, "y": 221 },
{ "id": 38, "defname": "TBINUP_1.def", "x": 187, "y": 212 },
{ "id": 39, "defname": "TBINUP_2.def", "x": 9, "y": 273 },
{ "id": 40, "defname": "TBINUP_3.def", "x": 412, "y": 197 },
{ "id": 41, "defname": "TBINUP_4.def", "x": 359, "y": 244 },
{ "id": 42, "defname": "TBINUP_5.def", "x": 220, "y": 282 },
{ "id": 43, "defname": "TBINUP_6.def", "x": 420, "y": 105 },
{ "id": 8, "defname": "TBINCAS2.def", "x": 222, "y": 44 },
], },
{ "defnames": [
{ "id": 16, "defname": "TBNCBLAK.def", "x": 382, "y": 252 },
{ "id": 8, "defname": "TBNCCAS2.def", "x": 139, "y": 66 },
{ "id": 9, "defname": "TBNCCAS3.def", "x": 34, "y": 18 },
{ "id": 7, "defname": "TBNCCSTL.def", "x": 138, "y": 66 },
{ "id": 6, "defname": "TBNCDOCK.def", "x": 617, "y": 265 },
{ "id": 30, "defname": "TBNCDW_0.def", "x": 80, "y": 222 },
{ "id": 31, "defname": "TBNCDW_1.def", "x": 502, "y": 223 },
{ "id": 32, "defname": "TBNCDW_2.def", "x": 0, "y": 187 },
{ "id": 33, "defname": "TBNCDW_3.def", "x": 607, "y": 212 },
{ "id": 34, "defname": "TBNCDW_4.def", "x": 206, "y": 207 },
{ "id": 35, "defname": "TBNCDW_5.def", "x": 0, "y": 31 },
{ "id": 36, "defname": "TBNCDW_6.def", "x": 663, "y": 25 },
{ "id": 21, "defname": "TBNCEXT0.def", "x": 307, "y": 61 },
{ "id": 22, "defname": "TBNCEXT1.def", "x": 247, "y": 275 },
{ "id": -1, "defname": "TBNCEXT2.def", "x": 25, "y": 279 },
{ "id": 27, "defname": "TBNCEXT3.def", "x": 0, "y": 241 },
{ "id": 28, "defname": "TBNCEXT4.def", "x": 321, "y": 255 },
{ "id": 29, "defname": "TBNCEXT5.def", "x": 475, "y": 257 },
{ "id": 11, "defname": "TBNCHAL2.def", "x": 482, "y": 56 },
{ "id": 12, "defname": "TBNCHAL3.def", "x": 478, "y": 26 },
{ "id": 13, "defname": "TBNCHAL4.def", "x": 481, "y": 26 },
{ "id": 10, "defname": "TBNCHALL.def", "x": 468, "y": 76 },
{ "id": 26, "defname": "TBNCHOLY.def", "x": 410, "y": 88 },
{ "id": 18, "defname": "TBNCHRD1.def", "x": 80, "y": 222 },
{ "id": 19, "defname": "TBNCHRD2.def", "x": 64, "y": 222 },
{ "id": 1, "defname": "TBNCMAG2.def", "x": 341, "y": 97 },
{ "id": 2, "defname": "TBNCMAG3.def", "x": 341, "y": 78 },
{ "id": 3, "defname": "TBNCMAG4.def", "x": 340, "y": 62 },
{ "id": 4, "defname": "TBNCMAG5.def", "x": 343, "y": 35 },
{ "id": 0, "defname": "TBNCMAGE.def", "x": 341, "y": 116 },
{ "id": 14, "defname": "TBNCMARK.def", "x": 347, "y": 215 },
{ "id": 15, "defname": "TBNCSILO.def", "x": 276, "y": 185 },
{ "id": 17, "defname": "TBNCSPEC.def", "x": 18, "y": 0 },
{ "id": 5, "defname": "TBNCTVRN.def", "x": 508, "y": 189 },
{ "id": 37, "defname": "TBNCUP_0.def", "x": 64, "y": 222 },
{ "id": 38, "defname": "TBNCUP_1.def", "x": 498, "y": 224 },
{ "id": 39, "defname": "TBNCUP_2.def", "x": 0, "y": 179 },
{ "id": 40, "defname": "TBNCUP_3.def", "x": 615, "y": 193 },
{ "id": 41, "defname": "TBNCUP_4.def", "x": 222, "y": 171 },
{ "id": 42, "defname": "TBNCUP_5.def", "x": 0, "y": 30 },
{ "id": 43, "defname": "TBNCUP_6.def", "x": 662, "y": 23 },
{ "id": 20, "defname": "TBNCBOAT.def", "x": 617, "y": 265 },
], },
{ "defnames": [
{ "id": 16, "defname": "TBDNBLAK.def", "x": 544, "y": 248 },
{ "id": 9, "defname": "TBDNCAS3.def", "x": 363, "y": 87 },
{ "id": 7, "defname": "TBDNCSTL.def", "x": 363, "y": 87 },
{ "id": 30, "defname": "TBDNDW_0.def", "x": 0, "y": 326 },
{ "id": 31, "defname": "TBDNDW_1.def", "x": 0, "y": 26 },
{ "id": 32, "defname": "TBDNDW_2.def", "x": 118, "y": 308 },
{ "id": 33, "defname": "TBDNDW_3.def", "x": 300, "y": 29 },
{ "id": 34, "defname": "TBDNDW_4.def", "x": 551, "y": 186 },
{ "id": 35, "defname": "TBDNDW_5.def", "x": 270, "y": 253 },
{ "id": 36, "defname": "TBDNDW_6.def", "x": 550, "y": 0 },
{ "id": 21, "defname": "TBDNEXT0.def", "x": 131, "y": 26 },
{ "id": 22, "defname": "TBDNEXT1.def", "x": 687, "y": 177 },
{ "id": 23, "defname": "TBDNEXT2.def", "x": 313, "y": 298 },
{ "id": 11, "defname": "TBDNHAL2.def", "x": 0, "y": 223 },
{ "id": 12, "defname": "TBDNHAL3.def", "x": 0, "y": 223 },
{ "id": 13, "defname": "TBDNHAL4.def", "x": 0, "y": 203 },
{ "id": 10, "defname": "TBDNHALL.def", "x": 0, "y": 234 },
{ "id": 26, "defname": "TBDNHOLY.def", "x": 562, "y": 24 },
{ "id": 18, "defname": "TBDNHRD1.def", "x": 0, "y": 326 },
{ "id": 19, "defname": "TBDNHRD2.def", "x": 0, "y": 300 },
{ "id": 1, "defname": "TBDNMAG2.def", "x": 164, "y": 97 },
{ "id": 2, "defname": "TBDNMAG3.def", "x": 164, "y": 77 },
{ "id": 3, "defname": "TBDNMAG4.def", "x": 164, "y": 61 },
{ "id": 4, "defname": "TBDNMAG5.def", "x": 164, "y": 15 },
{ "id": 0, "defname": "TBDNMAGE.def", "x": 164, "y": 119 },
{ "id": 14, "defname": "TBDNMARK.def", "x": 590, "y": 318 },
{ "id": 15, "defname": "TBDNSILO.def", "x": 624, "y": 335 },
{ "id": 17, "defname": "TBDNSPEC.def", "x": 746, "y": 294 },
{ "id": 5, "defname": "TBDNTVRN.def", "x": 211, "y": 297 },
{ "id": 37, "defname": "TBDNUP_0.def", "x": 0, "y": 300 },
{ "id": 38, "defname": "TBDNUP_1.def", "x": 0, "y": 26 },
{ "id": 39, "defname": "TBDNUP_2.def", "x": 118, "y": 256 },
{ "id": 40, "defname": "TBDNUP_3.def", "x": 300, "y": 29 },
{ "id": 41, "defname": "TBDNUP_4.def", "x": 519, "y": 172 },
{ "id": 42, "defname": "TBDNUP_5.def", "x": 270, "y": 253 },
{ "id": 43, "defname": "TBDNUP_6.def", "x": 550, "y": 0 },
{ "id": 8, "defname": "TBDNCAS2.def", "x": 363, "y": 87 },
], },
{ "defnames": [
{ "id": 31, "defname": "TBSTDW_1.def", "x": 266, "y": 246 },
{ "id": 43, "defname": "TBSTUP_6.def", "x": 604, "y": 0 },
{ "id": 8, "defname": "TBSTCAS2.def", "x": 402, "y": 114 },
{ "id": 9, "defname": "TBSTCAS3.def", "x": 402, "y": 114 },
{ "id": 7, "defname": "TBSTCSTL.def", "x": 402, "y": 148 },
{ "id": 30, "defname": "TBSTDW_0.def", "x": 373, "y": 239 },
{ "id": 32, "defname": "TBSTDW_2.def", "x": 566, "y": 232 },
{ "id": 33, "defname": "TBSTDW_3.def", "x": 197, "y": 204 },
{ "id": 34, "defname": "TBSTDW_4.def", "x": 137, "y": 30 },
{ "id": 35, "defname": "TBSTDW_5.def", "x": 622, "y": 160 },
{ "id": 36, "defname": "TBSTDW_6.def", "x": 604, "y": 0 },
{ "id": 21, "defname": "TBSTEXT0.def", "x": 473, "y": 282 },
{ "id": 22, "defname": "TBSTEXT1.def", "x": 617, "y": 286 },
{ "id": 23, "defname": "TBSTEXT2.def", "x": 313, "y": 13 },
{ "id": -1, "defname": "TBSTEXT3.def", "x": 23, "y": 20 },
{ "id": 11, "defname": "TBSTHAL2.def", "x": 0, "y": 225 },
{ "id": 12, "defname": "TBSTHAL3.def", "x": 0, "y": 201 },
{ "id": 13, "defname": "TBSTHAL4.def", "x": 0, "y": 148 },
{ "id": 10, "defname": "TBSTHALL.def", "x": 0, "y": 259 },
{ "id": 26, "defname": "TBSTHOLY.def", "x": 321, "y": 105 },
{ "id": 18, "defname": "TBSTHRD1.def", "x": 373, "y": 239 },
{ "id": 19, "defname": "TBSTHRD2.def", "x": 373, "y": 220 },
{ "id": 1, "defname": "TBSTMAG2.def", "x": 473, "y": 37 },
{ "id": 2, "defname": "TBSTMAG3.def", "x": 473, "y": 1 },
{ "id": 0, "defname": "TBSTMAGE.def", "x": 473, "y": 67 },
{ "id": 14, "defname": "TBSTMARK.def", "x": 397, "y": 308 },
{ "id": 15, "defname": "TBSTSILO.def", "x": 458, "y": 248 },
{ "id": 17, "defname": "TBSTSPEC.def", "x": 550, "y": 229 },
{ "id": 5, "defname": "TBSTTVRN.def", "x": 170, "y": 280 },
{ "id": 37, "defname": "TBSTUP_0.def", "x": 373, "y": 220 },
{ "id": 38, "defname": "TBSTUP_1.def", "x": 266, "y": 225 },
{ "id": 39, "defname": "TBSTUP_2.def", "x": 566, "y": 158 },
{ "id": 40, "defname": "TBSTUP_3.def", "x": 197, "y": 137 },
{ "id": 41, "defname": "TBSTUP_4.def", "x": 129, "y": 15 },
{ "id": 42, "defname": "TBSTUP_5.def", "x": 616, "y": 93 },
{ "id": 16, "defname": "TBSTBLAK.def", "x": 660, "y": 286 },
], },
{ "defnames": [
{ "id": 16, "defname": "TBFRBLAK.def", "x": 360, "y": 160 },
{ "id": 8, "defname": "TBFRCAS2.def", "x": 368, "y": 98 },
{ "id": 9, "defname": "TBFRCAS3.def", "x": 368, "y": 55 },
{ "id": 7, "defname": "TBFRCSTL.def", "x": 368, "y": 118 },
{ "id": 6, "defname": "TBFRDOCK.def", "x": 197, "y": 294 },
{ "id": 30, "defname": "TBFRDW_0.def", "x": 641, "y": 168 },
{ "id": 31, "defname": "TBFRDW_1.def", "x": 141, "y": 178 },
{ "id": 34, "defname": "TBFRDW_2.def", "x": 15, "y": 127 },
{ "id": 32, "defname": "TBFRDW_3.def", "x": 192, "y": 85 },
{ "id": 33, "defname": "TBFRDW_4.def", "x": 0, "y": 292 },
{ "id": 35, "defname": "TBFRDW_5.def", "x": 0, "y": 4 },
{ "id": 36, "defname": "TBFRDW_6.def", "x": 612, "y": 291 },
{ "id": 21, "defname": "TBFREXT0.def", "x": 341, "y": 174 },
{ "id": 22, "defname": "TBFREXT1.def", "x": 349, "y": 79 },
{ "id": -1, "defname": "TBFREXT2.def", "x": 372, "y": 227 },
{ "id": 11, "defname": "TBFRHAL2.def", "x": 166, "y": 97 },
{ "id": 12, "defname": "TBFRHAL3.def", "x": 166, "y": 51 },
{ "id": 13, "defname": "TBFRHAL4.def", "x": 166, "y": 2 },
{ "id": 10, "defname": "TBFRHALL.def", "x": 166, "y": 128 },
{ "id": 26, "defname": "TBFRHOLY.def", "x": 468, "y": 260 },
{ "id": 18, "defname": "TBFRHRD1.def", "x": 641, "y": 121 },
{ "id": 19, "defname": "TBFRHRD2.def", "x": 641, "y": 68 },
{ "id": 1, "defname": "TBFRMAG2.def", "x": 0, "y": 177 },
{ "id": 2, "defname": "TBFRMAG3.def", "x": 0, "y": 135 },
{ "id": 0, "defname": "TBFRMAGE.def", "x": 0, "y": 200 },
{ "id": 14, "defname": "TBFRMARK.def", "x": 382, "y": 219 },
{ "id": 15, "defname": "TBFRSILO.def", "x": 448, "y": 210 },
{ "id": 17, "defname": "TBFRSPEC.def", "x": 703, "y": 36 },
{ "id": 5, "defname": "TBFRTVRN.def", "x": 634, "y": 219 },
{ "id": 37, "defname": "TBFRUP_0.def", "x": 641, "y": 107 },
{ "id": 38, "defname": "TBFRUP_1.def", "x": 125, "y": 163 },
{ "id": 41, "defname": "TBFRUP_2.def", "x": 15, "y": 69 },
{ "id": 39, "defname": "TBFRUP_3.def", "x": 159, "y": 19 },
{ "id": 40, "defname": "TBFRUP_4.def", "x": 0, "y": 257 },
{ "id": 42, "defname": "TBFRUP_5.def", "x": 0, "y": 4 },
{ "id": 43, "defname": "TBFRUP_6.def", "x": 587, "y": 263 },
{ "id": 29, "defname": "TBFRWTRW.def", "x": 320, "y": 141 },
{ "id": 20, "defname": "TBFRBOAT.def", "x": 197, "y": 294 },
], },
{ "defnames": [
{ "id": 16, "defname": "TBELBLAK.def", "x": 449, "y": 151 },
{ "id": 8, "defname": "TBELCAS2.def", "x": 349, "y": 101 },
{ "id": 9, "defname": "TBELCAS3.def", "x": 349, "y": 101 },
{ "id": 7, "defname": "TBELCSTL.def", "x": 349, "y": 101 },
{ "id": 6, "defname": "TBELDOCK.def", "x": 239, "y": 215 },
{ "id": 30, "defname": "TBELDW_0.def", "x": 689, "y": 250 },
{ "id": 31, "defname": "TBELDW_1.def", "x": 630, "y": 50 },
{ "id": 32, "defname": "TBELDW_2.def", "x": 709, "y": 210 },
{ "id": 33, "defname": "TBELDW_3.def", "x": 108, "y": 131 },
{ "id": 34, "defname": "TBELDW_4.def", "x": 264, "y": 168 },
{ "id": 35, "defname": "TBELDW_5.def", "x": 394, "y": 283 },
{ "id": 36, "defname": "TBELDW_6.def", "x": 43, "y": 16 },
{ "id": -1, "defname": "TBELEXT1.def", "x": 23, "y": 218 },
{ "id": 27, "defname": "TBELEXT2.def", "x": 232, "y": 205 },
{ "id": 28, "defname": "TBELEXT3.def", "x": 516, "y": 223 },
{ "id": 29, "defname": "TBELEXT4.def", "x": 0, "y": 252 },
{ "id": -2, "defname": "TBELEXT5.def", "x": 682, "y": 183 },
{ "id": 21, "defname": "TBELEXT6.def", "x": 104, "y": 170 },
{ "id": 11, "defname": "TBELHAL2.def", "x": 0, "y": 165 },
{ "id": 12, "defname": "TBELHAL3.def", "x": 0, "y": 165 },
{ "id": 13, "defname": "TBELHAL4.def", "x": 0, "y": 164 },
{ "id": 10, "defname": "TBELHALL.def", "x": -1, "y": 164 },
{ "id": 26, "defname": "TBELHOLY.def", "x": 307, "y": 2 },
{ "id": 18, "defname": "TBELHRD1.def", "x": 689, "y": 250 },
{ "id": 19, "defname": "TBELHRD2.def", "x": 689, "y": 250 },
{ "id": 1, "defname": "TBELMAG2.def", "x": 206, "y": 58 },
{ "id": 2, "defname": "TBELMAG3.def", "x": 206, "y": 58 },
{ "id": 3, "defname": "TBELMAG4.def", "x": 206, "y": 58 },
{ "id": 4, "defname": "TBELMAG5.def", "x": 206, "y": 58 },
{ "id": 0, "defname": "TBELMAGE.def", "x": 206, "y": 58 },
{ "id": 14, "defname": "TBELMARK.def", "x": 347, "y": 216 },
{ "id": 15, "defname": "TBELSILO.def", "x": 372, "y": 171 },
{ "id": 17, "defname": "TBELSPEC.def", "x": 284, "y": 246 },
{ "id": 5, "defname": "TBELTVRN.def", "x": 553, "y": 203 },
{ "id": 37, "defname": "TBELUP_0.def", "x": 689, "y": 250 },
{ "id": 38, "defname": "TBELUP_1.def", "x": 630, "y": 50 },
{ "id": 39, "defname": "TBELUP_2.def", "x": 709, "y": 210 },
{ "id": 40, "defname": "TBELUP_3.def", "x": 108, "y": 131 },
{ "id": 41, "defname": "TBELUP_4.def", "x": 264, "y": 168 },
{ "id": 42, "defname": "TBELUP_5.def", "x": 394, "y": 283 },
{ "id": 43, "defname": "TBELUP_6.def", "x": 43, "y": 0 },
{ "id": 20, "defname": "TBELBOAT.def", "x": 239, "y": 215 }
] ]
]
}

View File

@ -1,352 +0,0 @@
0 16 TBCSBLAK.def 213 251
0 8 TBCSCAS2.def 478 66
0 9 TBCSCAS3.def 478 37
0 7 TBCSCSTL.def 595 66
0 6 TBCSDOCK.def 478 134
0 30 TBCSDW_0.def 304 92
0 31 TBCSDW_1.def 360 130
0 32 TBCSDW_2.def 76 57
0 33 TBCSDW_3.def 176 101
0 34 TBCSDW_4.def 563 211
0 35 TBCSDW_5.def 174 190
0 36 TBCSDW_6.def 303 0
0 21 TBCSEXT0.def 384 193
0 22 TBCSEXT1.def 0 198
0 -1 TBCSEXT2.def 46 119
0 11 TBCSHAL2.def 0 176
0 12 TBCSHAL3.def 0 164
0 13 TBCSHAL4.def 0 154
0 10 TBCSHALL.def 0 209
0 26 TBCSHOLY.def 456 109
0 18 TBCSHRD1.def 76 53
0 19 TBCSHRD2.def 76 35
0 1 TBCSMAG2.def 706 135
0 2 TBCSMAG3.def 704 107
0 3 TBCSMAG4.def 704 76
0 0 TBCSMAGE.def 707 166
0 14 TBCSMARK.def 413 264
0 15 TBCSSILO.def 488 228
0 17 TBCSSPEC.def 533 71
0 5 TBCSTVRN.def 0 230
0 37 TBCSUP_0.def 304 65
0 38 TBCSUP_1.def 360 115
0 39 TBCSUP_2.def 76 35
0 40 TBCSUP_3.def 176 85
0 41 TBCSUP_4.def 563 173
0 42 TBCSUP_5.def 160 190
0 43 TBCSUP_6.def 303 0
0 20 TBCSBOAT.def 478 134
1 16 TBRMBLAK.def 558 105
1 9 TBRMCAS3.def 79 18
1 8 TBRMCAS2.def 79 18
1 7 TBRMCSTL.def 63 25
1 30 TBRMDW_0.def 0 236
1 31 TBRMDW_1.def 0 154
1 32 TBRMDW_2.def 668 101
1 33 TBRMDW_3.def 287 73
1 34 TBRMDW_4.def 68 146
1 35 TBRMDW_5.def 362 90
1 36 TBRMDW_6.def 502 27
1 21 TBRMEXT0.def 555 297
1 22 TBRMEXT1.def 0 181
1 -1 TBRMEXT2.def 327 236
1 27 TBRMEXT3.def 293 235
1 28 TBRMEXT4.def 295 191
1 29 TBRMEXT5.def 260 171
1 43 TBRMUP_6.def 502 5
1 42 TBRMUP_5.def 362 90
1 41 TBRMUP_4.def 63 146
1 40 TBRMUP_3.def 287 28
1 39 TBRMUP_2.def 665 101
1 38 TBRMUP_1.def 0 143
1 37 TBRMUP_0.def 0 236
1 5 TBRMTVRN.def 181 229
1 17 TBRMSPEC.def 555 297
1 15 TBRMSILO.def 245 324
1 14 TBRMMARK.def 129 301
1 0 TBRMMAGE.def 454 200
1 1 TBRMMAG2.def 438 178
1 2 TBRMMAG3.def 418 153
1 3 TBRMMAG4.def 406 129
1 4 TBRMMAG5.def 384 104
1 25 TBRMHRD4.def 47 142
1 24 TBRMHRD3.def 47 142
1 19 TBRMHRD2.def 0 143
1 18 TBRMHRD1.def 0 154
1 26 TBRMHOLY.def 0 54
1 10 TBRMHALL.def 565 216
1 13 TBRMHAL4.def 534 187
1 12 TBRMHAL3.def 538 187
1 11 TBRMHAL2.def 538 187
2 16 TBTWBLAK.def 478 211
2 9 TBTWCAS3.def 301 0
2 7 TBTWCSTL.def 304 0
2 30 TBTWDW_0.def 453 221
2 31 TBTWDW_1.def 4 46
2 32 TBTWDW_2.def 209 177
2 33 TBTWDW_3.def 613 95
2 34 TBTWDW_4.def 511 75
2 35 TBTWDW_5.def 681 208
2 36 TBTWDW_6.def 75 144
2 21 TBTWEXT0.def 409 82
2 22 TBTWEXT1.def 702 115
2 23 TBTWEXT2.def 592 189
2 11 TBTWHAL2.def 0 220
2 12 TBTWHAL3.def 0 82
2 13 TBTWHAL4.def 0 82
2 10 TBTWHALL.def 0 259
2 26 TBTWHOLY.def 237 14
2 18 TBTWHRD1.def 0 47
2 19 TBTWHRD2.def 0 28
2 1 TBTWMAG2.def 593 65
2 2 TBTWMAG3.def 593 48
2 3 TBTWMAG4.def 593 31
2 4 TBTWMAG5.def 593 14
2 0 TBTWMAGE.def 597 82
2 14 TBTWMARK.def 614 292
2 15 TBTWSILO.def 763 214
2 17 TBTWSPEC.def 674 276
2 5 TBTWTVRN.def 375 278
2 37 TBTWUP_0.def 446 221
2 38 TBTWUP_1.def 4 28
2 39 TBTWUP_2.def 209 177
2 40 TBTWUP_3.def 613 74
2 41 TBTWUP_4.def 511 8
2 42 TBTWUP_5.def 681 157
2 43 TBTWUP_6.def 75 91
2 8 TBTWCAS2.def 301 0
3 16 TBINBLAK.def 684 253
3 9 TBINCAS3.def 222 18
3 7 TBINCSTL.def 222 44
3 30 TBINDW_0.def 614 256
3 31 TBINDW_1.def 187 248
3 32 TBINDW_2.def 9 325
3 33 TBINDW_3.def 414 204
3 34 TBINDW_4.def 359 296
3 35 TBINDW_5.def 220 350
3 36 TBINDW_6.def 420 153
3 21 TBINEXT0.def 297 0
3 22 TBINEXT1.def 227 174
3 23 TBINEXT2.def 593 104
3 11 TBINHAL2.def 0 174
3 12 TBINHAL3.def 0 174
3 13 TBINHAL4.def 0 131
3 10 TBINHALL.def 0 174
3 26 TBINHOLY.def 24 10
3 18 TBINHRD1.def 614 256
3 19 TBINHRD2.def 614 221
3 24 TBINHRD3.def 10 301
3 25 TBINHRD4.def 9 273
3 1 TBINMAG2.def 667 101
3 2 TBINMAG3.def 667 83
3 3 TBINMAG4.def 667 56
3 4 TBINMAG5.def 667 35
3 0 TBINMAGE.def 667 127
3 14 TBINMARK.def 511 301
3 15 TBINSILO.def 497 337
3 5 TBINTVRN.def 105 219
3 37 TBINUP_0.def 614 221
3 38 TBINUP_1.def 187 212
3 39 TBINUP_2.def 9 273
3 40 TBINUP_3.def 412 197
3 41 TBINUP_4.def 359 244
3 42 TBINUP_5.def 220 282
3 43 TBINUP_6.def 420 105
3 8 TBINCAS2.def 222 44
4 16 TBNCBLAK.def 382 252
4 8 TBNCCAS2.def 139 66
4 9 TBNCCAS3.def 34 18
4 7 TBNCCSTL.def 138 66
4 6 TBNCDOCK.def 617 265
4 30 TBNCDW_0.def 80 222
4 31 TBNCDW_1.def 502 223
4 32 TBNCDW_2.def 0 187
4 33 TBNCDW_3.def 607 212
4 34 TBNCDW_4.def 206 207
4 35 TBNCDW_5.def 0 31
4 36 TBNCDW_6.def 663 25
4 21 TBNCEXT0.def 307 61
4 22 TBNCEXT1.def 247 275
4 -1 TBNCEXT2.def 25 279
4 27 TBNCEXT3.def 0 241
4 28 TBNCEXT4.def 321 255
4 29 TBNCEXT5.def 475 257
4 11 TBNCHAL2.def 482 56
4 12 TBNCHAL3.def 478 26
4 13 TBNCHAL4.def 481 26
4 10 TBNCHALL.def 468 76
4 26 TBNCHOLY.def 410 88
4 18 TBNCHRD1.def 80 222
4 19 TBNCHRD2.def 64 222
4 1 TBNCMAG2.def 341 97
4 2 TBNCMAG3.def 341 78
4 3 TBNCMAG4.def 340 62
4 4 TBNCMAG5.def 343 35
4 0 TBNCMAGE.def 341 116
4 14 TBNCMARK.def 347 215
4 15 TBNCSILO.def 276 185
4 17 TBNCSPEC.def 18 0
4 5 TBNCTVRN.def 508 189
4 37 TBNCUP_0.def 64 222
4 38 TBNCUP_1.def 498 224
4 39 TBNCUP_2.def 0 179
4 40 TBNCUP_3.def 615 193
4 41 TBNCUP_4.def 222 171
4 42 TBNCUP_5.def 0 30
4 43 TBNCUP_6.def 662 23
4 20 TBNCBOAT.def 617 265
5 16 TBDNBLAK.def 544 248
5 9 TBDNCAS3.def 363 87
5 7 TBDNCSTL.def 363 87
5 30 TBDNDW_0.def 0 326
5 31 TBDNDW_1.def 0 26
5 32 TBDNDW_2.def 118 308
5 33 TBDNDW_3.def 300 29
5 34 TBDNDW_4.def 551 186
5 35 TBDNDW_5.def 270 253
5 36 TBDNDW_6.def 550 0
5 21 TBDNEXT0.def 131 26
5 22 TBDNEXT1.def 687 177
5 23 TBDNEXT2.def 313 298
5 11 TBDNHAL2.def 0 223
5 12 TBDNHAL3.def 0 223
5 13 TBDNHAL4.def 0 203
5 10 TBDNHALL.def 0 234
5 26 TBDNHOLY.def 562 24
5 18 TBDNHRD1.def 0 326
5 19 TBDNHRD2.def 0 300
5 1 TBDNMAG2.def 164 97
5 2 TBDNMAG3.def 164 77
5 3 TBDNMAG4.def 164 61
5 4 TBDNMAG5.def 164 15
5 0 TBDNMAGE.def 164 119
5 14 TBDNMARK.def 590 318
5 15 TBDNSILO.def 624 335
5 17 TBDNSPEC.def 746 294
5 5 TBDNTVRN.def 211 297
5 37 TBDNUP_0.def 0 300
5 38 TBDNUP_1.def 0 26
5 39 TBDNUP_2.def 118 256
5 40 TBDNUP_3.def 300 29
5 41 TBDNUP_4.def 519 172
5 42 TBDNUP_5.def 270 253
5 43 TBDNUP_6.def 550 0
5 8 TBDNCAS2.def 363 87
6 31 TBSTDW_1.def 266 246
6 43 TBSTUP_6.def 604 0
6 8 TBSTCAS2.def 402 114
6 9 TBSTCAS3.def 402 114
6 7 TBSTCSTL.def 402 148
6 30 TBSTDW_0.def 373 239
6 32 TBSTDW_2.def 566 232
6 33 TBSTDW_3.def 197 204
6 34 TBSTDW_4.def 137 30
6 35 TBSTDW_5.def 622 160
6 36 TBSTDW_6.def 604 0
6 21 TBSTEXT0.def 473 282
6 22 TBSTEXT1.def 617 286
6 23 TBSTEXT2.def 313 13
6 -1 TBSTEXT3.def 23 20
6 11 TBSTHAL2.def 0 225
6 12 TBSTHAL3.def 0 201
6 13 TBSTHAL4.def 0 148
6 10 TBSTHALL.def 0 259
6 26 TBSTHOLY.def 321 105
6 18 TBSTHRD1.def 373 239
6 19 TBSTHRD2.def 373 220
6 1 TBSTMAG2.def 473 37
6 2 TBSTMAG3.def 473 1
6 0 TBSTMAGE.def 473 67
6 14 TBSTMARK.def 397 308
6 15 TBSTSILO.def 458 248
6 17 TBSTSPEC.def 550 229
6 5 TBSTTVRN.def 170 280
6 37 TBSTUP_0.def 373 220
6 38 TBSTUP_1.def 266 225
6 39 TBSTUP_2.def 566 158
6 40 TBSTUP_3.def 197 137
6 41 TBSTUP_4.def 129 15
6 42 TBSTUP_5.def 616 93
6 16 TBSTBLAK.def 660 286
7 16 TBFRBLAK.def 360 160
7 8 TBFRCAS2.def 368 98
7 9 TBFRCAS3.def 368 55
7 7 TBFRCSTL.def 368 118
7 6 TBFRDOCK.def 197 294
7 30 TBFRDW_0.def 641 168
7 31 TBFRDW_1.def 141 178
7 34 TBFRDW_2.def 15 127
7 32 TBFRDW_3.def 192 85
7 33 TBFRDW_4.def 0 292
7 35 TBFRDW_5.def 0 4
7 36 TBFRDW_6.def 612 291
7 21 TBFREXT0.def 341 174
7 22 TBFREXT1.def 349 79
7 -1 TBFREXT2.def 372 227
7 11 TBFRHAL2.def 166 97
7 12 TBFRHAL3.def 166 51
7 13 TBFRHAL4.def 166 2
7 10 TBFRHALL.def 166 128
7 26 TBFRHOLY.def 468 260
7 18 TBFRHRD1.def 641 121
7 19 TBFRHRD2.def 641 68
7 1 TBFRMAG2.def 0 177
7 2 TBFRMAG3.def 0 135
7 0 TBFRMAGE.def 0 200
7 14 TBFRMARK.def 382 219
7 15 TBFRSILO.def 448 210
7 17 TBFRSPEC.def 703 36
7 5 TBFRTVRN.def 634 219
7 37 TBFRUP_0.def 641 107
7 38 TBFRUP_1.def 125 163
7 41 TBFRUP_2.def 15 69
7 39 TBFRUP_3.def 159 19
7 40 TBFRUP_4.def 0 257
7 42 TBFRUP_5.def 0 4
7 43 TBFRUP_6.def 587 263
7 29 TBFRWTRW.def 320 141
7 20 TBFRBOAT.def 197 294
8 16 TBELBLAK.def 449 151
8 8 TBELCAS2.def 349 101
8 9 TBELCAS3.def 349 101
8 7 TBELCSTL.def 349 101
8 6 TBELDOCK.def 239 215
8 30 TBELDW_0.def 689 250
8 31 TBELDW_1.def 630 50
8 32 TBELDW_2.def 709 210
8 33 TBELDW_3.def 108 131
8 34 TBELDW_4.def 264 168
8 35 TBELDW_5.def 394 283
8 36 TBELDW_6.def 43 16
8 -1 TBELEXT1.def 23 218
8 27 TBELEXT2.def 232 205
8 28 TBELEXT3.def 516 223
8 29 TBELEXT4.def 0 252
8 -2 TBELEXT5.def 682 183
8 21 TBELEXT6.def 104 170
8 11 TBELHAL2.def 0 165
8 12 TBELHAL3.def 0 165
8 13 TBELHAL4.def 0 164
8 10 TBELHALL.def -1 164
8 26 TBELHOLY.def 307 2
8 18 TBELHRD1.def 689 250
8 19 TBELHRD2.def 689 250
8 1 TBELMAG2.def 206 58
8 2 TBELMAG3.def 206 58
8 3 TBELMAG4.def 206 58
8 4 TBELMAG5.def 206 58
8 0 TBELMAGE.def 206 58
8 14 TBELMARK.def 347 216
8 15 TBELSILO.def 372 171
8 17 TBELSPEC.def 284 246
8 5 TBELTVRN.def 553 203
8 37 TBELUP_0.def 689 250
8 38 TBELUP_1.def 630 50
8 39 TBELUP_2.def 709 210
8 40 TBELUP_3.def 108 131
8 41 TBELUP_4.def 264 168
8 42 TBELUP_5.def 394 283
8 43 TBELUP_6.def 43 0
8 20 TBELBOAT.def 239 215
-1

View File

@ -5,6 +5,7 @@
#include <sstream>
#include "../lib/VCMI_Lib.h"
#include "CGeneralTextHandler.h"
#include "../lib/JsonNode.h"
extern CLodHandler * bitmaph;
void loadToIt(std::string &dest, const std::string &src, int &iter, int mode);
@ -125,27 +126,35 @@ void CTownHandler::loadNames()
void CTownHandler::loadStructures()
{
structures.resize(F_NUMBER);
//read buildings coords
std::ifstream of(DATA_DIR "/config/buildings.txt");
while(!of.eof())
{
Structure *vinya = new Structure;
vinya->group = -1;
of >> vinya->townID;
if (vinya->townID == -1)
break;
of >> vinya->ID;
of >> vinya->defName;
vinya->name = vinya->defName; //TODO - use normal names
of >> vinya->pos.x;
of >> vinya->pos.y;
vinya->pos.z = 0;
structures[vinya->townID][vinya->ID] = vinya;
}
of.close();
of.clear();
std::ifstream of;
structures.resize(F_NUMBER);
//read buildings coords
const JsonNode config(DATA_DIR "/config/buildings.json");
const JsonVector &vector1 = config["town_type"].Vector();
int townid=0;
for (JsonVector::const_iterator it = vector1.begin(); it!=vector1.end(); ++it, ++townid) {
const JsonNode &node = *it;
const JsonVector &vector2 = node["defnames"].Vector();
for (JsonVector::const_iterator it2 = vector2.begin(); it2!=vector2.end(); ++it2) {
const JsonNode &ai = *it2;
Structure *vinya = new Structure;
vinya->group = -1;
vinya->townID = townid;
vinya->ID = ai["id"].Float();
vinya->defName = ai["defname"].String();
vinya->name = vinya->defName; //TODO - use normal names
vinya->pos.x = ai["x"].Float();
vinya->pos.y = ai["y"].Float();
vinya->pos.z = 0;
structures[vinya->townID][vinya->ID] = vinya;
}
}
//read building priorities
of.open(DATA_DIR "/config/buildings2.txt");
int format, idt;