- Fixed: FTexture::~FTexture() must destroy the associated native texture
if present. - Modified GZDoom's true color texture copy functions and added them to generate 32 bit D3D textures. Paletted TGAs and PCXs are also handled this way but I don't think these 2 formats are worth some more special handling. (Question: Is it worth it to implement special handling for paletted PNGs so that they are used as 8 bit textures internally?) SVN r608 (trunk)
This commit is contained in:
parent
457976d88d
commit
28db2d9f15
12 changed files with 773 additions and 21 deletions
|
|
@ -371,6 +371,40 @@ void FMultiPatchTexture::CheckForHacks ()
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// FMultipatchTexture::CopyTrueColorPixels
|
||||
//
|
||||
// Preserves the palettes of each individual patch
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
int FMultiPatchTexture::CopyTrueColorPixels(BYTE * buffer, int buf_width, int buf_height, int x, int y)
|
||||
{
|
||||
int retv = -1;
|
||||
|
||||
for(int i=0;i<NumParts;i++)
|
||||
{
|
||||
int ret = Parts[i].Texture->CopyTrueColorPixels(buffer, buf_width, buf_height,
|
||||
x+Parts[i].OriginX, y+Parts[i].OriginY);
|
||||
|
||||
if (ret > retv) retv = ret;
|
||||
}
|
||||
return retv;
|
||||
}
|
||||
|
||||
FTextureFormat FMultiPatchTexture::GetFormat()
|
||||
{
|
||||
if (NumParts == 1) return Parts[0].Texture->GetFormat();
|
||||
|
||||
for(int i=0;i<NumParts;i++)
|
||||
{
|
||||
if (!Parts[i].Texture->UseBasePalette()) return TEX_RGB;
|
||||
}
|
||||
return TEX_Pal;
|
||||
}
|
||||
|
||||
|
||||
void FTextureManager::AddTexturesLump (const void *lumpdata, int lumpsize, int patcheslump, int firstdup, bool texture1)
|
||||
{
|
||||
FPatchLookup *patchlookup;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue