mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
fixed some image loading logic error .
This commit is contained in:
parent
7d9d27c3a3
commit
eada71ea2a
2 changed files with 50 additions and 20 deletions
|
@ -1509,12 +1509,13 @@ void CLoading::LoadBuilding(const CString& ID)
|
|||
CString ImageID = GetBuildingFileID(ID);
|
||||
|
||||
auto const& rules = IniMegaFile::GetRules();
|
||||
auto const& ppPowerUpBld = rules.GetString(ID, "PowersUpBuilding");
|
||||
auto const& powerUpBldId = rules.GetString(ID, "PowersUpBuilding");
|
||||
// Early load
|
||||
if (!ppPowerUpBld.IsEmpty()) {
|
||||
CString SrcBldName = GetBuildingFileID(*ppPowerUpBld) + "0";
|
||||
if (!IsImageLoaded(SrcBldName))
|
||||
LoadBuilding(*ppPowerUpBld);
|
||||
if (!powerUpBldId.IsEmpty()) {
|
||||
CString SrcBldName = GetBuildingFileID(powerUpBldId) + "0";
|
||||
if (!IsImageLoaded(SrcBldName)) {
|
||||
LoadBuilding(powerUpBldId);
|
||||
}
|
||||
}
|
||||
|
||||
auto loadAnimFrame = [this, &ArtID, &ID](const CString& key, const CString& controlKey) {
|
||||
|
@ -1960,6 +1961,7 @@ void CLoading::LoadVehicleOrAircraft(const CString& ID)
|
|||
|
||||
void CLoading::SetImageData(unsigned char* pBuffer, const CString& NameInDict, int FullWidth, int FullHeight, Palette* pPal)
|
||||
{
|
||||
ASSERT(!NameInDict.IsEmpty());
|
||||
auto& data = pics[NameInDict];
|
||||
SetImageData(pBuffer, data, FullWidth, FullHeight, pPal);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue