From 01000d76c86e1d7d80363cf6e04670da4fa60dda Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 30 Nov 2024 18:12:20 +0100 Subject: close #16 --- src/data.c | 2 ++ src/include/data.h | 2 ++ src/world.c | 15 +++++++++++++++ 3 files changed, 19 insertions(+) (limited to 'src') diff --git a/src/data.c b/src/data.c index db55518..e80589d 100644 --- a/src/data.c +++ b/src/data.c @@ -54,6 +54,8 @@ void data_load() img_world_map = assets_load_image_from_file("data/img/world_background.png"); img_invest = assets_load_image_from_file("data/img/invest.png"); img_shadow = assets_load_image_from_file("data/img/shadow.png"); + img_handshake = assets_load_image_from_file("data/img/handshake.png"); + img_resume_action = assets_load_image_from_file("data/img/resume_action.png"); img_panel_bottom = assets_load_image_from_file("data/img/panel_bottom.png"); img_panel_top = assets_load_image_from_file("data/img/panel_top.png"); diff --git a/src/include/data.h b/src/include/data.h index b5e038c..51bff80 100644 --- a/src/include/data.h +++ b/src/include/data.h @@ -56,6 +56,8 @@ image* img_denied; image* img_world_map; image* img_invest; image* img_shadow; +image* img_handshake; +image* img_resume_action; image* img_button_bottom; image* img_button_top; diff --git a/src/world.c b/src/world.c index c23205b..ec251de 100644 --- a/src/world.c +++ b/src/world.c @@ -1479,6 +1479,21 @@ world_update_result world_render(platform_window* window, world* world) } } + // Draw actions. + for (s32 i = 0; i < world->locations.length; i++) + { + world_location* location = array_at(&world->locations, i); + + const img_size = 5*scale*zoom; + if (location->job_offers.length != 0) { + renderer->render_image(img_handshake, location->map_position_x + dotsize/4, location->map_position_y - img_size - dotsize/4, img_size, img_size); + } + + if (location->resumes.length != 0) { + renderer->render_image(img_resume_action, location->map_position_x - img_size - dotsize/4, location->map_position_y - img_size - dotsize/4, img_size, img_size); + } + } + renderer->set_render_depth(1); update_render_scenery(world); -- cgit v1.2.3-70-g09d2