mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
A custom patch-*.mpq that upscales the WorldMap overlay art broke the tile resolution: the resolver read the actual BLP dimensions but did its grid and texcoord math against a hardcoded 256px cell, so HD tiles rendered sheared and half-clipped. - Grid resolution detects the full-cell file size S (256*scale) and uses it as the partial-tile threshold instead of a literal 256, so HD edge tiles aren't mistaken for full ones. - Texcoords now use content/nextPOT(content) — the engine's own WorldMapFrame fraction, which is scale-invariant (an HD file is POT*scale, same fraction) and needs no file-size guessing. Fixes overlays whose stock file was a 128 cell (content <=128): the patch doubled them to 256, which the earlier S>=256 floor read as un-upscaled and halved their texcoord (the clipped dark patches). Draw sizes/positions stay in logical map pixels; stock data is unchanged (its files already are next-POT). File reads now only drive grid resolution and the rare DBC-rounded sliver case.