- Moved renderer dependent part of savegame pic creation into DFrameBuffer

as a virtual function so that it can be overridden.


SVN r700 (trunk)
This commit is contained in:
Christoph Oelckers 2008-01-12 12:49:05 +00:00
commit 2e613c3557
4 changed files with 28 additions and 10 deletions

View file

@ -1969,17 +1969,8 @@ static void PutSavePic (FILE *file, int width, int height)
}
else
{
DCanvas *pic = new DSimpleCanvas (width, height);
PalEntry palette[256];
// Take a snapshot of the player's view
pic->Lock ();
P_CheckPlayerSprites();
R_RenderViewToCanvas (players[consoleplayer].mo, pic, 0, 0, width, height);
screen->GetFlashedPalette (palette);
M_CreatePNG (file, pic->GetBuffer(), palette, SS_PAL, width, height, pic->GetPitch());
pic->Unlock ();
delete pic;
screen->WriteSavePic(&players[consoleplayer], file, width, height);
}
}