mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-20 22:33:38 -04:00
made some progress, but SHP image position is not always correct .
This commit is contained in:
parent
5639805b58
commit
c8f7c99c80
12 changed files with 162 additions and 252 deletions
|
@ -52,28 +52,20 @@ inline CString GetUnitPictureFilename(LPCTSTR lpUnitName, DWORD dwPicIndex)
|
|||
{
|
||||
CIniFile& ini = Map->GetIniFile();
|
||||
|
||||
CString UnitName = lpUnitName;
|
||||
auto artname = rules.GetStringOr(lpUnitName, "Image", lpUnitName);
|
||||
artname = ini.GetStringOr(lpUnitName, "Image", artname);
|
||||
|
||||
UnitName = ini.GetString(lpUnitName, "Image");
|
||||
if (UnitName.IsEmpty()) {
|
||||
UnitName = rules.GetString(lpUnitName, "Image");
|
||||
}
|
||||
|
||||
CString artname = UnitName;
|
||||
if (UnitName.IsEmpty()) {
|
||||
artname = lpUnitName;
|
||||
}
|
||||
auto const shapeName = art.GetString(UnitName, "Image");
|
||||
auto const& shapeName = art.GetString(artname, "Image");
|
||||
|
||||
if (!shapeName.IsEmpty()) {
|
||||
if (!g_data.GetBool("IgnoreArtImage", UnitName)) {
|
||||
if (!g_data.GetBool("IgnoreArtImage", artname)) {
|
||||
artname = shapeName;
|
||||
}
|
||||
}
|
||||
|
||||
CString filename = UnitName;
|
||||
CString filename = artname;
|
||||
|
||||
if (art.GetBool(UnitName, "NewTheater") && !art.GetBool(UnitName, "DemandLoad")) {
|
||||
if (art.GetBool(artname, "NewTheater") && !art.GetBool(artname, "DemandLoad")) {
|
||||
filename.SetAt(1, 'T');
|
||||
}
|
||||
|
||||
|
@ -81,7 +73,7 @@ inline CString GetUnitPictureFilename(LPCTSTR lpUnitName, DWORD dwPicIndex)
|
|||
_itoa_s(dwPicIndex, n, 10);
|
||||
|
||||
|
||||
if (pics.find(artname + n) != pics.end()) {
|
||||
if (pics.find((artname + n)) != pics.end()) {
|
||||
filename = artname; // yes, found
|
||||
filename += n;
|
||||
} else if (pics.find(artname + ".bmp") != pics.end()) // since June, 15th (Matze): Only use BMP if no SHP/VXL exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue