While running static analysis over the tree I ended up with three findings I did not want to send as a PR, because the right fix depends on what real RW does and you would know that far better than I do. Filing them as questions instead.
if((raster->format & 0xF00) == Raster::C8888)
convertCSM1_32((uint32*)raster->palette);
else if((raster->format & 0xF00) == Raster::C8888)
convertCSM1_16((uint32*)raster->palette);
Both branches test the same thing, so convertCSM1_16 is dead and 16 bit palettes never get the CSM1 conversion. From the naming I would guess the second one is meant to be Raster::C1555, but I do not know whether the 16 bit path is supposed to be converted at all here. What should it be?
While running static analysis over the tree I ended up with three findings I did not want to send as a PR, because the right fix depends on what real RW does and you would know that far better than I do. Filing them as questions instead.
Both branches test the same thing, so convertCSM1_16 is dead and 16 bit palettes never get the CSM1 conversion. From the naming I would guess the second one is meant to be
Raster::C1555, but I do not know whether the 16 bit path is supposed to be converted at all here. What should it be?