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

Merged AC_desc.txt into battles_graphics.json.

This commit is contained in:
Frank Zago 2011-08-31 03:27:18 +00:00
parent 68090a4ec6
commit 71b1eef6b6
3 changed files with 90 additions and 112 deletions

View File

@ -242,32 +242,17 @@ void Graphics::initializeBattleGraphics()
}
//initialization of AC->def name mapping
std::ifstream acd;
acd.open(DATA_DIR "/config/AC_desc.txt", std::ios::binary);
if(!acd.is_open())
{
tlog1<<"lack of config/AC_desc.txt file!"<<std::endl;
}
else
{
std::string buf;
acd>>buf;
int ACid, numberOfDefs;
while(true)
{
std::vector< std::string > toAdd;
acd>>ACid;
if(ACid == -1)
break;
acd>>numberOfDefs;
for(int g=0; g<numberOfDefs; ++g)
{
acd>>buf;
toAdd.push_back(buf);
}
battleACToDef[ACid] = toAdd;
BOOST_FOREACH(const JsonNode &ac, config["ac_mapping"].Vector()) {
int ACid = ac["id"].Float();
std::vector< std::string > toAdd;
BOOST_FOREACH(const JsonNode &defname, ac["defnames"].Vector()) {
toAdd.push_back(defname.String());
}
battleACToDef[ACid] = toAdd;
}
spellEffectsPics = CDefHandler::giveDefEss("SpellInt.def");
}
Graphics::Graphics()

View File

@ -1,87 +0,0 @@
//WoG_Ac_format_to_def_names_mapping
0 1 C10SPW.DEF
1 1 C03SPA0.DEF
2 1 C01SPA0.DEF
3 1 C02SPA0.DEF
4 1 SP12_.DEF
5 1 C02SPE0.DEF
6 1 C02SPF0.DEF
7 1 C04SPA0.DEF
8 1 C04SPE0.DEF
9 1 C04SPF0.DEF
10 1 C05SPE0.DEF
11 1 C05SPF0.DEF
12 1 C06SPF0.DEF
13 1 C07SPA0.DEF
14 1 C07SPA1.DEF
15 1 C0FEAR.DEF
16 1 C08SPE0.DEF
17 1 C08SPF0.DEF
18 1 C09SPA0.DEF
19 1 C09SPE0.DEF
20 1 C09SPW0.DEF
21 1 C10SPA0.DEF
22 1 C11SPE0.DEF
23 1 C11SPF0.DEF
24 1 C11SPW0.DEF
25 1 C12SPA0.DEF
26 1 C13SPA0.DEF
27 1 C13SPE0.DEF
28 1 C13SPW0.DEF
29 1 C04SPE0.DEF
30 1 C14SPE0.DEF
31 1 C15SPA0.DEF
32 3 C15SPE0.DEF C15SPE1.DEF C15SPE2.DEF
33 7 C15SPE3.DEF C15SPE6.DEF C15SPE7.DEF C15SPE8.DEF C15SPE9.DEF C15SPE10.DEF C15SPE11.DEF
34 0
35 2 C01SPF.DEF C01SPF0.DEF
36 2 C01SPW.DEF C01SPW0.DEF
37 0
38 1 C11SPA1.DEF
39 2 C03SPW.DEF C03SPW0.DEF
40 2 C04SPW.DEF C04SPW0.DEF
41 2 C05SPW.DEF C05SPW0.DEF
42 2 C06SPW.DEF C06SPW0.DEF
43 6 C07SPF0.DEF C07SPF1.DEF C07SPF2.DEF C07SPF6.DEF C07SPF7.DEF C07SPF8.DEF
44 6 C07SPF0.DEF C07SPF4.DEF C07SPF5.DEF C07SPF9.DEF C07SPF10.DEF C07SPF11.DEF
45 2 C07SPW.DEF C07SPW0.DEF
46 1 C08SPW5.DEF
47 1 C09SPF0.DEF
48 1 C10SPF0.DEF
49 1 C11SPA1.DEF
50 1 C12SPE0.DEF
51 1 C12SPF0.DEF
52 1 C12SPE0.DEF
53 2 C13SPF.DEF C13SPF0.DEF
54 2 C16SPE.DEF C16SPE0.DEF
55 1 C17SPE0.DEF
56 1 C0ACID.DEF
57 2 C09SPF1.DEF C09SPF2.DEF
58 1 C17SPE2.DEF
59 1 C09SPF0.DEF
60 0
61 0
62 3 C07SPF60.DEF C07SPF61.DEF C07SPF62.DEF
63 0
64 1 C20SPX.DEF
65 0
66 0
67 1 SP11_.DEF
68 1 SP02_.DEF
69 1 SP05_.DEF
70 0
71 1 SP01_.DEF
72 1 SP04_.DEF
73 1 SP03_.DEF
74 1 SP12_.DEF
75 1 SP07_A.DEF
76 1 SP07_B.DEF
77 1 SP08_.DEF
78 1 SP09_.DEF
79 1 C01SPE0.DEF
80 1 C07SPE0.DEF
81 1 C17SPW0.DEF
82 1 C09SPF3.DEF
83 0
84 1 ZMGC02.DEF
-1

View File

@ -26,7 +26,7 @@
"CMBKRGH.BMP",
"CMBKBOAT.BMP",
"CMBKDECK.BMP"
]
],
// Hero animation used in battles.
// Each 2 def represent male and female heroes for each race
@ -49,5 +49,85 @@
"CH015.DEF",
"CH16.DEF",
"CH17.DEF"
],
// WoG_Ac_format_to_def_names_mapping
"ac_mapping": [
{ "id": 0, "defnames": [ "C10SPW.DEF" ] },
{ "id": 1, "defnames": [ "C03SPA0.DEF" ] },
{ "id": 2, "defnames": [ "C01SPA0.DEF" ] },
{ "id": 3, "defnames": [ "C02SPA0.DEF" ] },
{ "id": 4, "defnames": [ "SP12_.DEF" ] },
{ "id": 5, "defnames": [ "C02SPE0.DEF" ] },
{ "id": 6, "defnames": [ "C02SPF0.DEF" ] },
{ "id": 7, "defnames": [ "C04SPA0.DEF" ] },
{ "id": 8, "defnames": [ "C04SPE0.DEF" ] },
{ "id": 9, "defnames": [ "C04SPF0.DEF" ] },
{ "id": 10, "defnames": [ "C05SPE0.DEF" ] },
{ "id": 11, "defnames": [ "C05SPF0.DEF" ] },
{ "id": 12, "defnames": [ "C06SPF0.DEF" ] },
{ "id": 13, "defnames": [ "C07SPA0.DEF" ] },
{ "id": 14, "defnames": [ "C07SPA1.DEF" ] },
{ "id": 15, "defnames": [ "C0FEAR.DEF" ] },
{ "id": 16, "defnames": [ "C08SPE0.DEF" ] },
{ "id": 17, "defnames": [ "C08SPF0.DEF" ] },
{ "id": 18, "defnames": [ "C09SPA0.DEF" ] },
{ "id": 19, "defnames": [ "C09SPE0.DEF" ] },
{ "id": 20, "defnames": [ "C09SPW0.DEF" ] },
{ "id": 21, "defnames": [ "C10SPA0.DEF" ] },
{ "id": 22, "defnames": [ "C11SPE0.DEF" ] },
{ "id": 23, "defnames": [ "C11SPF0.DEF" ] },
{ "id": 24, "defnames": [ "C11SPW0.DEF" ] },
{ "id": 25, "defnames": [ "C12SPA0.DEF" ] },
{ "id": 26, "defnames": [ "C13SPA0.DEF" ] },
{ "id": 27, "defnames": [ "C13SPE0.DEF" ] },
{ "id": 28, "defnames": [ "C13SPW0.DEF" ] },
{ "id": 29, "defnames": [ "C04SPE0.DEF" ] },
{ "id": 30, "defnames": [ "C14SPE0.DEF" ] },
{ "id": 31, "defnames": [ "C15SPA0.DEF" ] },
{ "id": 32, "defnames": [ "C15SPE0.DEF", "C15SPE1.DEF", "C15SPE2.DEF" ] },
{ "id": 33, "defnames": [ "C15SPE3.DEF", "C15SPE6.DEF", "C15SPE7.DEF", "C15SPE8.DEF", "C15SPE9.DEF", "C15SPE10.DEF", "C15SPE11.DEF" ] },
{ "id": 35, "defnames": [ "C01SPF.DEF", "C01SPF0.DEF" ] },
{ "id": 36, "defnames": [ "C01SPW.DEF", "C01SPW0.DEF" ] },
{ "id": 38, "defnames": [ "C11SPA1.DEF" ] },
{ "id": 39, "defnames": [ "C03SPW.DEF", "C03SPW0.DEF" ] },
{ "id": 40, "defnames": [ "C04SPW.DEF", "C04SPW0.DEF" ] },
{ "id": 41, "defnames": [ "C05SPW.DEF", "C05SPW0.DEF" ] },
{ "id": 42, "defnames": [ "C06SPW.DEF", "C06SPW0.DEF" ] },
{ "id": 43, "defnames": [ "C07SPF0.DEF", "C07SPF1.DEF", "C07SPF2.DEF", "C07SPF6.DEF", "C07SPF7.DEF", "C07SPF8.DEF" ] },
{ "id": 44, "defnames": [ "C07SPF0.DEF", "C07SPF4.DEF", "C07SPF5.DEF", "C07SPF9.DEF", "C07SPF10.DEF", "C07SPF11.DEF" ] },
{ "id": 45, "defnames": [ "C07SPW.DEF", "C07SPW0.DEF" ] },
{ "id": 46, "defnames": [ "C08SPW5.DEF" ] },
{ "id": 47, "defnames": [ "C09SPF0.DEF" ] },
{ "id": 48, "defnames": [ "C10SPF0.DEF" ] },
{ "id": 49, "defnames": [ "C11SPA1.DEF" ] },
{ "id": 50, "defnames": [ "C12SPE0.DEF" ] },
{ "id": 51, "defnames": [ "C12SPF0.DEF" ] },
{ "id": 52, "defnames": [ "C12SPE0.DEF" ] },
{ "id": 53, "defnames": [ "C13SPF.DEF", "C13SPF0.DEF" ] },
{ "id": 54, "defnames": [ "C16SPE.DEF", "C16SPE0.DEF" ] },
{ "id": 55, "defnames": [ "C17SPE0.DEF" ] },
{ "id": 56, "defnames": [ "C0ACID.DEF" ] },
{ "id": 57, "defnames": [ "C09SPF1.DEF", "C09SPF2.DEF" ] },
{ "id": 58, "defnames": [ "C17SPE2.DEF" ] },
{ "id": 59, "defnames": [ "C09SPF0.DEF" ] },
{ "id": 62, "defnames": [ "C07SPF60.DEF", "C07SPF61.DEF", "C07SPF62.DEF" ] },
{ "id": 64, "defnames": [ "C20SPX.DEF" ] },
{ "id": 67, "defnames": [ "SP11_.DEF" ] },
{ "id": 68, "defnames": [ "SP02_.DEF" ] },
{ "id": 69, "defnames": [ "SP05_.DEF" ] },
{ "id": 71, "defnames": [ "SP01_.DEF" ] },
{ "id": 72, "defnames": [ "SP04_.DEF" ] },
{ "id": 73, "defnames": [ "SP03_.DEF" ] },
{ "id": 74, "defnames": [ "SP12_.DEF" ] },
{ "id": 75, "defnames": [ "SP07_A.DEF" ] },
{ "id": 76, "defnames": [ "SP07_B.DEF" ] },
{ "id": 77, "defnames": [ "SP08_.DEF" ] },
{ "id": 78, "defnames": [ "SP09_.DEF" ] },
{ "id": 79, "defnames": [ "C01SPE0.DEF" ] },
{ "id": 80, "defnames": [ "C07SPE0.DEF" ] },
{ "id": 81, "defnames": [ "C17SPW0.DEF" ] },
{ "id": 82, "defnames": [ "C09SPF3.DEF" ] },
{ "id": 84, "defnames": [ "ZMGC02.DEF" ] }
]
}