Increase max tiles (hack)

Hack, but it does work properly, even on tiles which are using ID's larger pre-commit (non-generated area's).
This commit is contained in:
Kawe Mazidjatari 2022-03-24 02:07:56 +01:00
parent f62c4c1284
commit 5a2cbaf40a

View File

@ -237,8 +237,8 @@ void Sample_TileMesh::handleSettings()
imguiValue(text);
// Max tiles and max polys affect how the tile IDs are caculated.
// There are 22 bits available for identifying a tile and a polygon.
int tileBits = rcMin((int)ilog2(nextPow2(tw*th)), 14);
if (tileBits > 14) tileBits = 14;
int tileBits = rcMin((int)ilog2(nextPow2(tw*th)), 28);
if (tileBits > 28) tileBits = 28;
int polyBits = 22 - tileBits;
m_maxTiles = 1 << tileBits;
m_maxPolysPerTile = 1 << polyBits;