mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
resolved palette house color issue .
This commit is contained in:
parent
79856fabd8
commit
bdb9c28fe0
6 changed files with 36 additions and 20 deletions
|
@ -1959,14 +1959,19 @@ void CLoading::LoadVehicleOrAircraft(const CString& ID)
|
|||
|
||||
}
|
||||
|
||||
void CLoading::SetImageData(unsigned char* pBuffer, const CString& NameInDict, int FullWidth, int FullHeight, Palette* pPal)
|
||||
void CLoading::SetImageData(unsigned char* pBuffer, const CString& NameInDict, int FullWidth, int FullHeight, Palette* pPal, bool forceNoRemap)
|
||||
{
|
||||
ASSERT(!NameInDict.IsEmpty());
|
||||
auto& data = pics[NameInDict];
|
||||
SetImageData(pBuffer, data, FullWidth, FullHeight, pPal);
|
||||
|
||||
if (NameInDict.Find("CNST") >= 0) {
|
||||
printf("");
|
||||
}
|
||||
|
||||
SetImageData(pBuffer, data, FullWidth, FullHeight, pPal, forceNoRemap);
|
||||
}
|
||||
|
||||
void CLoading::SetImageData(unsigned char* pBuffer, PICDATA& pData, const int FullWidth, const int FullHeight, Palette* pPal)
|
||||
void CLoading::SetImageData(unsigned char* pBuffer, PICDATA& pData, const int FullWidth, const int FullHeight, Palette* pPal, bool forceNoRemap)
|
||||
{
|
||||
if (pData.pic) {
|
||||
delete[](pData.pic);
|
||||
|
@ -2019,7 +2024,13 @@ void CLoading::SetImageData(unsigned char* pBuffer, PICDATA& pData, const int Fu
|
|||
//auto limited_to_theater = artSection.GetBool("TerrainPalette") ? shp->mixfile_theater : TheaterChar::None;
|
||||
auto limited_to_theater = TheaterChar::None;
|
||||
pData.bTerrain = limited_to_theater;
|
||||
pData.pal = pPal ? reinterpret_cast<const int*>(pPal->GetData()) : iPalUnit;
|
||||
if (pPal) {
|
||||
pData.pal = reinterpret_cast<const int*>(pPal->GetData());
|
||||
pData.bHouseColor = pPal->IsRemappable() && !forceNoRemap;
|
||||
return;
|
||||
}
|
||||
pData.pal = iPalUnit;
|
||||
pData.bHouseColor = true;
|
||||
}
|
||||
|
||||
void CLoading::LoadBuildingSubGraphic(const CString& subkey, const CIniFileSection& artSection, BOOL bAlwaysSetChar, char theat, HMIXFILE hShpMix, SHPHEADER& shp_h, BYTE*& shp)
|
||||
|
@ -3461,7 +3472,7 @@ void CLoading::LoadOverlayGraphic(const CString& lpOvrlName_, int iOvrlNum)
|
|||
char ic[50];
|
||||
itoa(i, ic, 10);
|
||||
|
||||
pics[(CString)"OVRL" + OvrlID + "_" + ic].bTried = TRUE;
|
||||
pics[(CString)"OVRL" + OvrlID + "_" + ic].bTried = true;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue