Browse Source

CLI: have -s be --save instead of --scale; use -x for --scale.

master
Ben Kurtovic 2 years ago
parent
commit
829680032d
2 changed files with 7 additions and 7 deletions
  1. 3
    3
      README.md
  2. 4
    4
      src/config.c

+ 3
- 3
README.md View File

@@ -50,13 +50,13 @@ Add or symlink ROMs to `roms/` at your leisure. Note that they must end in
50 50
 `.gg` or `.bin` to be auto-detected.
51 51
 
52 52
 Add `--fullscreen` (`-f`) to enable fullscreen mode, or `--scale <n>`
53
-(`-s <n>`) to scale the game screen by an integer factor in windowed mode (this
53
+(`-x <n>`) to scale the game screen by an integer factor in windowed mode (this
54 54
 only sets the starting configuration; the window should be resizeable).
55 55
 
56 56
 By default, crater will save cartridge RAM ("battery saves"; these are distinct
57 57
 from save states, which are not yet supported) to a file named `<rom>.sav`,
58 58
 where `<rom>` is the path to the ROM file. You can set a custom save location
59
-with `--save <path>` or disable saving entirely with `--no-save`.
59
+with `--save <path>` (`-s <path>`) or disable saving entirely with `--no-save`.
60 60
 
61 61
 Add `--debug` (`-g`) to show logging information while running. Pass it twice
62 62
 (`-gg`) to show more detailed logs, including an emulator trace.
@@ -94,7 +94,7 @@ Status
94 94
 
95 95
 The emulator is almost fully functional, lacking only audio support, a few
96 96
 uncommon CPU instructions, and some advanced graphics features. Most games are
97
-playable with only minor bugs. Future goals include save states and a more
97
+playable with only minor bugs. Future goals include full save states and a more
98 98
 sophisticated debugging mode.
99 99
 
100 100
 The assembler is complete. Future goals include more documentation, macros, and

+ 4
- 4
src/config.c View File

@@ -37,9 +37,9 @@ static void print_help(const char *arg1)
37 37
 "advanced options:\n"
38 38
 "    -g, --debug       show logging information while running; add twice (-gg)\n"
39 39
 "                      to show more detailed logs, including an emulator trace\n"
40
-"    -s, --scale <n>   scale the game screen by an integer factor\n"
40
+"    -x, --scale <n>   scale the game screen by an integer factor\n"
41 41
 "                      (applies to windowed mode only; defaults to 4)\n"
42
-"    -b, --save <path> save cartridge RAM (\"battery save\") to the given file\n"
42
+"    -s, --save <path> save cartridge RAM (\"battery save\") to the given file\n"
43 43
 "                      (defaults to <rom_path>.sav)\n"
44 44
 "    -n, --no-save     disable saving cartridge RAM entirely\n"
45 45
 "    -a, --assemble <in> [<out>]\n"
@@ -230,7 +230,7 @@ static int parse_opt_arg(Config *config, Arguments *args, const char *arg)
230 230
     else if (arg_check(arg, "f", "fullscreen")) {
231 231
         config->fullscreen = true;
232 232
     }
233
-    else if (arg_check(arg, "s", "scale")) {
233
+    else if (arg_check(arg, "x", "scale")) {
234 234
         const char *next = consume_next(args);
235 235
         if (!next) {
236 236
             ERROR("the scale option requires an argument")
@@ -243,7 +243,7 @@ static int parse_opt_arg(Config *config, Arguments *args, const char *arg)
243 243
         }
244 244
         config->scale = scale;
245 245
     }
246
-    else if (arg_check(arg, "b", "save")) {
246
+    else if (arg_check(arg, "s", "save")) {
247 247
         const char *next = consume_next(args);
248 248
         if (!next) {
249 249
             ERROR("the save option requires an argument")

Loading…
Cancel
Save