1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Created town_pictures.json from townPics.txt.

This commit is contained in:
Frank Zago 2011-08-31 00:35:04 +00:00
parent 21f72c61b1
commit 0a58d1f2cf
3 changed files with 22 additions and 21 deletions

View File

@ -201,19 +201,13 @@ void Graphics::loadPaletteAndColors()
playerColors[i].unused = 0;
}
neutralColor->r = 0x84; neutralColor->g = 0x84; neutralColor->b = 0x84; neutralColor->unused = 0x0;//gray
const JsonNode config(DATA_DIR "/config/town_pictures.json");
BOOST_FOREACH(const JsonNode &p, config["town_pictures"].Vector()) {
std::ifstream tpics(DATA_DIR "/config/townPics.txt");
assert(tpics.is_open());
while(!tpics.eof())
{
tpics >> pals;
townBgs.push_back(pals);
tpics >> pals;
guildBgs.push_back(pals);
tpics >> pals;
buildingPics.push_back(pals);
townBgs.push_back(p["town_background"].String());
guildBgs.push_back(p["guild_background"].String());
buildingPics.push_back(p["building_picture"].String());
}
tpics.close();
}
void Graphics::initializeBattleGraphics()

View File

@ -1,10 +0,0 @@
TBCSBACK.bmp TPMAGECS.bmp HALLCSTL.DEF
TBRMBACK.bmp TPMAGERM.bmp HALLRAMP.DEF
TBTWBACK.bmp TPMAGETW.bmp HALLTOWR.DEF
TBINBACK.bmp TPMAGEIN.bmp HALLINFR.DEF
TBNCBACK.bmp TPMAGENC.bmp HALLNECR.DEF
TBDNBACK.bmp TPMAGEDN.bmp HALLDUNG.DEF
TBSTBACK.bmp TPMAGEST.bmp HALLSTRN.DEF
TBFRBACK.bmp TPMAGEFR.bmp HALLFORT.DEF
TBELBACK.bmp TPMAGEEL.bmp HALLELEM.DEF

17
config/town_pictures.json Normal file
View File

@ -0,0 +1,17 @@
{
// Some town pictures, ordered by the town number (0 to 8)
// town_background: background inside the town
// guild_background: background inside the mage guild
// building_picture: picture inside the city hall
"town_pictures": [
{ "town_background": "TBCSBACK.bmp", "guild_background": "TPMAGECS.bmp", "building_picture": "HALLCSTL.DEF" },
{ "town_background": "TBRMBACK.bmp", "guild_background": "TPMAGERM.bmp", "building_picture": "HALLRAMP.DEF" },
{ "town_background": "TBTWBACK.bmp", "guild_background": "TPMAGETW.bmp", "building_picture": "HALLTOWR.DEF" },
{ "town_background": "TBINBACK.bmp", "guild_background": "TPMAGEIN.bmp", "building_picture": "HALLINFR.DEF" },
{ "town_background": "TBNCBACK.bmp", "guild_background": "TPMAGENC.bmp", "building_picture": "HALLNECR.DEF" },
{ "town_background": "TBDNBACK.bmp", "guild_background": "TPMAGEDN.bmp", "building_picture": "HALLDUNG.DEF" },
{ "town_background": "TBSTBACK.bmp", "guild_background": "TPMAGEST.bmp", "building_picture": "HALLSTRN.DEF" },
{ "town_background": "TBFRBACK.bmp", "guild_background": "TPMAGEFR.bmp", "building_picture": "HALLFORT.DEF" },
{ "town_background": "TBELBACK.bmp", "guild_background": "TPMAGEEL.bmp", "building_picture": "HALLELEM.DEF" }
]
}