- Fixed: Coordinate handling for multipatch texture compositing was not correct
for true color. Instead of using a clipping rectangle on the destination it tried to alter the source offsets which produced incorrect results for mirrored or rotated patches. SVN r1889 (trunk)
This commit is contained in:
parent
ed8f1ec8db
commit
7e4504f9d6
13 changed files with 158 additions and 102 deletions
|
|
@ -91,7 +91,7 @@ public:
|
|||
void Unload ();
|
||||
FTextureFormat GetFormat ();
|
||||
|
||||
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, int h, int rotate, FCopyInfo *inf = NULL);
|
||||
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate, FCopyInfo *inf = NULL);
|
||||
bool UseBasePalette();
|
||||
|
||||
protected:
|
||||
|
|
@ -543,7 +543,7 @@ void FPCXTexture::MakeTexture()
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
int FPCXTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, int h, int rotate, FCopyInfo *inf)
|
||||
int FPCXTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate, FCopyInfo *inf)
|
||||
{
|
||||
PalEntry pe[256];
|
||||
PCXHeader header;
|
||||
|
|
@ -556,9 +556,6 @@ int FPCXTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, int h, i
|
|||
|
||||
bitcount = header.bitsPerPixel * header.numColorPlanes;
|
||||
|
||||
if (w < 0 || w > Width) w = Width;
|
||||
if (h < 0 || h > Height) h = Height;
|
||||
|
||||
if (bitcount < 24)
|
||||
{
|
||||
Pixels = new BYTE[Width*Height];
|
||||
|
|
@ -600,13 +597,13 @@ int FPCXTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int w, int h, i
|
|||
lump.Seek(sizeof(header), SEEK_SET);
|
||||
ReadPCX8bits (Pixels, lump, &header);
|
||||
}
|
||||
bmp->CopyPixelData(x, y, Pixels, w, h, 1, Width, rotate, pe, inf);
|
||||
bmp->CopyPixelData(x, y, Pixels, Width, Height, 1, Width, rotate, pe, inf);
|
||||
}
|
||||
else
|
||||
{
|
||||
Pixels = new BYTE[Width*Height * 3];
|
||||
ReadPCX24bits (Pixels, lump, &header, 3);
|
||||
bmp->CopyPixelDataRGB(x, y, Pixels, w, h, 3, Width*3, rotate, CF_RGB, inf);
|
||||
bmp->CopyPixelDataRGB(x, y, Pixels, Width, Height, 3, Width*3, rotate, CF_RGB, inf);
|
||||
}
|
||||
delete [] Pixels;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue