aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-29 16:04:31 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-29 16:04:31 +0100
commit6b9957362a01c8282f96b5b2ef019cc8bf96fc2f (patch)
treee0d919f7b1c9062f132a96512d0bfd59db0cebee /inc
parentMakefile update (diff)
download42-cub3d-6b9957362a01c8282f96b5b2ef019cc8bf96fc2f.tar.gz
42-cub3d-6b9957362a01c8282f96b5b2ef019cc8bf96fc2f.tar.bz2
42-cub3d-6b9957362a01c8282f96b5b2ef019cc8bf96fc2f.tar.xz
42-cub3d-6b9957362a01c8282f96b5b2ef019cc8bf96fc2f.tar.zst
42-cub3d-6b9957362a01c8282f96b5b2ef019cc8bf96fc2f.zip
commit
Diffstat (limited to '')
-rw-r--r--inc/cub3d_defines.h55
-rw-r--r--inc/cub3d_structs.h1
2 files changed, 28 insertions, 28 deletions
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*);