mirror of
https://github.com/Ladebeze66/cub3D.git
synced 2026-11-09 13:47:10 +01:00
onapprochefin
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/11 14:09:52 by fgras-ca #+# #+# */
|
||||
/* Updated: 2024/01/29 17:43:10 by fgras-ca ### ########.fr */
|
||||
/* Updated: 2024/01/30 16:21:09 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -26,7 +26,7 @@ static int check_collision(t_structure_main *w, double future_x,
|
||||
map_x = (int)((future_x + coll_params->dx[i]) / w->s_map.map_s);
|
||||
map_y = (int)((future_y + coll_params->dy[i]) / w->s_map.map_s);
|
||||
map_position = w->s_map.map[map_y * w->s_map.map_x + map_x];
|
||||
if (map_position != '0' && map_position != '3')
|
||||
if (map_position == '1' || map_position == '2')
|
||||
return (0);
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -6,35 +6,12 @@
|
||||
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/01/11 14:17:56 by fgras-ca #+# #+# */
|
||||
/* Updated: 2024/01/29 17:53:45 by fgras-ca ### ########.fr */
|
||||
/* Updated: 2024/01/30 16:15:56 by fgras-ca ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../cub3d.h"
|
||||
|
||||
int *kill_prog(t_structure_main *w)
|
||||
{
|
||||
int i;
|
||||
|
||||
mlx_destroy_window(w->s_win.mlx, w->s_win.win);
|
||||
mlx_destroy_image(w->s_win.mlx, w->s_img.buffer);
|
||||
mlx_destroy_image(w->s_win.mlx, w->s_img.img_player);
|
||||
mlx_destroy_image(w->s_win.mlx, w->s_img.img_wall);
|
||||
mlx_destroy_image(w->s_win.mlx, w->s_img.pedro_wall);
|
||||
i = -1;
|
||||
while (++i <= 10)
|
||||
mlx_destroy_image(w->s_win.mlx, w->s_img.roomadslam[i]);
|
||||
if (w->s_map.map)
|
||||
{
|
||||
free(w->s_map.map);
|
||||
w->s_map.map = NULL;
|
||||
}
|
||||
mlx_destroy_display(w->s_win.mlx);
|
||||
free(w->s_win.mlx);
|
||||
exit(0);
|
||||
return (0);
|
||||
}
|
||||
|
||||
void adjust_player_angle(t_structure_main *w, int key)
|
||||
{
|
||||
double angle_adjustment;
|
||||
|
||||
Reference in New Issue
Block a user