diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-19 19:04:46 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-19 19:04:46 +0100 |
commit | 6463914b0dc8136c453a1c163dd98f39e55e1c21 (patch) | |
tree | 0df94a05e92460e578da7092fde5b2502c8cceef /src/ft_draw_handweap.c | |
parent | It's going well (diff) | |
download | 42-cub3d-6463914b0dc8136c453a1c163dd98f39e55e1c21.tar.gz 42-cub3d-6463914b0dc8136c453a1c163dd98f39e55e1c21.tar.bz2 42-cub3d-6463914b0dc8136c453a1c163dd98f39e55e1c21.tar.xz 42-cub3d-6463914b0dc8136c453a1c163dd98f39e55e1c21.tar.zst 42-cub3d-6463914b0dc8136c453a1c163dd98f39e55e1c21.zip |
Decent tier
Diffstat (limited to '')
-rw-r--r-- | src/ft_draw_handweap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ft_draw_handweap.c b/src/ft_draw_handweap.c index ae756e8..cdc5f5a 100644 --- a/src/ft_draw_handweap.c +++ b/src/ft_draw_handweap.c @@ -27,16 +27,17 @@ static void cl->tweap[w_id].img_w * cl->tweap[w_id].tex_y + 2); } -#include <libft.h> void ft_draw_handweap(t_cub *cl) { - const int8_t w_id = cl->plist.handles_weapon; int32_t x_ratio; int32_t y_ratio; int16_t x; int16_t y; + int8_t w_id; + w_id = cl->plist.handles_weapon; + w_id += (cl->plist.fire == 1) ? (1) : 0; x_ratio = (int32_t)((cl->tweap[w_id].img_w << 16) / cl->wlist.x_size) + 1; y_ratio = (int32_t)((cl->tweap[w_id].img_h << 16) / cl->wlist.y_size) + 1; y = 0; |