- Changed the way gamma works for D3DFB: In windowed mode, the display is
drawn to a texture, then that texture is copied to the real back buffer using a gamma-correcting pixel shader. In fullscreen mode, SetGammaRamp is used. - Fixed flashing of vid_fps display when fps > 1000. - Fixed loading of RGB textures for native 2D mode. - Changed the first rotozoomer's data because it just became too obvious when the backdrop is drawn with a full 256 distinct colors available. - Set the player backdrop to update no more frequently than 35 FPS, so opening the player setup menu before starting a game won't produce a very fast moving backdrop. - Changed the player backdrop into a texture so that it can be drawn like anything else. SVN r648 (trunk)
This commit is contained in:
parent
d1655ca2b9
commit
834e4bef32
21 changed files with 676 additions and 246 deletions
|
|
@ -633,52 +633,6 @@ void DCanvas::FillBorder (FTexture *img)
|
|||
}
|
||||
}
|
||||
|
||||
// This was in m_menu.cpp but it's better to be here because
|
||||
// non-software renderers must be able to override it.
|
||||
void DCanvas::DrawPlayerBackdrop (DCanvas *src, const BYTE *FireRemap, int x, int y)
|
||||
{
|
||||
DCanvas *dest = this;
|
||||
BYTE *destline, *srcline;
|
||||
const int destwidth = src->GetWidth() * CleanXfac / 2;
|
||||
const int destheight = src->GetHeight() * CleanYfac / 2;
|
||||
const int desty = y;
|
||||
const int destx = x;
|
||||
const fixed_t fracxstep = FRACUNIT*2 / CleanXfac;
|
||||
const fixed_t fracystep = FRACUNIT*2 / CleanYfac;
|
||||
fixed_t fracx, fracy = 0;
|
||||
|
||||
src->Lock();
|
||||
|
||||
if (fracxstep == FRACUNIT)
|
||||
{
|
||||
for (y = desty; y < desty + destheight; y++, fracy += fracystep)
|
||||
{
|
||||
srcline = src->GetBuffer() + (fracy >> FRACBITS) * src->GetPitch();
|
||||
destline = dest->GetBuffer() + y * dest->GetPitch() + destx;
|
||||
|
||||
for (x = 0; x < destwidth; x++)
|
||||
{
|
||||
destline[x] = FireRemap[srcline[x]];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (y = desty; y < desty + destheight; y++, fracy += fracystep)
|
||||
{
|
||||
srcline = src->GetBuffer() + (fracy >> FRACBITS) * src->GetPitch();
|
||||
destline = dest->GetBuffer() + y * dest->GetPitch() + destx;
|
||||
for (x = fracx = 0; x < destwidth; x++, fracx += fracxstep)
|
||||
{
|
||||
destline[x] = FireRemap[srcline[fracx >> FRACBITS]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
src->Unlock();
|
||||
}
|
||||
|
||||
|
||||
void DCanvas::PUTTRANSDOT (int xx, int yy, int basecolor, int level)
|
||||
{
|
||||
static int oldyy;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue