Cub3D
 
Loading...
Searching...
No Matches
Print functions

All the functions used to print. More...

Functions

ssize_t ft_print_position (int x, int y)
 Print a position.
 
ssize_t ft_print_file (t_map *map)
 Print the whole file.
 
ssize_t ft_print_config (t_map *map)
 Print the config.
 
ssize_t ft_print_map (t_map *map)
 Print the map.
 
void ft_print_floor_ceiling (t_map *map)
 Print the colors of floor and ceiling.
 
void ft_print_color (t_color *color)
 Print a color.
 
void print_visited (char **visited, char **map)
 Print the map visited by the DFS (Depth First Search), DFS is used to search if the exterior is accessible by the player 'x' means visited '.' means not visited.
 
void ft_print_key (int keycode)
 Print the keycode name if registered or just its value if not.
 
void print_map_error (t_map *map, enum e_map_error error)
 Print the corresponding map error.
 
int print_map_validate_error (t_map *map, enum e_map_error error)
 Print the corresponding map validation error.
 
void print_maze_error (enum e_maze_error error)
 Print the corresponding maze error.
 
int print_error (t_map *map, enum e_fx_error error)
 Print a special message according to enum.
 
void print_leak_map (char **map, size_t y, size_t x)
 Print where a leak is located on the map.
 

Detailed Description

All the functions used to print.

Function Documentation

◆ ft_print_color()

void ft_print_color ( t_color * color)

Print a color.

Parameters
[in]colorcolor to print

◆ ft_print_config()

ssize_t ft_print_config ( t_map * map)

Print the config.

Parameters
[in]mapmap structure
Returns
ssize_t number of caracter printed

◆ ft_print_file()

ssize_t ft_print_file ( t_map * map)

Print the whole file.

Parameters
[in]mapmap structure
Returns
ssize_t number of caracter printed

◆ ft_print_floor_ceiling()

void ft_print_floor_ceiling ( t_map * map)

Print the colors of floor and ceiling.

Parameters
[in]mapmap structure
Here is the call graph for this function:

◆ ft_print_key()

void ft_print_key ( int keycode)

Print the keycode name if registered or just its value if not.

Parameters
[in]keycodekeycode to print

◆ ft_print_map()

ssize_t ft_print_map ( t_map * map)

Print the map.

Parameters
[in]mapmap structure
Returns
ssize_t number of caracter printed

◆ ft_print_position()

ssize_t ft_print_position ( int x,
int y )

Print a position.

Parameters
[in]xx axis
[in]yy axis
Returns
ssize_t number of caracter printed

◆ print_error()

int print_error ( t_map * map,
enum e_fx_error error )

Print a special message according to enum.

Parameters
[in,out]mapmap structure
[in]errorerror state
Returns
int 1 if error print OK, 2 otherwise
Here is the call graph for this function:

◆ print_leak_map()

void print_leak_map ( char ** map,
size_t y,
size_t x )

Print where a leak is located on the map.

Parameters
[in]maparray of strings representing map
[in]ymap length
[in]xmap height
Here is the call graph for this function:

◆ print_map_error()

void print_map_error ( t_map * map,
enum e_map_error error )

Print the corresponding map error.

Parameters
[in,out]mapmap structure
[in]errorerror state
Here is the call graph for this function:

◆ print_map_validate_error()

int print_map_validate_error ( t_map * map,
enum e_map_error error )

Print the corresponding map validation error.

Parameters
[in,out]mapmap structure
[in]errorerror state
Here is the call graph for this function:

◆ print_maze_error()

void print_maze_error ( enum e_maze_error error)

Print the corresponding maze error.

Parameters
[in]errorerror state

◆ print_visited()

void print_visited ( char ** visited,
char ** map )

Print the map visited by the DFS (Depth First Search), DFS is used to search if the exterior is accessible by the player 'x' means visited '.' means not visited.

Parameters
[in]visitedarray of strings referring to visited tiles
[in]maparray of strings referring to original map