- Make BuildTexture inherit from worldtexture.

- handle WorldTextures that can change their content automatically.
This commit is contained in:
Christoph Oelckers 2018-03-18 14:18:19 +01:00
commit 47bfbb5e08
2 changed files with 9 additions and 64 deletions

View file

@ -91,7 +91,7 @@ void FWorldTexture::Unload ()
//
//==========================================================================
const uint8_t *FWorldTexture::GetColumn (unsigned int column, const Span **spans_out)
const uint8_t *FWorldTexture::GetColumn(unsigned int column, const Span **spans_out)
{
GetPixels();
if ((unsigned)column >= (unsigned)Width)
@ -124,6 +124,10 @@ const uint8_t *FWorldTexture::GetColumn (unsigned int column, const Span **spans
const uint8_t *FWorldTexture::GetPixels ()
{
if (CheckModified())
{
Unload();
}
if (Pixeldata[0] == nullptr)
{
Pixeldata[0] = MakeTexture (LegacyRenderStyles[STYLE_Normal]);