mirror of
https://codeberg.org/ACME-Corporation/cub3d.git
synced 2025-12-06 01:48:08 +01:00
Added weapon hud
This commit is contained in:
parent
fe665eaa4e
commit
416b7a833d
4 changed files with 6674 additions and 3 deletions
6668
ressources/weapon.xpm
Normal file
6668
ressources/weapon.xpm
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/07/17 14:59:37 by kcolin #+# #+# */
|
/* Created: 2025/07/17 14:59:37 by kcolin #+# #+# */
|
||||||
/* Updated: 2025/09/03 18:22:15 by tchampio ### ########.fr */
|
/* Updated: 2025/09/05 20:26:30 by tchampio ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -34,6 +34,7 @@ typedef struct s_cub3d_data
|
||||||
t_img_data *perk_logos[3];
|
t_img_data *perk_logos[3];
|
||||||
t_img_data *tally_marks[5];
|
t_img_data *tally_marks[5];
|
||||||
t_img_data *round_figures[10];
|
t_img_data *round_figures[10];
|
||||||
|
t_img_data *gun;
|
||||||
t_mapdata *map;
|
t_mapdata *map;
|
||||||
t_player player;
|
t_player player;
|
||||||
t_keypresses keypresses;
|
t_keypresses keypresses;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: tchampio <tchampio@student.42lehavre.fr> +#+ +:+ +#+ */
|
/* By: tchampio <tchampio@student.42lehavre.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/09/03 17:02:08 by tchampio #+# #+# */
|
/* Created: 2025/09/03 17:02:08 by tchampio #+# #+# */
|
||||||
/* Updated: 2025/09/03 18:24:18 by tchampio ### ########.fr */
|
/* Updated: 2025/09/05 20:26:20 by tchampio ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -92,4 +92,5 @@ void load_textures(t_cub3d_data *data)
|
||||||
load_points_textures(data);
|
load_points_textures(data);
|
||||||
load_perk_logos(data);
|
load_perk_logos(data);
|
||||||
load_round_indicators(data);
|
load_round_indicators(data);
|
||||||
|
data->gun = load_hud_texture(data, "ressources/weapon.xpm");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
/* By: kcolin <kcolin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
/* Created: 2025/07/17 14:14:30 by kcolin #+# #+# */
|
||||||
/* Updated: 2025/09/03 18:31:54 by tchampio ### ########.fr */
|
/* Updated: 2025/09/05 20:25:30 by tchampio ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -102,6 +102,7 @@ void create_hud(t_cub3d_data *data)
|
||||||
// draw round
|
// draw round
|
||||||
draw_round(data);
|
draw_round(data);
|
||||||
// draw weapon
|
// draw weapon
|
||||||
|
matrix_image_put(data, data->gun, WIDTH / 2, HEIGHT - 175);
|
||||||
// draw map
|
// draw map
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue