summaryrefslogtreecommitdiff
path: root/src/scenery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenery.c')
-rw-r--r--src/scenery.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/scenery.c b/src/scenery.c
index aca9dfe..39c91e6 100644
--- a/src/scenery.c
+++ b/src/scenery.c
@@ -1,5 +1,6 @@
vec2f px_to_coords(platform_window* window, double x, double y);
+bool world_map_location_is_in_sun(vec2f px_pos);
static void update_render_path(world* world, boat_route *route)
{
@@ -22,9 +23,15 @@ static void update_render_path(world* world, boat_route *route)
float rad = atan2(end_pos.y-start_pos.y, end_pos.x-start_pos.x);
gl_render_set_rotation(-rad);
- renderer->render_image(img_boat, map_pos.x-3, map_pos.y-3, 3*zoom, 3*zoom);
+ float boatsize = 3*zoom;
+ renderer->render_image(img_boat, map_pos.x-boatsize/2, map_pos.y-boatsize/2, boatsize, boatsize);
gl_render_set_rotation(0.0f);
+ if (!world_map_location_is_in_sun(map_pos)) {
+ float dotsize = 4*zoom;
+ renderer->render_image_tint(img_locationdot, map_pos.x-dotsize/2, map_pos.y-dotsize/2, dotsize, dotsize, rgba(255,255,0,10));
+ }
+
route->current_point_duration += (frame_delta*1000.0f)*world->simulation_speed;
if (route->current_point_duration > time_between_points) {
if (!route->reversed) route->current_point++;