| 276 | } |
| 277 | |
| 278 | static 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 | |
| 289 | static Pen doGetTile_default(int x, int y, bool map, int32_t * df::graphic_viewportst::*texpos_field = NULL) { |
| 290 | bool use_graphics = Screen::inGraphicsMode(); |