aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-02 00:33:11 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-02 00:33:11 +0100
commitfc61b9019c867c88868da308fd2d0bfce7408c7f (patch)
tree31ca264c2f2cc61613d38a0ffa91e1894e691f53 /inc
parentAnother song (diff)
download42-cub3d-fc61b9019c867c88868da308fd2d0bfce7408c7f.tar.gz
42-cub3d-fc61b9019c867c88868da308fd2d0bfce7408c7f.tar.bz2
42-cub3d-fc61b9019c867c88868da308fd2d0bfce7408c7f.tar.xz
42-cub3d-fc61b9019c867c88868da308fd2d0bfce7408c7f.tar.zst
42-cub3d-fc61b9019c867c88868da308fd2d0bfce7408c7f.zip
in progress
Diffstat (limited to '')
-rw-r--r--inc/cub3d.h16
-rw-r--r--inc/cub3d_defines.h3
-rw-r--r--inc/cub3d_structs.h2
3 files changed, 12 insertions, 9 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index dc363df..3ddf188 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -21,6 +21,8 @@
/*
** ====== STRUCTS ======
*/
+
+void ft_init_funptr(t_cub *clist);
int8_t ft_init_cub3d(t_cub **clist);
int ft_init_winlx(t_cub *clist);
int ft_init_winptr(t_cub *clist);
@@ -101,6 +103,13 @@ int ft_map_error(const char *errmsg, t_cub *clist);
size_t ft_get_line_len(char *line);
/*
+** ====== ARGS ======
+*/
+
+uint8_t ft_check_map_arg(int argc, const char *argv[]);
+uint8_t ft_use_args(int argc, const char *argv[], t_cub *clist);
+
+/*
** ====== OTHER ======
*/
@@ -114,11 +123,4 @@ int8_t ft_warp_level(t_cub *cl);
int ft_exit(uint8_t exit_code, t_cub *clist);
uint32_t ft_rgb_to_hex(t_rgb rgb);
-/*
-** ====== ARGS ======
-*/
-
-uint8_t ft_check_map_arg(int argc, const char *argv[]);
-uint8_t ft_use_args(int argc, const char *argv[], t_cub *clist);
-
# endif
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h
index e6aa3b3..3f32fe3 100644
--- a/inc/cub3d_defines.h
+++ b/inc/cub3d_defines.h
@@ -109,7 +109,7 @@ enum
# 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_NOT_A_XPM "given sound file is not a .wav"
+# define FT_ERR_NOT_A_WAV "given sound file is not a .wav"
# 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"
@@ -128,6 +128,7 @@ enum
# 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_RD_MUSIC "could not find music file"
/*
** ====== MISSING ERROR MSG ======
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h
index 5bd5616..2026a27 100644
--- a/inc/cub3d_structs.h
+++ b/inc/cub3d_structs.h
@@ -139,7 +139,7 @@ typedef struct s_cub
char errmsg[64];
int32_t key_input[5];
int (*key_ptr[6])(struct s_cub*);
- int8_t (*get_ptr[11])(char**, t_cub*);
+ int8_t (*get_ptr[11])(char**, struct s_cub*);
struct s_win *wlist;
struct s_player *plist;
struct s_map *mlist;