merge
This commit is contained in:
@ -10,8 +10,8 @@ typedef struct s_map
|
||||
void *img_path[4];
|
||||
long long color_bot;
|
||||
long long color_top;
|
||||
size_t size_x;
|
||||
size_t size_y;
|
||||
int size_x;
|
||||
int size_y;
|
||||
double ply_x;
|
||||
double ply_y;
|
||||
char direction;
|
||||
|
@ -3,8 +3,8 @@
|
||||
char **get_body(const char **file_content, size_t header_size)
|
||||
{
|
||||
char **body;
|
||||
size_t i;
|
||||
size_t len;
|
||||
int i;
|
||||
int len;
|
||||
|
||||
len = 0;
|
||||
while (file_content[header_size + len] != NULL)
|
||||
@ -29,8 +29,8 @@ char **get_body(const char **file_content, size_t header_size)
|
||||
|
||||
int get_spawn_position(const char **body, double *spawn_x, double *spawn_y)
|
||||
{
|
||||
size_t x;
|
||||
size_t y;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
*spawn_x = -1;
|
||||
*spawn_y = -1;
|
||||
@ -58,7 +58,7 @@ int get_spawn_position(const char **body, double *spawn_x, double *spawn_y)
|
||||
|
||||
static int map_is_in_one_part(const char **body)
|
||||
{
|
||||
size_t y;
|
||||
int y;
|
||||
|
||||
y = ft_tablen((const void **) body) - 1;
|
||||
while (body[y][0] == '\0' || ft_contain_only(body[y], ' '))
|
||||
@ -74,8 +74,8 @@ static int map_is_in_one_part(const char **body)
|
||||
|
||||
static int map_surround(const char **body)
|
||||
{
|
||||
size_t y;
|
||||
size_t x;
|
||||
int y;
|
||||
int x;
|
||||
|
||||
y = 0;
|
||||
while (body[y] != NULL)
|
||||
@ -125,8 +125,8 @@ static int body_contain_normal_char(const char **body)
|
||||
|
||||
void get_size(const char **body, t_map *map)
|
||||
{
|
||||
size_t y;
|
||||
size_t x;
|
||||
int y;
|
||||
int x;
|
||||
|
||||
map->size_x = 0;
|
||||
y = 0;
|
||||
@ -157,8 +157,8 @@ int body_is_valid(t_map *map)
|
||||
ft_eprintf("map: spawn position: not define");
|
||||
return (0);
|
||||
}
|
||||
map->direction = map->map[(size_t) map->ply_y][(size_t) map->ply_x];
|
||||
map->map[(size_t) map->ply_y][(size_t) map->ply_x] = '0';
|
||||
map->direction = map->map[(int) map->ply_y][(int) map->ply_x];
|
||||
map->map[(int) map->ply_y][(int) map->ply_x] = '0';
|
||||
error = map_is_in_one_part((const char **)map->map);
|
||||
if (error)
|
||||
{
|
||||
|
Reference in New Issue
Block a user