Revision 1128
Added library for wireless
main.c | ||
---|---|---|
31 | 31 |
|
32 | 32 |
int c; |
33 | 33 |
char worldLoadedFlag = 0; |
34 |
char *worldFile = NULL; |
|
34 | 35 |
|
35 |
while((c = getopt(argc, argv, ":l:p:w:")) != -1)
|
|
36 |
while((c = getopt(argc, argv, ":p:w:l:")) != -1)
|
|
36 | 37 |
{ |
37 | 38 |
switch(c) |
38 | 39 |
{ |
39 | 40 |
case 'l': |
40 |
setLogFile(optarg); |
|
41 |
//What about when -w not set... |
|
42 |
setWriteFile(optarg, worldFile); |
|
41 | 43 |
break; |
42 | 44 |
case 'p': |
43 |
setLogFile(optarg);
|
|
45 |
setReadFile(optarg, &worldFile);
|
|
44 | 46 |
playLog(argc, argv); |
45 | 47 |
return 0; |
46 | 48 |
break; |
47 | 49 |
case 'w': |
48 | 50 |
load_world(optarg, 100); |
51 |
worldFile = optarg; |
|
49 | 52 |
worldLoadedFlag = 1; |
50 | 53 |
break; |
51 | 54 |
case ':': |
Also available in: Unified diff