- Moved the code that renders the view from D_Display into a virtual function

of the frame buffer so I can get rid of the last remaining renderer check
  outside the display code in GZDoom.
- made V_SetResolution a virtual function in IVideo. It's probably not a perfect
  solution but at least it allows overriding it (which I need in GZDoom.)
  Note: There's a lot of redundancy between hardware.cpp/h in the SDL and Win32
  folders so some cleaning up might be a good idea.


SVN r692 (trunk)
This commit is contained in:
Christoph Oelckers 2008-01-11 21:04:22 +00:00
commit e06c645310
6 changed files with 36 additions and 9 deletions

View file

@ -1008,6 +1008,21 @@ void DFrameBuffer::CopyPixelData(BYTE * buffer, int texpitch, int texheight, int
}
}
//===========================================================================
//
// Render the view
//
//===========================================================================
void DFrameBuffer::RenderView(player_t *player)
{
R_RenderActorView (player->mo);
R_DetailDouble (); // [RH] Apply detail mode expansion
// [RH] Let cameras draw onto textures that were visible this frame.
FCanvasTextureInfo::UpdateAll ();
}
FNativePalette::~FNativePalette()
{
}
@ -1106,7 +1121,7 @@ bool V_DoModeSetup (int width, int height, int bits)
return true;
}
bool V_SetResolution (int width, int height, int bits)
bool IVideo::SetResolution (int width, int height, int bits)
{
int oldwidth, oldheight;
int oldbits;
@ -1253,7 +1268,7 @@ void V_Init2()
I_InitGraphics();
I_ClosestResolution (&width, &height, 8);
if (!V_SetResolution (width, height, 8))
if (!Video->SetResolution (width, height, 8))
I_FatalError ("Could not set resolution to %d x %d x %d", width, height, 8);
else
Printf ("Resolution: %d x %d\n", SCREENWIDTH, SCREENHEIGHT);