- removed support for loading Build palettes as the main game palette.

This was implemented in a way that made it entirely impossible to load Build resources and make them usable for modding.
ZDoom had Build texture support for many years but the limitations the palette handling imposed made it impossible to use them.
It wasn't usable for anything more than to load Build maps and have them display properly - a feature that had to be removed because it was irreparably broken already.

With the forced palette override out of the way it should now be possible to implement loading of Build ART files as actually usable resources.
This commit is contained in:
Christoph Oelckers 2018-03-18 11:57:41 +01:00
parent 341a9bcf91
commit 102d2647d3
1 changed files with 5 additions and 21 deletions

View File

@ -377,32 +377,16 @@ void InitPalette ()
bool usingBuild = false;
int lump;
if ((lump = Wads.CheckNumForFullName ("palette.dat")) >= 0 && Wads.LumpLength (lump) >= 768)
{
usingBuild = FixBuildPalette (pal, lump, false);
}
else if ((lump = Wads.CheckNumForFullName ("blood.pal")) >= 0 && Wads.LumpLength (lump) >= 768)
{
usingBuild = FixBuildPalette (pal, lump, true);
}
if (!usingBuild)
{
ReadPalette(Wads.CheckNumForName("PLAYPAL"), pal);
}
ReadPalette(Wads.CheckNumForName("PLAYPAL"), pal);
GPalette.SetPalette (pal);
GPalette.MakeGoodRemap ();
ColorMatcher.SetPalette ((uint32_t *)GPalette.BaseColors);
// The BUILD engine already has a transparent color, so it doesn't need any remapping.
if (!usingBuild)
{
if (GPalette.Remap[0] == 0)
{ // No duplicates, so settle for something close to color 0
GPalette.Remap[0] = BestColor ((uint32_t *)GPalette.BaseColors,
GPalette.BaseColors[0].r, GPalette.BaseColors[0].g, GPalette.BaseColors[0].b, 1, 255);
}
if (GPalette.Remap[0] == 0)
{ // No duplicates, so settle for something close to color 0
GPalette.Remap[0] = BestColor ((uint32_t *)GPalette.BaseColors,
GPalette.BaseColors[0].r, GPalette.BaseColors[0].g, GPalette.BaseColors[0].b, 1, 255);
}
// Colormaps have to be initialized before actors are loaded,