mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
feat: Added perk logos to the left of the HUD
This commit is contained in:
parent
cd7d0ddcfc
commit
77a532a223
3 changed files with 39 additions and 2 deletions
24
src/main.c
24
src/main.c
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue