|
|
|
@ -98,7 +98,8 @@ void MapViewUI::draw_map() { |
|
|
|
|
size_t end_y = std::min(size_t(height), $game_map.height() - start.y); |
|
|
|
|
|
|
|
|
|
for(size_t y = 0; y < end_y; ++y) { |
|
|
|
|
for(size_t x = 0; x < end_x; ++x) { |
|
|
|
|
for(size_t x = 0; x < end_x; ++x) |
|
|
|
|
{ |
|
|
|
|
const TileCell& tile = tiles.at(start.x+x, start.y+y); |
|
|
|
|
// light value is an integer that's a percent
|
|
|
|
|
float light_value = debug.LIGHT ? 80 * PERCENT : lighting[start.y+y][start.x+x] * PERCENT; |
|
|
|
@ -108,14 +109,14 @@ void MapViewUI::draw_map() { |
|
|
|
|
string num = dnum > 15 ? "*" : format("{:x}", dnum); |
|
|
|
|
|
|
|
|
|
$canvas.DrawText(x * 2, y * 4, num, [dnum, tile, light_value](auto &pixel) { |
|
|
|
|
pixel.foreground_color = Color::HSV(dnum * 20, 150, 200); |
|
|
|
|
pixel.background_color = Color::HSV(30, 20, tile.bg_v * 50 * PERCENT); |
|
|
|
|
}); |
|
|
|
|
pixel.foreground_color = Color::HSV(dnum * 20, 150, 200); |
|
|
|
|
pixel.background_color = Color::HSV(30, 20, tile.bg_v * 50 * PERCENT); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
$canvas.DrawText(x * 2, y * 4, tile.display, [tile, light_value](auto &pixel) { |
|
|
|
|
pixel.foreground_color = Color::HSV(tile.fg_h, tile.fg_s, tile.fg_v * light_value); |
|
|
|
|
pixel.background_color = Color::HSV(tile.bg_h, tile.bg_s, tile.bg_v * light_value); |
|
|
|
|
}); |
|
|
|
|
pixel.foreground_color = Color::HSV(tile.fg_h, tile.fg_s, tile.fg_v * light_value); |
|
|
|
|
pixel.background_color = Color::HSV(tile.bg_h, tile.bg_s, tile.bg_v * light_value); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|