mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-21 11:01:39 +00:00
Merge branch 'master' into newrenderer2
This commit is contained in:
commit
9a46fa7ef0
4 changed files with 7 additions and 6 deletions
|
@ -605,13 +605,13 @@ void DStatusBarCore::DrawGraphic(FGameTexture* tex, double x, double y, int flag
|
||||||
//
|
//
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
void DStatusBarCore::DrawRotated(FTextureID texture, double x, double y, double angle, int flags, double Alpha, double scaleX, double scaleY, PalEntry color, int translation, ERenderStyle style)
|
void DStatusBarCore::DrawRotated(FTextureID texture, double x, double y, int flags, double angle, double Alpha, double scaleX, double scaleY, PalEntry color, int translation, ERenderStyle style)
|
||||||
{
|
{
|
||||||
if (!texture.isValid())
|
if (!texture.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FGameTexture* tex = TexMan.GetGameTexture(texture, !(flags & DI_DONTANIMATE));
|
FGameTexture* tex = TexMan.GetGameTexture(texture, !(flags & DI_DONTANIMATE));
|
||||||
DrawRotated(tex, x, y, angle, flags, Alpha, scaleX, scaleY, color, translation, style);
|
DrawRotated(tex, x, y, flags, angle, Alpha, scaleX, scaleY, color, translation, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DStatusBarCore::DrawRotated(FGameTexture* tex, double x, double y, int flags, double angle, double Alpha, double scaleX, double scaleY, PalEntry color, int translation, ERenderStyle style)
|
void DStatusBarCore::DrawRotated(FGameTexture* tex, double x, double y, int flags, double angle, double Alpha, double scaleX, double scaleY, PalEntry color, int translation, ERenderStyle style)
|
||||||
|
|
|
@ -186,7 +186,7 @@ public:
|
||||||
void StatusbarToRealCoords(double& x, double& y, double& w, double& h) const;
|
void StatusbarToRealCoords(double& x, double& y, double& w, double& h) const;
|
||||||
void DrawGraphic(FGameTexture* texture, double x, double y, int flags, double Alpha, double boxwidth, double boxheight, double scaleX, double scaleY, PalEntry color = 0xffffffff, int translation = 0, ERenderStyle style = STYLE_Translucent, double clipwidth = -1.0);
|
void DrawGraphic(FGameTexture* texture, double x, double y, int flags, double Alpha, double boxwidth, double boxheight, double scaleX, double scaleY, PalEntry color = 0xffffffff, int translation = 0, ERenderStyle style = STYLE_Translucent, double clipwidth = -1.0);
|
||||||
void DrawGraphic(FTextureID texture, double x, double y, int flags, double Alpha, double boxwidth, double boxheight, double scaleX, double scaleY, PalEntry color = 0xffffffff, int translation = 0, ERenderStyle style = STYLE_Translucent, double clipwidth = -1.0);
|
void DrawGraphic(FTextureID texture, double x, double y, int flags, double Alpha, double boxwidth, double boxheight, double scaleX, double scaleY, PalEntry color = 0xffffffff, int translation = 0, ERenderStyle style = STYLE_Translucent, double clipwidth = -1.0);
|
||||||
void DrawRotated(FTextureID texture, double x, double y, double angle, int flags, double Alpha, double scaleX, double scaleY, PalEntry color = 0xffffffff, int translation = 0, ERenderStyle style = STYLE_Translucent);
|
void DrawRotated(FTextureID texture, double x, double y, int flags, double angle, double Alpha, double scaleX, double scaleY, PalEntry color = 0xffffffff, int translation = 0, ERenderStyle style = STYLE_Translucent);
|
||||||
void DrawRotated(FGameTexture* tex, double x, double y, int flags, double angle, double Alpha, double scaleX, double scaleY, PalEntry color = 0xffffffff, int translation = 0, ERenderStyle style = STYLE_Translucent);
|
void DrawRotated(FGameTexture* tex, double x, double y, int flags, double angle, double Alpha, double scaleX, double scaleY, PalEntry color = 0xffffffff, int translation = 0, ERenderStyle style = STYLE_Translucent);
|
||||||
void DrawString(FFont* font, const FString& cstring, double x, double y, int flags, double Alpha, int translation, int spacing, EMonospacing monospacing, int shadowX, int shadowY, double scaleX, double scaleY, int pt);
|
void DrawString(FFont* font, const FString& cstring, double x, double y, int flags, double Alpha, int translation, int spacing, EMonospacing monospacing, int shadowX, int shadowY, double scaleX, double scaleY, int pt);
|
||||||
void TransformRect(double& x, double& y, double& w, double& h, int flags = 0);
|
void TransformRect(double& x, double& y, double& w, double& h, int flags = 0);
|
||||||
|
|
|
@ -48,7 +48,6 @@ void AnimTexture::SetFrameSize(int format, int width, int height)
|
||||||
FTexture::SetSize(width, height);
|
FTexture::SetSize(width, height);
|
||||||
Image.Resize(width * height * (format == Paletted ? 1 : 3));
|
Image.Resize(width * height * (format == Paletted ? 1 : 3));
|
||||||
memset(Image.Data(), 0, Image.Size());
|
memset(Image.Data(), 0, Image.Size());
|
||||||
CleanHardwareTextures();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimTexture::SetFrame(const uint8_t* palette, const void* data_)
|
void AnimTexture::SetFrame(const uint8_t* palette, const void* data_)
|
||||||
|
@ -81,7 +80,6 @@ void AnimTexture::SetFrame(const uint8_t* palette, const void* data_)
|
||||||
}
|
}
|
||||||
else memcpy(Image.Data(), data_, Width * Height * (pixelformat == Paletted ? 1 : 3));
|
else memcpy(Image.Data(), data_, Width * Height * (pixelformat == Paletted ? 1 : 3));
|
||||||
}
|
}
|
||||||
CleanHardwareTextures();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
@ -156,10 +154,13 @@ void AnimTextures::SetSize(int format, int width, int height)
|
||||||
static_cast<AnimTexture*>(tex[1]->GetTexture())->SetFrameSize(format, width, height);
|
static_cast<AnimTexture*>(tex[1]->GetTexture())->SetFrameSize(format, width, height);
|
||||||
tex[0]->SetSize(width, height);
|
tex[0]->SetSize(width, height);
|
||||||
tex[1]->SetSize(width, height);
|
tex[1]->SetSize(width, height);
|
||||||
|
tex[0]->CleanHardwareData();
|
||||||
|
tex[1]->CleanHardwareData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimTextures::SetFrame(const uint8_t* palette, const void* data)
|
void AnimTextures::SetFrame(const uint8_t* palette, const void* data)
|
||||||
{
|
{
|
||||||
active ^= 1;
|
active ^= 1;
|
||||||
static_cast<AnimTexture*>(tex[active]->GetTexture())->SetFrame(palette, data);
|
static_cast<AnimTexture*>(tex[active]->GetTexture())->SetFrame(palette, data);
|
||||||
|
tex[active]->CleanHardwareData();
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,7 +257,7 @@ void BuildTiles::InvalidateTile(int num)
|
||||||
if ((unsigned) num < MAXTILES)
|
if ((unsigned) num < MAXTILES)
|
||||||
{
|
{
|
||||||
auto tex = tiledata[num].texture;
|
auto tex = tiledata[num].texture;
|
||||||
tex->GetTexture()->SystemTextures.Clean();
|
tex->CleanHardwareData();
|
||||||
tiledata[num].rawCache.data.Clear();
|
tiledata[num].rawCache.data.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue