-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcorridor.c
57 lines (46 loc) · 1.58 KB
/
corridor.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* corridor.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ccastill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/05/29 00:04:41 by ccastill #+# #+# */
/* Updated: 2020/05/29 06:54:36 by ccastill ### ########.fr */
/* */
/* ************************************************************************** */
#include "Nostromo.h"
int corridor()
{
int fd;
char *buff;
ssize_t bwr;
system("clear");
fd = open("pasillo_0.txt", O_RDONLY);
buff = malloc(sizeof(char) * 2000);
read(fd, buff, 2000);
printf("%s", buff);
close(fd);
free(buff);
buff == NULL;
SDL_Delay(500);
system("clear");
fd = open("pasillo_1.txt", O_RDONLY);
buff = malloc(sizeof(char) * 2000);
read(fd, buff, 2000);
printf("\r%s", buff);
close(fd);
free(buff);
buff == NULL;
SDL_Delay(500);
system("clear");
fd = open("pasillo_2.txt", O_RDONLY);
buff = malloc(sizeof(char) * 2000);
read(fd, buff, 2000);
printf("\r%s", buff);
close(fd);
free(buff);
buff == NULL;
SDL_Delay(500);
system("clear");
}