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 + map/map_one.cub | 8 +++---- media/img/segfault2.xpm | 2 +- media/img/segfot.xpm | 2 +- 5 files changed, 34 insertions(+), 34 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*); diff --git a/map/map_one.cub b/map/map_one.cub index d135e42..5a1fb78 100644 --- a/map/map_one.cub +++ b/map/map_one.cub @@ -1,9 +1,9 @@ R 1400 900 -NO ./media/img/BRIQUASSES.xpm -SO ./media/img/BRIQUASSE_3.xpm -EA ./media/img/BRIQUASSES_2.xpm -WE ./media/img/MURLOL.xpm +NO ./media/img/segfot.xpm +SO ./media/img/segfot.xpm +EA ./media/img/segfot.xpm +WE ./media/img/segfot.xpm S ./media/img/pillar.xpm C 50,100,200 diff --git a/media/img/segfault2.xpm b/media/img/segfault2.xpm index c4d5f22..7c2b058 100644 --- a/media/img/segfault2.xpm +++ b/media/img/segfault2.xpm @@ -1,7 +1,7 @@ /* XPM */ static char *eb6baf3bdb594db3a31907c1c3810593[] = { /* columns rows colors chars-per-pixel */ -"800 531 256 2 ", +"531 531 256 2 ", " c #040301", ". c #0A0603", "X c #0C0A06", diff --git a/media/img/segfot.xpm b/media/img/segfot.xpm index 63613c3..ec76624 100644 --- a/media/img/segfot.xpm +++ b/media/img/segfot.xpm @@ -1,7 +1,7 @@ /* XPM */ static char *ab6443816a3a429fb33254e278aee66b[] = { /* columns rows colors chars-per-pixel */ -"1300 1390 256 2 ", +"1300 1300 256 2 ", " c #040404", ". c #0C0C0C", "X c #070806", -- cgit v1.2.3