diff --git a/Makefile b/Makefile index 7003cd9..e904f48 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ SRCS := ${SRCS_MAP} \ OBJS := ${SRCS:.c=.o} CC := clang LIBS := libftx/libftx.a MLX42/build/libmlx42.a -ldl -lglfw -lm -CFLAGS := -g -Wall -Wextra -Werror +CFLAGS := -g -Wall -Wextra -Werror -Wno-conversion -Ofast NAME := cub3D all: ${NAME} diff --git a/cub3D b/cub3D new file mode 100755 index 0000000..64ecaf4 Binary files /dev/null and b/cub3D differ diff --git a/game/dda.c b/game/dda.c index f67c10c..8df73c7 100644 --- a/game/dda.c +++ b/game/dda.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/05/02 15:49:00 by erey-bet #+# #+# */ -/* Updated: 2023/05/03 17:37:31 by erey-bet ### ########.fr */ +/* Updated: 2023/05/04 14:37:21 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -55,7 +55,7 @@ void init_dda(t_game *game, t_dda *dda) dda->hit = 0; } -void loop_dda(t_game *game, t_dda *dda) +void loop_dda(t_game *game, t_dda *dda) { while (dda->hit == 0) { @@ -71,18 +71,23 @@ void loop_dda(t_game *game, t_dda *dda) dda->map_y += dda->step_y; dda->side = 1; } - if (dda->map_x >= 0 && dda->map_y >= 0 && - game->map.map[dda->map_y][dda->map_x] == '1') + if (dda->map_x < 0 || dda->map_y < 0 + || dda->map_x >= (int)game->map.size_x || dda->map_y >= (int)game->map.size_y) + { + dda->perp_wall_dist = 1e30; + return ; + } + if (game->map.map[dda->map_y][dda->map_x] == '1') dda->hit = 1; } -} - -void ray_dda(t_dda *dda) -{ if(dda->side == 0) dda->perp_wall_dist = dda->side_dist_x - dda->delta_dist_x; else dda->perp_wall_dist = dda->side_dist_y - dda->delta_dist_y; +} + +void ray_dda(t_dda *dda) +{ if (dda->perp_wall_dist == 0) dda->perp_wall_dist = 1e30; dda->line_height = (int)(HEIGHT / dda->perp_wall_dist); @@ -96,7 +101,7 @@ void ray_dda(t_dda *dda) unsigned int get_rgba(int r, int g, int b, int a) { - return (a << 24 | r << 16 | g << 8 | b); + return (r << 24 | g << 16 | b << 8 | a); } void draw_line(t_game *game, t_dda *dda, unsigned int color, int x) @@ -120,7 +125,7 @@ void draw_line(t_game *game, t_dda *dda, unsigned int color, int x) { mlx_put_pixel(game->window, x, y, white); } - y ++; + y++; } } @@ -129,14 +134,16 @@ void draw_dda(t_game *game, t_dda *dda, int x) { unsigned int color; - if (dda->step_x == -1 && dda->side == 0) // EAST - color = get_rgba(255, 0, 0, 255); - else if (dda->step_x == 1 && dda->side == 0) // WEST - color = get_rgba(0, 255, 0, 255); - else if (dda->step_y == 1 && dda->side == 1) // NORTH - color = get_rgba(0, 0, 255, 255); - else // SOUTH - color = get_rgba(100, 100, 100, 255); + if (dda->step_x < 0 && dda->side == 0) // NORTH + color = get_rgba(0, 0, 200, 255); + else if (dda->step_x > 0 && dda->side == 0) // SOUTH + color = get_rgba(200, 0, 0, 255); + else if (dda->step_y < 0 && dda->side == 1) // EAST + color = get_rgba(0, 200, 0, 255); + else if (dda->step_y > 0 && dda->side == 1) // WEST + color = get_rgba(50, 100, 50, 255); + else + color = get_rgba(0, 0, 0, 255); draw_line(game, dda, color, x); } diff --git a/game/dda.o b/game/dda.o new file mode 100644 index 0000000..9ab0c7c Binary files /dev/null and b/game/dda.o differ diff --git a/game/game.h b/game/game.h index 5c7f3a7..87e30f4 100644 --- a/game/game.h +++ b/game/game.h @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/26 15:29:34 by erey-bet #+# #+# */ -/* Updated: 2023/05/03 16:51:50 by erey-bet ### ########.fr */ +/* Updated: 2023/05/04 13:27:54 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -45,8 +45,8 @@ # define WIDTH 1920 # define HEIGHT 1080 -# define MOVESPEED 0.1 -# define ROTATIONSPEED 10 +# define MOVESPEED 0.10 +# define ROTATIONSPEED 60 typedef struct s_player { diff --git a/game/game.o b/game/game.o new file mode 100644 index 0000000..193be81 Binary files /dev/null and b/game/game.o differ diff --git a/game/init.c b/game/init.c index 2fb8e70..694fa40 100644 --- a/game/init.c +++ b/game/init.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/27 14:50:22 by erey-bet #+# #+# */ -/* Updated: 2023/05/03 17:47:38 by erey-bet ### ########.fr */ +/* Updated: 2023/05/04 14:34:47 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -18,8 +18,8 @@ void init_ply(t_map map, t_ply *ply) ply->pos_y = map.ply_y; ply->dir_x = -1; ply->dir_y = 0; - ply->pla_x = 0; - ply->pla_y = 0.90; + ply->pla_x = 0.66; + ply->pla_y = 0.66; } void init_ray(t_ray *ray) diff --git a/game/init.o b/game/init.o new file mode 100644 index 0000000..ee89501 Binary files /dev/null and b/game/init.o differ diff --git a/game/manage.o b/game/manage.o new file mode 100644 index 0000000..8f76207 Binary files /dev/null and b/game/manage.o differ diff --git a/game/manage_keys.c b/game/manage_keys.c index 168b1a0..4963b1d 100644 --- a/game/manage_keys.c +++ b/game/manage_keys.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/27 14:14:51 by erey-bet #+# #+# */ -/* Updated: 2023/05/03 16:16:34 by erey-bet ### ########.fr */ +/* Updated: 2023/05/04 14:16:06 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -15,28 +15,31 @@ void rotate(t_ply *ply, bool right) { double old_dir_x; + double old_dir_y; double old_plane_x; + double old_plane_y; double speed; old_dir_x = ply->dir_x; + old_dir_y = ply->dir_y; old_plane_x = ply->pla_x; + old_plane_y = ply->pla_y; speed = ROTATIONSPEED * (M_1_PI / 180.0); if (right) speed = -speed; - ply->dir_x = ply->dir_x * cos(speed) - ply->dir_y * sin(speed); - ply->dir_y = old_dir_x * sin(speed) + ply->dir_y * cos(speed); - ply->pla_x = ply->pla_x * cos(speed) - ply->pla_y * sin(speed); - ply->pla_y = old_plane_x * sin(speed) + ply->pla_y * cos(speed); + ply->dir_x = old_dir_x * cos(speed) - old_dir_y * sin(speed); + ply->dir_y = old_dir_x * sin(speed) + old_dir_y * cos(speed); + ply->pla_x = old_plane_x * cos(speed) - old_plane_y * sin(speed); + ply->pla_y = old_plane_x * sin(speed) + old_plane_y * cos(speed); } void movement(t_game *game, t_ply *ply, double x, double y) { - if(game->map.map[(int)(ply->pos_x + ply->dir_x * MOVESPEED)][(int)ply->pos_y] == '0') + (void)game; + //if(game->map.map[(int)(ply->pos_x + x)][(int)ply->pos_y] == '0') ply->pos_x += x; - if(game->map.map[(int)ply->pos_x][(int)(ply->pos_y + ply->dir_y * MOVESPEED)] == '0') + //if(game->map.map[(int)ply->pos_x][(int)(ply->pos_y + y)] == '0') ply->pos_y += y; - printf("ply->pos_x: %f, ply->pos_y: %f\n", ply->pos_x, ply->pos_y); - printf("x: %f, y: %f\n", x, y); } @@ -45,13 +48,18 @@ int manage_movement(t_game *game, int key) t_ply *ply; ply = &game->ply; + printf("dir_x: %f, dir_y: %f\n", ply->dir_x, ply->dir_y); if (key == MLX_KEY_W) - movement(game, ply, ply->dir_x * MOVESPEED, ply->dir_y * MOVESPEED); + movement(game, ply, (ply->dir_x * MOVESPEED), (ply->dir_y * MOVESPEED)); else if (key == MLX_KEY_S) movement(game, ply, -(ply->dir_x * MOVESPEED), -(ply->dir_y * MOVESPEED)); else if (key == MLX_KEY_D) - rotate(ply, true); + movement(game, ply, -(ply->dir_x * MOVESPEED), (ply->dir_y * MOVESPEED)); else if (key == MLX_KEY_A) + movement(game, ply, (ply->dir_x * MOVESPEED), -(ply->dir_y * MOVESPEED)); + else if (key == MLX_KEY_L) + rotate(ply, true); + else if (key == MLX_KEY_J) rotate(ply, false); return (1); } @@ -61,12 +69,15 @@ int manage_keys(mlx_key_data_t keys, t_game *game) int is_moving; is_moving = 0; - if (keys.key == MLX_KEY_ESCAPE) + if (keys.key == MLX_KEY_Q) mlx_close_window(game->mlx); else if (keys.key == MLX_KEY_W || keys.key == MLX_KEY_S || keys.key == MLX_KEY_D - || keys.key == MLX_KEY_A) + || keys.key == MLX_KEY_A + || keys.key == MLX_KEY_ESCAPE + || keys.key == MLX_KEY_L + || keys.key == MLX_KEY_J ) is_moving = manage_movement(game, keys.key); if (is_moving) return (1); diff --git a/game/manage_keys.o b/game/manage_keys.o new file mode 100644 index 0000000..c93554c Binary files /dev/null and b/game/manage_keys.o differ diff --git a/game/raycasting.c b/game/raycasting.c index d762391..d7da8ac 100644 --- a/game/raycasting.c +++ b/game/raycasting.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/27 14:30:29 by erey-bet #+# #+# */ -/* Updated: 2023/05/03 17:44:24 by erey-bet ### ########.fr */ +/* Updated: 2023/05/04 14:41:50 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -23,11 +23,11 @@ int ray(t_game *game) p = &game->ply; ray = &game->ray; - while (x <= WIDTH) + while (x < WIDTH) { camera = 2 * x / ((double)(WIDTH - 1)); - ray->dir_x = p->dir_x + p->pla_x * camera; - ray->dir_y = p->dir_y + p->pla_y * camera; + ray->dir_x = (p->dir_x + 0.45) + p->pla_x * camera; + ray->dir_y = (p->dir_y - 0.45) + p->pla_y * camera; dda(game, x); x++; } @@ -37,6 +37,5 @@ int ray(t_game *game) int raycasting(t_game *game) { ray(game); - write(1, "raycasting...\n", 14); return (0); } diff --git a/game/raycasting.o b/game/raycasting.o new file mode 100644 index 0000000..eee7085 Binary files /dev/null and b/game/raycasting.o differ diff --git a/libftx/extra/extra.a b/libftx/extra/extra.a new file mode 100644 index 0000000..ca2f0fd Binary files /dev/null and b/libftx/extra/extra.a differ diff --git a/libftx/extra/ft_contain_only.o b/libftx/extra/ft_contain_only.o new file mode 100644 index 0000000..9189360 Binary files /dev/null and b/libftx/extra/ft_contain_only.o differ diff --git a/libftx/extra/ft_freer.o b/libftx/extra/ft_freer.o new file mode 100644 index 0000000..3430315 Binary files /dev/null and b/libftx/extra/ft_freer.o differ diff --git a/libftx/extra/ft_is_in.o b/libftx/extra/ft_is_in.o new file mode 100644 index 0000000..13d7ee4 Binary files /dev/null and b/libftx/extra/ft_is_in.o differ diff --git a/libftx/extra/ft_random_generator.o b/libftx/extra/ft_random_generator.o new file mode 100644 index 0000000..eab56ac Binary files /dev/null and b/libftx/extra/ft_random_generator.o differ diff --git a/libftx/extra/ft_strchri.o b/libftx/extra/ft_strchri.o new file mode 100644 index 0000000..67cafcb Binary files /dev/null and b/libftx/extra/ft_strchri.o differ diff --git a/libftx/extra/ft_strcmp.o b/libftx/extra/ft_strcmp.o new file mode 100644 index 0000000..00dc348 Binary files /dev/null and b/libftx/extra/ft_strcmp.o differ diff --git a/libftx/extra/ft_strfjoin.o b/libftx/extra/ft_strfjoin.o new file mode 100644 index 0000000..e6eb032 Binary files /dev/null and b/libftx/extra/ft_strfjoin.o differ diff --git a/libftx/extra/ft_strgen.o b/libftx/extra/ft_strgen.o new file mode 100644 index 0000000..319c229 Binary files /dev/null and b/libftx/extra/ft_strgen.o differ diff --git a/libftx/extra/ft_strmerger.o b/libftx/extra/ft_strmerger.o new file mode 100644 index 0000000..46b5747 Binary files /dev/null and b/libftx/extra/ft_strmerger.o differ diff --git a/libftx/extra/ft_strndup.o b/libftx/extra/ft_strndup.o new file mode 100644 index 0000000..848e253 Binary files /dev/null and b/libftx/extra/ft_strndup.o differ diff --git a/libftx/extra/ft_swap.o b/libftx/extra/ft_swap.o new file mode 100644 index 0000000..de0699b Binary files /dev/null and b/libftx/extra/ft_swap.o differ diff --git a/libftx/extra/ft_tablen.o b/libftx/extra/ft_tablen.o new file mode 100644 index 0000000..6c22276 Binary files /dev/null and b/libftx/extra/ft_tablen.o differ diff --git a/libftx/extra/ft_tabrealloc.o b/libftx/extra/ft_tabrealloc.o new file mode 100644 index 0000000..879fc98 Binary files /dev/null and b/libftx/extra/ft_tabrealloc.o differ diff --git a/libftx/extra/ft_ultoa_base.o b/libftx/extra/ft_ultoa_base.o new file mode 100644 index 0000000..5804486 Binary files /dev/null and b/libftx/extra/ft_ultoa_base.o differ diff --git a/libftx/gnl/get_next_line.a b/libftx/gnl/get_next_line.a new file mode 100644 index 0000000..bc1e015 Binary files /dev/null and b/libftx/gnl/get_next_line.a differ diff --git a/libftx/gnl/get_next_line.o b/libftx/gnl/get_next_line.o new file mode 100644 index 0000000..8d3bf5e Binary files /dev/null and b/libftx/gnl/get_next_line.o differ diff --git a/libftx/libft/ft_atoi.o b/libftx/libft/ft_atoi.o new file mode 100644 index 0000000..bd06d75 Binary files /dev/null and b/libftx/libft/ft_atoi.o differ diff --git a/libftx/libft/ft_bzero.o b/libftx/libft/ft_bzero.o new file mode 100644 index 0000000..3624f57 Binary files /dev/null and b/libftx/libft/ft_bzero.o differ diff --git a/libftx/libft/ft_calloc.o b/libftx/libft/ft_calloc.o new file mode 100644 index 0000000..17cf949 Binary files /dev/null and b/libftx/libft/ft_calloc.o differ diff --git a/libftx/libft/ft_isalnum.o b/libftx/libft/ft_isalnum.o new file mode 100644 index 0000000..4d1b849 Binary files /dev/null and b/libftx/libft/ft_isalnum.o differ diff --git a/libftx/libft/ft_isalpha.o b/libftx/libft/ft_isalpha.o new file mode 100644 index 0000000..ab5e572 Binary files /dev/null and b/libftx/libft/ft_isalpha.o differ diff --git a/libftx/libft/ft_isascii.o b/libftx/libft/ft_isascii.o new file mode 100644 index 0000000..7d97a2f Binary files /dev/null and b/libftx/libft/ft_isascii.o differ diff --git a/libftx/libft/ft_isdigit.o b/libftx/libft/ft_isdigit.o new file mode 100644 index 0000000..3e14999 Binary files /dev/null and b/libftx/libft/ft_isdigit.o differ diff --git a/libftx/libft/ft_isprint.o b/libftx/libft/ft_isprint.o new file mode 100644 index 0000000..4f28a7d Binary files /dev/null and b/libftx/libft/ft_isprint.o differ diff --git a/libftx/libft/ft_itoa.o b/libftx/libft/ft_itoa.o new file mode 100644 index 0000000..e82a7f0 Binary files /dev/null and b/libftx/libft/ft_itoa.o differ diff --git a/libftx/libft/ft_lstadd_back.o b/libftx/libft/ft_lstadd_back.o new file mode 100644 index 0000000..e54f1c1 Binary files /dev/null and b/libftx/libft/ft_lstadd_back.o differ diff --git a/libftx/libft/ft_lstadd_front.o b/libftx/libft/ft_lstadd_front.o new file mode 100644 index 0000000..2609801 Binary files /dev/null and b/libftx/libft/ft_lstadd_front.o differ diff --git a/libftx/libft/ft_lstclear.o b/libftx/libft/ft_lstclear.o new file mode 100644 index 0000000..e76adde Binary files /dev/null and b/libftx/libft/ft_lstclear.o differ diff --git a/libftx/libft/ft_lstdelone.o b/libftx/libft/ft_lstdelone.o new file mode 100644 index 0000000..02984fb Binary files /dev/null and b/libftx/libft/ft_lstdelone.o differ diff --git a/libftx/libft/ft_lstiter.o b/libftx/libft/ft_lstiter.o new file mode 100644 index 0000000..7fb23ca Binary files /dev/null and b/libftx/libft/ft_lstiter.o differ diff --git a/libftx/libft/ft_lstlast.o b/libftx/libft/ft_lstlast.o new file mode 100644 index 0000000..16b1712 Binary files /dev/null and b/libftx/libft/ft_lstlast.o differ diff --git a/libftx/libft/ft_lstmap.o b/libftx/libft/ft_lstmap.o new file mode 100644 index 0000000..7d63dd0 Binary files /dev/null and b/libftx/libft/ft_lstmap.o differ diff --git a/libftx/libft/ft_lstnew.o b/libftx/libft/ft_lstnew.o new file mode 100644 index 0000000..dd238e1 Binary files /dev/null and b/libftx/libft/ft_lstnew.o differ diff --git a/libftx/libft/ft_lstsize.o b/libftx/libft/ft_lstsize.o new file mode 100644 index 0000000..0eb2159 Binary files /dev/null and b/libftx/libft/ft_lstsize.o differ diff --git a/libftx/libft/ft_memchr.o b/libftx/libft/ft_memchr.o new file mode 100644 index 0000000..f0ee4b1 Binary files /dev/null and b/libftx/libft/ft_memchr.o differ diff --git a/libftx/libft/ft_memcmp.o b/libftx/libft/ft_memcmp.o new file mode 100644 index 0000000..21b16e1 Binary files /dev/null and b/libftx/libft/ft_memcmp.o differ diff --git a/libftx/libft/ft_memcpy.o b/libftx/libft/ft_memcpy.o new file mode 100644 index 0000000..b804cc0 Binary files /dev/null and b/libftx/libft/ft_memcpy.o differ diff --git a/libftx/libft/ft_memmove.o b/libftx/libft/ft_memmove.o new file mode 100644 index 0000000..96a8eea Binary files /dev/null and b/libftx/libft/ft_memmove.o differ diff --git a/libftx/libft/ft_memset.o b/libftx/libft/ft_memset.o new file mode 100644 index 0000000..7867173 Binary files /dev/null and b/libftx/libft/ft_memset.o differ diff --git a/libftx/libft/ft_putchar_fd.o b/libftx/libft/ft_putchar_fd.o new file mode 100644 index 0000000..ffa0cc2 Binary files /dev/null and b/libftx/libft/ft_putchar_fd.o differ diff --git a/libftx/libft/ft_putendl_fd.o b/libftx/libft/ft_putendl_fd.o new file mode 100644 index 0000000..9c8e7c9 Binary files /dev/null and b/libftx/libft/ft_putendl_fd.o differ diff --git a/libftx/libft/ft_putnbr_fd.o b/libftx/libft/ft_putnbr_fd.o new file mode 100644 index 0000000..c3ace6e Binary files /dev/null and b/libftx/libft/ft_putnbr_fd.o differ diff --git a/libftx/libft/ft_putstr_fd.o b/libftx/libft/ft_putstr_fd.o new file mode 100644 index 0000000..38c632c Binary files /dev/null and b/libftx/libft/ft_putstr_fd.o differ diff --git a/libftx/libft/ft_split.o b/libftx/libft/ft_split.o new file mode 100644 index 0000000..f46c769 Binary files /dev/null and b/libftx/libft/ft_split.o differ diff --git a/libftx/libft/ft_strchr.o b/libftx/libft/ft_strchr.o new file mode 100644 index 0000000..07a907b Binary files /dev/null and b/libftx/libft/ft_strchr.o differ diff --git a/libftx/libft/ft_strdup.o b/libftx/libft/ft_strdup.o new file mode 100644 index 0000000..81ee7a5 Binary files /dev/null and b/libftx/libft/ft_strdup.o differ diff --git a/libftx/libft/ft_striteri.o b/libftx/libft/ft_striteri.o new file mode 100644 index 0000000..0a476a8 Binary files /dev/null and b/libftx/libft/ft_striteri.o differ diff --git a/libftx/libft/ft_strjoin.o b/libftx/libft/ft_strjoin.o new file mode 100644 index 0000000..3323f22 Binary files /dev/null and b/libftx/libft/ft_strjoin.o differ diff --git a/libftx/libft/ft_strlcat.o b/libftx/libft/ft_strlcat.o new file mode 100644 index 0000000..18fa474 Binary files /dev/null and b/libftx/libft/ft_strlcat.o differ diff --git a/libftx/libft/ft_strlcpy.o b/libftx/libft/ft_strlcpy.o new file mode 100644 index 0000000..09007c0 Binary files /dev/null and b/libftx/libft/ft_strlcpy.o differ diff --git a/libftx/libft/ft_strlen.o b/libftx/libft/ft_strlen.o new file mode 100644 index 0000000..e684c93 Binary files /dev/null and b/libftx/libft/ft_strlen.o differ diff --git a/libftx/libft/ft_strmapi.o b/libftx/libft/ft_strmapi.o new file mode 100644 index 0000000..e42a10a Binary files /dev/null and b/libftx/libft/ft_strmapi.o differ diff --git a/libftx/libft/ft_strncmp.o b/libftx/libft/ft_strncmp.o new file mode 100644 index 0000000..dc335cb Binary files /dev/null and b/libftx/libft/ft_strncmp.o differ diff --git a/libftx/libft/ft_strnstr.o b/libftx/libft/ft_strnstr.o new file mode 100644 index 0000000..86ac51b Binary files /dev/null and b/libftx/libft/ft_strnstr.o differ diff --git a/libftx/libft/ft_strrchr.o b/libftx/libft/ft_strrchr.o new file mode 100644 index 0000000..c224ce9 Binary files /dev/null and b/libftx/libft/ft_strrchr.o differ diff --git a/libftx/libft/ft_strtrim.o b/libftx/libft/ft_strtrim.o new file mode 100644 index 0000000..36b7dc2 Binary files /dev/null and b/libftx/libft/ft_strtrim.o differ diff --git a/libftx/libft/ft_substr.o b/libftx/libft/ft_substr.o new file mode 100644 index 0000000..4e89902 Binary files /dev/null and b/libftx/libft/ft_substr.o differ diff --git a/libftx/libft/ft_tolower.o b/libftx/libft/ft_tolower.o new file mode 100644 index 0000000..5be7fb8 Binary files /dev/null and b/libftx/libft/ft_tolower.o differ diff --git a/libftx/libft/ft_toupper.o b/libftx/libft/ft_toupper.o new file mode 100644 index 0000000..c12dcf3 Binary files /dev/null and b/libftx/libft/ft_toupper.o differ diff --git a/libftx/libft/libft.a b/libftx/libft/libft.a new file mode 100644 index 0000000..2c6a5d9 Binary files /dev/null and b/libftx/libft/libft.a differ diff --git a/libftx/libftx.a b/libftx/libftx.a new file mode 100644 index 0000000..4cf5af4 Binary files /dev/null and b/libftx/libftx.a differ diff --git a/libftx/printf/ft_dprintX.o b/libftx/printf/ft_dprintX.o new file mode 100644 index 0000000..763dca2 Binary files /dev/null and b/libftx/printf/ft_dprintX.o differ diff --git a/libftx/printf/ft_dprintarg.o b/libftx/printf/ft_dprintarg.o new file mode 100644 index 0000000..1ad8ac4 Binary files /dev/null and b/libftx/printf/ft_dprintarg.o differ diff --git a/libftx/printf/ft_dprintflag.o b/libftx/printf/ft_dprintflag.o new file mode 100644 index 0000000..ffd61b4 Binary files /dev/null and b/libftx/printf/ft_dprintflag.o differ diff --git a/libftx/printf/ft_dprintl_base.o b/libftx/printf/ft_dprintl_base.o new file mode 100644 index 0000000..25d4e4e Binary files /dev/null and b/libftx/printf/ft_dprintl_base.o differ diff --git a/libftx/printf/ft_dprintptr.o b/libftx/printf/ft_dprintptr.o new file mode 100644 index 0000000..747c23e Binary files /dev/null and b/libftx/printf/ft_dprintptr.o differ diff --git a/libftx/printf/ft_dprintstrtab.o b/libftx/printf/ft_dprintstrtab.o new file mode 100644 index 0000000..2d7dd8e Binary files /dev/null and b/libftx/printf/ft_dprintstrtab.o differ diff --git a/libftx/printf/ft_dprintul.o b/libftx/printf/ft_dprintul.o new file mode 100644 index 0000000..a3146a6 Binary files /dev/null and b/libftx/printf/ft_dprintul.o differ diff --git a/libftx/printf/ft_dprintul_base.o b/libftx/printf/ft_dprintul_base.o new file mode 100644 index 0000000..531ebcc Binary files /dev/null and b/libftx/printf/ft_dprintul_base.o differ diff --git a/libftx/printf/ft_dprintx.o b/libftx/printf/ft_dprintx.o new file mode 100644 index 0000000..e23686e Binary files /dev/null and b/libftx/printf/ft_dprintx.o differ diff --git a/libftx/printf/ft_eprintf.o b/libftx/printf/ft_eprintf.o new file mode 100644 index 0000000..50f4737 Binary files /dev/null and b/libftx/printf/ft_eprintf.o differ diff --git a/libftx/printf/ft_isarg.o b/libftx/printf/ft_isarg.o new file mode 100644 index 0000000..61786aa Binary files /dev/null and b/libftx/printf/ft_isarg.o differ diff --git a/libftx/printf/ft_isdigit.o b/libftx/printf/ft_isdigit.o new file mode 100644 index 0000000..28fdc56 Binary files /dev/null and b/libftx/printf/ft_isdigit.o differ diff --git a/libftx/printf/ft_printf.a b/libftx/printf/ft_printf.a new file mode 100644 index 0000000..adf35b4 Binary files /dev/null and b/libftx/printf/ft_printf.a differ diff --git a/libftx/printf/ft_printf.o b/libftx/printf/ft_printf.o new file mode 100644 index 0000000..a29e998 Binary files /dev/null and b/libftx/printf/ft_printf.o differ diff --git a/libftx/printf/ft_putchar_fd.o b/libftx/printf/ft_putchar_fd.o new file mode 100644 index 0000000..58d9c45 Binary files /dev/null and b/libftx/printf/ft_putchar_fd.o differ diff --git a/libftx/printf/ft_putstr_fd.o b/libftx/printf/ft_putstr_fd.o new file mode 100644 index 0000000..fe30c5d Binary files /dev/null and b/libftx/printf/ft_putstr_fd.o differ diff --git a/libftx/printf/ft_skipflag.o b/libftx/printf/ft_skipflag.o new file mode 100644 index 0000000..1ec4d6c Binary files /dev/null and b/libftx/printf/ft_skipflag.o differ diff --git a/libftx/printf/ft_strlen.o b/libftx/printf/ft_strlen.o new file mode 100644 index 0000000..fc491dd Binary files /dev/null and b/libftx/printf/ft_strlen.o differ diff --git a/libftx/printf/ft_vdprintf.o b/libftx/printf/ft_vdprintf.o new file mode 100644 index 0000000..7eaf4a3 Binary files /dev/null and b/libftx/printf/ft_vdprintf.o differ diff --git a/main.c b/main.c index fcfe81a..e30282b 100644 --- a/main.c +++ b/main.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/04/26 12:44:55 by erey-bet #+# #+# */ -/* Updated: 2023/05/03 17:33:16 by erey-bet ### ########.fr */ +/* Updated: 2023/05/04 13:39:00 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -32,11 +32,11 @@ int main(int argc, char **argv) map.map[1] = "100101"; map.map[2] = "101001"; map.map[3] = "100001"; - map.map[4] = "10N001"; + map.map[4] = "100001"; map.map[5] = "101001"; map.map[6] = "111111"; - map.size_x = 5; - map.size_y = 5; + map.size_x = 6; + map.size_y = 7; map.ply_x = 2; map.ply_y = 4; if (start_game(map)) diff --git a/main.o b/main.o new file mode 100644 index 0000000..dde2efe Binary files /dev/null and b/main.o differ diff --git a/pos b/pos new file mode 100644 index 0000000..14fb02a --- /dev/null +++ b/pos @@ -0,0 +1 @@ +Binary file (standard input) matches