aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-30 15:46:59 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-30 15:47:11 +0200
commitf8e80f326902fda7f8e98f62e79d37b3156a0c11 (patch)
treee4cca306f2002264cb60d95aa0484c8e07fcca84
parentCheck missing enemy good (diff)
download42-cub3d-f8e80f326902fda7f8e98f62e79d37b3156a0c11.tar.gz
42-cub3d-f8e80f326902fda7f8e98f62e79d37b3156a0c11.tar.bz2
42-cub3d-f8e80f326902fda7f8e98f62e79d37b3156a0c11.tar.xz
42-cub3d-f8e80f326902fda7f8e98f62e79d37b3156a0c11.tar.zst
42-cub3d-f8e80f326902fda7f8e98f62e79d37b3156a0c11.zip
Less fat sprites
Diffstat (limited to '')
-rw-r--r--inc/cub3d_defines.h2
-rw-r--r--src/ft_check_missing_defines.c2
-rw-r--r--src/ft_draw_sprite_extra.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index b1c93d8..a479b7f 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -122,7 +122,7 @@ enum
# define FT_WEAPON_THREE_FIRE_PATH "./media/img/weapons/double_b_w_fire.xpm"
# define FT_ENMY_WAIT_PATH "./media/img/tex/crapaud.xpm"
# define FT_ENMY_WALK_PATH "./media/img/tex/linuz.xpm"
-# define FT_ENMY_FIRE_PATH "./media/img/tex/linus.xpm"
+# define FT_ENMY_FIRE_PATH "./media/img/sprites/linus.xpm"
# define FT_ENMY_DEAD_PATH "./media/img/sprites/wood_chest.xpm"
# define FT_HEAL_PACK_PATH "./media/img/sprites/first_aid.xpm"
# define FT_ZER_PATH "./media/img/hud/zero.xpm"
diff --git a/src/ft_check_missing_defines.c b/src/ft_check_missing_defines.c
index a25c5ee..932bb93 100644
--- a/src/ft_check_missing_defines.c
+++ b/src/ft_check_missing_defines.c
@@ -68,7 +68,7 @@ static int
ft_check_ext(FT_ENMY_FIRE_PATH, ".xpm") < 0 ||
ft_check_not_found(FT_ENMY_DEAD_PATH) < 0 ||
ft_check_ext(FT_ENMY_DEAD_PATH, ".xpm") < 0)
- return (ft_missing_error(FT_ERR_MISS_ENMY, clist))
+ return (ft_missing_error(FT_ERR_MISS_ENMY, clist));
return (ft_check_missing_number_defines(clist));
}
diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c
index 3f0f474..43e69e3 100644
--- a/src/ft_draw_sprite_extra.c
+++ b/src/ft_draw_sprite_extra.c
@@ -24,7 +24,8 @@ void
sprite->drawendy = sprite->spriteheight / 2 + cl->wlist.y_size / 2;
if (sprite->drawendy >= (int)cl->wlist.y_size)
sprite->drawendy = cl->wlist.y_size - 1;
- sprite->spritewidth = abs((int)(cl->wlist.x_size / (sprite->transformy)));
+ sprite->spritewidth = abs((int)(cl->wlist.x_size / (sprite->transformy)))
+ * 0.8;
sprite->drawstartx = -sprite->spritewidth / 2 + sprite->spritescreenx;
if (sprite->drawstartx < 0)
sprite->drawstartx = 0;