- changed all texture access in the play code to use FGameTexture and redid Hexen's front sky layer by adding a new texture instead of hacking the existing one.

This commit is contained in:
Christoph Oelckers 2020-04-14 18:01:51 +02:00
commit b9b6a354c7
20 changed files with 91 additions and 77 deletions

View file

@ -489,7 +489,7 @@ static inline void CheckShortestTex (FLevelLocals *Level, FTextureID texnum, dou
{
if (texnum.isValid() || (texnum.isNull() && (Level->i_compatflags & COMPATF_SHORTTEX)))
{
FTexture *tex = TexMan.GetTexture(texnum);
auto tex = TexMan.GetGameTexture(texnum);
if (tex != NULL)
{
double h = tex->GetDisplayHeight();
@ -1156,10 +1156,10 @@ double GetFriction(const sector_t *self, int plane, double *pMoveFac)
auto c = planes[sector_t::floor].GlowColor;
if (c == 0)
{
FTexture *tex = TexMan.GetTexture(GetTexture(sector_t::floor));
auto tex = TexMan.GetGameTexture(GetTexture(sector_t::floor));
if (tex != NULL && tex->isGlowing())
{
if (!tex->isAutoGlowing()) tex = TexMan.GetTexture(GetTexture(sector_t::floor), true);
if (!tex->isAutoGlowing()) tex = TexMan.GetGameTexture(GetTexture(sector_t::floor), true);
if (tex->isGlowing()) // recheck the current animation frame.
{
tex->GetGlowColor(bottomglowcolor);
@ -1201,10 +1201,10 @@ double GetFriction(const sector_t *self, int plane, double *pMoveFac)
auto c = planes[sector_t::ceiling].GlowColor;
if (c == 0)
{
FTexture *tex = TexMan.GetTexture(GetTexture(sector_t::ceiling));
auto tex = TexMan.GetGameTexture(GetTexture(sector_t::ceiling));
if (tex != NULL && tex->isGlowing())
{
if (!tex->isAutoGlowing()) tex = TexMan.GetTexture(GetTexture(sector_t::ceiling), true);
if (!tex->isAutoGlowing()) tex = TexMan.GetGameTexture(GetTexture(sector_t::ceiling), true);
if (tex->isGlowing()) // recheck the current animation frame.
{
ret = true;
@ -1225,10 +1225,10 @@ double GetFriction(const sector_t *self, int plane, double *pMoveFac)
c = planes[sector_t::floor].GlowColor;
if (c == 0)
{
FTexture *tex = TexMan.GetTexture(GetTexture(sector_t::floor));
auto tex = TexMan.GetGameTexture(GetTexture(sector_t::floor));
if (tex != NULL && tex->isGlowing())
{
if (!tex->isAutoGlowing()) tex = TexMan.GetTexture(GetTexture(sector_t::floor), true);
if (!tex->isAutoGlowing()) tex = TexMan.GetGameTexture(GetTexture(sector_t::floor), true);
if (tex->isGlowing()) // recheck the current animation frame.
{
ret = true;