From 0e143e393d99ebb00cb14ffaa4c50efeec3729f1 Mon Sep 17 00:00:00 2001 From: Wiimm Date: Fri, 16 Dec 2022 16:02:51 +0100 Subject: SZS v2.31a --- project/src/ui/gen-ui.c | 5 +++++ project/src/ui/tab-wimgt.inc | 15 ++++++++++----- project/src/ui/tab-wszst.inc | 2 +- project/src/ui/ui-wimgt.c | 24 ++++++++++++++++++------ project/src/ui/ui-wszst.c | 2 +- project/src/ui/ui.def | 26 +++++++++++++++++++------- 6 files changed, 54 insertions(+), 20 deletions(-) (limited to 'project/src/ui') diff --git a/project/src/ui/gen-ui.c b/project/src/ui/gen-ui.c index 40a35a7..618fdeb 100644 --- a/project/src/ui/gen-ui.c +++ b/project/src/ui/gen-ui.c @@ -161,6 +161,11 @@ bool DefineIntVar ( VarMap_t * vm, ccp varname, int value ) { return false; } "If set, print the global search list too." \ " If set twice, print the auto-add search list too." +#define GENERIC_IMAGE(src) \ + "If " src " starts with colon (@:@), then it may be a generic image" \ + " instead of a real file." \ + " See https://szs.wiimm.de/doc/genericimg for details." + // /////////////////////////////////////////////////////////////////////////////// /////////////// the info table /////////////// diff --git a/project/src/ui/tab-wimgt.inc b/project/src/ui/tab-wimgt.inc index 62844b8..656387b 100644 --- a/project/src/ui/tab-wimgt.inc +++ b/project/src/ui/tab-wimgt.inc @@ -115,19 +115,22 @@ { T_DEF_CMD, "DECODE", "DECODE|DEC", "wimgt DECODE [source]...", "Decode (export) the entered image files into PNG files." - " The default destination is @'%P/%F.png'@." }, + " The default destination is @'%P/%F.png'@." + " " GENERIC_IMAGE("SOURCE") }, { T_DEF_CMD, "ENCODE", "ENCODE|ENC", "wimgt ENCODE [source]...", "Encode (import) the entered PNG files and convert them to" " to an internal image format (TPL, TEX, BREFT)." - " The default destination is @'%P/%N'@ (removed extension)." }, + " The default destination is @'%P/%N'@ (removed extension)." + " " GENERIC_IMAGE("SOURCE") }, { T_DEF_CMD, "CONVERT", "CONVERT|CV", "wimgt CONVERT [source]...", "Convert the entered image files into new file and image formats." " The old file is replaced by the new one." - " The difference to {ENCODE} is only the default file name handling." }, + " The difference to {ENCODE} is only the default file name handling." + " " GENERIC_IMAGE("SOURCE") }, { T_DEF_CMD, "COPY", "COPY|CP", "wimgt COPY source dest\n" @@ -140,7 +143,8 @@ " The default destination file format is selected by scanning the" " file extension of the destination." " Option --transform may override this." - " Option --overwrite is set implicitly." }, + " Option --overwrite is set implicitly." + "\n " GENERIC_IMAGE("SOURCE") }, { T_SEP_CMD, 0,0,0,0 }, //----- separator ----- @@ -354,7 +358,8 @@ " The default is @VCENTER.HCENTER.MIX.LEAVE@" " or in short form @V.H.MX.LV@." " If this option is used multiple times all patch files" - " will be used in the entered order." }, + " will be used in the entered order." + "\n " GENERIC_IMAGE("FILE") }, { T_SEP_OPT, 0,0,0,0 }, //----- separator ----- diff --git a/project/src/ui/tab-wszst.inc b/project/src/ui/tab-wszst.inc index ef9292c..6a90789 100644 --- a/project/src/ui/tab-wszst.inc +++ b/project/src/ui/tab-wszst.inc @@ -1848,7 +1848,7 @@ " If @DEST@ is empty no transformation is done for the source." " Examples: '@TPL@' or '@GRAY@' or '@BTI.IA8@' or '@TPL.I4+I8=IA8,TEX=,CMPR@'" "\n " - " @SRC@ and @DEST@ are tuple of file, image and palette formats" + " @SRC@ and @DEST@ are tuples of file, image and palette formats" " and of 2 more attributes. All parts are optional and separated" " by points, the order is irrelevant." "\n " diff --git a/project/src/ui/ui-wimgt.c b/project/src/ui/ui-wimgt.c index 3b86509..6dff364 100644 --- a/project/src/ui/ui-wimgt.c +++ b/project/src/ui/ui-wimgt.c @@ -218,7 +218,10 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " mode and SHRINK (SH), GROW (GR) and LEAVE (LV) as image size mode.\n" " Abbreviations are allowed. The default is VCENTER.HCENTER.MIX.LEAVE" " or in short form V.H.MX.LV. If this option is used multiple times" - " all patch files will be used in the entered order." + " all patch files will be used in the entered order.\n" + " If FILE starts with colon (:), then it may be a generic image" + " instead of a real file. See https://szs.wiimm.de/doc/genericimg for" + " details." }, { OPT_TRANSFORM, false, false, false, false, true, 'x', "transform", @@ -229,7 +232,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " for all source formats. This makes only sense as last rule. If DEST" " is empty no transformation is done for the source. Examples: 'TPL'" " or 'GRAY' or 'BTI.IA8' or 'TPL.I4+I8=IA8,TEX=,CMPR'\n" - " SRC and DEST are tuple of file, image and palette formats and of 2" + " SRC and DEST are tuples of file, image and palette formats and of 2" " more attributes. All parts are optional and separated by points, the" " order is irrelevant.\n" " Allowed file formats are: TPL, TEX, BTI, BREFT-IMG (=BTIMG), PNG" @@ -1454,7 +1457,9 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = "DEC", "wimgt DECODE [source]...", "Decode (export) the entered image files into PNG files. The default" - " destination is '%P/%F.png'.", + " destination is '%P/%F.png'. If SOURCE starts with colon (:), then it" + " may be a generic image instead of a real file. See" + " https://szs.wiimm.de/doc/genericimg for details.", 0, 20, option_tab_cmd_DECODE, @@ -1470,7 +1475,9 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = "wimgt ENCODE [source]...", "Encode (import) the entered PNG files and convert them to to an" " internal image format (TPL, TEX, BREFT). The default destination is" - " '%P/%N' (removed extension).", + " '%P/%N' (removed extension). If SOURCE starts with colon (:), then" + " it may be a generic image instead of a real file. See" + " https://szs.wiimm.de/doc/genericimg for details.", 0, 21, option_tab_cmd_ENCODE, @@ -1486,7 +1493,9 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = "wimgt CONVERT [source]...", "Convert the entered image files into new file and image formats. The" " old file is replaced by the new one. The difference to ENCODE is" - " only the default file name handling.", + " only the default file name handling. If SOURCE starts with colon" + " (:), then it may be a generic image instead of a real file. See" + " https://szs.wiimm.de/doc/genericimg for details.", 0, 21, option_tab_cmd_CONVERT, @@ -1507,7 +1516,10 @@ static const InfoCommand_t CommandInfo[CMD__N+1] = " This is an alternative for the ENCODE and DECODE commands. The" " default destination file format is selected by scanning the file" " extension of the destination. Option --transform may override this." - " Option --overwrite is set implicitly.", + " Option --overwrite is set implicitly.\n" + " If SOURCE starts with colon (:), then it may be a generic image" + " instead of a real file. See https://szs.wiimm.de/doc/genericimg for" + " details.", 0, 21, option_tab_cmd_COPY, diff --git a/project/src/ui/ui-wszst.c b/project/src/ui/ui-wszst.c index f35eba4..66a31d5 100644 --- a/project/src/ui/ui-wszst.c +++ b/project/src/ui/ui-wszst.c @@ -677,7 +677,7 @@ static const InfoOption_t OptionInfo[OPT__N_TOTAL+1] = " for all source formats. This makes only sense as last rule. If DEST" " is empty no transformation is done for the source. Examples: 'TPL'" " or 'GRAY' or 'BTI.IA8' or 'TPL.I4+I8=IA8,TEX=,CMPR'\n" - " SRC and DEST are tuple of file, image and palette formats and of 2" + " SRC and DEST are tuples of file, image and palette formats and of 2" " more attributes. All parts are optional and separated by points, the" " order is irrelevant.\n" " Allowed file formats are: TPL, TEX, BTI, BREFT-IMG (=BTIMG), PNG" diff --git a/project/src/ui/ui.def b/project/src/ui/ui.def index 9492806..d1c5e43 100644 --- a/project/src/ui/ui.def +++ b/project/src/ui/ui.def @@ -1522,7 +1522,7 @@ " rule. If @DEST@ is empty no transformation is done for the source." \ " Examples: '@TPL@' or '@GRAY@' or '@BTI.IA8@' or" \ " '@TPL.I4+I8=IA8,TEX=,CMPR@'\n" \ - " @SRC@ and @DEST@ are tuple of file, image and palette formats and" \ + " @SRC@ and @DEST@ are tuples of file, image and palette formats and" \ " of 2 more attributes. All parts are optional and separated by" \ " points, the order is irrelevant.\n" \ " Allowed file formats are: @TPL, TEX, BTI, BREFT-IMG (=BTIMG), PNG@" \ @@ -14505,19 +14505,25 @@ #:def_cmd( "DECODE", "DECODE|DEC", \ "wimgt DECODE [source]...", \ "Decode (export) the entered image files into PNG files. The default" \ - " destination is @'%P/%F.png'@." ) + " destination is @'%P/%F.png'@. If SOURCE starts with colon (@:@)," \ + " then it may be a generic image instead of a real file. See" \ + " https://szs.wiimm.de/doc/genericimg for details." ) #:def_cmd( "ENCODE", "ENCODE|ENC", \ "wimgt ENCODE [source]...", \ "Encode (import) the entered PNG files and convert them to to an" \ " internal image format (TPL, TEX, BREFT). The default destination is" \ - " @'%P/%N'@ (removed extension)." ) + " @'%P/%N'@ (removed extension). If SOURCE starts with colon (@:@)," \ + " then it may be a generic image instead of a real file. See" \ + " https://szs.wiimm.de/doc/genericimg for details." ) #:def_cmd( "CONVERT", "CONVERT|CV", \ "wimgt CONVERT [source]...", \ "Convert the entered image files into new file and image formats. The" \ " old file is replaced by the new one. The difference to {ENCODE} is" \ - " only the default file name handling." ) + " only the default file name handling. If SOURCE starts with colon" \ + " (@:@), then it may be a generic image instead of a real file. See" \ + " https://szs.wiimm.de/doc/genericimg for details." ) #:def_cmd( "COPY", "COPY|CP", \ "wimgt COPY source dest\n" \ @@ -14528,7 +14534,10 @@ " This is an alternative for the ENCODE and DECODE commands. The" \ " default destination file format is selected by scanning the file" \ " extension of the destination. Option --transform may override this." \ - " Option --overwrite is set implicitly." ) + " Option --overwrite is set implicitly.\n" \ + " If SOURCE starts with colon (@:@), then it may be a generic image" \ + " instead of a real file. See https://szs.wiimm.de/doc/genericimg for" \ + " details." ) #:def_opt( "VERSION", "V|version", "G", \ "", \ @@ -14844,7 +14853,10 @@ " Abbreviations are allowed. The default is" \ " @VCENTER.HCENTER.MIX.LEAVE@ or in short form @V.H.MX.LV@. If this" \ " option is used multiple times all patch files will be used in the" \ - " entered order." ) + " entered order.\n" \ + " If FILE starts with colon (@:@), then it may be a generic image" \ + " instead of a real file. See https://szs.wiimm.de/doc/genericimg for" \ + " details." ) #:def_opt( "TRANSFORM", "x|transform", "CP", \ "list", \ @@ -14855,7 +14867,7 @@ " rule. If @DEST@ is empty no transformation is done for the source." \ " Examples: '@TPL@' or '@GRAY@' or '@BTI.IA8@' or" \ " '@TPL.I4+I8=IA8,TEX=,CMPR@'\n" \ - " @SRC@ and @DEST@ are tuple of file, image and palette formats and" \ + " @SRC@ and @DEST@ are tuples of file, image and palette formats and" \ " of 2 more attributes. All parts are optional and separated by" \ " points, the order is irrelevant.\n" \ " Allowed file formats are: @TPL, TEX, BTI, BREFT-IMG (=BTIMG), PNG@" \ -- cgit v1.3.1