Allow positional arg for game_csv if it is the only arg
This commit is contained in:
parent
f831f3cd92
commit
672842c923
3
Game.cpp
3
Game.cpp
@ -29,6 +29,9 @@ int main(int argc, char **argv) {
|
|||||||
// Initialize nextLevel to 0 (load first level)
|
// Initialize nextLevel to 0 (load first level)
|
||||||
int next_level = 0;
|
int next_level = 0;
|
||||||
game_csv = "/sys/sdf/share/csvgame/story.csv";
|
game_csv = "/sys/sdf/share/csvgame/story.csv";
|
||||||
|
if (argc == 2) {
|
||||||
|
game_csv = string(argv[1]);
|
||||||
|
}
|
||||||
for (int i = 1; i < argc; i++) {
|
for (int i = 1; i < argc; i++) {
|
||||||
string test_arg = string(argv[i]);
|
string test_arg = string(argv[i]);
|
||||||
if (test_arg == "-f") {
|
if (test_arg == "-f") {
|
||||||
|
Loading…
Reference in New Issue
Block a user