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