- let FSkybox inherit from FImageTexture to simplify the redirection of the base image for the software renderer.

This commit is contained in:
Christoph Oelckers 2020-04-13 14:23:57 +02:00
commit e92be97f33
5 changed files with 30 additions and 56 deletions

View file

@ -54,18 +54,23 @@ FImageTexture::FImageTexture(FImageSource *img, const char *name) noexcept
if (img != nullptr)
{
if (name == nullptr) fileSystem.GetFileShortName(Name, img->LumpNum());
Width = img->GetWidth();
Height = img->GetHeight();
auto offsets = img->GetOffsets();
_LeftOffset[1] = _LeftOffset[0] = offsets.first;
_TopOffset[1] = _TopOffset[0] = offsets.second;
bMasked = img->bMasked;
bTranslucent = img->bTranslucent;
SetFromImage();
}
}
void FImageTexture::SetFromImage()
{
auto img = mImage;
Width = img->GetWidth();
Height = img->GetHeight();
auto offsets = img->GetOffsets();
_LeftOffset[1] = _LeftOffset[0] = offsets.first;
_TopOffset[1] = _TopOffset[0] = offsets.second;
bMasked = img->bMasked;
bTranslucent = img->bTranslucent;
}
//===========================================================================
//
//