From 6f7374c2fa58c8692b51018864b802e6b876d305 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 23 Nov 2024 21:52:24 +0100 Subject: A new start --- src/ui/portrait.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/ui/portrait.c (limited to 'src/ui/portrait.c') diff --git a/src/ui/portrait.c b/src/ui/portrait.c new file mode 100644 index 0000000..09301fe --- /dev/null +++ b/src/ui/portrait.c @@ -0,0 +1,21 @@ +void draw_employee_portrait(employee* emp, float x, float y, float w, float h) +{ + float body_s = h*0.8f; + float body_x = x + (w/2)-(body_s/2); + float body_y = y+h-body_s; + + float head_s = h*0.45f; + float head_x = x + (w/2)-(head_s/2); + float head_y = y+(h*0.11f); + + float hair_s = h*0.6f; + float hair_x = x + (w/2)-(hair_s/2); + float hair_y = y; + + //renderer->render_image(img_portrait, x,y,w,h); + + renderer->render_image_tint(img_portrait_head, head_x, head_y, head_s, head_s, emp->face_color); + renderer->render_image_tint(img_portrait_body, body_x, body_y, body_s, body_s, emp->body_color); + renderer->render_image_tint(img_portrait_hair[emp->portrait_hair_type], hair_x, hair_y, hair_s, hair_s, emp->hair_color); + +} \ No newline at end of file -- cgit v1.2.3-70-g09d2