aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-02-14 18:57:10 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-02-14 18:57:10 +0100
commitf5e4e2f56a9d1b6019cc937e1291930455502c99 (patch)
treef89f14a43145af99e0a639a5209c067149436189
parentNorme is bav (diff)
download42-cub3d-f5e4e2f56a9d1b6019cc937e1291930455502c99.tar.gz
42-cub3d-f5e4e2f56a9d1b6019cc937e1291930455502c99.tar.bz2
42-cub3d-f5e4e2f56a9d1b6019cc937e1291930455502c99.tar.xz
42-cub3d-f5e4e2f56a9d1b6019cc937e1291930455502c99.tar.zst
42-cub3d-f5e4e2f56a9d1b6019cc937e1291930455502c99.zip
Bug fix, changed rot speed
Diffstat (limited to '')
-rw-r--r--map/map_one.cub2
-rw-r--r--src/ft_draw_verline.c2
-rw-r--r--src/ft_extra_keys.c4
-rw-r--r--src/ft_key_events.c2
4 files changed, 6 insertions, 4 deletions
diff --git a/map/map_one.cub b/map/map_one.cub
index a8dc201..1a82a84 100644
--- a/map/map_one.cub
+++ b/map/map_one.cub
@@ -1,4 +1,4 @@
-R 1200 1000
+R 1200 900
NO ./path_to_the_north_texture
SO ./path_to_the_south_texture
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c
index 6584bcb..d7ebe34 100644
--- a/src/ft_draw_verline.c
+++ b/src/ft_draw_verline.c
@@ -15,7 +15,7 @@
static void
ft_draw_floor(t_cub *cl, int32_t y, int32_t x)
{
- while (y <= cl->wlist->y_size)
+ while (y < cl->wlist->y_size)
{
*(int*)(cl->img.ptr +
(x * 4 + (y * cl->img.sizeline))) = ft_rgb_to_hex(cl->f_rgb);
diff --git a/src/ft_extra_keys.c b/src/ft_extra_keys.c
index 3ca8fd8..2e9ccf7 100644
--- a/src/ft_extra_keys.c
+++ b/src/ft_extra_keys.c
@@ -23,7 +23,7 @@ int
float rot_speed;
pl = clist->plist;
- rot_speed = 0.3;
+ rot_speed = 0.1;
sav_dir_x = pl->dir_x;
pl->dir_x = pl->dir_x * cos(rot_speed) - pl->dir_y * sin(rot_speed);
pl->dir_y = sav_dir_x * sin(rot_speed) + pl->dir_y * cos(rot_speed);
@@ -42,7 +42,7 @@ int
float rot_speed;
pl = clist->plist;
- rot_speed = 0.3;
+ rot_speed = 0.1;
sav_dir_x = pl->dir_x;
pl->dir_x = pl->dir_x * cos(-rot_speed) - pl->dir_y * sin(-rot_speed);
pl->dir_y = sav_dir_x * sin(-rot_speed) + pl->dir_y * cos(-rot_speed);
diff --git a/src/ft_key_events.c b/src/ft_key_events.c
index e08e3d0..0609ba4 100644
--- a/src/ft_key_events.c
+++ b/src/ft_key_events.c
@@ -30,6 +30,8 @@ static uint16_t
(tmp_code == 3) ? (keycode = UINT16_MAX) : 0;
(tmp_code == 4) ? (keycode = UINT16_MAX) : 0;
(tmp_code == 5) ? (keycode = UINT16_MAX) : 0;
+ (tmp_code == FT_ESC_KEY) ? (keycode = FT_ESC_KEY) : 0;
+ (tmp_code == FT_F1_KEY) ? (keycode = FT_F1_KEY) : 0;
return (keycode);
}