aboutsummaryrefslogtreecommitdiffstats
path: root/inc
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-24 19:08:03 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-02-24 19:08:03 +0100
commit7b7d5343c6042ce90ed213e967c34a07875e2e85 (patch)
tree0943f8592c6d480a85099750dbbd6b9b045e66eb /inc
parentBug fix, 1px bug is back (diff)
parentoy (diff)
download42-cub3d-7b7d5343c6042ce90ed213e967c34a07875e2e85.tar.gz
42-cub3d-7b7d5343c6042ce90ed213e967c34a07875e2e85.tar.bz2
42-cub3d-7b7d5343c6042ce90ed213e967c34a07875e2e85.tar.xz
42-cub3d-7b7d5343c6042ce90ed213e967c34a07875e2e85.tar.zst
42-cub3d-7b7d5343c6042ce90ed213e967c34a07875e2e85.zip
Merge branch 'sprites'
Diffstat (limited to 'inc')
-rw-r--r--inc/cub3d.h1
-rw-r--r--inc/cub3d_structs.h12
2 files changed, 13 insertions, 0 deletions
diff --git a/inc/cub3d.h b/inc/cub3d.h
index cf855b2..5f1c6f8 100644
--- a/inc/cub3d.h
+++ b/inc/cub3d.h
@@ -90,5 +90,6 @@ void ft_draw_life_bar(size_t map_w,
const int8_t life,
t_cub *cl);
void ft_music(t_cub *cl);
+void ft_draw_sprite(t_cub *cl, int i);
# endif
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h
index 639de11..a173e8c 100644
--- a/inc/cub3d_structs.h
+++ b/inc/cub3d_structs.h
@@ -49,11 +49,22 @@ typedef struct s_rgb
typedef struct s_sprite
{
+ int32_t s_screen_x;
+ int32_t s_pos_x;
+ int32_t s_pos_y;
+ double s_x;
+ double s_y;
int32_t s_h;
int32_t s_w;
int32_t s_start_x;
int32_t s_start_y;
+ int32_t s_end_x;
+ int32_t s_end_y;
int32_t s_tex_y;
+ double sprite_transform_x;
+ double sprite_transform_y;
+ double sprite_dist;
+ double inv_c_m;
} t_sprite;
typedef struct s_player
@@ -126,6 +137,7 @@ typedef struct s_cub
struct s_rgb f_rgb;
struct s_rgb c_rgb;
struct s_img tlist[5];
+ struct s_sprite sp_list;
} t_cub;
# endif