From 6b9957362a01c8282f96b5b2ef019cc8bf96fc2f Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Sat, 29 Feb 2020 16:04:31 +0100 Subject: commit --- inc/cub3d_defines.h | 55 ++++++++++++++++++++++++++--------------------------- inc/cub3d_structs.h | 1 + 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'inc') diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index 6f9b4d7..f58c211 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -16,8 +16,7 @@ /* ** ====== RETURN VALUES ====== */ - -enum retvals +enum { RET_FINE, RET_NO_ARGV, @@ -26,7 +25,7 @@ enum retvals RET_MAP_ERROR, RET_NO_MAP, RET_READ_ERROR -}; +} retvals; /* ** ret vals: @@ -97,31 +96,31 @@ enum retvals ** ====== MAP ERROR MSG ====== */ -# define FT_ERR_ALLOCATE "allocation error" -# define FT_ERR_READ "read error" -# define FT_ERR_ARGS "too many or to few arguments" -# define FT_ERR_RES_SMALL "resolution is too small" -# define FT_ERR_RES_ALPHA "resolution should be digits only" -# define FT_ERR_NOT_A_CUB "given map is not a .cub" -# define FT_ERR_NOT_A_XPM "given texture is not a .xpm" -# define FT_ERR_COLOR_ALPHA "colors should be digits only" -# define FT_ERR_COLOR_MAX "colors should be maximum 255" -# define FT_ERR_COLOR_ARGS "colors should be three numbers separated by commas" -# define FT_ERR_UNFINISHED "no map" -# define FT_ERR_MAP_LEN "map length inconsistency" -# define FT_ERR_ILL_ENTRY "illegal map entry" -# define FT_ERR_ALR_SET "duplicate entry" -# define FT_ERR_ILL_MAP "map contains illegal char" -# define FT_ERR_MULT_SPAWN "multiple spawn points" -# define FT_ERR_MULT_NLVL "multiple spawn new level access points" -# define FT_ERR_MAP_L_L "last line is invalid" -# define FT_ERR_RD_NO "could not find north side texture file" -# define FT_ERR_RD_SO "could not find south side texture file" -# define FT_ERR_RD_EA "could not find east side texture file" -# define FT_ERR_RD_WE "could not find west side texture file" -# define FT_ERR_RD_SP "could not find sprite texture file" -# define FT_ERR_RD_NL_TEX "could not find next level texture file" -# define FT_ERR_RD_NL_MAP "could not find next level map file" +# define FT_ERR_ALLOCATE "allocation error" +# define FT_ERR_READ "read error" +# define FT_ERR_ARGS "too many or to few arguments" +# define FT_ERR_RES_SMALL "resolution is too small" +# define FT_ERR_RES_ALPHA "resolution should be digits only" +# define FT_ERR_NOT_A_CUB "given map is not a .cub" +# define FT_ERR_NOT_A_XPM "given texture is not a .xpm" +# define FT_ERR_COLOR_ALPHA "colors should be digits only" +# define FT_ERR_COLOR_MAX "colors should be maximum 255" +# define FT_ERR_COLOR_ARGS "colors should be three numbers with commas" +# define FT_ERR_UNFINISHED "no map" +# define FT_ERR_MAP_LEN "map length inconsistency" +# define FT_ERR_ILL_ENTRY "illegal map entry" +# define FT_ERR_ALR_SET "duplicate entry" +# define FT_ERR_ILL_MAP "map contains illegal char" +# define FT_ERR_MULT_SPAWN "multiple spawn points" +# define FT_ERR_MULT_NLVL "multiple spawn new level access points" +# define FT_ERR_MAP_L_L "last line is invalid" +# define FT_ERR_RD_NO "could not find north side texture file" +# define FT_ERR_RD_SO "could not find south side texture file" +# define FT_ERR_RD_EA "could not find east side texture file" +# define FT_ERR_RD_WE "could not find west side texture file" +# define FT_ERR_RD_SP "could not find sprite texture file" +# define FT_ERR_RD_NL_TEX "could not find next level texture file" +# define FT_ERR_RD_NL_MAP "could not find next level map file" /* ** ====== MISSING ERROR MSG ====== diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h index a4761a2..46e4fe4 100644 --- a/inc/cub3d_structs.h +++ b/inc/cub3d_structs.h @@ -132,6 +132,7 @@ typedef struct s_cub uint8_t w_side; uint8_t ishud; uint16_t currlvl; + uint16_t i; char errmsg[64]; int32_t key_input[5]; int (*key_ptr[6])(struct s_cub*); -- cgit v1.2.3