- redid clipinsidebox* functions.

* Completely rewritten to be less obtuse.
* Consolidated the two variants.
* Renamed to be clearer about what they do.
This commit is contained in:
Christoph Oelckers 2022-08-17 23:24:44 +02:00
parent b9d0c9d6ba
commit 3a9f9988f4
8 changed files with 67 additions and 121 deletions

View file

@ -232,8 +232,8 @@ static int OutlineToFloat(Outline& outl, FOutline& polygon)
count += outl[i].Size();
for (unsigned j = 0; j < outl[i].Size(); j++)
{
float X = RenderX(outl[i][j].X);
float Y = RenderY(outl[i][j].Y);
float X = (outl[i][j].X) * inttoworld;
float Y = (outl[i][j].Y) * -inttoworld;
if (fabs(X) > 32768.f || fabs(Y) > 32768.f)
{
// If we get here there's some fuckery going around with the coordinates. Let's better abort and wait for things to realign.
@ -241,8 +241,8 @@ static int OutlineToFloat(Outline& outl, FOutline& polygon)
return -1;
}
polygon[i][j] = { X, Y };
}
}
}
return count;
}