tgrekov-fdf
HIVE fdf May 2024
Loading...
Searching...
No Matches
main.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/20 07:21:24 by tgrekov #+# #+# */
/* Updated: 2024/06/24 09:54:05 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file main.c.

#include <fcntl.h>
#include <stdio.h>
#include <libft.h>
#include <ft_printf.h>
#include "fdf/map.h"
#include "utils/utils.h"
Include dependency graph for main.c:

Go to the source code of this file.

Functions

t_map read_map (int fd)
 Initialize map from an fdf map file pointed to by fd.
 
int fdf (t_map map)
 Initialize mlx, run map projection and scaling, execute mlx, and cleanup.
 
static int open_map (char *filename)
 Validate filename and open fdf map file.
 
int main (int argc, char **argv)
 

Function Documentation

◆ fdf()

int fdf ( t_map  map)

Initialize mlx, run map projection and scaling, execute mlx, and cleanup.

Parameters
map
Return values
intExit status, 0 on success

Definition at line 131 of file fdf_mlx.c.

References fdf_mlx(), ft_printf(), s_loop_data::map, and project_map().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)
Parameters
argc
argv
Return values
int

Definition at line 59 of file main.c.

References arr_free(), fdf(), open_map(), s_map::point, and read_map().

Here is the call graph for this function:

◆ open_map()

static int open_map ( char *  filename)
static

Validate filename and open fdf map file.

Parameters
filename
Return values
int

Definition at line 36 of file main.c.

References ft_printf(), ft_strlen(), and ft_strncmp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_map()

t_map read_map ( int  fd)

Initialize map from an fdf map file pointed to by fd.

Parameters
[in]fd
Return values
t_map

Definition at line 147 of file read_map.c.

References arr_len(), s_list::content, err(), fill_points(), ft_calloc(), ft_lstclear(), ft_lstsize(), s_map::height, lst_arr_free(), s_map::point, split_rows(), and s_map::width.

Here is the call graph for this function:
Here is the caller graph for this function: