Refactor header files for consistency and clarity; update function signatures in parser.h and player.h
This commit is contained in:
parent
555f2dc00c
commit
c87ff10b57
12
inc/cub3d.h
12
inc/cub3d.h
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* cub3d.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* :::::::: */
|
||||
/* cub3d.h :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/04/15 12:22:29 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/10 15:48:20 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/10 19:29:49 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* game_menu.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* :::::::: */
|
||||
/* game_menu.h :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/05/27 15:07:48 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/10 15:20:30 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/10 19:30:12 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -30,8 +30,7 @@ void menu_toggle(t_menu *menu);
|
||||
char *get_score_prefix(int index);
|
||||
char *get_score_suffix(int index);
|
||||
void draw_score_line(
|
||||
mlx_t *mlx, mlx_image_t **img, char *text, t_vec2_int pos
|
||||
);
|
||||
mlx_t *mlx, mlx_image_t **img, char *text, t_vec2_int pos);
|
||||
char *get_score_text(char *prefix, char *suffix, int score);
|
||||
|
||||
#endif
|
||||
14
inc/parser.h
14
inc/parser.h
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* parser.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* :::::::: */
|
||||
/* parser.h :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/04/19 14:41:55 by whaffman #+# #+# */
|
||||
/* Updated: 2025/06/10 15:49:46 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/10 18:41:08 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -22,7 +22,7 @@ int is_map_line(const char *line);
|
||||
unsigned int parse_color(const char *color_str);
|
||||
int parse_config_line(char *line, t_map *map);
|
||||
int map_width(char **lines);
|
||||
int parse_tile(char c);
|
||||
int parse_tile(t_game *game, char c);
|
||||
int parse_map(char **lines, t_game *game);
|
||||
int parse_file(char *buffer, t_game *game);
|
||||
void print_config(t_map *map);
|
||||
|
||||
12
inc/player.h
12
inc/player.h
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* player.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* :::::::: */
|
||||
/* player.h :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/04/15 18:53:27 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/04 18:42:25 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/10 19:29:24 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
13
inc/render.h
13
inc/render.h
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* render.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* :::::::: */
|
||||
/* render.h :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/04/15 16:28:16 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/10 14:30:30 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/10 19:30:21 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
# include "cub3d.h"
|
||||
# define MIN_SPRITE_DIST 0.1
|
||||
|
||||
void render_map(t_game *game);
|
||||
t_render cast_ray(t_game *game, int x);
|
||||
void cast_rays(t_game *game);
|
||||
|
||||
12
inc/types.h
12
inc/types.h
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* types.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* :::::::: */
|
||||
/* types.h :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/04/15 15:52:44 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/10 15:06:16 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/10 19:30:40 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* game_manager.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* :::::::: */
|
||||
/* game_manager.c :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/05/27 13:48:18 by qmennen #+# #+# */
|
||||
/* Updated: 2025/06/10 15:19:59 by qmennen ### ########.fr */
|
||||
/* Updated: 2025/06/10 19:16:24 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -59,7 +59,6 @@ void game_manager_destroy(t_game_manager *manager)
|
||||
menu_free(manager->menu, manager->game->screen);
|
||||
if (manager->end_screen)
|
||||
menu_free(manager->end_screen, manager->game->screen);
|
||||
print_scores(manager->game);
|
||||
if (manager->game)
|
||||
game_free(manager->game);
|
||||
mlx_close_window(manager->game->screen->mlx);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user