- added a FileWriter class (taken from another project of mine) and changed m_png.cpp to use it.

This is so that PNGs can be written to memory, not just to an external file. stdio's FILE cannot be easily redirected but a C++ class can.
The writer is very simple and primitive right now, allowing no seeking, but for the job at hand it is sufficient.

Note that large parts of savegame creation have been disabled, because they are about to be rewritten and it makes no sense to adjust them all before.
This commit is contained in:
Christoph Oelckers 2016-09-21 09:01:12 +02:00
commit 67239cd623
9 changed files with 167 additions and 54 deletions

View file

@ -179,7 +179,7 @@ void FSoftwareRenderer::RemapVoxels()
//
//===========================================================================
void FSoftwareRenderer::WriteSavePic (player_t *player, FILE *file, int width, int height)
void FSoftwareRenderer::WriteSavePic (player_t *player, FileWriter *file, int width, int height)
{
DCanvas *pic = new DSimpleCanvas (width, height);
PalEntry palette[256];