aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_lists.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-02-02 19:07:38 +0100
committerRudy Bousset <rbousset@z2r5p6.le-101.fr>2020-02-02 19:07:38 +0100
commit8c3b79c41048539d01f689d2fd3262b9b08ed00b (patch)
tree8caf2d580961f59d35dd7df70a7825c79f1a6706 /src/ft_init_lists.c
parentAdded player list (diff)
download42-cub3d-8c3b79c41048539d01f689d2fd3262b9b08ed00b.tar.gz
42-cub3d-8c3b79c41048539d01f689d2fd3262b9b08ed00b.tar.bz2
42-cub3d-8c3b79c41048539d01f689d2fd3262b9b08ed00b.tar.xz
42-cub3d-8c3b79c41048539d01f689d2fd3262b9b08ed00b.tar.zst
42-cub3d-8c3b79c41048539d01f689d2fd3262b9b08ed00b.zip
Parsed player spawn
Diffstat (limited to '')
-rw-r--r--src/ft_init_lists.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index b7602ab..74c1b3d 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -17,18 +17,6 @@
#include <stddef.h>
#include <stdlib.h>
-t_player
- *ft_init_player(void)
-{
- t_player *plist;
-
- if (!(plist = (t_player*)malloc(sizeof(t_player))))
- return (NULL);
- plist->pos_x = 0;
- plist->pos_y = 0;
- return (plist);
-}
-
t_win
*ft_init_win(void)
{
@@ -45,6 +33,19 @@ t_win
return (wlist);
}
+static t_player
+ *ft_init_player(void)
+{
+ t_player *plist;
+
+ if (!(plist = (t_player*)malloc(sizeof(t_player))))
+ return (NULL);
+ plist->pos_x = 0;
+ plist->pos_y = 0;
+ plist->view_side = 0;
+ return (plist);
+}
+
t_cub
*ft_init_cub(void)
{
@@ -67,6 +68,7 @@ t_cub
clist->c_color = -1;
clist->map_w = 0;
clist->line_chk = 0;
+ clist->map_start = 0;
clist->isspawn = 0;
return (clist);
}