- 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:
Randy Heit 2007-12-27 04:30:12 +00:00
commit 834e4bef32
21 changed files with 676 additions and 246 deletions

View file

@ -384,7 +384,7 @@ void FTGATexture::MakeTexture ()
//
//===========================================================================
int FTGATexture::CopyTrueColorPixels(BYTE * buffer, int buf_width, int buf_height, int x, int y)
int FTGATexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y)
{
PalEntry pe[256];
FWadLump lump = Wads.OpenLumpNum (SourceLump);
@ -469,7 +469,7 @@ int FTGATexture::CopyTrueColorPixels(BYTE * buffer, int buf_width, int buf_heigh
switch (hdr.img_type & 7)
{
case 1: // paletted
screen->CopyPixelData(buffer, buf_width, buf_height, x, y, ptr, Width, Height, step_x, Pitch, pe);
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, pe);
break;
case 2: // RGB
@ -477,21 +477,21 @@ int FTGATexture::CopyTrueColorPixels(BYTE * buffer, int buf_width, int buf_heigh
{
case 15:
case 16:
screen->CopyPixelDataRGB(buffer, buf_width, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_RGB555);
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_RGB555);
break;
case 24:
screen->CopyPixelDataRGB(buffer, buf_width, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_BGR);
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_BGR);
break;
case 32:
if ((hdr.img_desc&15)!=8) // 32 bits without a valid alpha channel
{
screen->CopyPixelDataRGB(buffer, buf_width, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_BGR);
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_BGR);
}
else
{
screen->CopyPixelDataRGB(buffer, buf_width, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_BGRA);
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_BGRA);
transval = -1;
}
break;
@ -506,11 +506,11 @@ int FTGATexture::CopyTrueColorPixels(BYTE * buffer, int buf_width, int buf_heigh
{
case 8:
for(int i=0;i<256;i++) pe[i]=PalEntry(0,i,i,i); // gray map
screen->CopyPixelData(buffer, buf_width, buf_height, x, y, ptr, Width, Height, step_x, Pitch, pe);
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, pe);
break;
case 16:
screen->CopyPixelDataRGB(buffer, buf_width, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_I16);
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, ptr, Width, Height, step_x, Pitch, CF_I16);
break;
default: