feat: Added perk logos to the left of the HUD

This commit is contained in:
Theo Champion 2025-09-03 16:38:38 +02:00
parent cd7d0ddcfc
commit 77a532a223
3 changed files with 39 additions and 2 deletions

View file

@ -51,11 +51,35 @@ void draw_points(t_cub3d_data *data)
}
}
void draw_perks(t_cub3d_data *data)
{
int i;
int perk_pos;
i = 0;
perk_pos = 50;
while (i < 3)
{
if (data->player.perk_order[i] != NONE)
{
if (data->player.perk_order[i] == REVIVE)
matrix_image_put(data, data->perk_logos[1], perk_pos, HEIGHT - 200);
if (data->player.perk_order[i] == JUGGERNOG)
matrix_image_put(data, data->perk_logos[0], perk_pos, HEIGHT - 200);
if (data->player.perk_order[i] == DOUBLETAP)
matrix_image_put(data, data->perk_logos[2], perk_pos, HEIGHT - 200);
perk_pos += 50;
}
i++;
}
}
void create_hud(t_cub3d_data *data)
{
// draw points
draw_points(data);
// draw perks
draw_perks(data);
// draw weapon
// draw map
}