mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-18 02:12:00 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
523f66fadb
2 changed files with 5 additions and 3 deletions
|
@ -223,11 +223,12 @@ bool P_GetMidTexturePosition(const line_t *line, int sideno, fixed_t *ptextop, f
|
||||||
FTexture * tex= TexMan(texnum);
|
FTexture * tex= TexMan(texnum);
|
||||||
if (!tex) return false;
|
if (!tex) return false;
|
||||||
|
|
||||||
|
fixed_t totalscale = FixedMul(side->GetTextureYScale(side_t::mid), tex->yScale);
|
||||||
fixed_t y_offset = side->GetTextureYOffset(side_t::mid);
|
fixed_t y_offset = side->GetTextureYOffset(side_t::mid);
|
||||||
fixed_t textureheight = tex->GetScaledHeight() << FRACBITS;
|
fixed_t textureheight = tex->GetScaledHeight(totalscale) << FRACBITS;
|
||||||
if (tex->yScale != FRACUNIT && !tex->bWorldPanning)
|
if (totalscale != FRACUNIT && !tex->bWorldPanning)
|
||||||
{
|
{
|
||||||
y_offset = FixedDiv(y_offset, tex->yScale);
|
y_offset = FixedDiv(y_offset, totalscale);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(line->flags & ML_DONTPEGBOTTOM)
|
if(line->flags & ML_DONTPEGBOTTOM)
|
||||||
|
|
|
@ -256,6 +256,7 @@ public:
|
||||||
|
|
||||||
int GetScaledWidth () { int foo = (Width << 17) / xScale; return (foo >> 1) + (foo & 1); }
|
int GetScaledWidth () { int foo = (Width << 17) / xScale; return (foo >> 1) + (foo & 1); }
|
||||||
int GetScaledHeight () { int foo = (Height << 17) / yScale; return (foo >> 1) + (foo & 1); }
|
int GetScaledHeight () { int foo = (Height << 17) / yScale; return (foo >> 1) + (foo & 1); }
|
||||||
|
int GetScaledHeight(fixed_t scale) { int foo = (Height << 17) / scale; return (foo >> 1) + (foo & 1); }
|
||||||
double GetScaledWidthDouble () { return (Width * 65536.) / xScale; }
|
double GetScaledWidthDouble () { return (Width * 65536.) / xScale; }
|
||||||
double GetScaledHeightDouble () { return (Height * 65536.) / yScale; }
|
double GetScaledHeightDouble () { return (Height * 65536.) / yScale; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue