示例#1
0
文件: view.c 项目: vilsbole/rt
int					ft_loop(int key, t_env **env)
{
	if (key == ESC)
	{
		ft_clear(*env);
		exit(0);
	}
	if (key == LE || key == RI || key == ENT || key == UP || key == DO
			|| key == PL || key == MI)
	{
		ft_change_view(env, key);
		ft_ray_cast_threads(*env);
	}
	return (0);
}
示例#2
0
void			ft_action_droite(t_player *player, t_env *e)
{
	if (!strcmp(player->read, OK))
	{
		printf("succes %s\n", player->cur_action);
		ft_change_view(player, e);
		if (player->view < 3)
			player->view++;
		else
			player->view = 0;
		player->cur_action = player->action[0];
		if (player->cur_action != NULL)
		{
			ft_destroy_action(player, 0);
			dprintf(player->sock, "%s", player->cur_action);
			printf("current : %s", player->cur_action);
		}
		e->graph.modif = 0;
	}
}