MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / setColorKeyFrom16bit

Function setColorKeyFrom16bit

src/lodepng.cpp:3746–3753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3744}
3745
3746static void setColorKeyFrom16bit(LodePNGColorMode* mode_out, unsigned r, unsigned g, unsigned b, unsigned bitdepth)
3747{
3748 unsigned mask = (1 << bitdepth) - 1;
3749 mode_out->key_defined = 1;
3750 mode_out->key_r = r & mask;
3751 mode_out->key_g = g & mask;
3752 mode_out->key_b = b & mask;
3753}
3754
3755/*updates values of mode with a potentially smaller color model. mode_out should
3756contain the user chosen color model, but will be overwritten with the new chosen one.*/

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected