mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Port of the San Andreas fault texture alignment fix from Hunter_rus to Polymer. I have no idea what it does, but it works and the last thing I want to do is to mess with build texture alignment ever again.
git-svn-id: https://svn.eduke32.com/eduke32@1559 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8733c63e5b
commit
173edd4b3f
1 changed files with 8 additions and 0 deletions
|
@ -2467,6 +2467,8 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
ypancoef = (float)(pow2long[picsiz[curpicnum] >> 4]);
|
||||
if (ypancoef < tilesizy[curpicnum])
|
||||
ypancoef *= 2;
|
||||
if (curypanning > 256 - (ypancoef - tilesizy[curpicnum]) * (256.0f / ypancoef))
|
||||
curypanning -= (ypancoef - tilesizy[curpicnum]) * (256.0f / ypancoef);
|
||||
ypancoef *= (float)(wal->ypanning) / (256.0f * (float)(tilesizy[curpicnum]));
|
||||
}
|
||||
else
|
||||
|
@ -2537,6 +2539,8 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
ypancoef = (float)(pow2long[picsiz[curpicnum] >> 4]);
|
||||
if (ypancoef < tilesizy[curpicnum])
|
||||
ypancoef *= 2;
|
||||
if (curypanning > 256 - (ypancoef - tilesizy[curpicnum]) * (256.0f / ypancoef))
|
||||
curypanning -= (ypancoef - tilesizy[curpicnum]) * (256.0f / ypancoef);
|
||||
ypancoef *= (float)(curypanning) / (256.0f * (float)(tilesizy[curpicnum]));
|
||||
}
|
||||
else
|
||||
|
@ -2622,6 +2626,8 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
ypancoef = (float)(pow2long[picsiz[curpicnum] >> 4]);
|
||||
if (ypancoef < tilesizy[curpicnum])
|
||||
ypancoef *= 2;
|
||||
if (curypanning > 256 - (ypancoef - tilesizy[curpicnum]) * (256.0f / ypancoef))
|
||||
curypanning -= (ypancoef - tilesizy[curpicnum]) * (256.0f / ypancoef);
|
||||
ypancoef *= (float)(wal->ypanning) / (256.0f * (float)(tilesizy[curpicnum]));
|
||||
}
|
||||
else
|
||||
|
@ -2672,6 +2678,8 @@ static void polymer_updatewall(int16_t wallnum)
|
|||
ypancoef = (float)(pow2long[picsiz[curpicnum] >> 4]);
|
||||
if (ypancoef < tilesizy[curpicnum])
|
||||
ypancoef *= 2;
|
||||
if (curypanning > 256 - (ypancoef - tilesizy[curpicnum]) * (256.0f / ypancoef))
|
||||
curypanning -= (ypancoef - tilesizy[curpicnum]) * (256.0f / ypancoef);
|
||||
ypancoef *= (float)(wal->ypanning) / (256.0f * (float)(tilesizy[curpicnum]));
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue