diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-11-23 21:52:24 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-11-23 21:52:24 +0100 |
| commit | 6f7374c2fa58c8692b51018864b802e6b876d305 (patch) | |
| tree | a7e8ead757e9f4de1920395336dcac1c8a989576 /src/ui/portrait.c | |
A new start
Diffstat (limited to 'src/ui/portrait.c')
| -rw-r--r-- | src/ui/portrait.c | 21 |
1 files changed, 21 insertions, 0 deletions
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 |
