mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 22:33:17 +00:00
Merge branch 'master' of c:\programming\doom-dev\zdoom
This commit is contained in:
commit
47834907da
8 changed files with 51 additions and 51 deletions
|
@ -231,8 +231,8 @@ bool P_GetMidTexturePosition(const line_t *line, int sideno, double *ptextop, do
|
|||
FTexture * tex= TexMan(texnum);
|
||||
if (!tex) return false;
|
||||
|
||||
double totalscale = fabs(side->GetTextureYScaleF(side_t::mid)) * tex->GetScaleY();
|
||||
double y_offset = side->GetTextureYOffsetF(side_t::mid);
|
||||
double totalscale = fabs(side->GetTextureYScale(side_t::mid)) * tex->GetScaleY();
|
||||
double y_offset = side->GetTextureYOffset(side_t::mid);
|
||||
double textureheight = tex->GetHeight() / totalscale;
|
||||
if (totalscale != 1. && !tex->bWorldPanning)
|
||||
{
|
||||
|
|
|
@ -8731,7 +8731,7 @@ scriptwait:
|
|||
case PCD_GETLINEROWOFFSET:
|
||||
if (activationline != NULL)
|
||||
{
|
||||
PushToStack (int(activationline->sidedef[0]->GetTextureYOffsetF(side_t::mid)));
|
||||
PushToStack (int(activationline->sidedef[0]->GetTextureYOffset(side_t::mid)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -549,8 +549,8 @@ void P_SpawnScrollers(void)
|
|||
case Scroll_Texture_Offsets:
|
||||
// killough 3/2/98: scroll according to sidedef offsets
|
||||
s = int(lines[i].sidedef[0] - sides);
|
||||
new DScroller (EScroll::sc_side, -sides[s].GetTextureXOffsetF(side_t::mid),
|
||||
sides[s].GetTextureYOffsetF(side_t::mid), -1, s, accel, SCROLLTYPE(l->args[0]));
|
||||
new DScroller (EScroll::sc_side, -sides[s].GetTextureXOffset(side_t::mid),
|
||||
sides[s].GetTextureYOffset(side_t::mid), -1, s, accel, SCROLLTYPE(l->args[0]));
|
||||
break;
|
||||
|
||||
case Scroll_Texture_Left:
|
||||
|
|
|
@ -150,8 +150,8 @@ static int WriteSIDEDEFS (FILE *file)
|
|||
|
||||
for (int i = 0; i < numsides; ++i)
|
||||
{
|
||||
msd.textureoffset = LittleShort(short(sides[i].GetTextureXOffsetF(side_t::mid)));
|
||||
msd.rowoffset = LittleShort(short(sides[i].GetTextureYOffsetF(side_t::mid)));
|
||||
msd.textureoffset = LittleShort(short(sides[i].GetTextureXOffset(side_t::mid)));
|
||||
msd.rowoffset = LittleShort(short(sides[i].GetTextureYOffset(side_t::mid)));
|
||||
msd.sector = LittleShort(short(sides[i].sector - sectors));
|
||||
uppercopy (msd.toptexture, GetTextureName (sides[i].GetTexture(side_t::top)));
|
||||
uppercopy (msd.bottomtexture, GetTextureName (sides[i].GetTexture(side_t::bottom)));
|
||||
|
|
|
@ -695,8 +695,8 @@ void DWallScrollInterpolation::Destroy()
|
|||
|
||||
void DWallScrollInterpolation::UpdateInterpolation()
|
||||
{
|
||||
oldx = side->GetTextureXOffsetF(part);
|
||||
oldy = side->GetTextureYOffsetF(part);
|
||||
oldx = side->GetTextureXOffset(part);
|
||||
oldy = side->GetTextureYOffset(part);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -719,8 +719,8 @@ void DWallScrollInterpolation::Restore()
|
|||
|
||||
void DWallScrollInterpolation::Interpolate(double smoothratio)
|
||||
{
|
||||
bakx = side->GetTextureXOffsetF(part);
|
||||
baky = side->GetTextureYOffsetF(part);
|
||||
bakx = side->GetTextureXOffset(part);
|
||||
baky = side->GetTextureYOffset(part);
|
||||
|
||||
if (refcount == 0 && oldx == bakx && oldy == baky)
|
||||
{
|
||||
|
|
28
src/r_defs.h
28
src/r_defs.h
|
@ -1244,18 +1244,19 @@ struct side_t
|
|||
{
|
||||
textures[which].xOffset = offset;;
|
||||
}
|
||||
|
||||
void SetTextureXOffset(double offset)
|
||||
{
|
||||
textures[top].xOffset =
|
||||
textures[mid].xOffset =
|
||||
textures[bottom].xOffset = offset;
|
||||
}
|
||||
fixed_t GetTextureXOffset(int which) const = delete;
|
||||
double GetTextureXOffsetF(int which) const
|
||||
|
||||
double GetTextureXOffset(int which) const
|
||||
{
|
||||
return textures[which].xOffset;
|
||||
}
|
||||
void AddTextureXOffset(int which, fixed_t delta) = delete;
|
||||
|
||||
void AddTextureXOffset(int which, double delta)
|
||||
{
|
||||
textures[which].xOffset += delta;
|
||||
|
@ -1265,35 +1266,35 @@ struct side_t
|
|||
{
|
||||
textures[which].yOffset = offset;
|
||||
}
|
||||
|
||||
void SetTextureYOffset(double offset)
|
||||
{
|
||||
textures[top].yOffset =
|
||||
textures[mid].yOffset =
|
||||
textures[bottom].yOffset = offset;
|
||||
}
|
||||
fixed_t GetTextureYOffset(int which) const = delete;
|
||||
double GetTextureYOffsetF(int which) const
|
||||
|
||||
double GetTextureYOffset(int which) const
|
||||
{
|
||||
return textures[which].yOffset;
|
||||
}
|
||||
void AddTextureYOffset(int which, fixed_t delta) = delete;
|
||||
|
||||
void AddTextureYOffset(int which, double delta)
|
||||
{
|
||||
textures[which].yOffset += delta;
|
||||
}
|
||||
|
||||
void SetTextureXScale(int which, fixed_t scale) = delete;
|
||||
void SetTextureXScale(int which, double scale)
|
||||
{
|
||||
textures[which].xScale = scale == 0 ? 1. : scale;
|
||||
}
|
||||
void SetTextureXScale(fixed_t scale) = delete;
|
||||
|
||||
void SetTextureXScale(double scale)
|
||||
{
|
||||
textures[top].xScale = textures[mid].xScale = textures[bottom].xScale = scale == 0 ? 1. : scale;
|
||||
}
|
||||
fixed_t GetTextureXScale(int which) const = delete;
|
||||
double GetTextureXScaleF(int which) const
|
||||
|
||||
double GetTextureXScale(int which) const
|
||||
{
|
||||
return textures[which].xScale;
|
||||
}
|
||||
|
@ -1303,22 +1304,21 @@ struct side_t
|
|||
textures[which].xScale *= delta;
|
||||
}
|
||||
|
||||
void SetTextureYScale(int which, fixed_t scale) = delete;
|
||||
void SetTextureYScale(int which, double scale)
|
||||
{
|
||||
textures[which].yScale = scale == 0 ? 1. : scale;
|
||||
}
|
||||
|
||||
void SetTextureYScale(fixed_t scale) = delete;
|
||||
void SetTextureYScale(double scale)
|
||||
{
|
||||
textures[top].yScale = textures[mid].yScale = textures[bottom].yScale = scale == 0 ? 1. : scale;
|
||||
}
|
||||
fixed_t GetTextureYScale(int which) const = delete;
|
||||
double GetTextureYScaleF(int which) const
|
||||
|
||||
double GetTextureYScale(int which) const
|
||||
{
|
||||
return textures[which].yScale;
|
||||
}
|
||||
|
||||
void MultiplyTextureYScale(int which, double delta)
|
||||
{
|
||||
textures[which].yScale *= delta;
|
||||
|
|
|
@ -1447,10 +1447,10 @@ void R_DrawSkyPlane (visplane_t *pl)
|
|||
// to allow sky rotation as well as careful positioning.
|
||||
// However, the offset is scaled very small, so that it
|
||||
// allows a long-period of sky rotation.
|
||||
skyangle += FLOAT2FIXED(s->GetTextureXOffsetF(pos));
|
||||
skyangle += FLOAT2FIXED(s->GetTextureXOffset(pos));
|
||||
|
||||
// Vertical offset allows careful sky positioning.
|
||||
skymid = s->GetTextureYOffsetF(pos) - 28;
|
||||
skymid = s->GetTextureYOffset(pos) - 28;
|
||||
|
||||
// We sometimes flip the picture horizontally.
|
||||
//
|
||||
|
|
|
@ -318,7 +318,7 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
|
|||
|
||||
// find positioning
|
||||
texheight = tex->GetScaledHeightDouble();
|
||||
texheightscale = fabs(curline->sidedef->GetTextureYScaleF(side_t::mid));
|
||||
texheightscale = fabs(curline->sidedef->GetTextureYScale(side_t::mid));
|
||||
if (texheightscale != 1)
|
||||
{
|
||||
texheight = texheight / texheightscale;
|
||||
|
@ -332,7 +332,7 @@ void R_RenderMaskedSegRange (drawseg_t *ds, int x1, int x2)
|
|||
dc_texturemid = MIN(frontsector->GetPlaneTexZF(sector_t::ceiling), backsector->GetPlaneTexZF(sector_t::ceiling));
|
||||
}
|
||||
|
||||
rowoffset = curline->sidedef->GetTextureYOffsetF(side_t::mid);
|
||||
rowoffset = curline->sidedef->GetTextureYOffset(side_t::mid);
|
||||
|
||||
if (!(curline->linedef->flags & ML_WRAP_MIDTEX) &&
|
||||
!(curline->sidedef->Flags & WALLF_WRAP_MIDTEX))
|
||||
|
@ -599,12 +599,12 @@ void R_RenderFakeWall(drawseg_t *ds, int x1, int x2, F3DFloor *rover)
|
|||
scaledside = rover->master->sidedef[0];
|
||||
scaledpart = side_t::mid;
|
||||
}
|
||||
xscale = FLOAT2FIXED(rw_pic->Scale.X * scaledside->GetTextureXScaleF(scaledpart));
|
||||
yscale = rw_pic->Scale.Y * scaledside->GetTextureYScaleF(scaledpart);
|
||||
xscale = FLOAT2FIXED(rw_pic->Scale.X * scaledside->GetTextureXScale(scaledpart));
|
||||
yscale = rw_pic->Scale.Y * scaledside->GetTextureYScale(scaledpart);
|
||||
|
||||
double rowoffset = curline->sidedef->GetTextureYOffsetF(side_t::mid) + rover->master->sidedef[0]->GetTextureYOffsetF(side_t::mid);
|
||||
double rowoffset = curline->sidedef->GetTextureYOffset(side_t::mid) + rover->master->sidedef[0]->GetTextureYOffset(side_t::mid);
|
||||
double planez = rover->model->GetPlaneTexZF(sector_t::ceiling);
|
||||
rw_offset = FLOAT2FIXED(curline->sidedef->GetTextureXOffsetF(side_t::mid) + rover->master->sidedef[0]->GetTextureXOffsetF(side_t::mid));
|
||||
rw_offset = FLOAT2FIXED(curline->sidedef->GetTextureXOffset(side_t::mid) + rover->master->sidedef[0]->GetTextureXOffset(side_t::mid));
|
||||
if (rowoffset < 0)
|
||||
{
|
||||
rowoffset += rw_pic->GetHeight();
|
||||
|
@ -2026,10 +2026,10 @@ void R_NewWall (bool needlights)
|
|||
if (linedef->special != Line_Horizon)
|
||||
{
|
||||
midtexture = TexMan(sidedef->GetTexture(side_t::mid), true);
|
||||
rw_offset_mid = FLOAT2FIXED(sidedef->GetTextureXOffsetF(side_t::mid));
|
||||
rowoffset = sidedef->GetTextureYOffsetF(side_t::mid);
|
||||
rw_midtexturescalex = sidedef->GetTextureXScaleF(side_t::mid);
|
||||
rw_midtexturescaley = sidedef->GetTextureYScaleF(side_t::mid);
|
||||
rw_offset_mid = FLOAT2FIXED(sidedef->GetTextureXOffset(side_t::mid));
|
||||
rowoffset = sidedef->GetTextureYOffset(side_t::mid);
|
||||
rw_midtexturescalex = sidedef->GetTextureXScale(side_t::mid);
|
||||
rw_midtexturescaley = sidedef->GetTextureYScale(side_t::mid);
|
||||
yrepeat = midtexture->Scale.Y * rw_midtexturescaley;
|
||||
if (yrepeat >= 0)
|
||||
{ // normal orientation
|
||||
|
@ -2181,10 +2181,10 @@ void R_NewWall (bool needlights)
|
|||
{ // top texture
|
||||
toptexture = TexMan(sidedef->GetTexture(side_t::top), true);
|
||||
|
||||
rw_offset_top = FLOAT2FIXED(sidedef->GetTextureXOffsetF(side_t::top));
|
||||
rowoffset = sidedef->GetTextureYOffsetF(side_t::top);
|
||||
rw_toptexturescalex =sidedef->GetTextureXScaleF(side_t::top);
|
||||
rw_toptexturescaley =sidedef->GetTextureYScaleF(side_t::top);
|
||||
rw_offset_top = FLOAT2FIXED(sidedef->GetTextureXOffset(side_t::top));
|
||||
rowoffset = sidedef->GetTextureYOffset(side_t::top);
|
||||
rw_toptexturescalex =sidedef->GetTextureXScale(side_t::top);
|
||||
rw_toptexturescaley =sidedef->GetTextureYScale(side_t::top);
|
||||
yrepeat = toptexture->Scale.Y * rw_toptexturescaley;
|
||||
if (yrepeat >= 0)
|
||||
{ // normal orientation
|
||||
|
@ -2226,10 +2226,10 @@ void R_NewWall (bool needlights)
|
|||
{ // bottom texture
|
||||
bottomtexture = TexMan(sidedef->GetTexture(side_t::bottom), true);
|
||||
|
||||
rw_offset_bottom = FLOAT2FIXED(sidedef->GetTextureXOffsetF(side_t::bottom));
|
||||
rowoffset = sidedef->GetTextureYOffsetF(side_t::bottom);
|
||||
rw_bottomtexturescalex = sidedef->GetTextureXScaleF(side_t::bottom);
|
||||
rw_bottomtexturescaley = sidedef->GetTextureYScaleF(side_t::bottom);
|
||||
rw_offset_bottom = FLOAT2FIXED(sidedef->GetTextureXOffset(side_t::bottom));
|
||||
rowoffset = sidedef->GetTextureYOffset(side_t::bottom);
|
||||
rw_bottomtexturescalex = sidedef->GetTextureXScale(side_t::bottom);
|
||||
rw_bottomtexturescaley = sidedef->GetTextureYScale(side_t::bottom);
|
||||
yrepeat = bottomtexture->Scale.Y * rw_bottomtexturescaley;
|
||||
if (yrepeat >= 0)
|
||||
{ // normal orientation
|
||||
|
@ -2301,9 +2301,9 @@ void R_NewWall (bool needlights)
|
|||
if (needlights && (segtextured || (backsector && IsFogBoundary(frontsector, backsector))))
|
||||
{
|
||||
lwallscale =
|
||||
midtex ? (midtex->Scale.X * sidedef->GetTextureXScaleF(side_t::mid)) :
|
||||
toptexture ? (toptexture->Scale.X * sidedef->GetTextureXScaleF(side_t::top)) :
|
||||
bottomtexture ? (bottomtexture->Scale.X * sidedef->GetTextureXScaleF(side_t::bottom)) :
|
||||
midtex ? (midtex->Scale.X * sidedef->GetTextureXScale(side_t::mid)) :
|
||||
toptexture ? (toptexture->Scale.X * sidedef->GetTextureXScale(side_t::top)) :
|
||||
bottomtexture ? (bottomtexture->Scale.X * sidedef->GetTextureXScale(side_t::bottom)) :
|
||||
1.;
|
||||
|
||||
PrepWall (swall, lwall, sidedef->TexelLength * lwallscale, WallC.sx1, WallC.sx2);
|
||||
|
@ -2387,7 +2387,7 @@ void R_StoreWallRange (int start, int stop)
|
|||
R_NewWall (true);
|
||||
}
|
||||
|
||||
rw_offset = FLOAT2FIXED(sidedef->GetTextureXOffsetF(side_t::mid));
|
||||
rw_offset = FLOAT2FIXED(sidedef->GetTextureXOffset(side_t::mid));
|
||||
rw_light = rw_lightleft + rw_lightstep * (start - WallC.sx1);
|
||||
|
||||
ds_p->CurrentPortalUniq = CurrentPortalUniq;
|
||||
|
@ -2516,8 +2516,8 @@ void R_StoreWallRange (int start, int stop)
|
|||
lwal = (fixed_t *)(openings + ds_p->maskedtexturecol);
|
||||
swal = (float *)(openings + ds_p->swall);
|
||||
FTexture *pic = TexMan(sidedef->GetTexture(side_t::mid), true);
|
||||
double yscale = pic->Scale.X * sidedef->GetTextureYScaleF(side_t::mid);
|
||||
fixed_t xoffset = FLOAT2FIXED(sidedef->GetTextureXOffsetF(side_t::mid));
|
||||
double yscale = pic->Scale.X * sidedef->GetTextureYScale(side_t::mid);
|
||||
fixed_t xoffset = FLOAT2FIXED(sidedef->GetTextureXOffset(side_t::mid));
|
||||
|
||||
if (pic->bWorldPanning)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue