aboutsummaryrefslogtreecommitdiffstats
path: root/inc/cub3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'inc/cub3d.h')
-rw-r--r--inc/cub3d.h43
1 files changed, 34 insertions, 9 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index d426bba..25b80ee 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -36,6 +36,7 @@ t_bmp_info ft_init_bmp_info(void);
t_rgb ft_hex_to_og_rgb(uint32_t color);
int8_t ft_init_sfx(t_cub *cl);
int8_t ft_init_sprites(t_sprite ***sprites);
+int8_t ft_init_weaps(t_sprite ***weaps);
/*
** ====== HOOKS ======
@@ -62,8 +63,9 @@ void ft_death_hooks(t_win *wl, t_cub *cl);
*/
void ft_wall_tex_init(t_cub *cl);
+void ft_next_sprite_init(t_cub *cl);
void ft_weap_tex_init(t_cub *cl);
-void ft_choose_tex(t_cub *clist);
+void ft_num_tex_init(t_cub *cl);
/*
** ====== DRAW ======
@@ -73,6 +75,12 @@ void ft_draw_square(int a, int b, int rgb, t_cub *clist);
void ft_draw_map(char **map, t_cub *clist);
void ft_draw_texture(t_cub *cl, int x, int y, int tex_y);
int8_t ft_draw_hud(t_cub *clist);
+void ft_draw_minimap_back(t_cub *cl);
+void ft_draw_ammo_back(t_cub *cl);
+void ft_draw_health_caption(t_cub *cl);
+void ft_draw_ammo_caption(t_cub *cl);
+void ft_draw_life_bar(t_cub *cl);
+void ft_draw_ammo_bar(t_cub *cl);
void ft_draw_scene(t_cub *clist);
void ft_draw_scene_bmp(t_cub *clist);
void ft_draw_circle(float a, float b,
@@ -93,7 +101,6 @@ void ft_draw_skybox(t_cub *cl);
void ft_draw_handweap(t_cub *cl);
void ft_macos_suffer_animation(t_cub *cl);
void ft_linux_suffer_animation(t_cub *cl);
-void ft_draw_life_bar(t_cub *cl);
/*
** ====== PARSING ======
@@ -134,23 +141,26 @@ int ft_get_map_core(int fd, t_cub *clist);
void ft_get_topsp(char c, t_cub *clist);
void ft_check_map_surrounds(t_map *ml, t_cub *cl);
int ft_check_missing(t_cub *clist);
+int ft_check_missing_tex_defines(t_cub *clist);
+int ft_check_missing_sfx(t_cub *clist);
int ft_missing_error(const char *err, t_cub *clist);
int ft_map_error(const char *errmsg, t_cub *clist);
size_t ft_get_line_len(char *line);
+void ft_get_spawns(t_cub *cl);
/*
** ====== ARGS ======
*/
uint8_t ft_check_map_arg(int argc, const char *argv[]);
-uint8_t ft_use_args(int argc, const char *argv[],
- char *const envp[], t_cub *clist);
+uint8_t ft_use_args(int argc, const char *argv[], t_cub *clist);
/*
** ====== RAYCAST ======
*/
void ft_castray(t_cub *cl);
+void ft_choose_tex(t_cub *clist);
void ft_detect(t_cub *cl);
void ft_detection_init_x(t_cub *cl);
void ft_detection_init_y(t_cub *cl);
@@ -171,6 +181,9 @@ void ft_sfx_weapon_one_load(t_sfx *sfx);
void ft_sfx_weapon_one_fire(t_sfx *sfx);
void ft_sfx_weapon_two_load(t_sfx *sfx);
void ft_sfx_weapon_two_fire(t_sfx *sfx);
+void ft_sfx_weapon_three_load(t_sfx *sfx);
+void ft_sfx_weapon_three_fire(t_sfx *sfx);
+void ft_sfx_ooa(t_sfx *sfx);
void *ft_sfx_death_thread(void *vargp);
void *ft_sfx_footstep_thread(void *vargp);
void *ft_sfx_new_lvl_thread(void *vargp);
@@ -181,6 +194,21 @@ void *ft_sfx_weapon_one_load_thread(void *vargp);
void *ft_sfx_weapon_one_fire_thread(void *vargp);
void *ft_sfx_weapon_two_load_thread(void *vargp);
void *ft_sfx_weapon_two_fire_thread(void *vargp);
+void *ft_sfx_weapon_three_load_thread(void *vargp);
+void *ft_sfx_weapon_three_fire_thread(void *vargp);
+void *ft_sfx_ooa_thread(void *vargp);
+
+/*
+** ====== DELETION ======
+*/
+
+void ft_del_tex(t_cub *clist);
+void ft_del_map(t_map *ml);
+void ft_del_sprites_lists(t_cub *clist);
+void ft_del_sfx_cmd(t_cub *clist);
+uint8_t ft_free_words(char **words);
+uint8_t ft_free_sprites_path(char **sprites);
+int ft_exit(uint8_t exit_code, t_cub *clist);
/*
** ====== OTHER ======
@@ -191,12 +219,8 @@ void ft_enable_music(t_cub *cl);
void ft_music_fork(char **mcmd_words, char *const envp[]);
int8_t ft_save_to_bmp(t_cub *cl);
int ft_error(uint8_t retval, const char *errmsg, t_cub *clist);
-uint8_t ft_free_words(char **words);
-uint8_t ft_free_sprites(char **sprites);
-void ft_del_extra_sprites(t_cub *cl);
int8_t ft_warp_level(char *path, t_cub *cl);
-int ft_exit(uint8_t exit_code, t_cub *clist);
-uint32_t ft_rgb_to_hex(t_rgb rgb);
+uint32_t ft_rgb_to_hex(float dist, t_rgb rgb, t_cub *cl);
t_bmp_rgb ft_hex_to_rgb(uint32_t color);
uint32_t ft_darken(t_rgb rgb, t_cub *cl);
void ft_death_screen(t_cub *cl);
@@ -204,6 +228,7 @@ void ft_get_fps_count(clock_t delta_time, t_cub *cl);
void ft_find_item(t_player *pl, t_map *ml, t_cub *cl);
int8_t ft_switch_weap_one(t_cub *cl);
int8_t ft_switch_weap_two(t_cub *cl);
+int8_t ft_switch_weap_three(t_cub *cl);
void ft_shoot(t_cub *cl, uint16_t center);
# endif