From cb92e568b6af4c7a5cdfa4fccf20d6dd1d6e0727 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Thu, 28 Nov 2024 21:32:10 +0100 Subject: working on shadows --- src/world.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/world.c') diff --git a/src/world.c b/src/world.c index 8ceb5b3..13dc644 100644 --- a/src/world.c +++ b/src/world.c @@ -1351,6 +1351,8 @@ static bool world_check_location_accessibility(world_location* orig, world_locat return false; } +bool world_map_location_is_in_sun(vec2f px_pos); + world_update_result world_render(platform_window* window, world* world) { world_update_result result = {0,0}; @@ -1391,6 +1393,10 @@ world_update_result world_render(platform_window* window, world* world) if (!location->is_accessible) { tint = COLOR_LOCATION_DOT_UNACCESSIBLE; } + + if (!world_map_location_is_in_sun(map_pos)) { + tint = rgb(255, 255, 0); + } renderer->render_image_tint(img_locationdot, circle_x, circle_y, dotsize, dotsize, tint); } -- cgit v1.2.3-70-g09d2