Polymost: in NPOT wall ypanning "correction", behave like Polymer in one corner case.

Specifically, the handling of one-way walls ([1] in Mapster32) was slightly
different.

git-svn-id: https://svn.eduke32.com/eduke32@4484 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-05-28 22:40:14 +00:00
parent 1fab90da10
commit dfa9daa5d3
2 changed files with 6 additions and 4 deletions

View file

@ -2997,7 +2997,7 @@ static void polymer_updatewall(int16_t wallnum)
} }
if (wal->ypanning) if (wal->ypanning)
// white // white (but not 1-way)
ypancoef = calc_ypancoef(wal->ypanning, curpicnum, !(wal->cstat & 4)); ypancoef = calc_ypancoef(wal->ypanning, curpicnum, !(wal->cstat & 4));
else else
ypancoef = 0; ypancoef = 0;
@ -3186,7 +3186,7 @@ static void polymer_updatewall(int16_t wallnum)
curpicnum = walloverpicnum; curpicnum = walloverpicnum;
if (wal->ypanning) if (wal->ypanning)
// mask // mask / 1-way
ypancoef = calc_ypancoef(wal->ypanning, curpicnum, 0); ypancoef = calc_ypancoef(wal->ypanning, curpicnum, 0);
else else
ypancoef = 0; ypancoef = 0;

View file

@ -3026,6 +3026,8 @@ static void polymost_drawalls(int32_t bunch)
if ((nextsectnum < 0) || (wal->cstat&32)) //White/1-way wall if ((nextsectnum < 0) || (wal->cstat&32)) //White/1-way wall
{ {
const int32_t maskingOneWay = (nextsectnum >= 0 && (wal->cstat&32));
if (nextsectnum < 0) globalpicnum = wal->picnum; else globalpicnum = wal->overpicnum; if (nextsectnum < 0) globalpicnum = wal->picnum; else globalpicnum = wal->overpicnum;
globalshade = wal->shade; globalpal = (int32_t)((uint8_t)wal->pal); globalshade = wal->shade; globalpal = (int32_t)((uint8_t)wal->pal);
globvis = globalvisibility; globvis = globalvisibility;
@ -3036,8 +3038,8 @@ static void polymost_drawalls(int32_t bunch)
if (nextsectnum >= 0) { if (!(wal->cstat&4)) i = nextsec->ceilingz; else i = sec->ceilingz; } if (nextsectnum >= 0) { if (!(wal->cstat&4)) i = nextsec->ceilingz; else i = sec->ceilingz; }
else { if (!(wal->cstat&4)) i = sec->ceilingz; else i = sec->floorz; } else { if (!(wal->cstat&4)) i = sec->ceilingz; else i = sec->floorz; }
// white // white / 1-way
calc_ypanning(i, ryp0, ryp1, x0, x1, wal->ypanning, wal->yrepeat, !(wal->cstat&4)); calc_ypanning(i, ryp0, ryp1, x0, x1, wal->ypanning, wal->yrepeat, !maskingOneWay && !(wal->cstat&4));
if (wal->cstat&8) //xflip if (wal->cstat&8) //xflip
{ {