- Added rotation 90° angles only) and mirroring to the Multipatch texture

composition code.
- Fixed: The game crashed when a level was ended while a player was morphed
  by a powerup. 

SVN r912 (trunk)
This commit is contained in:
Christoph Oelckers 2008-04-14 18:51:05 +00:00
commit adc9f090ef
14 changed files with 218 additions and 121 deletions

View file

@ -418,7 +418,7 @@ void FPCXTexture::MakeTexture()
//
//===========================================================================
int FPCXTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y)
int FPCXTexture::CopyTrueColorPixels(BYTE *buffer, int buf_pitch, int buf_height, int x, int y, int rotate)
{
PalEntry pe[256];
PCXHeader header;
@ -472,14 +472,14 @@ 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, pe);
screen->CopyPixelData(buffer, buf_pitch, buf_height, 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, CF_RGB);
screen->CopyPixelDataRGB(buffer, buf_pitch, buf_height, x, y, Pixels, Width, Height, 3, Width*3, rotate, CF_RGB);
}
delete [] Pixels;
return 0;