rre: add -u command line option

FossilOrigin-Name: 56a0437f8913f2f670fc6244e102d23f608a40f67c0e93d66bcc471a2ce43555
This commit is contained in:
crc 2019-01-22 14:35:31 +00:00
parent 356a110ada
commit 26bee34006
2 changed files with 7 additions and 0 deletions

View file

@ -29,6 +29,8 @@
### retro
- add random number generator
- add `-u filename` startup parameter to allow selection of
image file
### retro-compiler

View file

@ -402,6 +402,8 @@ void help(char *exename) {
printf(" Suppress the 'ok' prompt and keyboard echo in interactive mode\n\n");
printf(" -f filename\n");
printf(" Run the contents of the specified file\n\n");
printf(" -u filename\n");
printf(" Use the image in the specified file instead of the internal one\n\n");
printf(" -t\n");
printf(" Run tests (in ``` blocks) in any loaded files\n\n");
}
@ -484,6 +486,9 @@ int main(int argc, char **argv) {
files[fsp] = argv[i + 1];
fsp++;
i++;
} else if (strcmp(argv[i], "-u") == 0) {
i++;
ngaLoadImage(argv[i]);
} else if (strcmp(argv[i], "-t") == 0) {
modes[FLAG_RUN_TESTS] = 1;
run_tests = 1;