- some cleanup of the texture code
* removed unneeded includes * moved global brightmap to GPalette * took Build tile init code out of the FTextureManager class, because this code is not compatible with how real Build games need to go about it, making the texture manager not shareable. * removed dependency on higher level info from the Image class.
This commit is contained in:
parent
a13c7bd053
commit
7d192decc7
29 changed files with 261 additions and 315 deletions
|
|
@ -158,6 +158,18 @@ void InitPalette ()
|
|||
|
||||
GPalette.Init(NUM_TRANSLATION_TABLES);
|
||||
GPalette.SetPalette (pal, 0);
|
||||
|
||||
int lump = fileSystem.CheckNumForName("COLORMAP");
|
||||
if (lump == -1) lump = fileSystem.CheckNumForName("COLORMAP", ns_colormaps);
|
||||
if (lump != -1)
|
||||
{
|
||||
FileData cmap = fileSystem.ReadFile(lump);
|
||||
uint8_t palbuffer[768];
|
||||
ReadPalette(fileSystem.GetNumForName("PLAYPAL"), palbuffer);
|
||||
const unsigned char* cmapdata = (const unsigned char*)cmap.GetMem();
|
||||
GPalette.GenerateGlobalBrightmapFromColormap(cmapdata, 32);
|
||||
}
|
||||
|
||||
MakeGoodRemap ((uint32_t*)GPalette.BaseColors, GPalette.Remap);
|
||||
ColorMatcher.SetPalette ((uint32_t *)GPalette.BaseColors);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue