MCPcopy Create free account
hub / github.com/crossuo/crossuo / InitCli

Function InitCli

src/Main.cpp:33–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31po::parser g_cli;
32
33static bool InitCli(int argc, char *argv[])
34{
35 g_cli["dump-uop"].type(po::string).description("Dump information about a UOP file");
36 g_cli["headless"].description("Headless mode, no window is created");
37 g_cli["nocrypt"].description("Disable network cryptography");
38 g_cli["help"].abbreviation('h').description("print this help screen").callback([&] {
39 std::cout << g_cli << '\n';
40 });
41
42 // xuolauncher
43 g_cli["host"].abbreviation('s').type(po::string).description("LoginServer address");
44 g_cli["port"]
45 .abbreviation('p')
46 .type(po::u32)
47 .description("LoginServer port, defaults to 2593")
48 .fallback(2593);
49 g_cli["login"].abbreviation('l').type(po::string).description("Account username/login");
50 g_cli["password"]
51 .abbreviation('w')
52 .type(po::string)
53 .description("Account password")
54 .fallback("");
55 g_cli["savepassword"].type(po::u32).description(
56 "Force saving the password in crossuo.cfg (0 to remove, 1 to save)");
57
58 g_cli["autologin"].type(po::u32).description("1 to log in automatically");
59 g_cli["character"].type(po::string).description("When using auto login, use this character");
60 g_cli["fastlogin"].type(po::u32).description("1 to do a fast login");
61
62 g_cli["proxy-host"]
63 .type(po::string)
64 .description("Use proxy, host address. Requires 'proxy-port'");
65 g_cli["proxy-port"].type(po::u32).description("Proxy port to use with 'proxy-host'");
66 g_cli["proxy-user"].type(po::string).description("Proxy user");
67 g_cli["proxy-password"].type(po::string).description("Proxy password");
68 g_cli["indirect-rendering"].description("uses indirect rendering pipeline");
69 g_cli["quiet"]
70 .abbreviation('q')
71 .description("Disable logging (almost) completely")
72 .callback([&] { g_LogEnabled = eLogSystem::LogSystemNone; });
73
74 // vars
75 g_cli["DisableRenderGame"].description("disable game canvas rendering");
76
77 g_cli["config"]
78 .abbreviation('c')
79 .type(po::string)
80 .description("Use a different configuration file");
81 g_cli(argc, argv);
82
83 g_var_DisableRenderGame = g_cli["DisableRenderGame"].was_set();
84
85 return g_cli["help"].size() == 0;
86}
87
88RenderCmdList *g_renderCmdList = nullptr;
89static void *s_renderCmdListData = nullptr;

Callers 1

mainFunction · 0.85

Calls 2

was_setMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected