This commit is contained in:
Ladebeze66 2024-01-30 15:17:15 +01:00
parent ecbd62360c
commit 233d9d5cec
39 changed files with 17 additions and 16 deletions

BIN
cub3d Executable file

Binary file not shown.

View File

@ -6,7 +6,7 @@
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/14 16:56:52 by fgras-ca #+# #+# */
/* Updated: 2024/01/30 13:57:20 by fgras-ca ### ########.fr */
/* Updated: 2024/01/30 15:14:01 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
@ -472,6 +472,6 @@ bool check_for_multiple_players(bool found_player);
int check_boundaries(t_point p, t_map_check *map_check);
int is_space_surrounded_by_walls(t_map_check *map_check, t_point p);
void *ft_calloc(size_t nmemb, size_t size);
void *ft_realloc(void *ptr, size_t size);
void *ft_realloc(void *ptr, size_t newsize, size_t oldsize);
#endif

BIN
draw/ft_2d_view.o Normal file

Binary file not shown.

BIN
draw/ft_3d_view.o Normal file

Binary file not shown.

BIN
draw/ft_3d_view_utils.o Normal file

Binary file not shown.

BIN
draw/ft_background.o Normal file

Binary file not shown.

BIN
draw/ft_draw.o Normal file

Binary file not shown.

BIN
draw/ft_horizontal_ray.o Normal file

Binary file not shown.

View File

@ -6,7 +6,7 @@
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/14 20:30:59 by fgras-ca #+# #+# */
/* Updated: 2024/01/29 17:13:50 by fgras-ca ### ########.fr */
/* Updated: 2024/01/30 15:05:11 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */

BIN
draw/ft_load_textures.o Normal file

Binary file not shown.

BIN
draw/ft_pixel.o Normal file

Binary file not shown.

BIN
draw/ft_ray_utils.o Normal file

Binary file not shown.

BIN
draw/ft_textures.o Normal file

Binary file not shown.

BIN
draw/ft_vertical_ray.o Normal file

Binary file not shown.

BIN
main.o Normal file

Binary file not shown.

BIN
move/ft_collision.o Normal file

Binary file not shown.

BIN
move/ft_key.o Normal file

Binary file not shown.

BIN
move/ft_move.o Normal file

Binary file not shown.

BIN
parsing/ft_find_map_start.o Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
parsing/ft_map_check.o Normal file

Binary file not shown.

Binary file not shown.

BIN
parsing/ft_map_dimensions.o Normal file

Binary file not shown.

BIN
parsing/ft_parsing.o Normal file

Binary file not shown.

Binary file not shown.

View File

@ -6,7 +6,7 @@
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/16 16:19:13 by fgras-ca #+# #+# */
/* Updated: 2024/01/30 13:55:56 by fgras-ca ### ########.fr */
/* Updated: 2024/01/30 15:15:52 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
@ -24,9 +24,11 @@ bool read_map_line(int fd, char *buffer, ssize_t *bytes_read)
bool process_line(char **map_buffer, int *map_length, char *line)
{
ssize_t bytes_read;
size_t new_total_size;
bytes_read = ft_strlen(line);
*map_buffer = ft_realloc(*map_buffer, *map_length + bytes_read + 1);
new_total_size = *map_length + bytes_read + 1;
*map_buffer = ft_realloc(*map_buffer, new_total_size, *map_length);
if (!*map_buffer)
{
perror("Error reallocating memory for map buffer");

Binary file not shown.

BIN
utils/ft_utils_convert.o Normal file

Binary file not shown.

BIN
utils/ft_utils_gnl.o Normal file

Binary file not shown.

View File

@ -6,7 +6,7 @@
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/30 12:33:22 by fgras-ca #+# #+# */
/* Updated: 2024/01/30 13:58:28 by fgras-ca ### ########.fr */
/* Updated: 2024/01/30 15:13:41 by fgras-ca ### ########.fr */
/* */
/* ************************************************************************** */
@ -39,25 +39,24 @@ void *ft_calloc(size_t nmemb, size_t size)
return (ptr);
}
void *ft_realloc(void *ptr, size_t size)
void *ft_realloc(void *ptr, size_t newsize, size_t oldsize)
{
void *new_ptr;
char *newptr;
if (ptr == NULL)
{
return (malloc(size));
return (malloc(newsize));
}
if (size == 0)
if (newsize <= oldsize)
{
free(ptr);
return (NULL);
return (ptr);
}
new_ptr = malloc(size);
if (new_ptr == NULL)
newptr = malloc(newsize);
if (newptr == NULL)
{
return (NULL);
}
ft_memcpy(new_ptr, ptr, size);
ft_memcpy(newptr, ptr, oldsize);
free(ptr);
return (new_ptr);
return (newptr);
}

BIN
utils/ft_utils_mem.o Normal file

Binary file not shown.

BIN
utils/ft_utils_split.o Normal file

Binary file not shown.

BIN
utils/ft_utils_str_1.o Normal file

Binary file not shown.

BIN
window/ft_map.o Normal file

Binary file not shown.

BIN
window/ft_player.o Normal file

Binary file not shown.

BIN
window/ft_refresh_window.o Normal file

Binary file not shown.

BIN
window/ft_rescale.o Normal file

Binary file not shown.

BIN
window/ft_window.o Normal file

Binary file not shown.