- Changed true color texture creation to use a newly defined Bitmap class

instead of having the copy functions in the frame buffer class.
- Fixed: The WolfSS didn't have its obituary defined.


SVN r915 (trunk)
This commit is contained in:
Christoph Oelckers 2008-04-15 18:05:39 +00:00
commit ce5d4dba02
17 changed files with 648 additions and 505 deletions

View file

@ -39,6 +39,7 @@
#include "r_local.h"
#include "w_wad.h"
#include "templates.h"
#include "bitmap.h"
bool FPCXTexture::Check(FileReader & file)
@ -418,7 +419,7 @@ void FPCXTexture::MakeTexture()
//
//===========================================================================
int FPCXTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
int FPCXTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate)
{
PalEntry pe[256];
PCXHeader header;
@ -472,14 +473,13 @@ int FPCXTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height
lump.Seek(sizeof(header), SEEK_SET);
ReadPCX8bits (Pixels, lump, &header);
}
screen->CopyPixelData(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 1, Width, rotate, pe);
bmp->CopyPixelData(x, y, Pixels, Width, Height, 1, Width, rotate, pe);
}
else
{
Pixels = new BYTE[Width*Height * 3];
BYTE * row = buffer;
ReadPCX24bits (Pixels, lump, &header, 3);
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 3, Width*3, rotate, CF_RGB);
bmp->CopyPixelDataRGB(x, y, Pixels, Width, Height, 3, Width*3, rotate, CF_RGB);
}
delete [] Pixels;
return 0;