vrseasons
changeset 1:65c2e37c48b2
foo
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 12 Apr 2015 03:39:55 +0300 |
parents | 393ef1143c9c |
children | eea1b91dc3d4 |
files | .hgignore src/game.cc src/opt.cc |
diffstat | 3 files changed, 6 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/.hgignore Tue Apr 07 11:16:56 2015 +0300 1.2 +++ b/.hgignore Sun Apr 12 03:39:55 2015 +0300 1.3 @@ -1,3 +1,4 @@ 1.4 \.o$ 1.5 \.d$ 1.6 \.swp$ 1.7 +^vrseasons$
2.1 --- a/src/game.cc Tue Apr 07 11:16:56 2015 +0300 2.2 +++ b/src/game.cc Sun Apr 12 03:39:55 2015 +0300 2.3 @@ -12,10 +12,11 @@ 2.4 static bool vr_mode = true; 2.5 static int win_width, win_height; 2.6 static RenderTarget vr_rtarg; 2.7 +static Options opt; 2.8 2.9 bool game_init(int argc, char **argv) 2.10 { 2.11 - if(!parse_args(argc, argv)) { 2.12 + if(!parse_args(&opt, argc, argv)) { 2.13 return false; 2.14 } 2.15
3.1 --- a/src/opt.cc Tue Apr 07 11:16:56 2015 +0300 3.2 +++ b/src/opt.cc Sun Apr 12 03:39:55 2015 +0300 3.3 @@ -1,4 +1,5 @@ 3.4 #include <stdio.h> 3.5 +#include <string.h> 3.6 #include "opt.h" 3.7 3.8 enum { 3.9 @@ -58,11 +59,12 @@ 3.10 } 3.11 } 3.12 } 3.13 + return true; 3.14 } 3.15 3.16 static int get_option(const char *str) 3.17 { 3.18 - for(int i=0; optname[i], i++) { 3.19 + for(int i=0; optname[i]; i++) { 3.20 if(strcmp(str, optname[i]) == 0) { 3.21 return i; 3.22 }