|
3 | 3 | #include <Tempest/Log> |
4 | 4 | #include <Tempest/TextCodec> |
5 | 5 | #include <cstring> |
| 6 | +#include <cstdio> |
| 7 | +#include <cstdlib> |
6 | 8 | #include <cassert> |
7 | 9 |
|
8 | 10 | #if defined(__APPLE__) |
@@ -48,7 +50,33 @@ CommandLine::CommandLine(int argc, const char** argv) { |
48 | 50 | std::string_view mod; |
49 | 51 | for(int i=1;i<argc;++i) { |
50 | 52 | std::string_view arg = argv[i]; |
51 | | - if(arg.find("-game:")==0) { |
| 53 | + if(arg=="-h" || arg=="--help") { |
| 54 | + std::printf( |
| 55 | + "Usage: Gothic2Notr [options]\n" |
| 56 | + "\n" |
| 57 | + "Options:\n" |
| 58 | + " -g <path> Path to Gothic game data\n" |
| 59 | + " -game:<mod.ini> Load game modification\n" |
| 60 | + " -nomenu Skip main menu\n" |
| 61 | + " -devmode Enable marvin-mode\n" |
| 62 | + " -w <world.zen> Startup world (default: newworld.zen)\n" |
| 63 | + " -save q|<number> Load quick save or save slot\n" |
| 64 | + " -v, -validation Enable graphics validation layers\n" |
| 65 | + " -dx12 Force DirectX 12 (Windows only)\n" |
| 66 | + " -g1, -g2c, -g2 Assume Gothic 1/2 Classic/2 NotR\n" |
| 67 | + " -rt <0|1> Enable/disable ray-query\n" |
| 68 | + " -gi <0|1> Enable/disable ray-traced GI\n" |
| 69 | + " -ms <0|1> Enable/disable meshlets\n" |
| 70 | + " -aa <0-2> Anti-aliasing level\n" |
| 71 | + " -window Windowed mode\n" |
| 72 | + " -benchmark [ci] Run benchmark (ci: exit after)\n" |
| 73 | + " -h, --help Show this help\n" |
| 74 | + "\n" |
| 75 | + "See Gothic2Notr(6) man page for details.\n" |
| 76 | + ); |
| 77 | + std::exit(0); |
| 78 | + } |
| 79 | + else if(arg.find("-game:")==0) { |
52 | 80 | if(!mod.empty()) |
53 | 81 | Log::e("-game specified twice"); |
54 | 82 | mod = arg.substr(6); |
|
0 commit comments