summaryrefslogtreecommitdiff
path: root/src/ui/portrait.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/portrait.c')
-rw-r--r--src/ui/portrait.c21
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