From d0eb0b41da335f373d6b21eda21a437e39241b87 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 30 May 2021 22:59:54 +0200 Subject: [PATCH] renamed command to create level sketch images --- src/files.c | 4 ++-- src/init.c | 12 ++++++------ src/main.c | 2 +- src/main.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/files.c b/src/files.c index b43b89c8..40d7fb73 100644 --- a/src/files.c +++ b/src/files.c @@ -13086,8 +13086,8 @@ void CreateLevelSketchImages(void) sprintf(basename1, "%04d.bmp", i); sprintf(basename2, "%04ds.bmp", i); - filename1 = getPath2(global.create_images_dir, basename1); - filename2 = getPath2(global.create_images_dir, basename2); + filename1 = getPath2(global.create_sketch_images_dir, basename1); + filename2 = getPath2(global.create_sketch_images_dir, basename2); DrawSizedElement(0, 0, element, TILESIZE); BlitBitmap(drawto, bitmap1, SX, SY, TILEX, TILEY, 0, 0); diff --git a/src/init.c b/src/init.c index 5888e26f..528404b7 100644 --- a/src/init.c +++ b/src/init.c @@ -4905,7 +4905,7 @@ static void InitGlobal(void) global.convert_leveldir = NULL; global.dumplevel_leveldir = NULL; global.dumptape_leveldir = NULL; - global.create_images_dir = NULL; + global.create_sketch_images_dir = NULL; global.frames_per_second = 0; global.show_frames_per_second = FALSE; @@ -5189,13 +5189,13 @@ static void Execute_Command(char *command) program.headless = TRUE; } - else if (strPrefix(command, "create images ")) + else if (strPrefix(command, "create sketch images ")) { - global.create_images_dir = getStringCopy(&command[14]); + global.create_sketch_images_dir = getStringCopy(&command[21]); - if (access(global.create_images_dir, W_OK) != 0) + if (access(global.create_sketch_images_dir, W_OK) != 0) Fail("image target directory '%s' not found or not writable", - global.create_images_dir); + global.create_sketch_images_dir); } else if (strPrefix(command, "create CE image ")) { @@ -6294,7 +6294,7 @@ void OpenAll(void) DumpTapes(); return; } - else if (global.create_images_dir) + else if (global.create_sketch_images_dir) { CreateLevelSketchImages(); return; diff --git a/src/main.c b/src/main.c index 49f32600..dbc5ff1a 100644 --- a/src/main.c +++ b/src/main.c @@ -7641,7 +7641,7 @@ static void print_usage(void) " \"autofix LEVELDIR [NR ...]\" test and fix tapes for LEVELDIR\n" " \"patch tapes MODE LEVELDIR [NR]\" patch level tapes for LEVELDIR\n" " \"convert LEVELDIR [NR]\" convert levels in LEVELDIR\n" - " \"create images DIRECTORY\" write BMP images to DIRECTORY\n" + " \"create sketch images DIRECTORY\" write BMP images to DIRECTORY\n" " \"create CE image DIRECTORY\" write BMP image to DIRECTORY\n" "\n", program.command_basename); diff --git a/src/main.h b/src/main.h index fe3e025c..a513aaa2 100644 --- a/src/main.h +++ b/src/main.h @@ -3279,7 +3279,7 @@ struct GlobalInfo char *dumptape_leveldir; int dumptape_level_nr; - char *create_images_dir; + char *create_sketch_images_dir; int num_toons; -- 2.34.1