- cleanup of savegame picture code.

* re-added screen blends for images from the hardware renderer.
* moved all postprocessing of the image out of the renderers.
* cleaned out a large piece of cruft for handling the palette in the frame buffer class. This was all a remnant of the old paletted backend that no longer exists. Nowadays the screen blend is just a postprocessing effect drawn over the 3D screen, there is no need to maintain any of it as global state anymore.
* since the engine doesn't produce paletted screenshots anymore there is no need to have handling for it in the generation code. This depended on otherwise obsolete information so it got removed along with that information.
This commit is contained in:
Christoph Oelckers 2019-03-09 14:48:14 +01:00
commit b7d09c95dd
14 changed files with 62 additions and 120 deletions

View file

@ -612,12 +612,6 @@ void M_ScreenShot (const char *filename)
auto buffer = screen->GetScreenshotBuffer(pitch, color_type, gamma);
if (buffer.Size() > 0)
{
PalEntry palette[256];
if (color_type == SS_PAL)
{
screen->GetFlashedPalette(palette);
}
file = FileWriter::Open(autoname);
if (file == NULL)
{
@ -626,12 +620,12 @@ void M_ScreenShot (const char *filename)
}
if (writepcx)
{
WritePCXfile(file, buffer.Data(), palette, color_type,
WritePCXfile(file, buffer.Data(), nullptr, color_type,
screen->GetWidth(), screen->GetHeight(), pitch);
}
else
{
WritePNGfile(file, buffer.Data(), palette, color_type,
WritePNGfile(file, buffer.Data(), nullptr, color_type,
screen->GetWidth(), screen->GetHeight(), pitch, gamma);
}
delete file;