Commit f2be3a86 authored by mercury233's avatar mercury233

update command line parameters

parent b4a68d86
...@@ -94,12 +94,12 @@ int main(int argc, char* argv[]) { ...@@ -94,12 +94,12 @@ int main(int argc, char* argv[]) {
} else if(!strcmp(argv[i], "-k")) { // Keep on return } else if(!strcmp(argv[i], "-k")) { // Keep on return
exit_on_return = false; exit_on_return = false;
keep_on_return = true; keep_on_return = true;
} else if(!strcmp(argv[i], "-j")) { // Join host
exit_on_return = !keep_on_return;
ClickButton(ygo::mainGame->btnLanMode);
ClickButton(ygo::mainGame->btnJoinHost);
break;
} else if(!strcmp(argv[i], "-d")) { // Deck } else if(!strcmp(argv[i], "-d")) { // Deck
if(i + 2 < argc) { // select deck
++i;
GetParameterW(ygo::mainGame->gameConf.lastdeck, &argv[i][0]);
continue;
} else { // open deck
exit_on_return = !keep_on_return; exit_on_return = !keep_on_return;
if(i < argc) { if(i < argc) {
open_file = true; open_file = true;
...@@ -107,6 +107,17 @@ int main(int argc, char* argv[]) { ...@@ -107,6 +107,17 @@ int main(int argc, char* argv[]) {
} }
ClickButton(ygo::mainGame->btnDeckEdit); ClickButton(ygo::mainGame->btnDeckEdit);
break; break;
}
} else if(!strcmp(argv[i], "-c")) { // Create host
exit_on_return = !keep_on_return;
ygo::mainGame->HideElement(ygo::mainGame->wMainMenu);
ClickButton(ygo::mainGame->btnHostConfirm);
break;
} else if(!strcmp(argv[i], "-j")) { // Join host
exit_on_return = !keep_on_return;
ClickButton(ygo::mainGame->btnLanMode);
ClickButton(ygo::mainGame->btnJoinHost);
break;
} else if(!strcmp(argv[i], "-r")) { // Replay } else if(!strcmp(argv[i], "-r")) { // Replay
exit_on_return = !keep_on_return; exit_on_return = !keep_on_return;
if(i < argc) { if(i < argc) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment