- changed multipatch texture composition to always composite off full source images and not do it recursively.
Previously it tried to copy all patches of composite sub-images directly onto the main image. This caused massive complications throughout the entire true color texture code and made any attempt of caching the source data for composition next to impossible because the entire composition process operated on the raw data read from the texture and not some cacheable image. While this may cause more pixel data to be processed, this will be easily offset by being able to reuse patches for multiple textures, once a caching system is in place, which even for the IWADs happens quite frequently. Removing the now unneeded arguments from the implementation also makes things a lot easier to handle.
This commit is contained in:
parent
1e070d27bd
commit
03626107eb
24 changed files with 161 additions and 192 deletions
|
|
@ -63,7 +63,7 @@ class FPatchTexture : public FWorldTexture
|
|||
public:
|
||||
FPatchTexture (int lumpnum, patch_t *header, bool isalphatex);
|
||||
TArray<uint8_t> Get8BitPixels(bool alphatex) override;
|
||||
int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate, FCopyInfo *inf) override;
|
||||
int CopyPixels(FBitmap *bmp) override;
|
||||
void DetectBadPatches();
|
||||
|
||||
bool UseBasePalette() override { return !isalpha; }
|
||||
|
|
@ -264,10 +264,10 @@ TArray<uint8_t> FPatchTexture::Get8BitPixels(bool alphatex)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
int FPatchTexture::CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate, FCopyInfo *inf)
|
||||
int FPatchTexture::CopyPixels(FBitmap *bmp)
|
||||
{
|
||||
if (!isalpha) return FTexture::CopyTrueColorPixels(bmp, x, y, rotate, inf);
|
||||
else return CopyTrueColorTranslated(bmp, x, y, rotate, translationtables[TRANSLATION_Standard][STD_Grayscale]->Palette, inf);
|
||||
if (!isalpha) return FTexture::CopyPixels(bmp);
|
||||
else return CopyTranslatedPixels(bmp, translationtables[TRANSLATION_Standard][STD_Grayscale]->Palette);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue