/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* player_collect.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: kdx void player_collect(t_game *game, t_player *player, t_map *map) { int pos[2]; pos[0] = round(player->pos[0]) + 8; pos[1] = round(player->pos[1]) + 8; if (map_get(map, pos[0], pos[1]) == TILE_COLLECTIBLE) { map_set(map, pos[0], pos[1], TILE_NONE); game->collectibles -= 1; } }