mirror of
https://github.com/Ladebeze66/cub3D.git
synced 2025-12-13 04:36:59 +01:00
okmulti
This commit is contained in:
parent
c8dcaba517
commit
0e6abebb7b
2
cub3d.h
2
cub3d.h
@ -6,7 +6,7 @@
|
||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/14 16:56:52 by fgras-ca #+# #+# */
|
||||
/* Updated: 2024/01/30 15:47:04 by fgras-ca ### ########.fr */
|
||||
/* Updated: 2024/01/30 16:44:11 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
8
map.cub
8
map.cub
@ -10,13 +10,13 @@ C 165, 176, 196
|
||||
1111100000000000000000000000000000001 10000000001 10000000000000000000000000000000000002000000000000000000000001
|
||||
1000000000000000000000011111111111111 10000000001 10000000000000000000000000000000000002000000000000000000000001111
|
||||
100000000000000000000001 10000000001 10000000000000000000000000000000001111111100000000000000000000001
|
||||
100000000000000000000001111111111111111111000000000111110000000000000000000000000000000001 100000000000000000000001
|
||||
100000000000000000000001111111111111111111000000000111110000000000000000S00000000000000001 100000000000000000000001
|
||||
100000000000000000000000000000000000000000000000000002000000000000000000000000000000000001 111111111111000000000001
|
||||
100000000000000000111100000000000000000000000000000002000000000000000000000000000000000001 1000000000001
|
||||
1000000000000000001 100000000000000000000000000000002000000000000000000000000000011111111 1000000000001
|
||||
100000000000000000111100000000000000000000000000000002000000000000000000000000000011111111111111111111111 1000000000001
|
||||
100000000000000000000000000000000000000000000000000002000000000000000W00000000000000000000000000000000001 1000000000001
|
||||
110000000000011111100000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
|
||||
10000000000000000011110000000000000000000000000000000200000000000000E000000000000011111111111111111111111 1000000000001
|
||||
100000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
|
||||
110000000000011111100000000000000N00000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
|
||||
1000000000001 100000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
|
||||
11000000000001 100000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
|
||||
100000000000011111100000000000000000000000000000000002000000000000000000000000000000000000000000000000001 1000000000001
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/23 19:54:51 by fgras-ca #+# #+# */
|
||||
/* Updated: 2024/01/29 18:58:31 by fgras-ca ### ########.fr */
|
||||
/* Updated: 2024/01/30 16:59:15 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -29,7 +29,6 @@ static bool process_player_char(char current_char, t_player_info *player_info)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Multiple player start positions found. Invalid map.\n");
|
||||
return (false);
|
||||
}
|
||||
}
|
||||
@ -49,11 +48,8 @@ bool find_player(const char *map_content, int length, t_structure_map *map)
|
||||
player_info.found_player = &found_player;
|
||||
while (i < length)
|
||||
{
|
||||
if (!found_player)
|
||||
{
|
||||
if (!process_player_char(map_content[i], &player_info))
|
||||
return (false);
|
||||
}
|
||||
if (!process_player_char(map_content[i], &player_info))
|
||||
return (false);
|
||||
calculate_map(map);
|
||||
update_position(map_content[i],
|
||||
&player_info.line_number, &player_info.column_number);
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/29 18:57:38 by fgras-ca #+# #+# */
|
||||
/* Updated: 2024/01/29 18:58:26 by fgras-ca ### ########.fr */
|
||||
/* Updated: 2024/01/30 16:50:06 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user