Consider:
This creates the following mapping:
Code: Select all
240 -> 61
241 -> 60
242 -> 60
243 -> 60
244 -> 60
245 -> 60
246 -> 60
247 -> 59
FRemapTable::AddIndexRange is computing a step by dividing the size of each range, here -1 ÷ 7... which is wrong, because these ranges have
2 and
8 colors, respectively. It then continually adds the step to the first color and
truncates the result, so when the ranges go in opposite directions, the higher-numbered replacement color is doomed to never appear more than once. Finally, because floats, I end up with a color that's not even inside the range I asked for.
The mapping I expect to see is:
Code: Select all
240 -> 61
241 -> 61
242 -> 61
243 -> 61
244 -> 60
245 -> 60
246 -> 60
247 -> 60