mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 23:32:04 +00:00
Fix animated textures not updating in swtruecolor mode
This commit is contained in:
parent
5963f29afd
commit
12a50c140c
4 changed files with 35 additions and 0 deletions
|
@ -34,6 +34,7 @@ public:
|
|||
|
||||
const BYTE *GetColumn (unsigned int column, const Span **spans_out);
|
||||
const BYTE *GetPixels ();
|
||||
const uint32_t *GetPixelsBgra() override;
|
||||
bool CheckModified ();
|
||||
|
||||
void SetVial (int level);
|
||||
|
@ -115,6 +116,16 @@ const BYTE *FHealthBar::GetPixels ()
|
|||
return Pixels;
|
||||
}
|
||||
|
||||
const uint32_t *FHealthBar::GetPixelsBgra()
|
||||
{
|
||||
if (NeedRefresh)
|
||||
{
|
||||
MakeTexture();
|
||||
PixelsBgra.clear();
|
||||
}
|
||||
return FTexture::GetPixelsBgra();
|
||||
}
|
||||
|
||||
void FHealthBar::SetVial (int level)
|
||||
{
|
||||
if (level < 0)
|
||||
|
|
|
@ -78,6 +78,7 @@ public:
|
|||
|
||||
const BYTE *GetColumn(unsigned int column, const Span **spans_out);
|
||||
const BYTE *GetPixels();
|
||||
const uint32_t *GetPixelsBgra() override;
|
||||
bool CheckModified();
|
||||
|
||||
protected:
|
||||
|
@ -246,6 +247,16 @@ const BYTE *FBackdropTexture::GetPixels()
|
|||
return Pixels;
|
||||
}
|
||||
|
||||
const uint32_t *FBackdropTexture::GetPixelsBgra()
|
||||
{
|
||||
if (LastRenderTic != gametic)
|
||||
{
|
||||
Render();
|
||||
PixelsBgra.clear();
|
||||
}
|
||||
return FTexture::GetPixelsBgra();
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// This is one plasma and two rotozoomers. I think it turned out quite awesome.
|
||||
|
|
|
@ -484,6 +484,7 @@ public:
|
|||
virtual int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate=0, FCopyInfo *inf = NULL);
|
||||
const BYTE *GetColumn (unsigned int column, const Span **spans_out);
|
||||
const BYTE *GetPixels ();
|
||||
const uint32_t *GetPixelsBgra() override;
|
||||
void Unload ();
|
||||
bool CheckModified ();
|
||||
|
||||
|
|
|
@ -93,6 +93,18 @@ const BYTE *FWarpTexture::GetPixels ()
|
|||
return Pixels;
|
||||
}
|
||||
|
||||
const uint32_t *FWarpTexture::GetPixelsBgra()
|
||||
{
|
||||
DWORD time = r_FrameTime;
|
||||
|
||||
if (Pixels == NULL || time != GenTime)
|
||||
{
|
||||
MakeTexture(time);
|
||||
PixelsBgra.clear();
|
||||
}
|
||||
return FTexture::GetPixelsBgra();
|
||||
}
|
||||
|
||||
const BYTE *FWarpTexture::GetColumn (unsigned int column, const Span **spans_out)
|
||||
{
|
||||
DWORD time = r_FrameTime;
|
||||
|
|
Loading…
Reference in a new issue