Global map color palette is hardcoded
Currently, globalmap.cpp uses hardcoded formulas to transform the int8_t
values from WNAM
records in the landscape data into RGB colors for drawing the unexplored parts of the map. This means that morrowind modders and people developing other games for OpenMW have no way to change the global map's color scheme, unlike many other elements of the game's UI.
There are only 256 possible input values from WNAM
s, so there would be a negligible memory cost to using a pregenerated 1D texture as a LUT instead of deriving the RGB values per-texel at runtime. Moving to an external LUT would allow the color scheme to be modded by overriding a texture in a resources folder.
In case it helps, I have manually pregenerated the LUT that the hardcoded formulas describe and saved it as this DDS image (256x1 pixels, RGB8 format, uncompressed, no mipmaps). Please feel free to use and redistribute it however you want.