MCPcopy Create free account
hub / github.com/DFHack/dfhack / to_16_bit_color

Function to_16_bit_color

library/modules/Screen.cpp:278–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278static uint8_t to_16_bit_color(uint8_t *rgb) {
279 for (uint8_t c = 0; c < 16; ++c) {
280 if (rgb[0] == gps->uccolor[c][0] &&
281 rgb[1] == gps->uccolor[c][1] &&
282 rgb[2] == gps->uccolor[c][2]) {
283 return c;
284 }
285 }
286 return 0;
287}
288
289static Pen doGetTile_default(int x, int y, bool map, int32_t * df::graphic_viewportst::*texpos_field = NULL) {
290 bool use_graphics = Screen::inGraphicsMode();

Callers 1

doGetTile_defaultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected