48 lines
895 B
D
48 lines
895 B
D
import std.stdio;
|
|
|
|
import cm3d2;
|
|
|
|
void main(string[] args)
|
|
{
|
|
if (args.length < 2)
|
|
{
|
|
help(args[0]);
|
|
return;
|
|
}
|
|
|
|
switch (args[1])
|
|
{
|
|
case "help":
|
|
case "-h":
|
|
case "--help":
|
|
help(args[0]);
|
|
break;
|
|
case "menu-to-sdl":
|
|
throw new Exception("Not implemented yet");
|
|
case "sdl-to-menu":
|
|
throw new Exception("Not implemented yet");
|
|
default:
|
|
writeln("Unknown option '" ~ args[1] ~ "'");
|
|
writeln();
|
|
goto case "help";
|
|
}
|
|
}
|
|
|
|
void help(string toolPath)
|
|
{
|
|
writeln("Usage: " ~ toolPath ~ " <command>");
|
|
writeln();
|
|
|
|
void showCommandUsage(string command, string description)
|
|
{
|
|
writeln(" " ~ toolPath ~ " " ~ command);
|
|
writeln(" " ~ description);
|
|
}
|
|
|
|
showCommandUsage("menu-to-sdl", "Convert .menu to SDL");
|
|
showCommandUsage("sdl-to-menu", "Convert SDL to .menu");
|
|
|
|
writeln();
|
|
writeln("Reads input from stdin and writes output to stdout.");
|
|
}
|