Remove fast_f2nat

FossilOrigin-Name: 51fb59fc934df4829a82f7992f10435519dc8deb7098c3be1b17642fc6c05a44
This commit is contained in:
Jonathan Schleifer 2025-03-23 17:45:28 +00:00
parent 6320094293
commit e995b95a84
5 changed files with 17 additions and 23 deletions

View file

@ -31,9 +31,8 @@ lightray(float bx, float by, Entity *light)
int l = light.attr2 << PRECBITS;
int stepx = (int)(dx / (float)steps * PRECF);
int stepy = (int)(dy / (float)steps * PRECF);
int stepl =
fast_f2nat(l / (float)steps); // incorrect: light will fade quicker
// if near edge of the world
// incorrect: light will fade quicker if near edge of the world
int stepl = l / (float)steps;
if (hasoverbright) {
l /= lightscale;
@ -54,9 +53,9 @@ lightray(float bx, float by, Entity *light)
return;
int g = light.attr3 << PRECBITS;
int stepg = fast_f2nat(g / (float)steps);
int stepg = g / (float)steps;
int b = light.attr4 << PRECBITS;
int stepb = fast_f2nat(b / (float)steps);
int stepb = b / (float)steps;
g /= lightscale;
stepg /= lightscale;
b /= lightscale;