mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
Fix distrecip calculation
git-svn-id: https://svn.eduke32.com/eduke32@4899 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4911b9a949
commit
43161e1fd8
1 changed files with 11 additions and 5 deletions
|
@ -8117,15 +8117,21 @@ static void dosetaspect(void)
|
||||||
radarang2[i] = (int16_t)((radarang[k]+j)>>6);
|
radarang2[i] = (int16_t)((radarang[k]+j)>>6);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xdimen != oxdimen && voxlock[0][0])
|
if (xdimen != oxdimen && voxoff[0][0])
|
||||||
{
|
{
|
||||||
if (distrecip == NULL)
|
if (distrecip == NULL)
|
||||||
distrecip = (uint32_t *)Xaligned_alloc(16, DISTRECIPSIZ * sizeof(uint32_t));
|
distrecip = (uint32_t *)Xaligned_alloc(16, DISTRECIPSIZ * sizeof(uint32_t));
|
||||||
|
|
||||||
for (i=1; i<DISTRECIPSIZ; i++)
|
if (xdimen < 1 << 11)
|
||||||
distrecip[i] = (xdimen < 1<<11) ?
|
{
|
||||||
tabledivide32(xdimen<<20, i) :
|
for (i = 1; i < DISTRECIPSIZ; i++)
|
||||||
tabledivide64((uint64_t)xdimen<<20, i); // XXX
|
distrecip[i] = tabledivide32(xdimen << 20, i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (i = 1; i < DISTRECIPSIZ; i++)
|
||||||
|
distrecip[i] = tabledivide64((uint64_t)xdimen << 20, i);
|
||||||
|
}
|
||||||
|
|
||||||
nytooclose = xdimen*2100;
|
nytooclose = xdimen*2100;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue