bsq

b0VIM 8.0������f�2^R� ���rmckinno��������������������������������e1z1r5p11.42.us.org���������������������~rmckinno/42/projects/bsq/src/heater.c���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������utf-8
�3210����#"! U�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������tp�����������g���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ad��X�������g����������^��
�����k�����
��x
��'
�����������i��h��2��0�����������������������������������r��p��h��`��_��W��O��9��6�������
���
���
���
���
���
���
��
��>
��
��
��
���	���	���	���	���	���	���	���	���	���	���	���	���	���	��u	��q	��9	��4	��	��������������������������������~��|��{��\��Z��I��<��4��,��+��#�������������v��s��J��C��@��&��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������}�	return (heat_map);�	fire_map_p(m, heat_map);�	}�		y++;�		heat_map[y] = (first + m->length * y);�	{�	while (y < m->lines)�	first = (int *)(heat_map + m->lines);�		(sizeof(int *) * m->lines));�	heat_map = (int **)malloc((sizeof(int) * (m->lines * (m->length))) + \�	x = -1;�	y = 0;��	int x;�	int y;�	int *first;�	int **heat_map;�{�int		**make_heat_map(t_map *m)��}�	}�		y++;�		x = 0;�		}�			x++;�				hm[y][x] = (ft_min(hm[y - 1][x], hm[y][x - 1]) + 1);�			else�			}�					hm[y][x] = 0;�				else�					hm[y][x] = 1;�				if (m->map[y][x] == m->empty)�			{�			if (y == 0 || x == 0 || m->map[y][x] == m->obstacle)�		{�		while (x < m->length)�	{�	while (y < m->lines)�	x = 0;�	y = 0;��	int x;�	int y;�{�void	fire_map_p(t_map *m, int **hm)��}�	}�		y++;�		x = 0;�		}�			x++;�						m->map[y][x - 1], m->map[y - 1][x - 1]);�				hm[y][x] = num_free_spaces(m->map[y][x], m->map[y - 1][x], \�			else�			}�					hm[y][x] = 0;�				else�					hm[y][x] = 1;�				if (m->map[y][x] == m->empty)�			{�			if (y == 0 || x == 0 || m->map[y][x] == m->obstacle)�		{�		while (x < m->length)�	{�	while (y < m->lines)�	x = 0;�	y = 0;��	int x;�	int y;�{�void	fire_map(t_map *m, int **hm)��}�	return (free_spaces);�		free_spaces++;�	if (d == fs)�		free_spaces++;�	if (l == fs)�		free_spaces++;�	if (t == fs)�	free_spaces = 1;��	int free_spaces;�{�int		num_free_spaces(char fs, char t, char l, char d)��#include "../lib/ft_bsq.h"��/* ************************************************************************** */�/*                                                                            */�/*   Updated: 2020/01/29 23:36:06 by rmckinno         ###   ########.fr       */�/*   Created: 2020/01/29 16:40:26 by rmckinno          #+#    #+#             */�/*                                                +#+#+#+#+#+   +#+           */�/*   By: rmckinno <[email protected]>                    +#+  +:+       +#+        */�/*                                                    +:+ +:+         +:+     */�/*   heater.c                                           :+:      :+:    :+:   */�/*                                                        :::      ::::::::   */�/*                                                                            */�/* ************************************************************************** */�