mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-02 00:10:22 +02:00
tarnum icon
This commit is contained in:
parent
23652a8ba1
commit
0280254810
@ -787,6 +787,8 @@ bool SelectionTab::isMapSupported(const CMapInfo & info)
|
||||
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE)["supported"].Bool();
|
||||
case EMapFormat::SOD:
|
||||
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH)["supported"].Bool();
|
||||
case EMapFormat::CHR:
|
||||
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_CHRONICLES)["supported"].Bool();
|
||||
case EMapFormat::WOG:
|
||||
return CGI->settings()->getValue(EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS)["supported"].Bool();
|
||||
case EMapFormat::HOTA:
|
||||
|
@ -271,6 +271,19 @@
|
||||
"portraitYoungYog" : 162
|
||||
}
|
||||
},
|
||||
"chronicles" : {
|
||||
"supported" : true,
|
||||
"iconIndex" : 2,
|
||||
|
||||
"portraits" : {
|
||||
"portraitTarnumBarbarian" : 137,
|
||||
"portraitTarnumKnight" : 138,
|
||||
"portraitTarnumWizard" : 139,
|
||||
"portraitTarnumRanger" : 140,
|
||||
"portraitTarnumOverlord" : 141,
|
||||
"portraitTarnumBeastmaster" : 142
|
||||
}
|
||||
},
|
||||
"jsonVCMI" : {
|
||||
"supported" : true,
|
||||
"iconIndex" : 3
|
||||
|
@ -202,5 +202,71 @@
|
||||
],
|
||||
"skills" : [],
|
||||
"specialty" : {}
|
||||
},
|
||||
"portraitTarnumBarbarian" :
|
||||
{
|
||||
"class" : "barbarian",
|
||||
"special" : false,
|
||||
"images": {
|
||||
"large" : "Hc_HPL137",
|
||||
"small" : "Hc_HPS137",
|
||||
"specialtySmall" : "default",
|
||||
"specialtyLarge" : "default"
|
||||
}
|
||||
},
|
||||
"portraitTarnumKnight" :
|
||||
{
|
||||
"class" : "knight",
|
||||
"special" : false,
|
||||
"images": {
|
||||
"large" : "Hc_HPL138",
|
||||
"small" : "Hc_HPS138",
|
||||
"specialtySmall" : "default",
|
||||
"specialtyLarge" : "default"
|
||||
}
|
||||
},
|
||||
"portraitTarnumWizard" :
|
||||
{
|
||||
"class" : "wizard",
|
||||
"special" : false,
|
||||
"images": {
|
||||
"large" : "Hc_HPL139",
|
||||
"small" : "Hc_HPS139",
|
||||
"specialtySmall" : "default",
|
||||
"specialtyLarge" : "default"
|
||||
}
|
||||
},
|
||||
"portraitTarnumRanger" :
|
||||
{
|
||||
"class" : "ranger",
|
||||
"special" : false,
|
||||
"images": {
|
||||
"large" : "Hc_HPL140",
|
||||
"small" : "Hc_HPS140",
|
||||
"specialtySmall" : "default",
|
||||
"specialtyLarge" : "default"
|
||||
}
|
||||
},
|
||||
"portraitTarnumOverlord" :
|
||||
{
|
||||
"class" : "overlord",
|
||||
"special" : false,
|
||||
"images": {
|
||||
"large" : "Hc_HPL141",
|
||||
"small" : "Hc_HPS141",
|
||||
"specialtySmall" : "default",
|
||||
"specialtyLarge" : "default"
|
||||
}
|
||||
},
|
||||
"portraitTarnumBeastmaster" :
|
||||
{
|
||||
"class" : "beastmaster",
|
||||
"special" : false,
|
||||
"images": {
|
||||
"large" : "Hc_HPL142",
|
||||
"small" : "Hc_HPS142",
|
||||
"specialtySmall" : "default",
|
||||
"specialtyLarge" : "default"
|
||||
}
|
||||
}
|
||||
}
|
@ -208,8 +208,12 @@ void ChroniclesExtractor::extractFiles(int no)
|
||||
auto rename = [no](QDir dest){
|
||||
dest.refresh();
|
||||
for(auto & entry : dest.entryList())
|
||||
{
|
||||
if(entry.startsWith("HPS"))
|
||||
dest.rename(entry, "Hc_" + entry);
|
||||
if(!entry.startsWith("Hc" + QString::number(no) + "_"))
|
||||
dest.rename(entry, "Hc" + QString::number(no) + "_" + entry);
|
||||
}
|
||||
};
|
||||
|
||||
extract(tmpDir, outDirData, "xBitmap.lod");
|
||||
@ -229,7 +233,7 @@ void ChroniclesExtractor::extractFiles(int no)
|
||||
|
||||
tmpDir.cdUp();
|
||||
QDir tmpDirData = tmpDir.filePath(tmpDir.entryList({"data"}, QDir::Filter::Dirs).front());
|
||||
extract(tmpDirData, outDirData, "bitmap.lod", std::vector<std::string>{"HPL003sh", "HPL102br", "HPL139", "HPS006kn", "HPS137", "HPS141", "HPL004sh", "hpl112bs", "HPL140", "hps007sh", "HPS138", "HPS142", "HPL006kn", "HPL137", "HPS003sh", "HPS102br", "HPS139", "HPS143", "hpl007sh", "HPL138", "HPS004sh", "hps112bs", "HPS140"});
|
||||
extract(tmpDirData, outDirData, "bitmap.lod", std::vector<std::string>{"HPS137", "HPS138", "HPL139", "HPS140", "HPS141", "HPS142", "HPL137", "HPL138", "HPL139", "HPL140", "HPL141", "HPL142"});
|
||||
extract(tmpDirData, outDirData, "lbitmap.lod", std::vector<std::string>{"INTRORIM"});
|
||||
|
||||
rename(outDirData);
|
||||
|
@ -845,7 +845,7 @@ void CModListView::installFiles(QStringList files)
|
||||
|
||||
auto futureExtract = std::async(std::launch::async, [this, exe, &prog]()
|
||||
{
|
||||
ChroniclesExtractor ce(this, [this, &prog](float progress) { prog = progress; });
|
||||
ChroniclesExtractor ce(this, [&prog](float progress) { prog = progress; });
|
||||
ce.installChronicles(exe);
|
||||
return true;
|
||||
});
|
||||
|
@ -79,6 +79,7 @@ void GameSettings::load(const JsonNode & input)
|
||||
{EGameSettings::MAP_FORMAT_RESTORATION_OF_ERATHIA, "mapFormat", "restorationOfErathia" },
|
||||
{EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE, "mapFormat", "armageddonsBlade" },
|
||||
{EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH, "mapFormat", "shadowOfDeath" },
|
||||
{EGameSettings::MAP_FORMAT_CHRONICLES, "mapFormat", "chronicles" },
|
||||
{EGameSettings::MAP_FORMAT_HORN_OF_THE_ABYSS, "mapFormat", "hornOfTheAbyss" },
|
||||
{EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS, "mapFormat", "inTheWakeOfGods" },
|
||||
{EGameSettings::MAP_FORMAT_JSON_VCMI, "mapFormat", "jsonVCMI" },
|
||||
|
@ -58,6 +58,7 @@ enum class EGameSettings
|
||||
MAP_FORMAT_RESTORATION_OF_ERATHIA,
|
||||
MAP_FORMAT_ARMAGEDDONS_BLADE,
|
||||
MAP_FORMAT_SHADOW_OF_DEATH,
|
||||
MAP_FORMAT_CHRONICLES,
|
||||
MAP_FORMAT_HORN_OF_THE_ABYSS,
|
||||
MAP_FORMAT_JSON_VCMI,
|
||||
MAP_FORMAT_IN_THE_WAKE_OF_GODS,
|
||||
|
@ -172,6 +172,8 @@ int CMapInfo::getMapSizeFormatIconId() const
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE)["iconIndex"].Integer();
|
||||
case EMapFormat::SOD:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH)["iconIndex"].Integer();
|
||||
case EMapFormat::CHR:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_CHRONICLES)["iconIndex"].Integer();
|
||||
case EMapFormat::WOG:
|
||||
return VLC->settings()->getValue(EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS)["iconIndex"].Integer();
|
||||
case EMapFormat::HOTA:
|
||||
|
@ -112,6 +112,9 @@ MapFormatFeaturesH3M MapFormatFeaturesH3M::getFeaturesSOD()
|
||||
MapFormatFeaturesH3M MapFormatFeaturesH3M::getFeaturesCHR()
|
||||
{
|
||||
MapFormatFeaturesH3M result = getFeaturesSOD();
|
||||
result.levelCHR = true;
|
||||
|
||||
result.heroesPortraitsCount = 169; // +6x tarnum
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ public:
|
||||
bool levelROE = false;
|
||||
bool levelAB = false;
|
||||
bool levelSOD = false;
|
||||
bool levelCHR = false;
|
||||
bool levelWOG = false;
|
||||
bool levelHOTA0 = false;
|
||||
bool levelHOTA1 = false;
|
||||
|
@ -135,6 +135,8 @@ static MapIdentifiersH3M generateMapping(EMapFormat format)
|
||||
identifierMapper.loadMapping(VLC->settings()->getValue(EGameSettings::MAP_FORMAT_ARMAGEDDONS_BLADE));
|
||||
if(features.levelSOD)
|
||||
identifierMapper.loadMapping(VLC->settings()->getValue(EGameSettings::MAP_FORMAT_SHADOW_OF_DEATH));
|
||||
if(features.levelCHR)
|
||||
identifierMapper.loadMapping(VLC->settings()->getValue(EGameSettings::MAP_FORMAT_CHRONICLES));
|
||||
if(features.levelWOG)
|
||||
identifierMapper.loadMapping(VLC->settings()->getValue(EGameSettings::MAP_FORMAT_IN_THE_WAKE_OF_GODS));
|
||||
if(features.levelHOTA0)
|
||||
|
Loading…
Reference in New Issue
Block a user