From 5a2cbaf40aeb0471687f3b3d3d2880528ec91437 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 24 Mar 2022 02:07:56 +0100 Subject: [PATCH] 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). --- r5dev/naveditor/Sample_TileMesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/r5dev/naveditor/Sample_TileMesh.cpp b/r5dev/naveditor/Sample_TileMesh.cpp index 3d0ab41c..b1a6d8e0 100644 --- a/r5dev/naveditor/Sample_TileMesh.cpp +++ b/r5dev/naveditor/Sample_TileMesh.cpp @@ -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;