- completely clear all texture data when setting a frame size.

SMK tries to draw a texture from it before the first frame has been rendered. This ensures that it gets a fully black frame.
Fixes #167.
This commit is contained in:
Christoph Oelckers 2020-08-12 01:32:05 +02:00
parent 05fbfa3f25
commit 2d545767ef
2 changed files with 2 additions and 0 deletions

View file

@ -47,6 +47,7 @@ void AnimTexture::SetFrameSize(int format, int width, int height)
FTexture::SetSize(width, height);
Image.Resize(width * height * (format == Paletted ? 1 : 3));
memset(Image.Data(), 0, Image.Size());
CleanHardwareTextures();
pixelformat = format;
}

View file

@ -315,6 +315,7 @@ public:
{
Smacker_Close(hSMK);
soundEngine->StopAllChannels();
animtex.Clean();
}
};