41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: o_ :::::: ::: */
|
|
/* initialise_fdf.c :+: / :+::+: :+: */
|
|
/* +:+ > +:++:+ +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#++#++:++#++ */
|
|
/* +#+ +#+#+ +#++#+ +#+ \o/ */
|
|
/* Created: 2024/12/13 15:23:17 by whaffman #+#+# #+#+# #+# #+# | */
|
|
/* Updated: 2024/12/20 11:22:00 by whaffman ### ### ### ### / \ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "fdf.h"
|
|
|
|
t_fdf *initialise_fdf(void)
|
|
{
|
|
t_map *map;
|
|
t_fdf *fdf;
|
|
|
|
fdf = malloc(sizeof(t_fdf));
|
|
if (!fdf)
|
|
handle_error(fdf, MALLOC_ERROR);
|
|
map = malloc(sizeof(t_map));
|
|
fdf->map = map;
|
|
if (!map)
|
|
handle_error(fdf, MALLOC_ERROR);
|
|
fdf->mlx = NULL;
|
|
fdf->img = NULL;
|
|
fdf->last_width = WIDTH;
|
|
fdf->last_height = HEIGHT;
|
|
fdf->map->orig = NULL;
|
|
fdf->map->rot = NULL;
|
|
fdf->map->proj = NULL;
|
|
fdf->map->width = 0;
|
|
fdf->map->height = 0;
|
|
fdf->map->z_max = 0;
|
|
fdf->map->z_min = 0;
|
|
reset_fdf(fdf);
|
|
return (fdf);
|
|
}
|