diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-14 19:25:00 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-14 19:25:00 +0200 |
commit | 9e7508d8baeee1695cb99a98a2ed0c020f7a41e1 (patch) | |
tree | 61d3349646156203c9f79504e58253940850ecb3 | |
parent | Renorm (diff) | |
download | 42-cub3d-9e7508d8baeee1695cb99a98a2ed0c020f7a41e1.tar.gz 42-cub3d-9e7508d8baeee1695cb99a98a2ed0c020f7a41e1.tar.bz2 42-cub3d-9e7508d8baeee1695cb99a98a2ed0c020f7a41e1.tar.xz 42-cub3d-9e7508d8baeee1695cb99a98a2ed0c020f7a41e1.tar.zst 42-cub3d-9e7508d8baeee1695cb99a98a2ed0c020f7a41e1.zip |
Some more norms
-rw-r--r-- | src/ft_can_it_shoot.c | 2 | ||||
-rw-r--r-- | src/ft_draw_ammo_bar.c | 1 | ||||
-rw-r--r-- | src/ft_draw_ammo_caption.c | 6 | ||||
-rw-r--r-- | src/ft_draw_sprite_extra.c | 9 | ||||
-rw-r--r-- | src/ft_hud_threads_next.c | 1 | ||||
-rw-r--r-- | src/ft_music.c | 2 |
6 files changed, 10 insertions, 11 deletions
diff --git a/src/ft_can_it_shoot.c b/src/ft_can_it_shoot.c index 0c76f3d..0029c39 100644 --- a/src/ft_can_it_shoot.c +++ b/src/ft_can_it_shoot.c @@ -103,7 +103,7 @@ static int8_t sqx <= cl->sprites[13][id].s_pos_x + 0.15)) break ; if (cl->mlist.map[(uint64_t)(sqy + 0.5)][(uint64_t)(sqx + 0.5)] == '1') - hit = 1; + hit = 1; } return ((hit == 1) ? (0) : (1)); } diff --git a/src/ft_draw_ammo_bar.c b/src/ft_draw_ammo_bar.c index febeb55..627fdf6 100644 --- a/src/ft_draw_ammo_bar.c +++ b/src/ft_draw_ammo_bar.c @@ -135,4 +135,3 @@ void (2 * (cl->mlist.map_w * cl->mlist.scale) / 4), cl); } } - diff --git a/src/ft_draw_ammo_caption.c b/src/ft_draw_ammo_caption.c index 96e37a2..4f8bd55 100644 --- a/src/ft_draw_ammo_caption.c +++ b/src/ft_draw_ammo_caption.c @@ -34,7 +34,7 @@ static void (uint8_t)cl->tlist[22].ptr[cl->tlist[22].tex_x * 4 + 4 * cl->tlist[22].img_w * cl->tlist[22].tex_y + 2]; } - + static void ft_put_ammo_caption(t_cub *cl) { @@ -65,8 +65,8 @@ static void static void ft_get_hw(t_cub *cl) { - int16_t x; - int16_t y; + int16_t x; + int16_t y; const int16_t scl = cl->mlist.scale; x = 20; diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c index 45833c8..57cd143 100644 --- a/src/ft_draw_sprite_extra.c +++ b/src/ft_draw_sprite_extra.c @@ -35,13 +35,12 @@ void sprite->drawendx = cl->wlist.x_size - 1; } - static void ft_init_sprite(t_cub *cl, t_sprite *sprite) { sprite->invdet = 1.0 / (cl->plist.plane_x * -cl->plist.dir_x - - cl->plist.dir_y * cl->plist.plane_y); + - cl->plist.dir_y * cl->plist.plane_y); sprite->transformx = sprite->invdet * (-cl->plist.dir_x * sprite->spritex - cl->plist.dir_y * sprite->spritey); sprite->transformy = sprite->invdet * (cl->plist.plane_y * sprite->spritex @@ -61,8 +60,10 @@ void while (++i < cl->big_t_val) { sprite = cl->sprites[(int8_t)cl->big_t[i][2]][(int32_t)cl->big_t[i][3]]; - if (((cl->plist.pos_x > sprite.s_pos_x - 0.01 && cl->plist.pos_x < sprite.s_pos_x + 0.99) && - (cl->plist.pos_y > sprite.s_pos_y - 0.01 && cl->plist.pos_y < sprite.s_pos_y + 0.99))) + if (((cl->plist.pos_x > sprite.s_pos_x - 0.01 && + cl->plist.pos_x < sprite.s_pos_x + 0.99) && + (cl->plist.pos_y > sprite.s_pos_y - 0.01 && + cl->plist.pos_y < sprite.s_pos_y + 0.99))) return ; if (sprite.s_pos_x != 0) { diff --git a/src/ft_hud_threads_next.c b/src/ft_hud_threads_next.c index e390050..d4754e0 100644 --- a/src/ft_hud_threads_next.c +++ b/src/ft_hud_threads_next.c @@ -35,4 +35,3 @@ void pthread_exit(0x0); return (0x0); } - diff --git a/src/ft_music.c b/src/ft_music.c index 7a2d800..1371de7 100644 --- a/src/ft_music.c +++ b/src/ft_music.c @@ -28,7 +28,7 @@ static void while (1) if (system(cl->mlist.music_cmd) != 0) pthread_exit(NULL); - return(NULL); + return (NULL); } void |