diff --git a/deck_reader/src/main.c b/deck_reader/src/main.c index e1a27af..f47e3ab 100644 --- a/deck_reader/src/main.c +++ b/deck_reader/src/main.c @@ -66,6 +66,23 @@ void clear_stdin() { } } +void version() { + const char* version_string = "1.1.1"; + const char* url = "https://github.com/Torphedo/Esper-RE"; + printf("deck_reader (Esper-RE tools) v%s\n", version_string); + printf("Open-source @ %s\n", url); + printf("Written by Torphedo\n"); +} + +void help() { + LOG_MSG(info, "Drag-and-drop a file onto the program, or use it on command-line:\n"); + printf("\tdeck_reader [deck file]\n"); + LOG_MSG(info, "Commands:\n"); + printf("\t1-8: edit a property of the deck (each field is numbered on-screen)\n"); + printf("\tw: overwrite the deck file with the new data\n"); + printf("\tq: quit\n"); +} + int main(int argc, char** argv) { enable_win_ansi(); // Allow ANSI escape codes on Windows if (argc == 1) { @@ -73,6 +90,13 @@ int main(int argc, char** argv) { pause(); // Make the message visible to people who double-click the EXE return 1; } + if (strcmp(argv[1], "--help") == 0) { + help(); + return 0; + } else if (strcmp(argv[1], "--version") == 0) { + version(); + return 0; + } char* filepath = argv[1]; deck d = {0};