mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Implemented mod-friendly loading of town building icons for campaigns
This commit is contained in:
@@ -118,7 +118,6 @@ Graphics::Graphics()
|
||||
{
|
||||
loadPaletteAndColors();
|
||||
initializeBattleGraphics();
|
||||
loadErmuToPicture();
|
||||
|
||||
//(!) do not load any CAnimation here
|
||||
}
|
||||
@@ -153,21 +152,3 @@ void Graphics::setPlayerFlagColor(SDL_Palette * targetPalette, PlayerColor playe
|
||||
SDL_SetPaletteColors(targetPalette, &color, 5, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::loadErmuToPicture()
|
||||
{
|
||||
//loading ERMU to picture
|
||||
const JsonNode config(JsonPath::builtin("config/ERMU_to_picture.json"));
|
||||
int etp_idx = 0;
|
||||
for(const JsonNode &etp : config["ERMU_to_picture"].Vector()) {
|
||||
int idx = 0;
|
||||
for(const JsonNode &n : etp.Vector()) {
|
||||
ERMUtoPicture[idx][etp_idx] = n.String();
|
||||
idx ++;
|
||||
}
|
||||
assert (idx == std::size(ERMUtoPicture));
|
||||
|
||||
etp_idx ++;
|
||||
}
|
||||
assert (etp_idx == 44);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user