aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--inc/cub3d.h2
-rw-r--r--map/map_one.cub4
-rw-r--r--src/ft_click_close.c2
-rw-r--r--src/ft_get_player_spawn.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index d4ca854..386f658 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -32,7 +32,7 @@ int8_t ft_init_cub3d(t_cub **clist);
t_map *ft_init_map(void);
void ft_hooks_and_loops(t_win *wl, t_cub *cl);
int ft_key_event(int keycode, t_cub *clist);
-int ft_click_close(uint64_t keycode, t_cub *clist);
+int ft_click_close(int keycode, t_cub *clist);
int ft_exit(uint8_t exit_code, t_cub *clist);
void ft_draw_square(int a, int b, int rgb, t_cub *clist);
void ft_parse_map(const char *map_path, t_cub *clist);
diff --git a/map/map_one.cub b/map/map_one.cub
index 1a8de2b..2c3f8a2 100644
--- a/map/map_one.cub
+++ b/map/map_one.cub
@@ -16,10 +16,10 @@ F 150,150,145
1 0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1
1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 0 1 1 1 1 0 0 0 1
1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1
-1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 E 0 1
+1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1
1 1 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1
1 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 1
-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 1
+1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 W 0 1
1 1 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 0 0 1
1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 0 0 0 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
diff --git a/src/ft_click_close.c b/src/ft_click_close.c
index 6c876ea..113c241 100644
--- a/src/ft_click_close.c
+++ b/src/ft_click_close.c
@@ -18,8 +18,8 @@
int
ft_click_close(int keycode, t_cub *clist)
{
+ (void)keycode;
(void)clist;
- ft_printf("Button [%d] pressed\n", keycode);
exit(0);
return (0);
}
diff --git a/src/ft_get_player_spawn.c b/src/ft_get_player_spawn.c
index fa99fdf..f5d2c87 100644
--- a/src/ft_get_player_spawn.c
+++ b/src/ft_get_player_spawn.c
@@ -82,8 +82,8 @@ void
{
if (ft_ischarset("NSEW", clist->mlist->map[y][x]))
{
- plist->pos_x = x;
- plist->pos_y = y;
+ plist->pos_x = x + 0.5;
+ plist->pos_y = y + 0.5;
ft_get_start_side(clist->mlist->map[y][x], clist->plist);
return ;
}